Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
# Run pyflakes on all changed .py files before commit.
#
# By David Warde-Farley, Feb 28, 2013 -- released under the 3-clause BSD license.
#
# To use, run this file from the script .git/hooks/pre-commit
FILES=`git diff --staged --name-status |grep '\.py$' |grep '^[AM]' |sed -e's/^[AM]\s\+//'`
ROOT=`git rev-parse --show-toplevel`
NUM_BAD_FILES=0
@fonnesbeck
fonnesbeck / Microbiome community.ipynb
Last active December 10, 2015 01:48
Tissue/stool microbiome comparison
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iros
iros / fasterRead.r
Created September 28, 2012 20:46
R Trick - reading data faster
# Making R read data faster by precomputing the column
# data types
sample <- read.table("data.txt", nrows = 100)
types <- sapply(sample, classes)
allData <- read.table("data.txt", colClasses = classes)
@jseabold
jseabold / download_remote_dir.py
Created September 18, 2012 18:49
walk and download a remote http file server
# 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
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
@Carreau
Carreau / slideshow.js
Created July 12, 2012 12:25
Slideshow mode of Notebook
<div id='presentation_mode'>
<style>
.pmode{ display: none !important }
</style>
<script>
grp=0;
pmode = function(){
init()
cells = $('.cell')