brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
| Vagrant::Config.run do |config| | |
| config.vm.define :pythondata do |pythondata_config| | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| pythondata_config.vm.box = "precise64" | |
| # The url from where the 'config.vm.box' box will be fetched if it | |
| # doesn't already exist on the user's system. | |
| pythondata_config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| # Forward a port from the guest to the host, which allows for outside |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
| #!/bin/bash | |
| sudo pip install -Iv http://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz googlecl |
| gcloud auth | |
| gcloud auth activate-refresh-token | |
| gcloud auth activate-service-account | |
| gcloud auth git-helper | |
| gcloud auth list | |
| gcloud auth login | |
| gcloud auth print-access-token | |
| gcloud auth print-refresh-token | |
| gcloud auth revoke | |
| gcloud components |
| import sys | |
| import os | |
| import cv2 | |
| import numpy as np | |
| import tensorflow as tf | |
| sys.path.append("..") | |
| from object_detection.utils import label_map_util |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |
| curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
| --header 'Accept: application/vnd.github.v3.raw' \ | |
| --remote-name \ | |
| --location https://api.github.com/repos/owner/repo/contents/path | |
| # Example... | |
| TOKEN="INSERTACCESSTOKENHERE" | |
| OWNER="BBC-News" | |
| REPO="responsive-news" |
| import warnings | |
| warnings.filterwarnings('ignore') |
| import os | |
| from PIL import Image | |
| ''' | |
| I searched high and low for solutions to the "extract animated GIF frames in Python" | |
| problem, and after much trial and error came up with the following solution based | |
| on several partial examples around the web (mostly Stack Overflow). | |
| There are two pitfalls that aren't often mentioned when dealing with animated GIFs - |