This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
# OfflineIMAP config for GMail backup (only tested on OS X) | |
# Save it as ~/.offlineimaprc | |
# NB: this will sync *everything*, including All Mail, Spam, Bin, etc. | |
[general] | |
metadata = ~/.offlineimap | |
accounts = GMail | |
maxsyncaccounts = 1 | |
# You might want to change the below to ui = TTY.TTYUI the first time you run offlineimap | |
# It can choke on large attachments and GMail might reset the connection if you download too much |
#####Minima.mer.func.R##### | |
#Kathryn Turner June 21, 2013 | |
#Given an output kmer counting histogram table from jellyfish, | |
#find two minima around a peak | |
#input table from jellyfish | |
dat <- read.table("data.from.jellyfish.hist", head=T) | |
head(dat) | |
frequency multiplicity |
#!/usr/bin/env python | |
import os | |
import sys | |
import uuid | |
random_unique_name = str(uuid.uuid4()) + str(uuid.uuid1()) | |
def find_mount_point(path): # http://stackoverflow.com/questions/4453602/how-to-find-the-mountpoint-a-file-resides-on | |
path = os.path.abspath(path) |
#!/usr/bin/env bash | |
# HubCrypt | |
# ======== | |
# | |
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl + | |
# your SSH keys). It needs the private key that matches your last public key | |
# listed at github.com/<user>.keys | |
# |
# Utilities for quickly accessing frequently used directories in bash. | |
# Usage: | |
# $ cd /path/to/project/src/ | |
# $ mark code # Will create a new shortcut. | |
# # Becomes interactive if a shortcut already exists | |
# # m is an alias for mark. You can also `m code` | |
# | |
# $ code # From now on, running this anywhere in the shell | |
# # will put you in /path/to/project/src/code |
#!/usr/bin/env python | |
"""Store messages in a Maildir into a couchdb database.""" | |
import couchdb | |
from mailbox import Maildir | |
from optparse import OptionParser | |
import os | |
from pprint import pprint | |
import sys | |
from uuid import uuid4 |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs