Python-Kurs - iPython-Dingsis

This commit is contained in:
2024-09-16 23:45:34 +02:00
parent d02339bb80
commit dfbf934e7f
28 changed files with 12283 additions and 84 deletions
+97 -84
View File
@@ -38,7 +38,7 @@
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{color}%farbiger text
\usepackage{hyperref}
%\usepackage{hyperref}
\usepackage{cleveref}
@@ -242,9 +242,9 @@ Additions to the original lecture material were made by Markus Demleitner, Marku
This course was originally written by Thomas Robitaille, and was carefully adapted by Markus Demleitner and myself.
The web page for this course is [http://wwwstaff.ari.uni-heidelberg.de/rschmidt/pycourse/].
The web page for this course is \url{http://wwwstaff.ari.uni-heidelberg.de/rschmidt/pycourse/}.
The lecturer is Felix Spanier. You can contact me during the course and at \url{felix.spanier@uni-heidelberg.de
The lecturer is Felix Spanier. You can contact me during the course and at \url{felix.spanier@uni-heidelberg.de}
Topics
\begin{itemize}
\item Using the IPython Notebook
@@ -256,11 +256,12 @@ Topics
\item Applying Python to scientific problems
\item Object-oriented programming
%%TODO Matplotlib, Schleifen
\end{itemize}
%\end{itemize}
\end{frame}
\begin{frame}{Structure}
\only<1>{
The block course lasts five days, and each day will follow this schedule:
9:00-10:30 - lecture/exercises
@@ -270,90 +271,102 @@ The block course lasts five days, and each day will follow this schedule:
13:30-14:30 - lecture/exercises
14:30-17:00 - computer pool available to finish homework
The lectures will be mixed with exercise sessions - from time to time I will give you 5 or 10 minutes to complete a given task/exercise. There will be problem sets during the week, and you will be required to hand these in a deadline indicated on the problem sheet. An average of 60% [=54 points] in the problem sets will be required to obtain 2 credits points at the end of the course.
The lectures will be mixed with exercise sessions - from time to time I will give you 5 or 10 minutes to complete a given task/exercise. There will be problem sets during the week, and you will be required to hand these in a deadline indicated on the problem sheet. An average of 60\% [=54 points] in the problem sets will be required to obtain 2 credits points at the end of the course.
The course will be in English or German as convenient.
I am happy to review or talk about your code/solutions to exercises.
Solutions to problem sheets
All solutions should be submitted as IPython (/Jupyter) notebooks or python programs (one notebook/program per problem set).
-> Please use a filename that contains the name of the problem sheet and your name.
-> Only submit the program (.py or .ipynb), do not submit data downloaded from the course web page.
Submissions have to be entered in the uebungen system.
The following criteria are taken into account for grading problem sets - the notebook/program should:
run with no errors under python3
produce the correct results
be clearly readable, and include text to explain what you are doing and why
not include any unused code! (-> readability)
Please make use of the ability to add comments and text around your code. Make it so that someone not familiar with the problem could read it and understand your solution.
There is never a unique solution to a problem, so it does not matter if your programs do not look the same as somebody else's! What matters most is that you get a chance to make mistakes and learn from them.
Policy on handing in solutions
Problem set submissions need to be handed in separately for each participant.
The deadlines for the Problem Sets are:
Problem Set 1 Thursday, April 11th 2024, 7pm CEST
Problem Set 2 Thursday, April 18th 2024, 7pm CEST
Problem Set 3 Thursday, April 25th 2024, 7pm CEST
Your own python installation on your Laptop
The default is to use the jupyter server (see below), but if you would like to use Python on your laptop, you have several possibilities:
If you have a linux laptop and are familiar with package managers, most major scientific Python packages are available through these
Otherwise, try and install the Anaconda Python distribution
Getting set up
CIP Pool, the jupyter server and the Lecture Notes
The default is to use the server https://jupyter.kip.uni-heidelberg.de for this course (there is also jupyter2 in case of overcrowding). Please login there.
You can download the notebooks I'm showing, the problem sets and the ancillary data files from here
The simplest way to upload the files to the jupyter server is the following:
copy link location (using the "right" mouse button)
then open a terminal on the jupyter server using "New" -> "Terminal" (top right next to "Upload")
type: wget [paste link location here]
using the browser, go back to the tab with the jupyter Home directory ("Home")
The file should now be visible in the Home directory.
In the same directory you also find the 'data' directory. The contains material that will be used in this course. In case you used your account before, this may also be called 'data2'. You can ask me if you want to rename this.
Using ipython on the CIP pool computer directly
This option is now deprecated due to the antiquated python installation on these systems, so we do not recommend to do this.
For backwards compatibility I still keep the instructions here:
You will need to start up a command-line Terminal application. In the CIP pool this is located in the Anwendungen -> Zubehör -> Terminal menu.
To ensure a common environment, in the CIP pool we'll be using an updated version of ipython over what is installed on the machines themselves. To use that, you have to manipulate your path. Here is one way to do that:
echo "export PATH=/local/py4sci/anaconda3/bin:$PATH" >> ~/.bashrc
exec bash
You only need to do that once.
Then fetch the notebooks and execute the notebook player (optionally in a subdirectory):
ipython notebook
A web browser should open and you should be ready to go.
}
\end{frame}
%
%\begin{frame}{Solutions to problem sheets}
%
%All solutions should be submitted as IPython (/Jupyter) notebooks or python programs (one notebook/program per problem set).
%
%\begin{itemize}
%\item Please use a filename that contains the name of the problem sheet and your name.
%\item Only submit the program (.py or .ipynb), do not submit data downloaded from the course web page.
%\end{itemize}
%Submissions have to be entered in the uebungen system. %%TODO
%
%The following criteria are taken into account for grading problem sets - the notebook/program should:
%
%run with no errors under python3
%produce the correct results
%be clearly readable, and include text to explain what you are doing and why
%not include any unused code! (-> readability)
%
%Please make use of the ability to add comments and text around your code. Make it so that someone not familiar with the problem could read it and understand your solution.
%
%There is never a unique solution to a problem, so it does not matter if your programs do not look the same as somebody else's! What matters most is that you get a chance to make mistakes and learn from them.
%Policy on handing in solutions
%
%Problem set submissions need to be handed in separately for each participant.
%
%The deadlines for the Problem Sets are:
%
%Problem Set 1 Thursday, April 11th 2024, 7pm CEST
%
%Problem Set 2 Thursday, April 18th 2024, 7pm CEST
%
%Problem Set 3 Thursday, April 25th 2024, 7pm CEST
%\end{frame}
%
%\begin{frame}{Your own python installation on your Laptop}
%
%
%The default is to use the jupyter server (see below), but if you would like to use Python on your laptop, you have several possibilities:
%\begin{itemize}
%\item If you have a linux laptop and are familiar with package managers, most major scientific Python packages are available through these
%\item Otherwise, try and install the Anaconda Python distribution
%\end{frame}
%
%\begin{frame}{Getting set up}
%
%\textbf{CIP Pool, the jupyter server and the Lecture Notes}
%
%The default is to use the server \url{https://jupyter.kip.uni-heidelberg.de} for this course (there is also jupyter2 in case of overcrowding). Please login there.
%
%You can download the notebooks I'm showing, the problem sets and the ancillary data files from here
%
%The simplest way to upload the files to the jupyter server is the following:
%
%copy link location (using the "right" mouse button)
%then open a terminal on the jupyter server using "New" -> "Terminal" (top right next to "Upload")
%type: wget [paste link location here]
%using the browser, go back to the tab with the jupyter Home directory ("Home")
%
%The file should now be visible in the Home directory.
%
%In the same directory you also find the 'data' directory. The contains material that will be used in this course. In case you used your account before, this may also be called 'data2'. You can ask me if you want to rename this.
%Using ipython on the CIP pool computer directly
%
%This option is now deprecated due to the antiquated python installation on these systems, so we do not recommend to do this.
%
%For backwards compatibility I still keep the instructions here:
%
%You will need to start up a command-line Terminal application. In the CIP pool this is located in the Anwendungen -> Zubehör -> Terminal menu.
%
%To ensure a common environment, in the CIP pool we'll be using an updated version of ipython over what is installed on the machines themselves. To use that, you have to manipulate your path. Here is one way to do that:
%
%\begin{bash}
%echo "export PATH=/local/py4sci/anaconda3/bin:$PATH" >> ~/.bashrc
%exec bash
%\end{bash}
%
%You only need to do that once.
%
%Then fetch the notebooks and execute the notebook player (optionally in a subdirectory):
%
%\begin{bash}
%ipython notebook
%\end{bash}
%
%A web browser should open and you should be ready to go.
%
%\end{frame}
%
%
\end{document}