Skip to content

Instantly share code, notes, and snippets.

@alubbock
alubbock / search_species.py
Created July 3, 2013 22:09
PySB module to search for monomers in lists of species from a model
## PySB module to search for monomers in lists of species in a model
##
## Alex Lubbock <alex.lubbock@ed.ac.uk>
## 3rd July 2013
import pysb
from warnings import warn
def remove_duplicates_by_eq(obj_list):
"""
@alubbock
alubbock / binom-test-power.R
Created May 20, 2015 00:03
Statistical power calculation for one-sided exact binomial test
##' Calculate the minimum number of samples required for a one-sided exact
##' binomial test to distinuish between two success probabilities
##' with specified alpha and power
##'
##' @param alpha is desired false positive rate (probability of incorrectly rejecting the null)
##' @param required.power is the probability of correctly rejects the null when the alternate is true
##' @param p0 is the expected proportion of successes under the null
##' @param p1 is the proportion of successes under the alternate hypothesis
##' @return (Invisibly) A list containing the required sample size and the number of successful
##' trials required
@alubbock
alubbock / pysb-travis.yml
Created June 25, 2016 01:42
Minimal Travis configuration for PySB models with coveralls
language: python
sudo: false
python:
- '2.7'
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- "./miniconda.sh -b"
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
@alubbock
alubbock / datatable-example.ipynb
Last active April 19, 2024 03:34
Sortable, searchable Pandas DataFrames in Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.