Skip to content

Instantly share code, notes, and snippets.

View xguse's full-sized avatar

Gus Dunn xguse

View GitHub Profile
@xguse
xguse / brownNoise.sh
Created March 11, 2011 23:11
brown noise generator using sox for linux. keywords: white pink red brown noise
#!/bin/sh
len='7:00:00'
vol=1
if [ "$1" != '' ]; then
len=$1
fi
if [ "$2" != '' ]; then
@xguse
xguse / fembot
Created November 29, 2011 21:48
Female robot voice that speaks text. Can be used as a tack-on after a long running command to tell you that it has finished. Uses espeak and sox/play. Allows setting volume and repeat value.
#!/bin/sh
slp=0s
rep=0
vol=1
text='Type something Here for me to say.'
while getopts 'w:r:v:t:' OPTION
do
case $OPTION in
@xguse
xguse / ParseFastQ.py
Created February 19, 2012 22:43
Simple Python FastQ Parser class
class ParseFastQ(object):
"""Returns a read-by-read fastQ parser analogous to file.readline()"""
def __init__(self,filePath,headerSymbols=['@','+']):
"""Returns a read-by-read fastQ parser analogous to file.readline().
Exmpl: parser.next()
-OR-
Its an iterator so you can do:
for rec in parser:
... do something with rec ...
@xguse
xguse / bashrc
Last active December 16, 2015 09:39
Generic yet functional bash prompt template
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Setup PATH env vars and variants
@xguse
xguse / sort_example.py
Created June 30, 2013 21:38
example script to sort a file for seqanswers user marqudiego
import sys
in_file = sys.argv[1]
in_data = open(in_file, 'rU')
data_list = []
@xguse
xguse / xpermutations.py
Created July 23, 2013 00:50
Generators for calculating a) the permutations of a sequence and b) the combinations and selections of a number of elements from a sequence. Uses Python 2.2 generators. Similar solutions found also in comp.lang.python Keywords: generator, combination, permutation, selection See also: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/105962
#!/usr/bin/env python
__version__ = "1.0"
"""xpermutations.py
Generators for calculating a) the permutations of a sequence and
b) the combinations and selections of a number of elements from a
sequence. Uses Python 2.2 generators.
Similar solutions found also in comp.lang.python
@xguse
xguse / email signature
Last active December 20, 2015 21:38
my gmail signature and public key
http://about.me/wadunn
W. Augustine Dunn, III
Ph.D. Candidate
Laboratory of Dr. Anthony James
Department of Molecular Biology and Biochemistry
Institute for Genomics and Bioinformatics
University of California, Irvine
(949) 824-3210 - Lab
(949) 824-8551 - Fax
dunnw@uci.edu
@xguse
xguse / public email key
Created August 10, 2013 02:13
my public email encryption key. Take it. Use it. Make one for yourself. Send it to me. Screw the NSA.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20130712
Comment: http://openpgpjs.org
xsBNBFIFl8QBCACn/Arb96LzlcetuPj2yXMqMVUmJueUJ8/alzQCpAZx5JnU
7R+ajxOgmiV4JxMpOT/9nHJCwDudDrqgoTms1AjJVWoOZTBCpRGq9MpFr0PF
5eue2ioAdoNZyehFYhh7oN6PvBHxMC9y2Xesiza9d4nartZhES2coBJh7FEX
E8gOIrQ7c0cWfpapBUmcfYLQtvo1DFK7dLa1zFqFpN/losfVocHu6cEOdEkB
T0mtedkjhOWAdjq0w3GxYkeXPcbdfGFNM9kW3k+TbF4M4vWGQVgcxgm2g3vc
tpnUAfNqdwXm6x2jZblr/opvONLlvq4dM0fwi/rKWuGZLpWhuytvQZ1XABEB
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20130712
Comment: http://openpgpjs.org
xsBNBFINLngBCACTfqW1ZsIPtaBCeXGQ+KuG66wBCTVNodqhY5P292sekYOG
1ldjADX1bO/T88nqQlBgJi/gwzOb9dDkD/MXjcdX3buJS+oiPsHdG9+v34Xq
owZCbZP4XAHC3epXkpN/K/kMdjY5mPorakeP4eXWKT3XfKwhe/GoZ3eXcxaH
tfGIK1M055fBCQIuOusgMf55dbsfg9QyzTbXZciP0x9PuUvrd3TaYpebBmYq
cTc0Z44feQevj+/GQxh8Il4i+eJF1mpa1gzVbAKfnAXu1zxqOuHIwfbaKlgM
f32fXFC17ya/2ZQ7wkme/E2XOTrSjuSYLj5hewDccYat+T9dtaZRfFWjABEB
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
mQINBFIKB18BEADWZvUf+2taIgGEl+AbZVOEuPt1movmT2KG9qY0354RS4EVJU+s
3edCSm55ynazcJo6ikSEsVFb2LKa9Lmqpf//32Q3Mpt10AX7nLcnxYBrMCu6uVBV
l+9cpPKIFtOLLZQvLN4LhgS39wAi+Azin3on3LrTWc7knRwCeGrx+UupbDdYiExm
sVleD9gjKX9ri/sqEdBlNZV48pXrCGbEC3b50Jh1rdPIUg//KZMAwThuOzXo2Y8l
9pWLWZqbuNXCBNDixq3TVOZAptWrvSSCQDrfA+wJbho9dRR3jurgoF9kb8BiJnsL
CZkf2R8tMUfgG866okRisRCIE8VbRX19bS6is0czKa/1/HJc0NDhLV4hig2aijsP