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
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) |
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
""" | |
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() |
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 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')) |
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
#!/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 |
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
############# | |
# 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) |