Skip to content

Instantly share code, notes, and snippets.

View jwintersinger's full-sized avatar

Jeff Wintersinger jwintersinger

View GitHub Profile
#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 ..."
#!/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):
============================
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 March 4, 2012 02:02
Alex design discussion
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
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
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 October 3, 2012 23:41
MDSC 408 multiple sequence alignment colourer
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 October 10, 2012 21:56
Gene IDs for determining gene ontology information
ENSG00000000003
ENSG00000000460
ENSG00000001461
ENSG00000001561
ENSG00000002016
ENSG00000002745
ENSG00000002822
ENSG00000003436
ENSG00000003756
ENSG00000003987
@jwintersinger
jwintersinger / gist:4084930
Created November 16, 2012 06:55
MDSC 402 snail BLAST
Working with: Lymnaea stagnalis
Proteins:
Connexins: vertebrates
Innexins: invertebrates
Panexins: both
Somewhat similar to innexins
Other choices:
Aplysia californica
@jwintersinger
jwintersinger / graph.py
Created November 25, 2012 21:12
Lux grapher
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):