Skip to content

Instantly share code, notes, and snippets.

View gokul-uf's full-sized avatar
🎯
Focusing

Gokula Krishnan gokul-uf

🎯
Focusing
View GitHub Profile
@gokul-uf
gokul-uf / chain_length.txt
Created March 26, 2016 00:06
Full output of the modified local_subtensor_merge
================================================
Current node:
Subtensor{int64}(Subtensor{:int64:}.0, Constant{0})
Chain Length: 2
================================================
Current node:
Subtensor{int64}(Subtensor{:int64:}.0, Constant{1})
Chain Length: 2
================================================
Current node:
@gokul-uf
gokul-uf / cleaned_lightcurve.ipynb
Created March 24, 2016 21:09
Solution for the toy problem in Coders for Habitability (McGill Space Institute GSoC 2016)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gokul-uf
gokul-uf / Profiler Output without local_subtensor_merge
Created March 24, 2016 20:41
Profiler Output without local_subtensor_merge on GoogleNet using Lasagne
/home/gokul/Theano/theano/compile/pfunc.py:479: UserWarning: config.profile_optimizer requires config.profile to be set to True as well
output_keys=output_keys)
Using gpu device 0: GeForce GT 750M (CNMeM is disabled, CuDNN 4004)
/home/gokul/Theano/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
Function profiling
==================
Message: lasagne_googlenet.py:135
Time in 0 calls to Function.__call__: 0.000000e+00s
Total compile time: 3.531861e+02s
@gokul-uf
gokul-uf / Profiler Output
Last active March 24, 2016 02:59
Profiler output for theano GSoC proposal
/home/gokul/Theano/theano/compile/pfunc.py:479: UserWarning: config.profile_optimizer requires config.profile to be set to True as well
output_keys=output_keys)
Using gpu device 0: GeForce GT 750M (CNMeM is disabled, CuDNN 4004)
/home/gokul/Theano/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
Function profiling
==================
Message: lasagne_googlenet.py:132
Time in 0 calls to Function.__call__: 0.000000e+00s
Total compile time: 3.520045e+02s
@gokul-uf
gokul-uf / oop.py
Last active December 28, 2015 01:19
OOP in Python: Gist for my blogpost at gokul-uf.github.io
'''References:
1. https://developer.mozilla.org/en-US/Learn/Python/Quickly_Learn_Object_Oriented_Programming#start
2. http://stackoverflow.com/questions/576169/understanding-python-super-with-init-methods
3. http://www.artima.com/weblogs/viewpost.jsp?thread=236275
4. https://docs.python.org/2/glossary.html#term-new-style-class
'''
class A:
#public attributes
intAttribute = 0

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs