Skip to content

Instantly share code, notes, and snippets.

Will Dampier JudoWill

Block or report user

Report or block JudoWill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ExampleSeqFigure.json
{
"metadata": {
"name": "ExampleSeqFigure"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@JudoWill
JudoWill / uploadpoints.py
Created Sep 16, 2010
Uploads CokeRewards points in a simple text file. Useful if you have a large number and want to make sure you're always uploading something every day so they don't expire!
View uploadpoints.py
import time, re, logging
from optparse import OptionParser
import os.path
import subprocess
from mechanize import Browser
from mechanize._form import ControlNotFoundError
USER_NAME = ''
PASSWORD = ''
@JudoWill
JudoWill / pavement
Created Oct 1, 2010
An example of using both paver and ruffus to do scientific workflows.
View pavement
from paver.easy import *
import os.path, os
import csv
import ruffus
from collections import defaultdict
from types import GeneratorType, DictType
from itertools import ifilter
options(
@JudoWill
JudoWill / LogHyperCDF.py
Created Jun 28, 2011
Using logarithms to do hypergeometric tests with large N
View LogHyperCDF.py
from math import log, exp
from mpmath import loggamma
def logchoose(ni, ki):
try:
lgn1 = loggamma(ni+1)
lgk1 = loggamma(ki+1)
lgnk1 = loggamma(ni-ki+1)
except ValueError:
#print ni,ki
@JudoWill
JudoWill / FBmodel.m
Created Jul 4, 2011
A function for getting F and My from simulation results
View FBmodel.m
function dydt=FBmodel(t,y)
%global y2
% Model file to be initiated by FBstart.m
% extract variable from y-vector
X=y(1);
S=y(2);
V=y(3);
View bowlerscores.py
nbowlers = 5
nscores = 3
team_score = 0
for bowlernum in range(nbowlers):
bowler_scores = []
for game_num in range(nscore):
prompt_string = “Please enter Bowler %i’s game score in game %i: \n” % (bowlernum+1, game_num+1) #because counting starts at zero
score = int(raw_input(prompt_string))
bowler_scores.append(score) #keep track of this bowler
View build_env.py
#!/usr/bin/env python
"""
Guide users through installing the installation dependencies
"""
# Unfortunately, we can't rely on setuptools' install_requires
# keyword, because matplotlib doesn't properly install its dependencies
from subprocess import check_call, CalledProcessError
import sys
import os
@JudoWill
JudoWill / PWMSearch.py
Created Jan 4, 2011
This is a python script which processes a SeqInterval file and Jaspar matrix file to find all occurrences of the TF binding sites.
View PWMSearch.py
"""
PWMSearch
Searches through a fasta sequence for the relevant Position Weight Matrices
from the Jaspar Database.
"""
from __future__ import division
from optparse import OptionParser
@JudoWill
JudoWill / LocallyConnected3D.py
Last active Jun 3, 2019
3D version of locally connected keras layer
View LocallyConnected3D.py
import numpy as np
from keras import backend as K
from keras.legacy import interfaces
import keras
from keras.layers import Layer, InputLayer, Input
import tensorflow as tf
from keras.engine.topology import Node
from keras.utils import conv_utils
You can’t perform that action at this time.