git fetch origin pull/1234/head:pr-1234
Here:
1234 is the PR number.
pr-1234 is your local branch name.
| import requests | |
| class DockerAPI(object): | |
| """ Helper for using Fleet API to deploy services to a CoreOS cluster.""" | |
| def __init__(self, docker_endpoint): | |
| self.docker_endpoint = docker_endpoint | |
| def containers(self): | |
| """ Return a list of pairs with container's names and ids """ |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| #!/bin/bash | |
| # Run this | |
| docker run -it -p 8888:8888 b.gcr.io/tensorflow/tensorflow-full /run_jupyter.sh --notebook-dir=/tensorflow/tensorflow/tools/docker/notebooks/ | |
| # Go to http://localhost:8888 |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Activation | |
| from keras.optimizers import SGD | |
| import numpy as np | |
| from keras.utils import np_utils | |
| # Create a random matrix with 1000 rows (data points) and 15 columns (features) | |
| train_rows = 1000 | |
| X_train = np.random.rand(train_rows, 15) |
| """ | |
| This is a batched LSTM forward and backward pass | |
| """ | |
| import numpy as np | |
| import code | |
| class LSTM: | |
| @staticmethod | |
| def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
| #!/bin/bash | |
| wget -qO- http://ipecho.net/plain ; echo |
| #include "stdio.h" | |
| // Compute the solution x to x*n % m == 1 using the Generalized Euclidean Agorithm | |
| int inverse(int n, int m){ | |
| int t0 = 0, t1 = 1; | |
| int s0 = 1, s1 = 0; | |
| int r = m - 1; // Just to get started | |
| int a = m; | |
| int b = n; | |
| int q, s, t; |
| def character(i) | |
| return i < 10 ? (i + 48).chr : (i + 87).chr | |
| end | |
| def generate(n) | |
| i1 = n % 36 | |
| i3 = n/(36*36) | |
| i2 = n/36 - i3*36 | |
| return "#{character(i3)}#{character(i2)}#{character(i1)}" | |
| end |
git fetch origin pull/1234/head:pr-1234
Here:
1234 is the PR number.
pr-1234 is your local branch name.
| FROM ubuntu:14.04 | |
| RUN apt-get update | |
| # Install curl (for downloading pip) and other dependencies | |
| RUN apt-get install -y curl clang cmake git python2.7-dev python2.7 python-numpy | |
| # Install pip | |
| RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7 |