Skip to content

Instantly share code, notes, and snippets.

View kkweon's full-sized avatar

Mo Kweon kkweon

View GitHub Profile
@kkweon
kkweon / bn_cnn.ipynb
Created March 28, 2017 00:51
Batchnorm CNN Test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkweon
kkweon / mnist.ipynb
Last active March 30, 2017 23:05
MNIST Custom Drawing Test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkweon
kkweon / DQN.keras.py
Created April 1, 2017 21:49
DQN Keras Example
import numpy as np
import gym
import random
from collections import deque
from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape
from keras.layers.convolutional import Conv2D
from keras.models import Model
from keras import backend as K
@kkweon
kkweon / dqn.v2.keras.py
Created April 3, 2017 03:39
Python3 DQN Keras V2 CartPole
import numpy as np
import gym
import random
from collections import deque
from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape
from keras.layers.convolutional import Conv2D
from keras.models import Model
@kkweon
kkweon / A2C.py
Created April 5, 2017 00:02
A2C.py
"""
Actor-Critic Example
In this file, I will use abbreviations extensively
Here are examples:
s : state
a : action
r : reward
d : done
@kkweon
kkweon / A2C.ipynb
Last active April 9, 2017 04:21
Basic Actor Critic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkweon
kkweon / get_reddits.py
Created April 14, 2017 04:29
Reddit Scraper
"""
Reddit Scraper
Examples
----------
$ python get_reddits.py
"""
import requests
import bs4
@kkweon
kkweon / mnist.evaluation.ipynb
Created April 19, 2017 03:47
mnist.evaluation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We couldn’t find that file to show.
@kkweon
kkweon / cython_count.pyx
Last active May 1, 2017 19:45
counter vs dict
cpdef dict cython_count(list list_):
cdef dict result
cdef int i
cdef unicode word
cdef int end_index = len(list_)
result = {}
for i in range(end_index):
word = list_[i]