Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Move the the downloaded zip file (`python-for-hydrology-main.zip`) to the select

# Test the class environment

After successful installation of the class environment and downloading the class repository navigate to the `installation` directory in class repository.
After successful installation of the class environment and downloading the class repository navigate to the `installation` directory in class repository. In Windows, this is done in Miniforge Prompt.

```shell
cd python-for-hydrology/installation
Expand Down
64 changes: 64 additions & 0 deletions notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Jupyter Lab

Jupyter Lab will be used to view and interact with Python Notebooks.

## Starting Jupyter

### Windows

1. Open Miniforge Prompt. Startup steps (2-4) are done within Miniforge.

2. Navigate to the notebooks folder:

For example:

```shell
cd python-for-hydrology/notebooks/part0_python_intro
```

3. Activate the pyclass environment (this assumes the installation steps were already performed).

```shell
conda activate pyclass
```

4. Launch JupyterLab with the command:

```shell
jupyter lab
```

A browser should open up:

<img src="images/jupyter_launch.png" alt="Launch Jupyter" width="300"/>

Choose Python 3 (ipykernal)

5. Choose one of the .ipynb files

## Using Jupyter

* Individual code blocks can be run with "Shift + Enter".

* You can pick a spot in the notebook and run all
the code up until that point. To do that, place your
cursor in the place you want the code to run to. Go
to the Run menu and choose "Run all above selected cell".

<img src="images/run_to.png" alt="Run to a code block" width="300"/>

* Text notes can be added by adding a cell and choosing "Markdown":

<img src="images/take_notes.png" alt="Take notes" width="200"/>

* Code cells that have been run will have a number in the [ ]:

<img src="images/was_run.png" alt="Take notes" width="300"/>

* Export the notebook to a Python script:

File -> Save and Export Notebook As -> Executable Script




Binary file added notebooks/images/jupyter_launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/images/run_to.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/images/take_notes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/images/was_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading