Skip to content

Instantly share code, notes, and snippets.

Jeff Wintersinger jwintersinger

View GitHub Profile
View gist:1810077
#name=java_singleproc
name=java_threaded
#name=node_async
host=http://localhost:8124
n=1000
for file in {small,large}.jpg; do
for c in 1 50 100 1000; do
cmd="ab -n $n -c $c $host/$file"
echo "Running $cmd ..."
View blosum.py
#!/usr/bin/env python
# Usage: python blosum.py blosum62.txt
# Then, enter input in "row col" format -- e..g, "s f".
import sys
class InvalidPairException(Exception):
pass
class Matrix:
def __init__(self, matrix_filename):
View midterm-prep
============================
Test Contents (thanks, Kent)
============================
Composition: short-answer questions
Look at exercises in Prag Prog book
Contents:
JS basics
Class, object, sequence diagrams
Basic OOP
Use cases
@jwintersinger
jwintersinger / gist:1969994
Created Mar 4, 2012
Alex design discussion
View gist:1969994
Search should be consistent
Centre the search
Put it in top right/left, just below horizontal bar
On opposing side of it, have header describing what page you're on ("Dashboard", "Discussion")
Then, search always stays in exact same spot
How we should have search bar on every page: like on search results page, with bar across top -- perhaps centre it
Calling attention to search:
Can put light grey bar behind it
View gist:2340220
testHelpers.makePutReq('/api/memos/1', {
title: 'My new title',
postDate: 1433820201,
content: 'My new body.',
id: 1,
posterID: 2
}, function(res) {
// On response
}, function(body) {
// On complete
View gist:3342665
import argparse
from __future__ import with_statement
from Bio import SeqIO
def main():
parser = argparse.ArgumentParser()
parser.add_argument("inputFile", help="Input FASTA file")
parser.add_argument("outputFile",help="Filtered FASTA output")
parser.add_argument("-d", "--header", default=None, dest="sampleName", help="Sample name to remove")
args = parser.parse_args()
@jwintersinger
jwintersinger / gist:3830596
Created Oct 3, 2012
MDSC 408 multiple sequence alignment colourer
View gist:3830596
def main():
lines = open('alignment.aln').readlines()
lines = [line for line in lines if len(line.strip()) > 0]
header = lines[0]
del lines[0]
num_lines = 3
for k in range(0, len(lines), num_lines + 1):
@jwintersinger
jwintersinger / gene.ids
Created Oct 10, 2012
Gene IDs for determining gene ontology information
View gene.ids
ENSG00000000003
ENSG00000000460
ENSG00000001461
ENSG00000001561
ENSG00000002016
ENSG00000002745
ENSG00000002822
ENSG00000003436
ENSG00000003756
ENSG00000003987
@jwintersinger
jwintersinger / gist:4084930
Created Nov 16, 2012
MDSC 402 snail BLAST
View gist:4084930
Working with: Lymnaea stagnalis
Proteins:
Connexins: vertebrates
Innexins: invertebrates
Panexins: both
Somewhat similar to innexins
Other choices:
Aplysia californica
View graph.py
import matplotlib.pyplot as plt
import numpy as np
import pandas
def char_range(c1, c2):
for c in xrange(ord(c1), ord(c2) + 1):
yield chr(c)
def make_plate_range(a, b, number):
for c in char_range(a, b):
You can’t perform that action at this time.