Keybase proof
I hereby claim:
- I am thouis on github.
- I am thouis (https://keybase.io/thouis) on keybase.
- I have a public key whose fingerprint is A4F6 3AF2 C0E4 8CAE 7501 2BDE 2904 0D09 3557 95A4
To claim this, I am signing this object:
import sys | |
import twitter | |
import time | |
# see https://python-twitter.readthedocs.io/en/latest/getting_started.html | |
api = twitter.Api(consumer_key=CONSUMER_KEY, | |
consumer_secret=CONSUMER_SECRET, | |
access_token_key=ACCESS_TOKEN, | |
access_token_secret=ACCESS_SECRET) |
I hereby claim:
To claim this, I am signing this object:
def depth_to_space(x, blocksize=2): | |
b, k, d, r, c = x.shape | |
r1 = x.reshape((b, k // (blocksize ** 2), blocksize, blocksize, d, r, c)) | |
r2 = r1.transpose(0, 1, 4, 5, 2, 6, 3) | |
return r2.reshape((b, k // (blocksize ** 2), d, r * blocksize, c * blocksize)) |
# coding=utf-8 | |
import numpy as np | |
import scipy.sparse as sparse | |
# Evaluation code courtesy of Juan Nunez-Iglesias, taken from | |
# https://github.com/janelia-flyem/gala/blob/master/gala/evaluate.py | |
def adapted_rand(seg, gt, all_stats=False): | |
"""Compute Adapted Rand error as defined by the SNEMI3D contest [1] |
import tensorflow as tf | |
from tensorflow.python import control_flow_ops | |
# from http://stackoverflow.com/a/34634291 | |
def batch_norm(x, n_out, phase_train, scope='bn', affine=True): | |
""" | |
Batch normalization on convolutional maps. | |
Args: | |
x: Tensor, 4D BHWD input maps | |
n_out: integer, depth of input maps |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
import sys | |
import h5py | |
import numpy as np | |
def pygame(h5, name, board, moves): | |
for idx in range(board.shape[0]): | |
for plane in range(board.shape[1]): | |
if plane < 44: | |
# different board orderings | |
f = board[idx, plane, ...].T[:, ::-1] |