Skip to content

Instantly share code, notes, and snippets.

Avatar

Hyuck Kang brainstormot

View GitHub Profile
@brainstormot
brainstormot / pg-pong.py
Created Jul 13, 2016 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
View pg-pong.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@brainstormot
brainstormot / rbm_MNIST_test.py
Created Feb 14, 2017 — forked from myme5261314/rbm_MNIST_test.py
RBM procedure using tensorflow
View rbm_MNIST_test.py
import tensorflow as tf
import numpy as np
import input_data
import Image
from util import tile_raster_images
def sample_prob(probs):
return tf.nn.relu(
tf.sign(
@brainstormot
brainstormot / rbm_after_refactor.py
Created Feb 14, 2017 — forked from gabrieleangeletti/rbm_after_refactor.py
Restricted Boltzmann Machine implementation in TensorFlow, before and after code refactoring. Blog post: http://blackecho.github.io/blog/programming/2016/02/21/refactoring-rbm-tensor-flow-implementation.html
View rbm_after_refactor.py
import tensorflow as tf
import numpy as np
import os
import zconfig
import utils
class RBM(object):
@brainstormot
brainstormot / solarized-dark.xcs
Created May 19, 2017 — forked from ichaos/solarized-dark.xcs
xshell solarized dark color theme
View solarized-dark.xcs
[Solarized Dark]
text(bold)=839496
magenta(bold)=6c71c4
text=839496
white(bold)=fdf6e3
green=859900
red(bold)=cb4b16
green(bold)=586e75
black(bold)=073642
red=dc322f
View crawlingResultToCSV.py
import os
import csv
searchKeywords = ["P2P","금융"]
def main():
for dirname, dirnames, filenames in os.walk('.'):
for subdirname in dirnames:
if subdirname == "news":
print("in " + os.path.join(dirname, subdirname))