Skip to content

Saim-Hassan786/Modern-AI-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

🧠 Modern AI Python

Welcome to Modern AI Python, a comprehensive and structured learning repository that covers foundational to advanced Python concepts with a theoretical lens. This course is curated for learners who aim to master Python as a modern tool for AI, data science, and software engineering.

⚙️ Ideal for beginners and intermediate developers who want deep insight into both classic Python theory and modern programming practices.

📚 Table of Contents

Each module is organized as a folder with explanatory notebooks or scripts.

00 - Google Colab

Learn how to run Python code directly in your browser using Google Colab.

  • No installation required
  • GPU & TPU access
  • Easy code sharing
  • Ideal for AI prototyping

01 - Introduction to Python

Covers the origin and philosophy of Python:

  • Interpreted vs. compiled languages
  • Python’s design principles (readability, simplicity)
  • Python versions (2.x vs 3.x)
  • How Python fits into the AI ecosystem

02 - Data Types

Understand the core data types in Python:

  • Primitive types: int, float, bool, str
  • Compound types: list, tuple, dict, set
  • Type checking and casting
  • The role of immutability in data integrity

03 - Operators, Keywords, and Variables

Delve into Python's syntax mechanics:

  • Arithmetic, comparison, logical, bitwise operators
  • is vs == semantics
  • Keywords and naming rules
  • Variable scope and lifetime

04 - Strings and Casting

Explore string theory and type conversion:

  • String immutability and interning
  • String methods and formatting (f-strings, .format())
  • Unicode and encoding
  • Type casting rules and implicit coercion

05 - Control Flow

Master Python’s decision-making and repetition:

  • if, elif, else
  • while, for, break, continue
  • Boolean expressions and truthy/falsy values
  • Control flow design patterns

06 - Lists, Tuples, and Dictionaries

Learn how Python handles collections:

  • List slicing, comprehensions, and performance
  • Tuple immutability and use-cases
  • Dictionary hashing and key rules
  • Memory and speed considerations

07 - Sets

Understand the mathematics of sets in Python:

  • Unique element storage
  • Set operations: union, intersection, difference
  • Performance characteristics
  • Mutable vs immutable sets (frozenset)

08 - Modules and Functions

Explore code modularization and reuse:

  • Defining and importing modules
  • Built-in vs third-party modules
  • Defining pure and impure functions
  • Variable arguments: *args, **kwargs

09 - Exception Handling

Embrace Python's error-handling philosophy:

  • try, except, else, finally
  • Custom exceptions and best practices
  • Python’s EAFP (Easier to Ask Forgiveness than Permission)
  • Raising and re-raising exceptions

10 - File Handling

Manage persistent storage and I/O:

  • File modes (r, w, a, b)
  • Context managers (with statement)
  • Reading/writing text and binary files
  • Exception-safe file handling

11 - Math and Datetime

Leverage mathematical and time-based utilities:

  • math module (rounding, trigonometry)
  • random for simulations
  • datetime and timedelta for scheduling
  • Timestamps and formatting

12 - Traditional OOP Part 1

Understand Object-Oriented Programming basics:

  • Classes and instances
  • The __init__ method and constructors
  • Instance vs class variables
  • self and method bindings

13 - Traditional OOP Part 2

Go deeper into OOP abstractions:

  • Inheritance and method overriding
  • super() usage and MRO
  • Polymorphism and encapsulation
  • Abstract base classes and interfaces

14 - Metaclasses and Dataclasses

Explore Python's advanced object mechanics:

  • What are metaclasses and why they matter
  • Customizing class creation
  • @dataclass decorator: theory and benefits
  • Comparison to traditional classes

15 - Pydantic and Generics

Modern data modeling with type safety:

  • Introduction to Pydantic
  • Data validation and parsing
  • Type annotations and type checking
  • Generics and reusable model templates

16 - Asyncio

Master asynchronous programming in Python:

  • Event loops and concurrency theory
  • async and await keywords
  • Tasks, coroutines, and asyncio.run()
  • Async I/O vs multithreading/multiprocessing

17 - CPython and GIL

Understand Python’s execution model:

  • What is CPython?
  • How the Global Interpreter Lock (GIL) works
  • Impacts on threading and performance
  • Workarounds: multiprocessing, native extensions

🛠️ Technologies Used

  • Python 3.10+
  • Google Colab
  • Jupyter Notebook
  • Pydantic
  • Asyncio
  • Standard Library

📈 Goal of This Repository

This repo is intended to:

  • Teach solid Python theory (not just syntax)
  • Bridge traditional programming and modern AI
  • Serve as a reference for foundational topics
  • Prepare students for real-world AI workflows

📩 Contributing

Contributions, suggestions, and feedback are always welcome. Feel free to open an issue or submit a pull request!

🙌 Acknowledgments

This project is inspired by the need for clarity in foundational Python theory, essential for advancing in AI, backend systems, and modern software development.

About

All the Modern AI Python Concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors