Programming with Python
Kühne Logistics University Hamburg - Fall 2026
Sessions VIII-IX. The first 40 minutes are the checkpoint. It starts now: the board runs one final audit before the big news.
groupby, fair charts vs. misleading onesCmd/Ctrl+S, then menu → Download → Download Python code → upload the .py to the “Checkpoint 5” assignment on Moodle, before the 40 minutes are up. No retakes: one sitting.
The live checks under the tasks are provisional. The final grading runs on my side. The two multiple-choice tasks only say “recorded”, never correct or wrong. That’s expected, they’re scored later. Everything in it was rehearsed in the labs.
The checkpoint is behind you, and so, it turns out, is the startup. Overnight rival chain MunchCorp stopped competing and made an offer: they’re buying the company. The investor read the term sheet, did the math against her own, and told you to take it: her money would have bought growth, theirs buys the whole shop.
Lawyers will tell you deals close on the numbers. This one closed on yours. The clean order data you pulled together in the data room (Session VIII) and the pitch deck you built from it (Session IX) are exactly what convinced the acquirer the books were real.
No cliff-edge growth chart with a chopped axis. Just data that survived a second look. That’s why they signed.
Tobi’s job today is to hand over the data room: the folder with every file the company ever built. You know that folder. It’s python-labs, two labs later.
MunchCorp’s lawyer opens it and asks two questions:
growth.png: is this the chart the investor saw, or has it changed?orders_messy.csv: who changed it after Tobi’s export, and what?Nobody can say. A folder shows what is in it now, and nothing about how it got there. Today you give a folder a history, with a tool called git.
Every acquisition comes with an exit package. Here’s yours: you don’t join MunchCorp. You spin off your own idea and build it.
Let’s get you kitted out.
Over the next weeks you build and present one real project.
README.md carries a short AI-disclosure section: which tools you used, what for, and what you verified yourselfPick something you’re actually interested in. You’ll spend real hours on it. Curiosity is the fuel that carries a project past the boring middle.
The project need not be flawless; an unfinished one can be presented too. Show that you scoped it realistically, built it in the open, and can explain your own code. That’s the bar.
The Beer Game, online: the supply chain classic, with computer players
Dispatch: a live map of Hamburg, and you assign the couriers
Logistics Exchange: trade logistics stocks and oil while the news breaks
Stack the Yard: Tetris for a container terminal
Reverse the Trailer: back a truck into the dock, level by level
Load the Trailer: 33 pallets, no overloaded axle, then the computer beats you
Monday Route Sheet: a real shop’s delivery list in, a driver sheet out
Charge When Cheap: forecast the power price, plan ten electric trucks
Digital twin: an animated copy of a real place, built from your own counts
Chokepoint: close Suez or Hormuz and watch Hamburg’s shipping lanes reroute
Who Owns This Box: your own photos teach a model to name the shipping line
Shelf Gap: daily shelf photos teach a model to spot where a shelf is empty
Measure the Parcel: one phone photo gives length, width, height and the price
Scan to Track: real DHL and Hermes labels in, your own tracking dashboard out
You build your project with the agent, and the agent lives in Zed. So every group needs a laptop that runs Zed.
Right now, in the room:
A good outcome by the end of this block: a one-sentence pitch (“we’re building X that does Y for Z”), a name for the project, and a decision on who owns the shared repo (the owner creates it in the git block, so pick whoever did the git homework; the partners clone). The sentence keeps you honest about scope; the name goes on the repo in a minute.
git and gh were the homework from Session IX. Before we build anything, they need to work. In Zed’s terminal (Ctrl+`):
Didn’t work? Don’t burn the session fighting it. Tell me, sit with a partner whose machine works, and follow along on the slides for now. I sort it out with you in class or by e-mail; nobody gets left behind.
Before your laptop can talk to GitHub, it has to prove it’s allowed to. Signing in to Zed does not do this; git needs its own login, and the gh tool handles it. If gh auth status showed no login, do it now, once per computer:
Choose GitHub.com, HTTPS, authenticate in the browser, and answer yes to “Authenticate Git with your GitHub credentials?”.
Login fighting you? Same rule: tell me, follow along on the slides, and finish at home with the Git Basics page, or with me in the supervised sessions. Nobody’s project stalls on a login.
Everyone, logged in or not: three settings, once per computer. Running them twice does no harm.
Everyone, right now, a practice repo. On github.com click New repository, then:
python-practicePythonCreate repository, then copy the HTTPS URL from the green Code button: https://github.com/you/python-practice.git
That’s a repository: a folder git watches, with its whole history. So far it lives only on GitHub. Next we bring it down.
In Zed’s command palette (Cmd/Ctrl+Shift+P): git: clone, paste the URL, and pick the folder that python-labs sits in, so the repo lands next to python-labs and not inside it. Zed opens the new folder as your workspace: the file tree on the left shows README.md and .gitignore.
The same in the terminal. Use one way, not both:
Everything from here on happens inside this folder: git, uv, the AI. If Zed ever shows an empty file tree, File → Open Folder and pick the cloned folder itself, not the one above it.
uv initOpen Zed’s built-in terminal (Ctrl+`); it starts inside your workspace. Then:
uv init adds main.py, pyproject.toml and .python-version next to the README.md and .gitignore that GitHub made. The second line runs main.py the way you run a lab, and prints Hello from python-practice!
--no-package keeps it a flat folder of scripts, like python-labs, which the same command made in Session VII; without it, uv builds an installable package layout you don’t need yet. And no git init: the folder came from GitHub, it is a git repository already.
Part III encourages AI, and your agent is already here: Mistral Vibe works in whatever folder Zed has open. Open the agent panel and ask:
Explain what
main.pydoes, then add a one-line comment at the top that says so. Don’t change anything else.
This time, watch the panel while it works: what does Vibe do before it shows you a change? Then read the diff before you accept it, as always.
The disclosure rule applies from today: your repo’s README.md says which tools you used, what for, and what you checked yourself.
Every failure mode from Sessions VI and VIII applies at every step, and a loop gives them many steps to compound in. The diff you just read is the guardrail.
Git has a small vocabulary. These five cover all this project needs:
Two of them you’ve already done: the repo exists, and you cloned it. The other three now, live, in your practice repo. Mistakes are cheap when the repo is five minutes old.
Your folder has new files worth saving: main.py with its new comment, pyproject.toml, .python-version, and uv.lock, the exact package versions, so every laptop installs the same ones. In Zed’s command palette:
git: stage all: mark everything as part of the snapshotgit: commit (Cmd/Ctrl+Enter): type a message, save itBecause the folder came from GitHub, git already knows where “up” is. In Zed: git: push. In the terminal:
Reload the repo page on github.com: main.py is there. That’s the commit cycle you’ll repeat all project long: edit → commit → push. Pull is the other direction; you’ll see it in a minute.
Two commits in, the folder has a history. Read it:
One line per commit, newest first: a short ID and the message. Yours sits on top of GitHub’s Initial commit. On github.com, Commits (top right of the file list) shows the same list with author and time; click a commit to see what it changed.
That answers the lawyer for every file in the repo: who changed it, when, and what it looked like before. It’s also the list I read when I grade your project. Set up the project tells me something; stuff doesn’t.
Now the one that counts. Repo owner only, same recipe as the practice repo, with four extras:
.gitignoreuv init --no-package, commit, push, as beforeuv add pandas matplotlib in this folder: every project has its own packagesPartners: don’t create a second project repo. You’ll be invited.
Each partner accepts the invitation (GitHub e-mails it) and clones the project into a fresh folder, next to the practice repo:
git: clone, paste the project’s HTTPS URLOr in the terminal:
Cloning brings the whole project, its history and the connection to GitHub; the partners push and pull normally from the first moment.
README.md, with a heading ## AI disclosure below it, then commits and pushesgit: pull (git pull --no-edit): the pitch lands on their laptopsAll of you have now pushed and pulled in the real repo. On github.com, Commits shows every name.
Clock ran out? This step can wait: inviting and cloning works just as well at the start of Session XI, with me in the room.
Three people, one repo. Four habits keep it painless:
git: pull first, every session: this alone prevents almost every problem--force, no “force push”, everEverything today (the actions, the terminal equivalents, the setup, and a cheatsheet table) lives on the Git Basics page. When today’s follow-along is a fading memory, that’s the page you reopen.
Between now and then, the repo tells your story. Commit as you go. A steady history is worth more than a heroic final night.
random module from Session VIYour machine, your repo, your demo: it must run from the clone on the room’s projector.
The Git Basics page is the reference version of everything we did live today. The setup from Session VII lives on Installing Python and AI Tools.
Lecture X - Git and Your Project | Dr. Tobias Vlćek | Home