Skip to content

Instantly share code, notes, and snippets.

View jskDr's full-sized avatar

Sungjin Kim jskDr

View GitHub Profile
@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)
@napsternxg
napsternxg / linearReg.py
Created July 31, 2015 16:22
Implementing linear regression in keras
"""
Author: Shubhanshu Mishra
Posted this on the keras issue tracker at: https://github.com/fchollet/keras/issues/108
Implementing a linear regression using Keras.
"""
from keras.models import Sequential
from keras.layers.core import Dense, Activation
model = Sequential()
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
#AlexNet with batch normalization in Keras
#input image is 224x224
model = Sequential()
model.add(Convolution2D(64, 3, 11, 11, border_mode='full'))
@falsetru
falsetru / main.py
Last active August 29, 2015 13:56
touchtracer
#!/usr/bin/kivy
import kivy
#kivy.require('1.0.6')
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.graphics import Color, Rectangle, Point, GraphicException
from kivy.clock import Clock
from kivy.logger import Logger
anonymous
anonymous / mywebserver.py
Created February 16, 2014 14:52
This is well known code for simple web-service using Python.
#############
# mywebserver.py
import BaseHTTPServer, SimpleHTTPServer, CGIHTTPServer
class myRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
def is_executable(self, path):
return self.is_python(path)
if __name__ == '__main__':
SimpleHTTPServer.test(myRequestHandler, BaseHTTPServer.HTTPServer)