Skip to content

Instantly share code, notes, and snippets.

View yoavram's full-sized avatar

Yoav Ram yoavram

View GitHub Profile
@yoavram
yoavram / bool.py
Created May 20, 2015 13:05
Boolean model for regulatory networks
#########################################
## Boolean model for regulatory networks
#########################################
def update_node(G, states, i):
''' Return new state of node i given states vector '''
def update(G, states):
''' Return the next states vector - apply transition function to all nodes '''
@yoavram
yoavram / log
Created May 14, 2015 15:14
plato travis log 140515
Using worker: worker-linux-docker-0b0f0c24.prod.travis-ci.org:travis-linux-6
Build system information
Build language: python
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yoavram
yoavram / README.md
Last active August 29, 2015 14:18
Plate UI
@yoavram
yoavram / wooey_quickstart.bat
Created April 1, 2015 15:37
Starting Wooey (https://github.com/mfitzp/Wooey). You'll need Python, virtualenv, Foreman, git
git clone git@github.com:mfitzp/Wooey.git
cd Wooey
virtualenv venv
venv\Scripts\activate
pip install requirements.txt
pip install --upgrade pip
pip install -r requirements.txt
echo WOOEY_ENV=prod > .env
echo python manage.py server > Procfile
@yoavram
yoavram / bug.ipynb
Created March 31, 2015 09:24
A reproducible bug in lmfit with ipython - see https://github.com/lmfit/lmfit-py/issues/221
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yoavram
yoavram / pyzo_walkthrough.md
Last active August 29, 2015 14:15
A quick walkthough on how to install Python 3.4 with IPython and Numpy using PyZo

See also a video.

  • download pyzo http://www.pyzo.org/downloads.html
  • if you don't know any better and use Windows, choose the windows 32bit installer: pyzo_distro-2014a.win32.exe
    Make sure you download pyzo 2014a, not 2015a (scroll down and look for it).
    If you get a warning message "The site ahead contains harmful programs", don't worry, just click 'details' and then 'visit this site'
  • when the download has finished, open the downloads folder
  • rename the pyzo installer (F2) to add extension .exe if it's missing
  • run the pyzo installer
  • yes, yes, next, next.
@yoavram
yoavram / Tel Aviv District, Israel.json
Created February 9, 2015 15:40
a geojson file of Tel-Aviv district in Israel
{"type": "Polygon", "coordinates": [[[34.7329194, 32.003664], [34.7331871, 32.0042395], [34.7332279, 32.004728], [34.7335569, 32.005378], [34.7338242, 32.0061259], [34.7344472, 32.0078575], [34.7346879, 32.0082979], [34.7348684, 32.0090573], [34.7354511, 32.0103011], [34.735532, 32.0104612], [34.7357396, 32.0109268], [34.7358668, 32.0113811], [34.7359873, 32.0117786], [34.7361132, 32.012084], [34.7361882, 32.0123862], [34.7363654, 32.0130711], [34.7366711, 32.0137898], [34.736816, 32.0145175], [34.737052, 32.0151134], [34.7370355, 32.0153149], [34.7371808, 32.0153727], [34.7372505, 32.0154682], [34.7373739, 32.0158002], [34.7376212, 32.0170903], [34.7379497, 32.018086], [34.7382751, 32.0187476], [34.7385272, 32.0195117], [34.7386468, 32.0203345], [34.7386645, 32.0207311], [34.738656, 32.0208717], [34.7386157, 32.0210513], [34.7385782, 32.0212264], [34.7384347, 32.0216121], [34.7382188, 32.0217701], [34.7383894, 32.0218622], [34.7384954, 32.0219558], [34.7386324, 32.0222105], [34.7387031, 32.0226788], [34.7387
@yoavram
yoavram / anaconda_walkthourgh.md
Created February 5, 2015 05:57
A quick walkthrough on how to install Python using the Anaconda distribution

This is a quick walkthrough on how to install Python using the Anaconda distribution which is a very quick and easy way to install python together with the most common packages, including some that can be hard to install such as numpy and IPython.

  • Optional: uninstall current Python installation. Start from Control Panel\All Control Panel Items\Programs and Features, work your way through Python itself and any installer you used (probably from Gohlke's site).
  • Download the Anaconda Python installer (I got Anaconda-2.1.0-Windows-x86_64.exe)
  • Run the Anaconda installer
  • Go prepare a cup of coffee or clean up your mail inbox, install will take 10-20 minutes
  • Anaconda installed a default environment called root, if you know what this mean you can play around with new environments, if you don't forget about it (to play around with it look for the Anaconda launcher in the Start menu).
  • Update packages - open the Anaconda la
"""
This script produces a video analysis proving for the first time in history
that bacterial populations grow exponentially. See the result here:
http://i.imgur.com/uoITKiA.gif
We proceed as follows:
- Download a video of bacteria growing under a microscope.
- Cut the video to keep only the first 7 seconds.
- Threshold each frame to find where the bacteria are, and compute the