Skip to content

Instantly share code, notes, and snippets.

Avatar

Anna Woodard annawoodard

View GitHub Profile
@PubuduSaneth
PubuduSaneth / 01.Format_gencode_gff3.ipynb
Created Dec 24, 2018
Annotating gene coordinates and gene lists - python way
View 01.Format_gencode_gff3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@spott
spott / beemind.py
Created Apr 17, 2017
A script for dealing with beeminding a thesis.
View beemind.py
#!/usr/local/bin/python3
import requests
import hashlib
import time as tt
import ast
import os
import sys
folder = '<where_your_thesis_is>'
@evansde77
evansde77 / setup.sh
Last active Dec 5, 2016
Python Environment Setup on MacOSX
View setup.sh
#!/bin/bash
# assumes that XCode and XCode command line tools have been installed
# xcode-select --install
# assumes that gfortran has been installed
# https://gcc.gnu.org/wiki/GFortranBinaries
# install pyenv & set 2.7.11 as current
# See: https://github.com/yyuu/pyenv-installer
# See: https://github.com/yyuu/pyenv
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
@manugarri
manugarri / parking map.ipynb
Created Feb 21, 2016
Where the f*** can I park?
View parking map.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@markfink
markfink / game_of_life_32x64.ino
Last active Jul 28, 2017
Arduino Conway's Game of Life on 32 x 62 LED Matrix
View game_of_life_32x64.ino
// Conway's Game Of Life 32 x 64
// based on https://github.com/markfink/GoL_Javascript
#include <avr/pgmspace.h>
#include "pins_arduino.h"
// Connections to board
const byte pinSTB=7;
const byte pinClock=12;
const byte pinURed=10;
const byte pinUGreen=11;
@rmcgibbo
rmcgibbo / free-slots.py
Last active Mar 1, 2019
Summarize free slots on SLURM queues [script].
View free-slots.py
#!/usr/bin/python
from __future__ import print_function, division
import os
import re
import sys
import itertools
from pprint import pprint
import subprocess
from distutils.spawn import find_executable
from collections import defaultdict
@cranmer
cranmer / RooMomentMorphExample.py
Last active Nov 30, 2016
RooMomentMorph example for RooFit
View RooMomentMorphExample.py
#for C++ look here: https://gist.github.com/cranmer/b67830e46d53d5f7cf2d
import ROOT
import numpy as np
def testMomentMorph():
#Going to make a few statistical models we want to interpolate
#initialize workspace with some common background part
w = ROOT.RooWorkspace('w')
w.factory('Exponential::e(x[-5,15],tau[-.15,-3,0])')
x = w.var('x')
@CamDavidsonPilon
CamDavidsonPilon / 538.json
Last active Mar 12, 2018
Use the two files below to mimic graphs on 538. www.dataorigami.net/blogs/fivethirtyeight-mpl
View 538.json
{
"lines.linewidth": 2.0,
"examples.download": true,
"patch.linewidth": 0.5,
"legend.fancybox": true,
"axes.color_cycle": [
"#30a2da",
"#fc4f30",
"#e5ae38",
"#6d904f",
@garyvdm
garyvdm / test_tools.py
Created May 12, 2014
Alternative to nost.tools.with_setup decorator, which allows arguments to be returned form the setup function, and passed to the test and teardown functions.
View test_tools.py
def with_setup_args(setup, teardown=None):
"""Decorator to add setup and/or teardown methods to a test function::
@with_setup_args(setup, teardown)
def test_something():
" ... "
The setup function should return (args, kwargs) which will be passed to
test function, and teardown function.
@dnmellen
dnmellen / timeout_decorator.py
Created Jan 23, 2014
Threaded timeout Python decorator
View timeout_decorator.py
import threading
import logging
from functools import wraps
logger = logging.getLogger(__name__)
def timeout(secs=None):
def my_decorator(target, *args, **kwargs):
You can’t perform that action at this time.