retrography
5/12/2015 - 2:59 PM

iPython set of notebooks

iPython set of notebooks

# First configure Pry! and IRB
wget https://gist.github.com/retrography/d2331bc08d7670f63377/raw -O - | bash
 
# Libs
brew install zeromq

# Or
#sudo add-apt-repository ppa:chris-lea/zeromq
#sudo apt-get update
sudo apt-get -y install libzmq3-dbg libzmq3-dev libzmq3 imagemagick libmagickwand-dev

# Now iRuby and friends
gem install iruby gruff rmagick gnuplot rubyvis ffi-rzmq uuid --conservative

mkdir -p ~/.ipython/kernels/iruby
cd ~/.ipython/kernels/iruby
echo '{"argv": ["iruby", "kernel", "{connection_file}"], "display_name":"Ruby", "language":"ruby", "codemirror_mode":"ruby"}' >> kernel.json
curl https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Ruby_logo.svg/64px-Ruby_logo.svg.png >logo-64x64.png

cd ~
# Libs
brew install zeromq

pip install ipython --upgrade
pip install pyzmq jinja2 tornado jsonschema
install.packages('RCurl')  
install.packages('devtools')
install.packages('rzmq')
# Or
# install.packages('rzmq', type = 'source')
library(devtools) 

options(unzip = 'internal')

install_github("IRkernel/repr")
install_github("IRkernel/IRdisplay")
install_github("IRkernel/IRkernel")
IRkernel::installspec()
# Install iPython notebook
pip install ipython --upgrade
pip install "ipython[notebook]"
pip install pyzmq jinja2 tornado jsonschema

# Profile settings
ipython profile create
echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.ipython/profile_default/ipython_notebook_config.py
echo "c.NotebookApp.open_browser = False" >> ~/.ipython/profile_default/ipython_notebook_config.py

# Python 3
mkdir -p ~/.ipython/kernels/ipython3
cd ~/.ipython/kernels/ipython3
echo '{"argv": ["python3", "-m", "IPython.kernel", "-f", "{connection_file}"], "display_name":"Python 3", "language":"python3", "codemirror_mode":"python"}' >> kernel.json
curl https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/64px-Python-logo-notext.svg.png > logo-64x64.png

cd ~