Make sure there is at least one file in it (even just the README.md)
ssh-keygen -t rsa -C "your_email@example.com"
| # from the guide https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html | |
| # and from other resources found, trying to achieve a good classifier based on Inveption V3 pre-trained netfork | |
| from keras.applications.inception_v3 import InceptionV3 | |
| from keras.preprocessing import image | |
| from keras.models import Model | |
| from keras.layers import Dense, GlobalAveragePooling2D | |
| from keras.preprocessing.image import ImageDataGenerator | |
| from keras import backend as K | |
| from keras.callbacks import ModelCheckpoint |
Most recently tested on macOS Sierra (10.12.6)
curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py--user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.--user when installing modules; ie. pip install <package_name> --user| import flask | |
| import flask_login | |
| app = flask.Flask(__name__) | |
| app.secret_key = 'super secret string' # Change this! | |
| login_manager = flask_login.LoginManager() | |
| login_manager.init_app(app) | |
| # Our mock database. |
| # this original one uses values returned from 'brew info' | |
| brew list --formula | xargs -n1 -P8 -I {} \ | |
| sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \ | |
| sort -h -r -k2 - | column -t | |
| # faster alternative using 'du' | |
| du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h |
| from jinja2 import Template | |
| text = """ | |
| hi {{ name|default(other_name) }} | |
| """ | |
| template = Template(text) | |
| template.render(name="foo") # passing variables here to the text template if needed | |
| template.render(other_name="bar") |
| # -*- coding: utf-8 -*- | |
| import datetime | |
| def first_day_of_week(date): | |
| return date + datetime.timedelta(days = -date.weekday()) |