Jupyter with IJulia

Reading Time: 3 minutes

“The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text.”

Jupyter offers an open-source (BSD-licensed), interactive computing environment for Python, Julia, R and other languages.

It was created in summer 2014 by the IPython development team to carry forward a vision of reproducible interactive computing for all programming languages:

  • Python
  • Julia
  • R
  • Ruby
  • Haskell
  • Scala
  • etc…

Need for Jupyter:

The minimum requirement to work with Julia in a scientific context is:

  1. An environment for editing and running Julia code
  2. The ability to generate figures and graphics

And a  very nice option that provides these features is Jupyter.

As an added bonus Jupyter also provides:

  • Widgets to manipulate and visualize data in real time.
  • Share notebooks with others using email, DropBox, GitHub and the Jupyter Notebook Viewer
  • It has support for over 40 programming languages, including those popular in Data Science such as Python, R, Julia and Scala.

 

Jupyter Notebook

IJulia is a Julia-language back-end combined with the Jupyter interactive environment.

This combination allows you to interact with the Julia language using Jupyter’s powerful notebook, which combines code, formatted text, math, and multimedia in a single document.

Installing Jupyter using IJulia

In the previous blog,  we have already covered the installation of Julia.

Open Julia and run:

After installing Ijulia, the easiest way to check if your installation was successful is to run:

 

A web browser window would open with url: localhost:8888/tree

Jupyter Notebook

the page you are looking at is called the “dashboard”

If you click on “New” you should have the option to start a new Julia notebook

JuliaNewBook.png

Let’s try a very simple example in this Julia notebook using PyPlot.

jupytercode

Shutting down Jupyter

By simply closing the browser, it will not close you Jupyter Notebook App. You can reopen the previous address and the Jupyter Notebook App will be redisplayed.

When a notebook is opened, its kernel is automatically started. Closing the notebook browser tab, will not shut down the kernel, instead the kernel will keep running until is explicitly shut down. One needs to close the associated terminal to completely shut it down.

To shut down a kernel, the Notebook dashboard has a tab named Running which shows all the running notebooks and allows shutting them down(by clicking the shutdown button).

References:


KNOLDUS-advt-sticker

Written by 

Himani is a Software Consultant, having experience of more than 2.5 years. She is very dedicated, hardworking and focussed. She is Familiar with C#, C++, C , PHP, Scala and Java and has interest in Functional programming. She is very helpful and loves to share her knowledge. Her hobbies include reading books and cooking.

3 thoughts on “Jupyter with IJulia2 min read

Comments are closed.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading