Skip to content

Latest commit

 

History

313 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Python Mastery for AI Engineering

A comprehensive, hands-on curriculum built to take you from Python basics to software engineering and core mathematics for AI.

This repository is a self-contained, practical learning suite designed for developers, data scientists, and aspiring AI engineers. Every module emphasizes practical execution: learn, see, practice, and build.

🚧 Project Status: In Progress (Modules 00 through 15 currently implemented)


🎯 Core Philosophy

Build things. Break things. Fix things. Ship things.

Every module in this repository follows a consistent, production-oriented structure:

  1. Learn concepts with detailed explanations (theory.md)
  2. See clean, runnable code demonstrations (examples.py)
  3. Practice hands-on problems with solution validation (exercises.py)
  4. Build functional mini-projects (project.py)
  5. Explore interactively with data/math plots (notebook.ipynb | Data & Math modules)

📂 Standard Module Folder Structure

module_folder/
├── README.md              # Module context, prerequisites, estimated time, and objectives
├── requirements.txt       # Python dependencies required for the module
└── topic_subfolder/
    ├── theory.md          # Theoretical foundations & best practices
    ├── examples.py        # Runnable code demonstrations
    ├── exercises.py       # Guided practice problems & answers
    ├── project.py         # Real-world mini-project implementation
    └── notebook.ipynb     # (Data & Math modules) Interactive visual Jupyter notebooks

🗺️ Currently Available Curriculum & Modules

Phase 1: Python Foundations (0005)

Master fundamental syntax, memory model, data structures, and program flow.

Module Subtopics Included Primary Mini-Projects
🔹 00_foundations Variables, primitive types, arithmetic/logical operators, I/O, PEP8 style Interactive CLI Calculator
🔹 01_control_flow if/else, match/case, for & while loops, break/continue/pass Number Guessing Game
🔹 02_data_structures Lists, tuples, sets, dictionaries, list/dict comprehensions Contact Management System
🔹 03_functions Functions, positional/keyword arguments, *args/**kwargs, lambdas, recursion Math Utility Library
🔹 04_modules_packages Module importing, custom packages, __init__.py, virtual environments Custom Python Package
🔹 05_error_handling try/except, finally/else, exception hierarchy, custom exceptions Robust File Processor

Phase 2: Practical Python (0609)

Work with file formats, object-oriented architecture, advanced language features, and Python's standard library.

Module Subtopics Included Primary Mini-Projects
🔹 06_file_handling Reading/writing text files, JSON serialization, CSV manipulation Data Format Converter Tool
🔹 07_object_oriented_programming Classes, objects, attributes, inheritance, polymorphism, encapsulation, magic methods Bank Account Management System
🔹 08_advanced_python Decorators, generators, iterators, closures, custom context managers Reusable Context Manager
🔹 09_standard_library os/sys, datetime, collections, itertools, argparse Automated CLI File Organizer

Phase 3: Software Engineering (1013)

Build maintainable, well-tested, high-performance, and network-connected applications.

Module Subtopics Included Primary Mini-Projects
🔹 10_testing_debugging unittest, pytest, interactive debugging with pdb, standard logging Automated Test Suite & Log Audit
🔹 11_performance_optimization Time complexity (Big-O), code profiling, threading, multiprocessing, asyncio Concurrent Web Scraper
🔹 12_databases SQLite basics, PostgreSQL connection, ORM with SQLAlchemy Task Manager with DB Persistence
🔹 13_networking_web_basics Sockets, HTTP requests, web scraping, REST APIs with Flask & FastAPI Secure REST API & Web Scraper

Phase 4: Data & Math for AI (1415)

The mathematical and data engineering foundation powering modern Artificial Intelligence.

Module Subtopics Included Primary Mini-Projects
🔹 14_data_science_basics NumPy arrays, Pandas DataFrames/Series, data cleaning, Matplotlib & Seaborn visualization Real-World Dataset EDA
🔹 15_math_for_ai Vectors, matrices, dot products, norms, Cosine similarity, Bayes' Theorem, Gaussian stats, Z-scores, CLT, Markov chains Movie Recommender, Neural Layer Pass, Spam Classifier & Anomaly Detector

⚡ Quick Start & Usage Guide

1. Prerequisites

  • Python 3.10 or higher.
  • Git, VS Code, or any preferred IDE with Jupyter support.

2. Setup Environment

# Clone the repository
git clone https://github.com/hamzalafsioui/python_4_all.git
cd python_4_all

# Create a virtual environment
python -m venv .venv

# Activate the virtual environment
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# Linux / macOS:
source .venv/bin/activate

3. Install Module Dependencies

Each module specifies its requirements in its root directory. For example, to install dependencies for Module 15 (Math for AI):

pip install -r 15_math_for_ai/requirements.txt

4. Running Examples, Exercises & Projects

You can run any .py file directly from the command line:

# Run code demonstrations
python 00_foundations/variables_and_types/examples.py

# Run practice exercises
python 00_foundations/variables_and_types/exercises.py

# Run mini-projects
python 15_math_for_ai/linear_algebra_basics/project.py

5. Interactive Jupyter Notebooks

Modules 14 and 15 feature interactive .ipynb notebooks for visual plots and mathematical exploration. Launch Jupyter Notebook or JupyterLab:

jupyter notebook 15_math_for_ai/linear_algebra_basics/notebook.ipynb

📊 Completed Modules Summary

  • 00_foundations | Python Foundations
  • 01_control_flow | Decisions & Loops
  • 02_data_structures | Lists, Tuples, Sets, Dicts
  • 03_functions | Functions, Lambdas, Recursion
  • 04_modules_packages | Packages & Environments
  • 05_error_handling | Exceptions & Resilience
  • 06_file_handling | File I/O, JSON, CSV
  • 07_object_oriented_programming | OOP & Magic Methods
  • 08_advanced_python | Decorators, Generators & Context Managers
  • 09_standard_library | Standard Utilities & CLI
  • 10_testing_debugging | Unit Testing & Logging
  • 11_performance_optimization | Async, Multiprocessing & Profiling
  • 12_databases | SQL & SQLAlchemy ORM
  • 13_networking_web_basics | HTTP, FastAPI & Web Scraping
  • 14_data_science_basics | NumPy, Pandas & Data Visualization
  • 15_math_for_ai | Linear Algebra, Probability, Statistics & Matrix Computing

🤝 License & Contributions

This repository is maintained as an open-source learning resource. Contributions, fixes, and improvements are welcome!

About

This repository is a comprehensive, hands on roadmap to Python Mastery and AI Engineering. It is designed to take a learner from the very foundations of programming to building professional grade AI agents and scalable systems...

Topics

Resources

Stars

18 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages