IJulia Notebook
Whenever possible I like to create the course environment in a Docker container, for the instructor and for the students.
In online courses, I use my machine as IJulia Notebook server.
Ideas are from Andre Ferrari
What is a notebook?
In this case, "notebook" or "notebook documents" denote documents that contain both code and rich text elements, such as figures, links, equations, ... Because of the mix of code and text elements, these documents are the ideal place to bring together an analysis description, and its results, as well as, they can be executed perform the data analysis in real tme.See
Options to use a notebook
You have several option to work with IJulia:
- You have installed Julia on your own machine.
- You have installed Docker on your own machine and run IJulia from a container with Julia and IJulia installed.
- You make use of the IJulia server installed on the machne of your instructor.
The IJulia Notebook is installed on the machine of the instructor, but you can also install IJula on your own notebook. Follow the instruction in the appendix.
Starting IJulia
Ask your instructor for the public ip-address and the token.
The first time you enter the IJulia server, it will ask you one time for the token.
Login to the IJulia server
Step | Action | Comment |
---|---|---|
1 | Start browser | |
2 | http://x.x.x.x:8888 | Ask instructor for the complete the public ip-address of the IJulia server |
3 | Enter the token in the Password or token field | |
4 | Click on the Log in button |
Create a new notebook
Step | Action/Response | Comment |
---|---|---|
1 | Click on work directory | |
2 | Click on button New | Open New menu. |
3 | Select on item Julia.x.x.x | Create a new Julia Notebook. |
New Notebook is opened | ||
4 | Place the cursor in the first cel | In this cell you can type your code. |
5 | println("Hello World!") | Type your Julia code. |
6 | Shift-Enter | Activate the code and create a new cell |
Notebook commands
Working with a Notebook is rather intuitive. Here are some commands you will often use.
Command | Comment |
---|---|
Shift-Enter | Execute code and create a new cell below. |
Ctrl-Enter | Execute code and stay in the cell |
Tab | Code completion, e.g. printl-Tab => println. |
Double Tab | List with option, e.g. print-Tab displays print, println, and printstyled |
\sqrt-tab | Special characters, in this case √ . |
Esc-A | Create empty cell above the current cell. |
Esc-B | Create empty cell below current cell. |
Esc-M | Change to a markdown cell. |
Esc-Y | Change to code cell. |
Click on the keyboard icon to see more options.