M1 Artificial Intelligence · semester 7 · Python

Python: tooling and data

Environments and packaging first, then images, a command-line tool, and logging.

The practicals

TP1 Environments and packages Virtual environments with venv and pip, then uv, then notebooks running against each. Built around a weather API. TP2 Images as Numpy arrays Loading, greyscale, padding, convolution, blurring and edge detection. TP3 A duplicate finder on the command line A click tool: walking a directory, hashing files, handling duplicates and corrupt images, resizing, reporting. TP4 Logging, then a logger of your own The standard module, then a logger class of your own: levels, file output, decorators, a static class, a singleton.

The environment

All four run in one conda environment, declared once in environment.yml and registered as the Jupyter kernel Python 3.11 (m1ai-programming). TP1 is the exception by design: its subject is environments, so it builds its own with venv and uv rather than using this one.

Source The folder on GitHub Four practicals, each with its README and handout.