-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
|
||
# Jupyter notebooks | ||
# Jupyter Lab & Notebooks | ||
|
||
![](https://upload.wikimedia.org/wikipedia/commons/2/21/OpenGL_Tutorial_TODO.png){width=300x} | ||
If you are working with Python, a great way to develop your code efficiently, especially when performing data analysis or creating POCs, is to use Jupyter notebooks. Here we are showing you how to do this through Jupyter lab, which is a web-based, interactive development environment that includes Jupyter notebooks. | ||
|
||
|
||
# How to install: | ||
|
||
In your terminal/Powershell you can use `pip` to install Jupyter Lab. | ||
|
||
```bash | ||
pip install jupyterlab | ||
``` | ||
|
||
# How to launch: | ||
|
||
Then you can launch the application with: | ||
|
||
```bash | ||
jupyter lab | ||
``` | ||
|
||
This will start Jupyter Lab on your browser. On the left panel you can navigate through your files and directories. The right panel is the Launcher; from here you can start a notebook, as shown below. | ||
|
||
![Interface](img/jupyter-1.png) | ||
|
||
# How to work with a notebook | ||
|
||
Within the new notebook, you can write small blocks of code in separate cells and run them individually by pressing `SHIFT+ENTER`. You can move cells around and collapse them, plot graphs and images and you can even add [Markdown](../../docs/writing/markdown.md) cells to document your process. | ||
|
||
![Interface](img/jupyter-2.png) | ||
|
||
The biggest advantage of the notebook is that you do not need to rerun parts of code that might be time-consuming (eg loading a large TIF file). Once a cell is run, its state is preserved and subsequent cells can be changed and run independently. | ||
|
||
As shown below, you can use a exclamation mark to run Bash commands (for example for installing a new python module to your environment) and a question mark to see some information about you functions an variables. | ||
|
||
![Tips](img/jupyter-3.png) |