Python × CUB

We’ll keep this page up to date with lecture slides, additional materials, and links to every task and homework. Check back anytime for the latest course information.

Jump to current week ↓
Sep 5–11
Lecture
Intro
Incredible Python
How to run a program
Memory Model
I/O
Seminar

Basic Python

Simple types: int, float, string, bool
complex Advanced
Collections: list, tuple, dict, set
Time complexity of collections Advanced
import collections Advanced
Functions
Nested functions, scoping Advanced
IDE and debugging, Jupyter, venv/uv
Shallow vs deep copy
Sep 12–18
Seminar
How to work on a homework
I/O — Recap from the lecture
Modules and HTTP
Libraries/modules, PyPI
Requests
Virtual env, pyproject.toml, pip, uv
if __name__ == "__main__"
Cyclic imports
HTTP API, JSON
Homework

Homework 1

Deadline: Sep 25, 23:59 CET
  1. Implement a running key cipher
  2. Reformat git log
  3. Find a “wiki distance” between two articles
  4. Find the most productive committed across all repositories in github organisation (excl. merge commits, without using github client libraries).
  5. Implement tail() function returning last n lines of a file Advanced
Talks

Topics announcement

Sep 19–25
Seminar
Comprehensions
List, dict, set comprehensions
Comprehensions with filters
Nested comprehensive
match-case Advanced
Exceptions
Raising and catching exceptions
Exception inheritance
Try-finally
except* and ExceptionGroup Advanced
Deadline

For Homework 1

Please submit your homework by 23:59 CET on Sep 25.
Sep 26–Oct 2
Seminar
Decorators
What decorator is, how to define own decorator
@staticmethod, @classmethod
@functools.lru_cache
Decorators with parameters
Homework

Homework 2

Deadline: Oct 9, 23:59 CET
  1. Implement retry decorator
  2. Implement logging decorator
  3. Implement secret masking decorator
Talks
Deadline

Plan/proposal deadline

Oct 3–9
Seminar
Regexps
Deadline

For Homework 2

Please submit your homework by 23:59 CET on Oct 9.
Oct 10–16
Seminar
Deadline
Defense of Lab 1
Oct 17–23
Lecture
Functional programming
Concurrency and Async programming
OOP
Testing
Seminar
Classes and OOP
Constructors, instance vs class attributes, methods
Magic methods
@dataclass
Inheritance, super(), method overriding
Multiple inheritance Advanced
Polymorphism Advanced
Homework

Homework 3

Deadline: Oct 30, 23:59 CET
Implement map, filter, reduce and zip without using map, filter, reduce and zip.
Lab

Lab 2

Defend your solution during the seminar in the week of Nov 7–13.
Feature for the open-source project · Defence a feature idea in advance · Paired work?
Oct 24–30
Seminar
Async programming
Deadline

For Homework 3

Please submit your homework by 23:59 CET on Oct 30.
Talks
Deadline

Text/material is ready

Contest

Competition?

Oct 31–Nov 6
Seminar
numpy, scipy, pandas
pytest
Nov 7–13
Seminar
Deadline
Defense of Lab 2
Talks
Deadline

Presentation draft

Nov 14–20
Lecture
Details will be added later
Seminar
FastAPI, creating HTTP API
Databases? Sqlite and SqlAlchemy?
Nov 21–27
Seminar
Talks

A conference with your talks!

Nov 28–Dec 4
Seminar
Details will be added later
Dec 5–11
Seminar
Details will be added later
Dec 12–18

EXAM