Skip to content

Instantly share code, notes, and snippets.

View jstvz's full-sized avatar

James Estevez jstvz

View GitHub Profile
@jstvz
jstvz / ko_to_pathwway.py
Created August 18, 2011 22:30
KAAS annotation engine htext parser.
#!/usr/bin/python
"""
Script for parsing the output of the KAAS annotation engine.
"""
import sys
import csv
import os
from optparse import OptionParser
@jstvz
jstvz / BibTexCiteKeyOnly.js
Created August 24, 2011 23:25
Enables zotero BibTex translator to only output \cite{key}.
{
"translatorID":"333",
"translatorType":3,
"label":"BibTex CiteKey-Only Exporter",
"creator":"Simon Kornblith with tweaks by Andrew Leifer",
"target":"bib",
"minVersion":"0.1",
"maxVersion":"",
"priority":200,
"inRepository":false,
@jstvz
jstvz / cog_rgb_colors.tab
Created October 22, 2011 23:41
Clusters of Orthologous Groups (COGs) color scheme
rgb cog_code cog_name cog_functional_cat
(252, 204, 252) J Translation, ribosomal structure and biogenesis Information storage and processing
(252, 220, 252) A RNA processing and modification Information storage and processing
(252, 220, 236) K Transcription Information storage and processing
(252, 220, 220) L Replication, recombination and repai Information storage and processing
(252, 220, 204) B Chromatin structure and dynamics Information storage and processing
(252, 252, 220) D Cell cycle control, cell division, chromosome partitioning Cellular processes and signaling
(252, 252, 188) V Defense mechanisms Cellular processes and signaling
(252, 252, 172) T Signal transduction mechanisms Cellular processes and signaling
(236, 252, 172) M Cell wall/membrane/envelope biogenesis Cellular processes and signaling
@jstvz
jstvz / CAZy_html_parser.py
Last active February 6, 2019 22:05
Download and parses html entries from the CAZy Database (www.cazy.org). Use this instead: https://doi.org/10.1093/nar/gkx894
#!/usr/bin/python
import csv, os, glob
import pickle
from BeautifulSoup import BeautifulSoup
cazy_dict = {}
os.chdir('data/html')
for filename in glob.iglob('*.html'):
print filename
SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
--------- ------- ---- ------- ----------- ---------- ----------- -----------
base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
@jstvz
jstvz / init.sh
Created January 29, 2013 03:53 — forked from lrvick/init.sh
USER='lrvick'
cd /data/local/arch
if ! mountpoint -q dev; then
mount -t proc /proc proc
mount -o bind /dev dev
mount -o bind /dev/pts dev/pts
fi
#http://joshashby.com/2011/08/arch-droid/#
#quick hack to start up everything for the chrooted Arch
if [ "mount | grep proc" ]; then
echo "Proc already mounted, skipping..."
else
mount -t proc proc /proc
fi
if [ "mount | grep sysfs" ]; then
echo "Sysfs already mounted, skipping..."
else
@jstvz
jstvz / Awards.csv
Created January 30, 2013 20:30
NSF-postdocs-CNS
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
"AwardNumber","Title","NSFOrganization","Program(s)","StartDate","LastAmendmentDate","PrincipalInvestigator","State","Organization","AwardInstrument","ProgramManager","ExpirationDate","AwardedAmountToDate","Co-PIName(s)","PIEmailAddress","OrganizationStreet","OrganizationCity","OrganizationState","OrganizationZip","OrganizationPhone","NSFDirectorate","ProgramElementCode(s)","ProgramReferenceCode(s)","ARRAAmount","Abstract"
"1202761","NSF Postdoctoral Fellowship in Biology FY 2012","DBI","MINORITY POSTDOC RSRCH FLW-NEW","01/01/2013","06/26/2012","Flavia Barbosa","MO","Barbosa Flavia A","Fellowship","Sally E. O'Connor","12/31/2016","$250,500.00","","flavia.barbosa@univ-tours.fr","","Columbia","MO","652117400","","BIO","1157","1228, 7137, 7174","$0.00","Mutual mate choice in the bushcricket Ephippiger diurnus<br/><br/>Few decisions are more important for individual fitness than choosing when and with whom to mate. Although mate choice is a widely studied topic, little is known about cases where mutual mate choic
@jstvz
jstvz / nih.url
Last active December 12, 2015 00:58
NIH postdocs publications in CNS and PLoS
http://projectreporter.nih.gov/Reporter_Viewsh.cfm?sl=10ECC80F4E88C5DF7598B8961CAA4A01A2FFCEB861BF
@jstvz
jstvz / las-vegas-municipal-court-downloader
Last active December 20, 2015 15:08
This Las Vegas Municipal Court case download script uses python Selenium and Python to download public case reports from the Courts website.
#!/usr/bin/python
import gzip
import sys
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
def get_lvmc_case_report(caseNumber):
driver = webdriver.Firefox()
driver.get('https://secure2.lasvegasnevada.gov/defendantreport/Default.aspx')