Skip to content

Instantly share code, notes, and snippets.

View chintak's full-sized avatar

Chintak Sheth chintak

View GitHub Profile
@chintak
chintak / new_env.sh
Created January 2, 2014 17:01
Save to ``~/Documents/venv/`` Add ``alias newvirtualenv="source ~/Documents/venv/new_env.sh $1"`` to ~/.bash_profile. Invoke it using: ``newvirtualenv ENV_NAME``
mkvirtualenv $1
ln -ns ~/Documents/venv/dev_pack2/lib/python2.7/site-packages/* ~/Documents/venv/$1/lib/python2.7/site-packages
# Ipython installtion
ln -s ~/Documents/venv/dev_pack2/bin/i* ~/Documents/venv/$1/bin/
# ln -s ~/Documents/venv/dev_pack2/lib/python2.7/site-packages/IPython ~/Documents/venv/$1/lib/python2.7/site-packages/
# Nosetests installtion
ln -s ~/Documents/venv/dev_pack2/bin/nose* ~/Documents/venv/$1/bin/
# .bash_profile
#-----------------------
alias ls='ls -G'
alias ipn="cd ~/Notebooks/; ipython notebook --pylab=inline"
alias crp="cd ~/Documents/Repositories"
alias si2="workon skimage2; crp; cd scikit-image"
alias newvirtualenv="source ~/Documents/venv/new_env.sh $1"
export PS1="\e[0;31m\h: \W$ \e[m"
cpdef _inpaint_criminisi(cnp.float_t [:, ::1] painted,
cnp.int8_t [:, ::1] mask,
cnp.uint8_t window,
cnp.float_t ssd_thresh):
cdef:
cnp.float_t [:, ::1] source_image, confidence, gauss_mask, dx, dy
cnp.float_t [:, ::1] smooth_painted, template, valid_mask
cnp.int16_t [:, ::1] fill_front
cnp.int8_t [:, ::1] nx, ny, mask_template
@chintak
chintak / install_simplecv.sh
Last active June 1, 2018 15:56
Install SimpleCV/OpenCV in a Virtual Environment on Mac OSX
# First install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Choose the name of the virtualenv as simplecv
virtualenv simplecv --no-site-packages
source simplecv/bin/activate
# This activates the virtualenv; your command prompt should change from `$` to `(simplecv)$`
# Next the dependencies
sudo easy_install pip # Can be ignored, if pip already present