Skip to content

Instantly share code, notes, and snippets.

View mscook's full-sized avatar

Mitchell Stanton-Cook mscook

View GitHub Profile
@mscook
mscook / hosts
Last active November 8, 2021 11:03
hosts
192.168.1.71 mini
192.168.1.1 erx

Keybase proof

I hereby claim:

  • I am mscook on github.
  • I am mscook (https://keybase.io/mscook) on keybase.
  • I have a public key whose fingerprint is 753D EE5F F52A 8D99 D5CE 6F9E 3250 99BF BFC2 08D4

To claim this, I am signing this object:

@mscook
mscook / RethinkDBError
Created June 18, 2015 04:37
Traceback
015-06-18T04:20:30.719185558 0.017922s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.719599764 0.018326s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.719676100 0.018402s error: Backtrace:
2015-06-18T04:20:30.720274794 0.019002s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.720465822 0.019192s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.720554637 0.019281s error: Backtrace:
2015-06-18T04:20:30.737817554 0.036561s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
2015-06-18T04:20:30.738007288 0.036733s error: Guarantee failed: [fd != -1] (errno 1 - Operation not permitted) Could not create timer
2015-06-18T04:20:30.738081646 0.036807s error: Backtrace:
2015-06-18T04:20:30.777285267 0.076028s error: Error in src/arch/io/timer/timerfd_provider.cc at line 18:
@mscook
mscook / counter_dec.py
Created September 4, 2014 07:33
counter decorator
print 80*"="+"\nThe 'counter' decorator\n"+80*"="
def scount(wrapped):
def inner(*args, **kwargs):
inner.counter +=1
return wrapped(*args, **kwargs)
inner.counter = 0
return inner
@scount
@mscook
mscook / skipIf_dec.py
Created September 4, 2014 01:47
wrapt examples!
##############################################################################
#
# Handling arguments
#
# This is a wrapt decorator equivalent to Colton Meyers' skipIf presented
# from about the 15 minute mark in his PyCon 2014 talk
#
##############################################################################
import wrapt
| => brew list
ansible blast cd-hit freetype glibmm harfbuzz intltool libpng open-mpi pkg-config ray tmux
aspell boost cloog gcc gmp hicolor-icon-theme isl libsigc++ openssl popt readline vcftools
atk boost-build cmake gdbm gobject-introspection icu4c jpeg libtiff pango python samtools velvet
atkmm bwa coreutils gdk-pixbuf gsl igv libevent libyaml pangomm python3 spades vim
autoenv cairo ctags gettext gtk+ igvtools libffi little-cms pcre qualimap sqlite wget
bdw-gc cairomm fontconfig glib gtkmm inkscape libmpc mpfr pixman quast sratoolkit xz
@mscook
mscook / gist:23abcd53934f75c6239b
Created July 14, 2014 03:56
blast.py stashed
diff --git a/SeqFindR/blast.py b/SeqFindR/blast.py
index 62fb750..cfee667 100644
--- a/SeqFindR/blast.py
+++ b/SeqFindR/blast.py
@@ -77,6 +77,7 @@ def run_BLAST(query, database, args):
:returns: the path of the blast.xml file
"""
+ out_xml = database.split('/')[-1]+"_blast.xml"
protein = False
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
} catch (error) {
var d3_style_prototype = CSSStyleDeclaration.prototype,
d3_style_setProperty = d3_style_prototype.setProperty;
d3_style_prototype.setProperty = function(name, value, priority) {
d3_style_setProperty.call(this, name, value + "", priority);
#!/usr/bin/env python
# Copyright 2014 Beatson Laboratory Licensed under the
# Educational Community License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
# http://www.osedu.org/licenses/ECL-2.0
#
# Unless required by applicable law or agreed to in writing,
@mscook
mscook / q64_q33.py
Created May 12, 2014 06:41
Use seqret to go q64 --> q33
import glob
import os
inf = glob.glob("*.gz")
for f in inf:
tmp = f.split(".gz")[0]
os.system("cp "+f+" .original/")
os.system("gunzip "+f)
os.system("seqret fastq-illumina::"+tmp+" fastq::"+tmp+".33")