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 numpy import zeros, dot, exp, tanh, array, allclose | |
from numpy.random import randn | |
from copy import deepcopy | |
from time import time | |
from theano import tensor as T | |
from theano import function, shared, config, scan | |
FLOAT_PRECISION = config.floatX | |
class Network: |
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
import numpy | |
import theano | |
import theano.tensor as TT | |
# number of hidden units | |
n = 50 | |
# number of input units | |
nin = 5 | |
# number of output units | |
nout = 5 |
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 numpy import zeros, dot, exp, tanh, array, allclose | |
from numpy.random import randn | |
from copy import deepcopy | |
from time import time | |
from theano import tensor as T | |
from theano import function, shared, config | |
"""Flags: | |
export THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 |
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
ludwig@serv8:~/Theano$ theano-nose -v | |
/home/ludwig/Theano/theano/misc/pycuda_init.py:34: UserWarning: PyCUDA import failed in theano.misc.pycuda_init | |
warnings.warn("PyCUDA import failed in theano.misc.pycuda_init") | |
Using gpu device 0: GeForce GTX 670 | |
test_grad (theano.compile.tests.test_builders.T_OpFromGraph) ... ok | |
test_size_changes (theano.compile.tests.test_builders.T_OpFromGraph) ... ok | |
test_straightforward (theano.compile.tests.test_builders.T_OpFromGraph) ... ok | |
test_aliased_outputs_bad (theano.compile.tests.test_debugmode.Test_ViewMap) ... ok | |
test_aliased_outputs_ok (theano.compile.tests.test_debugmode.Test_ViewMap) ... ok | |
test_aliased_outputs_ok_output (theano.compile.tests.test_debugmode.Test_ViewMap) ... ok |
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
>>> theano.test() | |
Theano version 0.6.0rc3 | |
theano is installed in /usr/local/lib/python2.7/dist-packages/theano | |
NumPy version 1.6.1 | |
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy | |
Python version 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] | |
nose version 1.1.2 | |
Using gpu device 0: GeForce GTX 670 | |
.........................................K.............../usr/local/lib/python2.7/dist-packages/theano/compile/tests/test_inplace_opt_for_value.py:170: UserWarning: theano modules are deprecated and will be removed in release 0.7 | |
super(ExampleRNN, self).__init__() |
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
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32,exception_verbosity=high python jointest.py | |
Using gpu device 0: Quadro FX 580 | |
WARNING (theano.sandbox.cuda): You are probably using an old GPU, that Theano does not support. This means GPU code will most likely be slow AND may crash when we try to use features that your GPU does not support. | |
1 #include <Python.h> | |
2 #include <iostream> | |
3 #include <numpy/arrayobject.h> | |
4 #include <math.h> | |
5 #include <numpy/arrayscalars.h> | |
6 #include "cuda_ndarray.cuh" | |
7 ////////////////////// |
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/env python | |
""" | |
call this to run the code: | |
export CUDA_LAUNCH_BLOCKING=1 | |
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32,exception_verbosity=high python jointest.py | |
""" | |
import theano | |
import theano.tensor as T | |
from numpy import * |
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 collections import Counter | |
from twython import Twython | |
import operator | |
app_key = 'XXX' | |
app_secret = 'XXX' | |
## init OAuth | |
t = Twython(app_key=app_key, | |
app_secret=app_secret) |
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
import feedparser | |
import urllib | |
d = feedparser.parse(XXX) # link to the soup.io rss feed | |
PATH = 'old_soup/' | |
print len(d.entries) | |
for entry in d.entries: | |
print entry['links'][0]['href'] | |
if entry['links'][0]['type'] == u'image/jpeg': |
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
Code now at https://github.com/shackenberg/pbar.py |
NewerOlder