I hereby claim:
- I am varokas on github.
- I am varokas (https://keybase.io/varokas) on keybase.
- I have a public key whose fingerprint is D830 E8A8 1AF7 53F8 AD23 8260 0701 C740 FB8D 24E9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| "body": "eyJ0ZXN0IjoiYm9keSJ9", | |
| "resource": "/{proxy+}", | |
| "path": "/path/to/resource", | |
| "httpMethod": "POST", | |
| "isBase64Encoded": true, | |
| "queryStringParameters": { | |
| "foo": "bar" | |
| }, | |
| "multiValueQueryStringParameters": { |
| -- Decompose Int to arrays of digits | |
| digits :: Integral a => a -> [a] | |
| digits x | |
| | x < 10 = [x] | |
| | otherwise = digits(x `div` 10) ++ [x `mod` 10] | |
| -- x to the 4th | |
| power4 x = x^4 | |
| -- What is asked |
| #!/usr/bin/python3 | |
| from collections import defaultdict | |
| import sys | |
| individual_indicator = "east" | |
| by_name = defaultdict(list) | |
| by_item = defaultdict(list) | |
| individual = defaultdict(list) |
| #!/bin/bash | |
| current_date=`date +%Y%m%d` | |
| mysql_backup_filename="mysql-"$current_date | |
| mysql_backup_filename_gz=$mysql_backup_filename".gz" | |
| content_backup_filename="content-"$current_date".tar.gz" | |
| tar -C /home/ubuntu -czf /home/ubuntu/$content_backup_filename ghost | |
| /usr/local/bin/docker-compose -f /home/ubuntu/docker-compose.yml exec db /usr/bin/mysqldump -u root --password=<some_password> ghost > /home/ubuntu/$mysql_backup_filename | |
| gzip -f /home/ubuntu/$mysql_backup_filename |
| www.<your_domain>.com | |
| reverse_proxy ghost:2368 |
| import json | |
| import numpy as np | |
| def hello(event, context): | |
| a = np.arange(10) | |
| response = { | |
| "statusCode": 200, | |
| "body": json.dumps({ "sum": int(np.sum(a)) }) |
| www.varokas.com | |
| reverse_proxy ghost:2368 |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| version: '3' | |
| services: | |
| jupyter: | |
| image: jupyter/pyspark-notebook:latest | |
| ports: | |
| - "8888:8888" | |
| - "4040:4040" | |
| volumes: | |
| - .:/home/jovyan | |
| environment: |