Skip to content

Instantly share code, notes, and snippets.

View FedericoV's full-sized avatar

Federico Vaggi FedericoV

View GitHub Profile
@FedericoV
FedericoV / Emcee Snippet
Created June 11, 2014 12:58
EMCEE sampling script
# Initialize the MPI-based pool used for parallelization.
pool = emcee.utils.MPIPool()
if not pool.is_master():
# Wait for instructions from the master process.
pool.wait()
sys.exit(0)
nwalkers = 1500
ndim = len(params)
@FedericoV
FedericoV / gist:985aaa4c78c55270f7eb
Last active August 29, 2015 14:02
mpi4py STD ERR
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
bash: module: line 1: syntax error: unexpected end of file
bash: module: line 1: syntax error: unexpected end of file
206c 736f 6461 2d2d 2020 6174 2074 2028
3d72 3129 2061 6e64 2073 7465 7020 7369
7a65 2068 2028 3d72 3229 2c20 7468 6520
2020 2000 000a 2020 2020 2020 2063 6f72
7265 6374 6f72 2063 6f6e 7665 7267 656e
6365 2066 6169 6c65 6420 7265 7065 6174
6564 6c79 2020 2020 2000 000a 2020 2020
2020 206f 7220 7769 7468 2061 6273 2868
2920 3d20 686d 696e 2020 2000 000a 2020
2020 2020 696e 2061 626f 7665 2c20 2072
conda list | grep qt
ipython-qtconsole 1.1.0 py27_1
pyqt 4.10.4 py27_0
qt 4.8.5 0
federico@FV-DESKTOP-FEM-UBUNTU:~/Systems_Biology/Projects/l-py-and-ducts/modeler$ conda list | grep vtk
vtk 5.10.1 py27_1
@FedericoV
FedericoV / gist:10019386
Created April 7, 2014 12:29
String Output:
query
http://string-db.org/api/tsv/resolveList
data
output=tsv&identifiers=%250Dhob1%250Dfim1%250Dscd1%250Dpom1%250Drho2%250Drho1%250Dpsd1%250Dalp14%250Dfor3%250Dpck2%250Dpck1%250Dalp6%250Dscd2%250Dskb1%250Dsid2%250Dtea1%250Dmal3%250Dtea4%250Dmkh1%250Dppb1%250Dkin1%250Dmob2%250Dcki2%250Datb2%250Dpal1%250Dmyo1%250Dgef1%250Dsty1%250Drga1%250Dshk1%250Dssp1%250Dpmk1%250Dact1%250Drgf1%250Dsts5%250Dtea2%250Darp3%250Dtea3%250Dtip1%250Defc25%250D&request=resolveList&species=4896
queryIndex stringId ncbiTaxonId taxonName preferredName annotation
0 4896.SPBC21D10.12-1 4896 Schizosaccharomyces pombe hob1 Protein hob1; Has a role in DNA damage signaling as a part of stress response processes
9 4896.SPBC119.08-1 4896 Schizosaccharomyces pombe spm1 Mitogen-activated protein kinase spm1; Regulates cell integrity and functions coordinately with the protein kinase C pathway (pck1 and pck2). Involved the regulation of wall architecture, cell shape, cytokinesis in exponential and stationary phase, and metabolism of ions
@FedericoV
FedericoV / gist:7646850
Created November 25, 2013 19:06
Parameter Estimation using SciPy
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@FedericoV
FedericoV / gist:7234206
Created October 30, 2013 15:06
Sample Notebook
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@FedericoV
FedericoV / gist:7132880
Created October 24, 2013 07:42
SymPy Autowrap generated function
!******************************************************************************
!* Code generated with sympy 0.7.3 *
!* *
!* See http://www.sympy.org/ for more information. *
!* *
!* This file is part of 'autowrap' *
!******************************************************************************
REAL*8 function autofunc(Gal, empty, fullbound_RE, fullbound_closed_RE, k_base_synt_p53, k_bindleft_p53_RE, k_bindright_p53_RE, k_deg_p53, k_max_synt_p53, k_sat_p53, k_transclosed, k_transhalf, k_transopen, k_unbindleft_p53_RE, k_unbindright_p53_RE, leftbound_RE, p53, rightbound_RE)
implicit none
@FedericoV
FedericoV / gist:6638875
Created September 20, 2013 15:02
Assimulo vs odeint comparison
exp_sim.iter = 'Newton'
exp_sim.discr = 'BDF'
exp_sim.rtol = 1e-4
exp_sim.atol = 1e-4
#exp_sim.pbar = [1,1,1] #pbar is used to estimate the tolerances for the parameters
exp_sim.report_continuously = True #Need to be able to store the result using the interpolate methods
exp_sim.sensmethod = 'SIMULTANEOUS' #Defines the sensitvity method used
exp_sim.suppress_sens = True
exp_sim.verbosity = 50
@FedericoV
FedericoV / gist:6607904
Created September 18, 2013 11:34
Assimulo Experiments 3
from assimulo.solvers import CVode
from assimulo.problem import Explicit_Problem
import numpy as np
class MyProblem(Explicit_Problem):
def __init__(self, y0):
Explicit_Problem.__init__(self,y0=y0)
self.text = "Test"
#Define the rhs