This file contains hidden or 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
from __future__ import print_function | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
import tensorflow as tf | |
x = tf.placeholder(tf.float32, [None, 784]) | |
W = tf.Variable(tf.zeros([784, 10])) |
This file contains hidden or 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
from __future__ import print_function | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
import tensorflow as tf | |
def weight_variable(shape): | |
initial = tf.truncated_normal(shape, stddev=0.1) | |
return tf.Variable(initial) |
This file contains hidden or 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
// -*- coding: utf-8 -*- | |
#include <iostream> | |
#include <fstream> | |
#include <memory> | |
#include <vector> | |
#include <cassert> | |
#include <cstdint> | |
#include <boost/iostreams/filtering_stream.hpp> | |
#include <boost/iostreams/filter/gzip.hpp> |
This file contains hidden or 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
from __future__ import print_function | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets('MNIST_data/', one_hot=True) | |
import tensorflow as tf | |
from tensorflow.python.framework.graph_util import convert_variables_to_constants | |
def train_and_save(): | |
x = tf.placeholder(tf.float32, [None, 784], name='x') |
This file contains hidden or 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
from __future__ import print_function | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets('MNIST_data', one_hot=True) | |
import tensorflow as tf | |
def import_graph_def(): | |
with open('trained_graph.pb', 'rb') as f: | |
graph_def = tf.GraphDef() |
This file contains hidden or 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 -eu | |
# -*- coding: utf-8 -*- | |
HEADER_DIR=/tmp/tensorflow/include | |
if [ ! -e $HEADER_DIR ]; | |
then | |
mkdir -p $HEADER_DIR | |
fi |
This file contains hidden or 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 | |
container_id=$1 | |
if [ -z $container_id ]; then | |
echo "usage: sudo docker-nsenter <container_id> [args ...]" | |
exit 1 | |
fi | |
target=`docker inspect --format '{{.State.Pid}}' $container_id` | |
nsenter --mount --uts --ipc --net --pid --target $target ${@:2} |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
PLAYER_URL='http://radiko.jp/player/swf/player_4.1.0.00.swf' | |
wget $PLAYER_URL -O player.swf | |
swfextract -b 14 -o authkey.png player.swf | |
rm -f player.swf |
This file contains hidden or 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
export PS1="-- \[\033[0;31m\]\u@\h \[\033[1;34m\]\w \[\033[0m\]-- \n> " | |
alias ls='ls -hF --color=tty' | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias less='less -r' # raw control characters | |
alias grep='grep --color' # show differences in colourx | |
alias ll='ls -l -A' # long list | |
alias la='ls -A' # all but . and .. |
This file contains hidden or 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
GSSAPIAuthentication no | |
AddressFamily inet | |
Compression yes | |
CompressionLevel 9 | |
ServerAliveInterval 100 | |
ForwardX11 yes | |
ForwardX11Trusted yes | |
ForwardAgent yes |
NewerOlder