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
on open dropped_dir | |
tell application "Terminal" | |
set dirname to do shell script "perl -e \"print quotemeta ('" & POSIX path of item 1 of dropped_dir & "');\"" | |
do script "cd " & dirname & "; ipython notebook --pylab; exit" | |
end tell | |
end open |
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
# Load the BSgenome package and download the hg19 reference sequence | |
# For documentation see http://www.bioconductor.org/packages/release/bioc/html/BSgenome.html | |
source("http://www.bioconductor.org/biocLite.R") | |
biocLite("BSgenome") | |
biocLite("BSgenome.Hsapiens.UCSC.hg19") #installs the human genome (~850 MB download). | |
library('BSgenome.Hsapiens.UCSC.hg19') | |
# Function to pull flanking sequence. Defaults to +/- 10 bp | |
getflank <- function(position, alleles="[N/N]", chr="chr12", offset=10) { |
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
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 | |
./configure --prefix=$PREFIX | |
make | |
make install |
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 ruby | |
## disconnect | |
# ./disconnect.rb -u yourusername [-o /your/path] [-p yourhttpproxyserver] | |
# | |
# This is a command-line utility for the bulk-downloading of run data from | |
# the connect.garmin.com web application, which has lackluster export | |
# capabilities. | |
# |
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 requests, os, glob, json | |
you = 'giessel' | |
data = 'tweets' | |
try: os.mkdir(data) | |
except Exception: pass | |
def run(max_id = False): | |
already = glob.glob("%s/*.json" % data) |
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
# Install Macports | |
# We'll install a relatively high-level package first, with a lot of dependencies, | |
# so that we pick up everything along the way | |
# Chaco is an enthought plotting package that'll | |
sudo port install py26-chaco | |
sudo port select python python26 | |
sudo port install py26-ipython |