This repository includes both the Jupyter Notebooks and the complement material for the tutorial containing programming exercises. The worksheets for the tutorials can be found on ISIS.
If the tutorial includes coding exercises, there will be Jupyter Notebooks accompanied with required data and additional hints.
The Jupyter Notebooks and the materials should be downloaded before the tutorial. The programming exercises will be covered in the tutorials. However, for better understanding it is recommended to already go through the programming exercises before the tutorial.
We will not ask you any programming questions in the exam! The exercises help you to deepen your understanding of the theory in the lectures. Furthermore, they will prepare you for the voluntary Python group project.
In the tutorials, we will repeatedly work with the programming language Python. If you are unfamiliar with the language, you might find the following tutorials useful.
The Python notebook based notes of Robert Johansson are a comprehensive kick starter.
- Lecture 0 covers installation and getting ready.
- Lecture 1
zooms through most basic general python control structures (only
brush over it and stop reading early, i.e. if you read the word
classesyou already know too much). - Lecture 2 is the most important and closely connected to the exercises.
- You might as well stop now, but if you are hooked, have a look at Lecture 3 for more physics and Lecture 4 for prettier graphs.
Further reference material of help is are the website-books http://python-course.eu/ (English), http://python-kurs.eu/ (German); especially of interest might be the pandas bit in the end, which will make the exercises a breeze at the expense of yet another package to learn.
You can use Binder to directly run code from the Jupyter Notebooks online without a local installation. It will create the necessary software packages and open a Jupyter Notebook from a remote server. To use binder click on the blue badge or follow the link
https://mybinder.org/v2/gh/p-glaum/energy_systems_tutorial.git/main
It might take a moment, so please be patient 🙃
You should now be ready to do the tutorials in the browser 🥳
If you prefer to do the tutorials locally with your own Python installation,
first download the tutorials with directly from the repository as compressed zip-file or by using git.
Directly from repository as compressed zip: https://github.com/p-glaum/energy_systems_tutorial/archive/master.zip
With git from the terminal:
cd /path/where/your/tutorial/folder/should/be
git clone https://github.com/p-glaum/energy_systems_tutorialNote that to be able to use git, you first need to download git (https://git-scm.com/downloads)
To manage Python environments, we recommend to use conda to install the packages required.
Install Anaconda.
Create a new conda environment from the provided environment.yml file with the following set of commands in the prompt/terminal:
conda env create -f environment.ymlFor detailed instructions see https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file. It will take some time!
After the conda environment is installed you can activate the environment with the following command:
conda activate es-tutorialNow with the activated environment, you can open a Jupyter Notebook with the following command in the tutorial folder (where your notebooks are):
cd /path/where/your/tutorial/folder/should/be
cd Notebooks
jupyter labor
cd /path/where/your/tutorial/folder/should/be
cd Notebooks
jupyter notebook