This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" media="all" href="/site_media/resources/bootstrap/css/bootstrap.min.css" type="text/css"> | |
<script type="text/javascript" src="/site_media/resources/jquery/jquery-1.8.2.js"></script> | |
<script type="text/javascript" src="/site_media/resources/bootstrap/js/bootstrap.min.js"></script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class shorter_float(float): | |
"""A float which returns only 3 digits after the decimal""" | |
def __repr__(self): | |
return "%0.3f" % self | |
ires = 100.0 # Inverse resolution | |
left = -100 | |
right = 101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "pluginconfig" : | |
{ | |
"torrent_variant_caller":{ | |
"downsample_to_coverage":2000, | |
"min_indel_count_for_genotyping":5, | |
"min_mapping_quality_score":4, | |
"min_allele_frequency":0.2, | |
"hp_low_stringency":0, | |
"hp_min_cov_each_strand":3, | |
"hp_stb_fpe_min_coverage":30, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import requests | |
import math | |
import sys | |
def human_size(size_bytes): | |
""" | |
format a size in bytes into a 'human' file size, e.g. bytes, KB, MB, GB, TB, PB | |
Note that bytes/KB will be reported in whole numbers but MB and above will have greater precision | |
e.g. 1 byte, 43 bytes, 443 KB, 4.3 MB, 4.43 GB, etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="0.1" | |
#Set the URL for the API requests | |
plugin_url=http://127.0.0.1/rundb/api/v1/results/${RUNINFO__PK}/plugin/ | |
page_url=http://127.0.0.1/${RUNINFO__URL_ROOT}/ | |
#Set the HTTP Headers | |
api_header="Content-Type: application/json;Accept: application/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Image | |
from __future__ import division | |
import math | |
import os | |
""" | |
This is a bit of Python code that uses PIL to slice very long images into segment sizes of your choice. | |
For example take a 10,000px tall image, and slice it into 10 10,00px tall images. | |
thanks to the great docs at http://www.packtpub.com/article/python-image-manipulation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.country { | |
fill: #b8b8b8; | |
stroke: #fff; | |
stroke-width: .5px; | |
stroke-linejoin: round; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
search = "https://jobs.github.com/positions.json?description=python&location=San+Francisco" | |
attempts = 100 | |
worked = 0 | |
for count, attempt in enumerate(xrange(attempts)): | |
print "Attempt", count, | |
r = requests.get(search) | |
if r.json: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ld /Users/josh/Library/Developer/Xcode/DerivedData/libPusher-OSX-dzzypffturoukofvlbezlpziwihh/Build/Products/Debug/Pusher.framework/Versions/A/Pusher normal x86_64 | |
cd /Users/josh/projects/libPusher/libPusher-OSX | |
setenv MACOSX_DEPLOYMENT_TARGET 10.6 | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/josh/Library/Developer/Xcode/DerivedData/libPusher-OSX-dzzypffturoukofvlbezlpziwihh/Build/Products/Debug -F/Users/josh/Library/Developer/Xcode/DerivedData/libPusher-OSX-dzzypffturoukofvlbezlpziwihh/Build/Products/Debug -filelist /Users/josh/Library/Developer/Xcode/DerivedData/libPusher-OSX-dzzypffturoukofvlbezlpziwihh/Build/Intermediates/libPusher-OSX.build/Debug/Pusher.build/Objects-normal/x86_64/Pusher.LinkFileList -install_name "@executable_path/../Frameworks/Pusher.framework/Versions/A/Pusher" -mmacosx-version-min=10. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo ${watch_src_path} | |
ps awux | grep runserver | grep -v grep | awk '{print $2}' | tail -1 | xargs kill -9; | |
echo 'killed' | |
sleep .5 | |
echo 'reloading' | |
export PYTHONPATH=/results/svn/TS/dbReports | |
python manage.py runserver_plus --noreload 0.0.0.0:8000 |