Skip to content

Instantly share code, notes, and snippets.

View terrycojones's full-sized avatar

Terry Jones terrycojones

View GitHub Profile
#!/usr/bin/env python
import os
from collections import defaultdict
def parseColors(colors):
"""
Parse read id color specification.
@terrycojones
terrycojones / gist:444c9b4d246fe123e9c7
Created May 27, 2014 11:40
NCBI (compressed) data set sizes
16SMicrobial: 2.21 MB (1 parts)
cdd_delta: 873.31 MB (1 parts)
env_nr: 0.99 GB (2 parts)
env_nt: 3.06 GB (4 parts)
est: 284 B (1 parts)
est_human: 1.26 GB (2 parts)
est_mouse: 682.56 MB (1 parts)
est_others: 9.52 GB (11 parts)
gss: 6.57 GB (7 parts)
gss_annot: 36.39 MB (1 parts)

Keybase proof

I hereby claim:

  • I am terrycojones on github.
  • I am terrycojones (https://keybase.io/terrycojones) on keybase.
  • I have a public key whose fingerprint is DA37 724E D2C7 CF8A E792 99A9 F18B DFFA 72B5 F70B

To claim this, I am signing this object:

1: count= 67, len= 3620, min(e)= 0.0 median(e)= 1.31674e-63: gi|6561412|gb|AF191073.1|AF191073 Stealth virus 1 clone 3B43, genomic sequence
2: count= 31, len= 814, min(e)= 2.04982e-153 median(e)= 1.56463e-48: gi|6957471|gb|AF065755.1|AF065755 Stealth virus 1 clone 3B43 T3
3: count= 7, len= 836, min(e)= 1.70374e-79 median(e)= 4.20903e-35: gi|6940537|gb|AF065756.1|AF065756 Stealth virus 1 clone 3B43 T7
4: count= 6, len= 290, min(e)= 6.41028e-62 median(e)= 3.398355e-61: gi|38569384|gb|AY397620.1| Bluetongue virus isolate 10 5' UTR
5: count= 12, len= 193, min(e)= 1.91051e-37 median(e)= 2.744805e-37: gi|84579786|dbj|AB214978.1| Human picobirnavirus pseudogene for RNA-dependent RNA polymerase
6: count= 18, len= 104710, min(e)= 1.33442e-23 median(e)= 1.571805e-23: gi|84683224|gb|DQ333351.1| Choristoneura occidentalis granulovirus, complete genome
7: count= 8, len= 1923, min(e)=
class FakeCursor(object):
def close(self):
pass
class FakeDbConnection(object):
def __init__(self, result):
self._result = result
def cursor(self):
return FakeCursor()
WORKING:
https://sandbox.fluidinfo.com/values?query=fluiddb%2Fabout%20%3D%20%22%23%CE%B1%CE%BE%CE%B9%CE%BF%CE%BB%CF%8C%CE%B3%CE%B7%CF%83%CE%B7%22%20or%20fluiddb%2Fabout%20%3D%20%22%23gmt%22%20or%20fluiddb%2Fabout%20%3D%20%22%23apple%22%20or%20fluiddb%2Fabout%20%3D%20%22%23client%22%20or%20fluiddb%2Fabout%20%3D%20%22%23pajama%22%20or%20fluiddb%2Fabout%20%3D%20%22%23geeky%22%20or%20fluiddb%2Fabout%20%3D%20%22%23corruption%22%20or%20fluiddb%2Fabout%20%3D%20%22%23skyler_white%22%20or%20fluiddb%2Fabout%20%3D%20%22%23tag%22%20or%20fluiddb%2Fabout%20%3D%20%22%23subject_with_parentheses%22%20or%20fluiddb%2Fabout%20%3D%20%22%23cases%22%20or%20fluiddb%2Fabout%20%3D%20%22%23riddler%22%20or%20fluiddb%2Fabout%20%3D%20%22%23qwe%22%20or%20fluiddb%2Fabout%20%3D%20%22%23testing%22&tag=*
FAILING:
https://sandbox.fluidinfo.com/values?query=fluiddb%2Fabout%20%3D%20%22%23%CE%B1%CE%BE%CE%B9%CE%BF%CE%BB%CF%8C%CE%B3%CE%B7%CF%83%CE%B7%22%20or%20fluiddb%2Fabout%20%3D%20%22%23gmt%22%20or%20fluiddb%2Fabout%20%3D%20%22%23apple%22%20or
def _getRange(inputRange):
if inputRange is None:
return None
rangeRegex = compile(r'^(\d+)(?:-(\d+))?$')
ranges = []
match = rangeRegex.match(inputRange)
if match:
start, end = match.groups()
start = int(start)
if end is None:
def testErrbackedDeferredFiresWithTheRightResult(self):
"""
The pool must correctly pass the original deferred errback result
through any callbacks it might have added.
"""
expectedValue = Exception()
pool = DeferredPool()
d = Deferred()
pool.add(d)
pool.notifyWhenEmpty()
# Copyright 2013 Terry Jones ([email protected]). All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
@terrycojones
terrycojones / gist:5253419
Created March 27, 2013 11:07
haproxy logging conf (/etc/rsyslog.d/49-haproxy.conf)
# This file added by Terry on Dec 3, 2012
# See http://kvz.io/blog/2010/08/11/haproxy-logging/
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
local1.* -/var/log/haproxy_1.log
& ~
# & ~ means not to put what matched in the above line anywhere else for the rest of the rules