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 pylab import * | |
from scipy.stats import uniform, binom, expon, beta | |
true_gamma = 0.5 | |
N = 600 | |
T = 15 | |
data = zeros((2, N), dtype=float) | |
event_times = data[0,:] | |
event_times[:] = uniform(0,15).rvs(N) |
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 scipy.stats import t | |
def retroDesign(A, s, alpha=0.05, df=1000000, n_sims=10000): | |
""" | |
:param A: the hypothesized true effect size | |
:param s: standard error | |
:param alpha: confidence level | |
:param df: degree of freedom |
Description Miles / Time (Round trip) Map & Notes Bear Creek - CA 9 loop 60 / 1 hr 45 min https://goo.gl/maps/ZHvz1GqNxoufX2Cs9
I hereby claim:
- I am seekshreyas on github.
- I am seekshreyas (https://keybase.io/seekshreyas) on keybase.
- I have a public key ASDhDWEcjCEebaj7xzxHfy3A3SIzkrhTsPJZwTehkaXg7Qo
To claim this, I am signing this object:
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 | |
from numpy import asmatrix, asarray, ones, zeros, mean, sum, arange, prod, dot, loadtxt | |
from numpy.random import random, randint | |
import pickle | |
MISSING_VALUE = -1 # a constant I will use to denote missing integer values | |
def impute_hidden_node(E, I, theta, sample_hidden): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var open = window.XMLHttpRequest.prototype.open, | |
send = window.XMLHttpRequest.prototype.send, | |
onReadyStateChange; | |
function openReplacement(method, url, async, user, password) { | |
var syncMode = async !== false ? 'async' : 'sync'; | |
console.warn( | |
'Preparing ' + | |
syncMode + | |
' HTTP request : ' + |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
- Launch quicktime player
- do Screen recording
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
"""quick way to create a data frame to try things out""" | |
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd']) | |
df['A'] """ will bring out a col """ df.ix[0] """will bring out a row, #0 in this case""" | |
"""Given a dataframe df to filter by a series s:""" | |
df[df['col_name'].isin(s)] | |
"""to do the same filter on the index instead of arbitrary column""" | |
df.ix[s] |
NewerOlder