Winter Semester 2026/2027
Summary
This class is an advanced course in Python programming for Data
Science.
Topics include concepts of software engineering (modularization,
design patterns, documentation, unit tests, version control), advanced
features of the Python language (including Numpy, Scipy, Sympy,
Matplotlib), performance aspects of programming (Cython/Numba/JAX,
sparse matrix operations), Graphics, and elementary concepts of
parallelization.
Quick Links
Software
that needs to be installed on your computer
It is strongly recommended that you install the Anaconda
Python Distribution on your computer. If you run Linux, it should
also be possible to use distribution packages for everything (an initial
list of the relevant software is git, spyder,
pytest, sympy, and scipy, later
there will be numba, cython, and
jax which might cause more of an installation
headache).
One you have installed Anaconda, open the Anaconda console and
install necessary additional packages by typing
conda install -c anaconda git
conda install -c conda-forge gh
conda install jax cython numba
gh extension install foundation50/gh-student
Remark: If you install git on Windows outside of the
anaconda installer, you’ll end up using two different command consoles
with different shells and different path settings. This causes issues
for the workflow described below. Similar issues might come up with
other software if not installed via conda.
Initial setup
- If you do not already have an account on GitHub, sign up for one.
- You will receive an invitation by email to join the organization
KU-MIDS-MO on GitHub. Please accept this invitation. You might be asked
to “verify your email address”. In that case, add the email address
based on your KU user name to your github accout. It is of the
format
MGA12345@stud.ku.de. The email address
Firstname.Lastname@stud.ku.de will not work.
Standard workflow
For each assignment, do the following steps from the Anaconda
console:
gh student accept KU-MIDS-MO adv-prog assignment1
(Change number on assignment as necessary)
- Navigate, if necessary, to an appropriate folder using
cd foldername, then type the clone command
that was output from in the previous step. (There is an https and an ssh
version, use ssh if you have set up an ssh public key on your github
account - this avoids ever typing passwords - otherwise use https.)
- Open Spyder, or another editor or IDE, navigate to the new folder
created in the previous step, and do your work.
- On the console, you can run the individual unit tests as
pytest test_unittests.py (use appropriate unit test file
name), or run all unit tests by simply typing pytest.
- Once everything works, type
gh student submit
- Github will then rerun all tests and assign 5 points for each unit
test that passes without error. Some questions will be graded manually,
so you will not get immediate feedback.
Grading
- The grade is determined from your solutions to the assignments
(approximately 8 in total). Submission must be through Github
(“portfolio grade”)
- You are required to present your solutions regularly and without
prior announcement.
- The sequence of presentations is random. If a student fails to be
present when called to show their work, they will be put into the front
position of the presentation queue and must present at the earliest
possible occasion. This must happen at most twice per semester.
- Subsequent failure to present when called, or failure to be able to
explain one’s code will lead to loss of the points for the entire
assignment.
- An oral exam covering the details of one or more assignments may be
called at any time.
- Failure to explain your submitted code properly can lead to the
rejection of the entire assignment, even if the code is correct and
complete.
Code Plagiarism
- The code you submit should be written by you.
- You are encouraged to talk with your peers about the problems, so
long as you write the code yourself.
- You can help others, but do not share your code electronically.
Copy-pasted submissions do not help anybody.
- Submissions will be checked by plagiarism detection software; the
ultimate determination what does and what does not constitute plagiarism
is with the instructor.
- If you take substantial help from online resources, you must credit
your source in a code comment. If your help comes from an LLM, you have
to document the conversation (see below). There is no penalty for using
properly acknowledged and documented resources, but you will be expected
to be able to explain your code and make small changes on request.
Advice on the use of LLMs
- The purpose of this class is to build basic skills regarding the
efficient implementation of mathematical algorithms in Python. Even
though state-of-the-art LLMs are now capable of solving most or all of
the class assignments on their own, using them in this way defeats the
purpose of the class. Don’t let an LLM take your place!
- The best choice is not to use LLMs at all in this class.
- LLMs might be useful to get quick information on software
documentation, APIs, and similar (“How do I do X in Python?”)
- LLMs can also help if you are really stuck and need help debugging.
Do not ask too early or too routinely, because you need to hone your own
debugging skills.
- If you get any kind of nontrivial help from an LLM, save the entire
conversation to a file and check it into your submission
repository.
- Your are responsible for everything you submit, and must be
able to explain any part of your code.
Topics
- Oct 12, 2026
-
Introduction, root finding methods: Newton’s method, secant method,
bisection for functions of a single variable (this
article summarizes what was covered in class; for more information,
see the Wikipedia articles on Newton’s
method, the secant method,
and the bisection
method; the theory is covered in any basic textbook on numerical
analysis)
- Oct 13, 2026
-
Implementation questions on root finding methods, order of
convergence
- Oct 19, 2026
-
Basins of attraction, meshgrid-plotting (see, e.g., these
notes)