- https://cloud.google.com/ml-engine/docs/tensorflow/getting-started-training-prediction
- https://cloud.google.com/ml-engine/docs/tensorflow/data-prep
- https://github.com/GoogleCloudPlatform/cloudml-samples
- https://github.com/GoogleCloudPlatform/cloudml-samples/blob/master/sklearn/notebooks/Online%20Prediction%20with%20scikit-learn.ipynb
- https://cloud.google.com/ml-engine/docs/tensorflow/
- https://cloud.google.com/ml-engine/docs/tensorflow/trainer-considerations
- https://cloud.google.com/ml-engine/docs/v1/predict-request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"Aleutians East", | |
"Aleutians West (CA)", | |
"Anchorage Municipality", | |
"Bethel Census Area", | |
"Bristol Bay", | |
"Denali", | |
"Dillingham (CA)", | |
"Fairbanks North Star", | |
"Haines", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/Desktop/ScreenShots | |
defaults write com.apple.screencapture location ~/Desktop/ScreenShots/ | |
killall SystemUIServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo yum update -y | |
sudo yum install -y netstat git rubygems gcc kernel-devel make perl | |
sudo yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel maven | |
sudo gem install sass | |
cd /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_path(self): | |
min_char = 8 | |
max_char = 12 | |
max_lookups = 100 | |
character_choices = string.ascii_letters | |
for _ in range(max_lookups): | |
url_path = ( | |
"".join(choice(character_choices) for x | |
in range(randint(min_char, max_char)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update; | |
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" | |
apt-get update | |
apt-get install -y docker-ce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
// API key and country can go here. | |
var options = { | |
"key": "your-api-key-here", | |
"country": "US" | |
} | |
var duration = 500; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backup and restore databases | |
# Backup | |
pg_dump -h <orig db> -U <user> -Fc > data.backup | |
psql in to db... | |
$ drop schema public cascade; | |
$ \connect postgres | |
$ drop database <dbname>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# non-ternary; fails coverage | |
def _make_image_properties_from_pb(image_properties): | |
"""Create ``ImageProperties`` object from a protobuf response. | |
:type image_properties: :class:`~google.cloud.grpc.vision.v1.\ | |
image_annotator_pb2.ImagePropertiesAnnotation` | |
:param image_properties: Protobuf instance of | |
``ImagePropertiesAnnotation``. | |
:rtype: list |
NewerOlder