This file contains 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 | |
PYTHON_VERSION=2.7.8 | |
tmpdir=$HOME/tmp-python | |
rm -rf $tmpdir; mkdir -p $tmpdir | |
pushd $tmpdir && wget --no-check-certificate https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O- | tar xzf - && pushd Python-${PYTHON_VERSION} && ./configure --prefix $prefix && make && make install && popd && popd |
This file contains 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 our own python | |
prefix=$(mktemp -d) | |
cd $prefix | |
version=2.7.8 | |
wget --no-check-certificate https://www.python.org/ftp/python/${version}/Python-${version}.tgz -O- | tar xzf - | |
cd Python-${version} | |
./configure --prefix $prefix | |
make | |
make install | |
cd .. |
This file contains 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 re | |
import os | |
from os.path import * | |
import sys | |
import csv | |
from datetime import datetime | |
from collections import defaultdict | |
import itertools | |
gisaid_file = 'H3N2_GISAID.csv' |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Hello, world!"> | |
<Require feature="opensocial-0.8"/> | |
</ModulePrefs> | |
<Content type="html"><![CDATA[ | |
<script type="text/javascript"> | |
function init() { | |
document.getElementById("handler").innerHTML = "Hello, world."; | |
} |
This file contains 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 python | |
import sys | |
from Bio import SeqIO | |
f = sys.argv[1] | |
seqs = SeqIO.parse(f,'fasta') |
This file contains 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 tempdir | |
class BaseTester(object): | |
def setUp(self): | |
''' Auto enter temporary directory ''' | |
self.tdir = tempdir.TempDir() | |
os.chdir(self.tdir.name) |
This file contains 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 python | |
import subprocess | |
import argparse | |
# Can test with | |
# python -m doctest dnaplotter.py | |
def count_ref_bases(reference): | |
''' |
This file contains 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
#!/bin/bash | |
# Max amount of idle time in seconds before pm-suspend is invoked | |
# Default is 1 hour | |
idlemax=$((60*60)) | |
# Run forever | |
while [ 1 ] | |
do | |
# Keep checking to see if samba has locked files |
This file contains 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 python | |
import sys | |
from Bio import SeqIO | |
from Bio.SeqIO.QualityIO import PairedFastaQualIterator | |
import argparse | |
parser = argparse.ArgumentParser() |
This file contains 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: xbmc | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts instance of XBMC | |
# Description: starts instance of XBMC using start-stop-daemon and xinit |
OlderNewer