To book a consultation, visit petr.budaktivni.cz/en. Or Czech version petr.budaktivni.cz.
This repository is a collection of Python code snippets, examples, and best practices. It is part of a larger effort to provide hands-on experience with different aspects of Python. It does not aim to replace comprehensive resources; rather, it provides a quick reference for some common problems and solutions. It can also be used as presentation material in some cases.
It was partly used as supporting material for various presentations and workshops I have given since 2023. The topics covered by this repository include:
- Python 101 Workshop - A 3x3h hands-on workshop covering Python fundamentals for JavaScript developers transitioning to Python (May 2025)
- Astral UV Workshop - Opinion-based walkthrough on how to use Astral UV properly for Python dependency management (February 2025)
- Python Typing Workshop - Comprehensive guide to Python type hints, generics, and edge cases (August 2025)
- Neural Network - All about neural networks, for example reimplementation of gradient descent based on Andrej Karpathy's explanation with Jupyter notebooks (June 2025)
- Advanced Inheritance - Comprehensive exploration of Python inheritance, including metaclasses, multiple inheritance, and the diamond problem
- Asynchronous Code - Process vs Thread vs Asyncio comparison with performance optimization examples (January 2025)
- Dependency Injection - Custom implementation of dependency injection patterns inspired by Python DI libraries (May 2025)
- Edge Cases - Collection of Python edge cases, descriptors, dunder methods, and unusual behaviors
- Main Playground - Quick experiments and code snippets
I created a system of badges to encourage people to share about different technologies — each badge is a generated image that humorously represents the content of a presentation. Here are examples of badges I made for my presentations:
Explanation of gradients (how PyTorch works internally):
How to use Astral UV properly:
I recommend using Astral UV from February 2025 onwards. See the astral-uv-workshop folder for detailed guidance on proper UV usage. Each project folder should have its own pyproject.toml. If not present, you can use any generic Python environment.
uv syncpython_101_workshop/- Complete 3x3h workshop materials for Python fundamentalsastral-uv-workshop/- Comprehensive guide to Astral UV dependency managementtyping_workshop/- Python type hints and advanced typing concepts
advanced_inheritance/- Inheritance patterns, metaclasses, and complex class hierarchiesasynchronous_code/- Async programming, performance optimization, and concurrency patternsdependency_injection/- Custom DI implementation with testsedge_cases/- Python edge cases, descriptors, dunder methods, and unusual behaviors
pytorch_neural_network/- Neural network implementation from scratch with gradient descentimgs/- Workshop badges and presentation images
playground.py- Root-level experimentation file

