This file contains hidden or 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
// http://platform.twitter.com/widgets.js captured 2013-01-07 | |
if (!window.__twttrlr) { | |
(function (a, b) { | |
function s(a) { | |
for (var b = 1, c; c = arguments[b]; b++) for (var d in c) a[d] = c[d]; | |
return a | |
} | |
function t(a) { | |
return Array.prototype.slice.call(a) |
This file contains hidden or 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 T | |
import config | |
import time | |
def theano_softmax(): | |
x = T.fmatrix('x') | |
_y = T.nnet.softmax(x) |
This file contains hidden or 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
n_sims = 1_000_000 | |
mle_se = zeros(n_sims) | |
unbiased_se = zeros(n_sims) | |
yatracos_std_se = zeros(n_sims) | |
kourouklis_std_se = zeros(n_sims) | |
for sim in 1:n_sims | |
n = 10 | |
x = randn(n) |
This file contains hidden or 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
def _start_notebook(self, master, user, profile_dir, profile_name='default', notebook_port=8888): | |
master.ssh.execute('ipython profile create %s' % profile_name) | |
log.info("Setting up IPython web notebook for user: %s" % user) | |
user_cert = posixpath.join(profile_dir, '%s.pem' % user) | |
ssl_cert = posixpath.join(profile_dir, '%s.pem' % user) | |
if not master.ssh.isfile(user_cert): | |
log.info("Creating SSL certificate for user %s" % user) | |
ssl_subj = "/C=US/ST=SC/L=STAR/O=Dis/CN=%s" % master.dns_name | |
master.ssh.execute( | |
"openssl req -new -newkey rsa:4096 -days 365 " |
This file contains hidden or 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
# Simulator for the simple Boltzmann machine of Coursera NN Lecture 11e | |
# Christian Jauvin - [email protected] | |
from collections import defaultdict | |
import numpy as np | |
# weights | |
w_v1_h1 = 2 | |
w_h1_h2 = -1 | |
w_h2_v2 = 1 |
This file contains hidden or 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
# Simulator for the simple Boltzmann machine of Coursera NN Lecture 11e | |
# Christian Jauvin - [email protected] | |
from collections import defaultdict | |
import numpy as np | |
# weights | |
w_v1_h1 = 2 | |
w_h1_h2 = -1 | |
w_h2_v2 = 1 |
This file contains hidden or 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
# Simulator for the simple Boltzmann machine of Coursera NN Lecture 11e | |
# Christian Jauvin - [email protected] | |
from collections import defaultdict | |
import numpy as np | |
# weights | |
w_v1_h1 = 2 | |
w_h1_h2 = -1 | |
w_h2_v2 = 1 |
This file contains hidden or 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
# if you can, just use wget | |
# wget -np -r remote_url | |
import re | |
import os | |
import urllib2 | |
import urlparse | |
import pycurl | |
from lxml import html |
This file contains hidden or 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
function mdump() | |
{ | |
mongodump --db sqdev --collection $1 --query "{\"sid\" : \"$2\"}" --out $3 | |
} |
This file contains hidden or 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
# OAuth stuff... | |
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN" | |
ACCESS_TOKEN_SECRET = "YOUR_ACCESS_TOKEN_SECRET" | |
CONSUMER_KEY = "YOUR_CONSUMER_KEY" | |
CONSUMER_SECRET = "YOUR_CONSUMER_SECRET" |