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
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 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 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/sh | |
# | |
# Startup script for the Supervisor server | |
# | |
# chkconfig: - 90 10 | |
# description: Supervisor is a client/server system that allows its users to \ | |
# monitor and control a number of processes on UNIX-like \ | |
# operating systems. | |
# | |
# processname: supervisord |
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 -eu | |
# -*- coding: utf-8 -*- | |
HEADER_DIR=/tmp/tensorflow/include | |
if [ ! -e $HEADER_DIR ]; | |
then | |
mkdir -p $HEADER_DIR | |
fi |
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
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 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/sh | |
# -*- coding: utf-8 -*- | |
IPTABLES=/sbin/iptables | |
SERVICE=/sbin/service | |
SSH_PORT=22 | |
$IPTABLES -F # すべてのチェインの内容を削除 | |
$IPTABLES -P INPUT ACCEPT # INPUTチェインのポリシーをACCEPTにする |
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
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 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 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 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
C:\cygwin\bin\bash.exe -c "/usr/bin/ssh-agent | /usr/bin/sed -e '/echo/d' | /usr/bin/cut -f 1 -d ';' | /usr/bin/tr '=' ' ' | while read line; do setx.exe $line; done;" |
NewerOlder