I loved this "recipe" from Andrej Karpathy. Read the whole thing at the source. I summarized the key points.
- Make sure to analyze the data
- Set up the end-to-end training/evaluation skeleton + get dumb baselines
- Overfit
- Regularize
- Tune
| """ | |
| This gist is intended to be loaded into a python notebook via wget. | |
| It is used to retrieve a secret from the google cloud. | |
| See https://cloud.google.com/secret-manager/docs/reference/libraries#client-libraries-install-python | |
| Usage: | |
| 1. !wget | |
| 2. !pip install google-cloud-secret-manager | |
| 3. import load_secret |
| # concat files but just keep header from first file | |
| awk ' | |
| FNR==1 && NR!=1 { while (/^header/) getline; } | |
| 1 {print} | |
| ' file*.txt >all.txt |
| import os | |
| GB1 = 1024*1024*1024 # 1GB | |
| size = 50 # desired size in GB | |
| with open('large_file', 'wb') as fout: | |
| for i in range(size + 1): | |
| fout.write(os.urandom(GB1)) |
A brief review of the last week or so can be a useful habit.
Add some regimen to make this weekly.
That review may include items such as these.
What was the most enjoyable work activity of the week?
What was the most boring or dreary?
| # from http://www.rackspace.com/knowledge_center/article/generate-a-csr-with-openssl | |
| # create key | |
| openssl genrsa -out ~/domain.com.ssl/domain.com.key 2048 | |
| # create csr | |
| openssl req -new -sha256 -key ~/domain.com.ssl/domain.com.key -out ~/domain.com.ssl/domain.com.csr |
| # Taken from http://flask.pocoo.org/snippets/57/ | |
| from flask import Flask | |
| app = Flask(__name__) | |
| @app.route('/', defaults={'path': ''}) | |
| @app.route('/<path:path>') | |
| def catch_all(path): | |
| return 'You want path: %s' % path | |
| if __name__ == '__main__': |