Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 print_function | |
from functools import wraps | |
class UnitialisedFunctionCallException(Exception): | |
pass | |
def setup_function(function_): | |
@wraps(function_) | |
def setter(self, *args, **kwargs): |
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 | |
# Get installation prefix from the args | |
VERSION=2.7.9 | |
PREFIX=$HOME/python${VERSION} # Default to home/python-2.7.9 | |
if [ -n "$1" ]; then | |
PREFIX=$1 | |
if [ ! -d "$PREFIX" ]; then | |
mkdir $PREFIX | |
fi |
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
#!/usr/bin/env python | |
""" | |
Sets a random wallpaper on Mac OSX Mavericks. | |
The wallpaper is fetched from interfacelift's random page for Retina resolution | |
""" | |
from urllib.request import Request, urlopen | |
import re | |
import os | |
# We need to pretend we are Chrome, otherwise HTTP 403 Forbidden is thrown |
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 print_function | |
import libsbml | |
import argparse | |
def _parser(): | |
parser = argparse.ArgumentParser(description="Parse stoichiometry matrix of SBML file") | |
parser.add_argument('file', metavar="filename", type=argparse.FileType('r'), | |
help="Filename of SBML file to parse") |
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
#!/usr/bin/env python | |
""" | |
Sets a random wallpaper on Mac OSX Mavericks. | |
The wallpaper is fetched from interfacelift's random page for Retina resolution | |
""" | |
import urllib2 | |
import re | |
import os | |
# We need to pretend we are Chrome, otherwise HTTP 403 Forbidden is thrown |
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
#!/usr/bin/env python | |
""" | |
simple example script for running and testing notebooks. | |
Forked from shoyer / ipnbdoctest.py (https://gist.github.com/shoyer/7497853), | |
who has forked from the original author minrk/ipnbdoctest.py (https://gist.github.com/minrk/2620735) | |
Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]` | |
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# Get installation prefix from the args | |
PREFIX=$HOME # Default to home | |
if [ -n "$1" ]; then | |
PREFIX=$1 | |
if [ ! -d "$PREFIX" ]; then | |
mkdir $PREFIX | |
fi | |
PREFIX=`cd $PREFIX; pwd` # Convert to absolute path |
NewerOlder