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 pandas as pd | |
import numpy as np | |
import patsy | |
import wrenlab.R.wrap.DESeq2 | |
def fn(): | |
X = pd.DataFrame(np.random.randint(10000, size=(12, 1000))) | |
D = pd.DataFrame({ | |
"V1": [0,0,0,0,0,0,1,1,1,1,1,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
import atexit | |
import codecs | |
import functools | |
import gzip | |
import os.path | |
import shutil | |
import sys | |
import tempfile | |
import urllib.request |
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 functools | |
import time | |
import pickle | |
import os | |
def decorator(save_path="default"): | |
def wrapper(fn): | |
@functools.wraps(fn) | |
def wrap(self, *args, **kwargs): | |
if not os.path.exists(save_path): |
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
from dataclasses import dataclass | |
import pandas as pd | |
import numpy as np | |
import scipy.stats | |
@dataclass | |
class BinaryAnnotation: | |
columns: np.array | |
index: np.array | |
data: np.array # 2D array of packed bits |
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 os | |
import psutil | |
import numpy as np | |
import sklearn.decomposition | |
def memory_usage(): | |
return psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2 | |
def pca(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
#!/usr/bin/env bash | |
cat <<EOF | ftp | |
open hgdownload.cse.ucsc.edu | |
anonymous | |
[email protected] | |
cd goldenPath/mm9/database | |
prompt | |
mget chr*rmsk.txt.gz | |
bye |
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
module app1; | |
import std.stdio; | |
import lib1; | |
void main() { | |
add(2,3).println; | |
} |
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
extern mod std; | |
fn main() { | |
let s = @"foo bar baz"; | |
// similar results with ~"foo bar baz" | |
// These work | |
s.substr(1, 5); | |
s.slice(1,5); |
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
Religiosity negatively correlated with: | |
- IQ [1] | |
- Societal health (homicide, suicide, life expectancy) [2] | |
- hippocampus (part of the brain involved in memory) size [7] | |
and positively correlated with: | |
- abortion rates (!) [2] | |
- poverty [3] | |
- teen pregnancy [4] |
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
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -163,7 +163,7 @@ desc "deploy public directory to github pages" | |
task :push do | |
puts "## Deploying branch to Github Pages " | |
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } | |
- system "cp -R #{public_dir}/ #{deploy_dir}" | |
+ system "cp -R #{public_dir}/* #{deploy_dir}" | |
puts "\n## copying #{public_dir} to #{deploy_dir}" |
NewerOlder