Skip to content

Instantly share code, notes, and snippets.

View audy's full-sized avatar

Austin Richardson audy

View GitHub Profile
@audy
audy / doug.html
Created November 22, 2010 01:57
showing my friend some CSS
<html>
<head>
<title>Dear Diary</title>
<style type="text/css">
body {
background-image:url("http://media.thatguys.co.uk/uploaded_images/Dinosaur-disney-screenshot-789279.jpg");
font: "Helvetica";
}
h1 {
@audy
audy / sequences.fasta
Created November 23, 2010 05:52
nothing to see here...
>gi|15803490|ref|NP_289523.1| hypothetical protein Z4296 [Escherichia coli O157:H7 EDL933]
MNDIAHNLAQVRDKISAAATRCGRSPEEITLLAVSKTKPASAIAEAIDAGQRQFGENYVQEGVDKIRHFQ
ELGVTGLEWHFIGPLQSNKSRLVAEHFDWCHTIDRLRIATRLNDQRPAELPPLNVLIQINISDENSKSGI
QLAELDELAAAVAELPRLRLRGLMAIPAPESEYVRQFEVARQMAVAFAGLKTRYPHIDTLSLGMSDDMEA
AIAAGSTMVRIGTAIFGARDYSKK
>gi|197284237|ref|YP_002150109.1| amino acid racemase [Proteus mirabilis HI4320]
MNTIKQNLVNVRSHIDTAAQKCGRSPDEITLLAVSKTKPVSDIEKAIACGQTEFGENYVQEGVDKISYFA
ENKNLVWHFIGPLQSNKTRLVAEHFAWCHTIDRLKIAQRLSDQRPTTLPPLNVLIQINISDENSKSGISL
TELDGLAAQISILPGIKLRGLMAIPAPENDYNKQVEVLEKMHQAFKQLQNQYPDIDTLSMGMTGDMEAAI
@audy
audy / sequences.fasta
Created November 23, 2010 05:59
nothing to see here
>gi|15803490|ref|NP_289523.1| hypothetical protein Z4296 [Escherichia coli O157:H7 EDL933]
MNDIAHNLAQVRDKISAAATRCGRSPEEITLLAVSKTKPASAIAEAIDAGQRQFGENYVQEGVDKIRHFQ
ELGVTGLEWHFIGPLQSNKSRLVAEHFDWCHTIDRLRIATRLNDQRPAELPPLNVLIQINISDENSKSGI
QLAELDELAAAVAELPRLRLRGLMAIPAPESEYVRQFEVARQMAVAFAGLKTRYPHIDTLSLGMSDDMEA
AIAAGSTMVRIGTAIFGARDYSKK
>gi|86146413|ref|ZP_01064737.1| Predicted enzyme with a TIM-barrel fold [Vibrio sp. MED222]
MSSIQQNIEQITSQIRSAEQKCGRAPDSVQLLAVSKTKPIDAILEAALGGQVAFGENYVQEGVDKVKHFS
EQHSNLNLEWHFIGPIQSNKTRPIAESFQWVHSVDRDKIAQRLHDQRPNELPPLQVLIQVNTSGEDSKSG
TSEETVFALAELISSLPNLTLRGLMSIPANVSDYQSQLKAFSQLADLQQKLAAKYPDIDTLSMGMSGDMD
PFRMAT TS
TARGET Undefined
AUTHOR Phyre-1
REMARK Quick Phyre Results
REMARK Job Description: Undefined
REMARK Unique Job identifier: c174463da7096328
REMARK
REMARK This data has been generated by the Phyre web server
REMARK Structural Bioinformatics Group
REMARK Imperial College London
@audy
audy / shannon.py
Created January 17, 2011 17:28
Shannon Diversity Index
#!/usr/bin/env python
# Shannon Diversity Index
# http://en.wikipedia.org/wiki/Shannon_index
import sys
def sdi(data):
""" Given a hash { 'species': count } , returns the SDI
@audy
audy / wtvr.py
Created February 22, 2011 02:47
# Use a class:
class playlistFactory:
API_KEY = "..."
SECRET = "..."
def __init__(self, query):
self.query = query
def get_song():
@audy
audy / gist:945581
Created April 28, 2011 00:50
ruffus.py
#!/usr/bin/env python
from ruffus import *
import os
files = [ ('data/a.fasta', 'data/b.fasta'), ('data/c.fasta', 'data/d.fasta') ]
@transform(files, suffix('.fasta'), '.out')
def combine(infiles, outfile):
a, b = files
@audy
audy / autovivify.py
Created April 28, 2011 17:55
Auto Vivification w/ Python
class AutoVivification(dict):
def __getitem__(self, item):
try:
return dict.__getitem__(self, item)
except KeyError:
value = self[item] = type(self)()
return value
data = AutoVivification()
@audy
audy / illuminaobscura.py
Created May 4, 2011 19:45
illuminaobscura.py
#!/usr/bin/env python
from glob import glob
from PIL import Image, ImageDraw
from itertools import defaultdict
# Create matrix
matrix = defaultdict(dict)
lanes = [1, 2, 3, 4, 5, 6, 7]
@audy
audy / gist:959439
Created May 6, 2011 17:55
instiki syntax error
/usr/lib/ruby/gems/1.9.1/gems/instiki-0.10.2/instiki:6:in `load': /usr/lib/ruby/gems/1.9.1/gems/instiki-0.10.2/script/server:27: formal argument cannot be a constant (SyntaxError)
'Default: 2500') { |OPTIONS[:port]| }
^
/usr/lib/ruby/gems/1.9.1/gems/instiki-0.10.2/script/server:27: syntax error, unexpected '[', expecting '|'
'Default: 2500') { |OPTIONS[:port]| }
^
/usr/lib/ruby/gems/1.9.1/gems/instiki-0.10.2/script/server:30: formal argument cannot be a constant
'Default: 0.0.0.0') { |OPTIONS[:ip]| }
^
/usr/lib/ruby/gems/1.9.1/gems/instiki-0.10.2/script/server:30: syntax error, unexpected '[', expecting '|'