Skip to content

Instantly share code, notes, and snippets.

View jskDr's full-sized avatar

Sungjin Kim jskDr

View GitHub Profile
@jskDr
jskDr / reg_in_keras.py
Created August 26, 2016 14:34
Reguralization of a dense layer in Kreas
model = Sequential()
model.add(Dense( l[1], input_shape=(l[0],)))
for n_w_l in l[2:]:
model.add(Activation('relu'))
model.add(Dense( n_w_l, W_regularizer = l2(.01)))
return model
@jskDr
jskDr / keras_plot.ipynb
Created August 26, 2016 01:36
Plot hidden layers in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / tf_random_normal.py
Last active May 19, 2016 15:54
Tensoflow - Very simple example: normal random generation
init = tf.initialize_all_variables()
a = tf.random_normal([2, 2, 2, 2])
with tf.Session() as sess:
sess.run(init)
x = sess.run(a)
x
@jskDr
jskDr / skflow_example.ipynb
Last active April 10, 2016 12:22
Simple example of Skflow (Sklearn + Tensorflow)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / pyexecjs_performance.ipynb
Created March 2, 2016 23:00
Performance of PyExecJS (Javascript vs. Python Families)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / PyExexJS_example.ipynb
Last active December 25, 2015 15:28
A simple example of PyExecJS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jskDr
jskDr / jDataFrames.jl
Created October 27, 2015 03:28
Extension of Julia's DataFrames by James
# This code is for extension of DataFrames.
# By the extension, fingerprint can be loaded via string.
# Each fingerprint is a set of the binary integers in python.
# However, it can be not be loaded directly in Julia, which directly
# trainslate a binary integer string to big interger. It is automatic even if
# quoto mark is aded. Hence, "Julia" is added on a binary string as a prefix.
# By doing that, Julia can read them as a character string rather than a big integer value.
# bs2ba() transform binary string to binary array.
@jskDr
jskDr / powermethod.jl
Created October 18, 2015 22:52
Powermethod in Julia
tolerence = 1e-10
M = rand(2, 2)
#w0 = [1., 1]
#w = copy( w0)
w_org = [1, 1] / norm( [1, 1])
w_full = rand(2, 1)
w = w_full / norm( w_full)
@jskDr
jskDr / 곱셉.py
Created January 5, 2015 10:54
파이썬3가 지원하는 다국어 기능 검토
"""
파이썬3로 얼마 만큼 한글 코딩이 가능한지 알아본다.
"""
import random
무작위정수 = random.randint
쓰다 = print
범위 = range
지역변수들 = locals
@jskDr
jskDr / Snake
Created December 26, 2014 11:24
Snake code by Korean C programming
// 예제 프로그램 :
// 뱀 경기에서 화면관리를 위해 사용되는 절차를 정의한다.
// 화면을 80*60(가로*세로)단위로 관리한다.
뱀화면 단원 .
사용 뱀입력 .
사용 단말기 .
절차 시작점 ( ) .
절차 마무리 ( ) .