Skip to content

Instantly share code, notes, and snippets.

View lzamparo's full-sized avatar

Lee Zamparo lzamparo

View GitHub Profile
@lzamparo
lzamparo / output.txt
Created February 14, 2017 15:09
Simple spearmint max test
Running iteration 0
Running iteration 1
Running iteration 2
Running iteration 3
Running iteration 4
Running iteration 5
Running iteration 6
Running iteration 7
Running iteration 8
Running iteration 9
@lzamparo
lzamparo / conda info
Created December 18, 2015 00:48
conda install scikit-bio fail
mski1743:Submission zamparol$ conda info
Current conda install:
platform : osx-64
conda version : 3.19.0
conda-build version : 1.11.0
python version : 2.7.11.final.0
requests version : 2.9.0
root environment : /Users/zamparol/anaconda (writable)
default environment : /Users/zamparol/anaconda
@lzamparo
lzamparo / example.pyx
Created July 30, 2015 16:01
Cython error compiling test example with overloaded constructor
import numpy as np
cimport numpy as np
cimport cython
include "random.pyx"
@cython.boundscheck(False)
def example(n):
@lzamparo
lzamparo / r-script-output.R
Created June 22, 2015 20:29
associate dunn.test p-values, adjusted p-values with group-group tests
> band_class_pvals
test_name upper Pvalue region
1: unannotated to CTCF 10000 13.0077750 1
2: unannotated to CTCF 20000 0.0000000 1
3: unannotated to CTCF 30000 0.9957614 1
4: unannotated to CTCF 40000 0.2821918 1
5: unannotated to CTCF 50000 0.3926610 1
---
1996: DNase to DNase 1960000 0.0000000 20
1997: DNase to DNase 1970000 0.0000000 20
@lzamparo
lzamparo / bash_output.txt
Created June 11, 2015 01:15
cutorch not accessible from th in docker file
root@dfad87219936:~/torch# luarocks install cutorch
Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode
Cloning into 'cutorch'...
remote: Counting objects: 70, done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 70 (delta 8), reused 22 (delta 4), pack-reused 0
Receiving objects: 100% (70/70), 94.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
@lzamparo
lzamparo / dplyr_fisher_test.R
Created June 9, 2015 21:09
fisher.test on subset & summarized data frames using dplyr
# here's what the data looks like:
> all_chrs_dt
lower upper signif_label signif_unlabel not_signif_label not_signif_unlabel test_name
1: 0 100000 1293 1121 1235366 224096 unnannotated to unnannotated
2: 100000 200000 465 1335 1244847 227812 unnannotated to unnannotated
3: 200000 300000 1296 2358 1244090 225916 unnannotated to unnannotated
4: 300000 400000 1245 1840 1242731 226852 unnannotated to unnannotated
5: 400000 500000 627 995 1241226 227550 unnannotated to unnannotated
---
5056: 1500000 1600000 0 76 0 895216 DNase to DNase
@lzamparo
lzamparo / cmake_build_log.txt
Created May 6, 2015 00:46
clBLAS build failure
Script started on Tue May 5 20:36:43 2015
-- The C compiler identification is AppleClang 6.1.0.6020049
-- The CXX compiler identification is AppleClang 6.1.0.6020049
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
@lzamparo
lzamparo / algorithm_3.py
Created February 20, 2015 20:59
numba.jit fails silently on Gibbs sampling
from numpy import bincount, log, log2, seterr, unique, zeros
from scipy.special import gammaln
from math_utils import log_sample, vi
def iteration(V, D, N_DV, N_D, alpha, beta, z_D, inv_z_T, active_topics, inactive_topics, N_TV, N_T, D_T):
"""
Performs a single iteration of Radford Neal's Algorithm 3.
"""
@lzamparo
lzamparo / dnn.py
Last active August 29, 2015 14:14 — forked from syhw/dnn.py
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@lzamparo
lzamparo / AutoEncoder.py
Last active August 29, 2015 14:14
help interpreting output of MonitorMode
import numpy as np
import theano.tensor as T
from theano import shared, config
from theano.tensor.shared_randomstreams import RandomStreams
class AutoEncoder(object):
def __init__(self, numpy_rng=None, theano_rng=None, input=None, n_visible=784, n_hidden=500,
W=None, bhid=None, bvis=None, W_name=None, bvis_name=None, bhid_name=None, sparse_init=-1):