# Spell checking in Jupyter notebooks

## UPDATE

The original post (see below) is terribly out of date now with broken links and deprecated procedures. To install spell checker for Jupyter, go to this link and follow the procedure.
Alternatively, you can install the Calico extensions that are now maintained here. Open a terminal window and write:

git clone https://github.com/Calysto/notebook-extensions.git
cd notebook-extensions
jupyter nbextension install calysto --user
jupyter nbextension enable calysto/spell-check/main


## Deprecated!!!

This afternoon I found a nice spellchecker for Jupyter markdown cells BROKEN LINK. Here's the step by step procedure for the installation of the spellchecker and two other usefull tools:

• Open a terminal window and type
sudo ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip

• Go to ~/.ipython/profile_default/static/custom, and add the following line to the end of custom.js.
IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');

• Start a new ipython notebook. If everything goes well, you should see the following addition to the toolbar:

### Update (thanks to Henry Schreiner)

In Jupyter, instead of adding the load_extension line, you can run the following code in a notebook cell:

%%javascript
"calico-document-tools":true,
"calico-cell-tools":true}})


### Update II (thanks to Noam Elfanbaum)

Run the following in a terminal:

jupyter nbextension enable calico-spell-check


# JFVM: a finite volume tool for Julia

During the Christmass holydays, I spent some time to convert my Matlab FVTool to a Julia package. The result, which I call JFVM is a bit Matlabesque, but the package works. In this post I'm going to show how it works.

### Installation¶

To install the package, you can use Pkg.add("JFVM") in Julia, or clone the most recent version (recommended). You need to have Julia installed. JFVM relies on PyPlot, PyCall, and Mayavi for visualization. Here's the procedure.

# Physical properties in Julia: CoolProp

Recently, I was analyzing my core-flooding experimental data in a Julia notebook, when I realize that I don't have access to a few Matlab functions that I have written (or found elsewhere), which I use regularly for the calculation of physical properties of pure components. For instance, viscosity of water (I know that you know it is 0.001 Pa.s) or density of CO2 or nitrogen at different temperatures and pressures. I know that Professor Wagner and his group have developed a few highly-accurate equations of state for industrial applications and I knew that there is a software called FPROPS which is used in Ascend IV package. Searching the name in google showed me a fantastic package called CoolProp which is being developed mostly in thermodynamics laboratory in Universite de Liege. The code is written in C++ but it supports many languages and environments including Matlab and Python. The Python part was interesting to me because I can call it using PyCall package in Julia. First I installed the CoolProp package using the instructions here. You can do it in Ubuntu 14.04 by running the following code in terminal:

sudo apt-get install g++
sudo apt-get install cython
sudo apt-get install python-pip
sudo apt-get install python-dev
sudo pip install CoolProp


# Matlab and Julia -- Part II

In the previous post, I explained how to program the solution procedure of Buckley-Leverett equation in Matlab. Here, I'm trying to move everything to Julia. First, you need to install Julia, and a few important packages. Personally, I prefer the last development version. In Ubuntu-based distributions, you can install it by writing the following lines in the terminal.

sudo add-apt-repository ppa:staticfloat/julianightlies
sudo apt-get update
sudo apt-get install julia


# Matlab and Julia -- Part I

I'm very comfortable with Matlab. It does most of the things that I need to do and I've written so many handy scripts and functions in it that I can barely afford to divorce it. I can easily read my data, which are not so many most of the time, analyze them, plot the results, and export the final figure to a format I prefer. However, I'm going to try and detach myself by learning how I can do all the Matlab stuff in Julia. I've already learned how to work with the arrays, write types, and I almost know all the differences. I'll write a post about it later. Here, I' going to try the root finding and optimization in Julia. Let's star by root finding. Let's say I have a function in Matlab. Most of the time, if it's not a long relation, I write it using @. For instance, consider the fractional flow function:

$$f_w = \frac {k_{rw}/\mu_w}{k_{rw}/\mu_w+k_{ro}/\mu_o}$$