Skip to content

Latest commit

 

History

History
326 lines (236 loc) · 11.8 KB

README.md

File metadata and controls

326 lines (236 loc) · 11.8 KB

Python Training Repository

A comprehensive collection of Python scripts, programs, and exercises organized for beginners and intermediate Python developers. This repository covers everything from fundamental programming concepts to advanced topics like async programming, web frameworks, and cloud services.

Python Logo


📚 Table of Contents


01. Fundamentals

Location: 01_fundamentals/

Core Python programming concepts and basics for beginners.

Contents:


02. Data Structures

Location: 02_data_structures/

Python data structures and comprehension techniques.

Contents:


03. Advanced Concepts

Location: 03_advanced_concepts/

Advanced Python programming paradigms and patterns.

Contents:

  • Object-Oriented Programming (OOP) - Classes, inheritance, polymorphism, dataclasses
    • Class definitions and inheritance
    • Abstract classes and interfaces
    • Magic methods and dunder methods
    • Dataclasses and properties
    • Multiple inheritance and composition
    • Projects: Coffee Machine, Pong Game, Quiz Game, Snake Game, Turtle Crossing, Turtle Race
  • Decorator Functions - Function decorators, decorator patterns
    • Caching with decorators
    • Timing and profiling decorators
    • Decorator classes and metadata
  • Generator Functions - Generators, yield, lazy evaluation
  • Lambda Functions - Anonymous functions, functional programming
  • Dunder Methods - Magic methods, operator overloading
  • Async Programming - Asyncio, coroutines, tasks, event loops
    • Task groups and synchronization
    • Semaphores and futures
  • Multiprocessing - Parallel processing, process pools
  • Multithreading - Concurrent execution, thread management
  • Exception Handling - Try/except, error handling patterns
  • Call Stack - Stack operations, call stack examples
  • Pattern Matching - Structural pattern matching (Python 3.10+)

04. Standard Library

Location: 04_standard_library/

Working with Python's built-in modules and libraries.

Contents:


05. File and Data

Location: 05_file_and_data/

File handling, data processing, and database operations.

Contents:

  • File Manipulation - Reading, writing, copying files
  • CSV Operations - CSV reading, writing, processing
  • Database Operations - Database connectivity and queries
  • Pandas - Data analysis and manipulation
    • DataFrame operations
    • Data iteration and manipulation
    • Projects: Squirrel Census, US States Game
  • OCR - Optical Character Recognition

06. Web and APIs

Location: 06_web_and_apis/

Web scraping, API requests, and network communication.

Contents:

  • API Requests - HTTP requests, REST APIs
    • Weather API, ISS Tracking
    • Google Search, XKCD downloader
    • Requests module and error handling
    • Projects: Flight Deals Finder, Habit Tracking App, Kanye Quotes, Rainmeter App, Stock Price News Alert
  • Web Scraping - HTML parsing, data extraction
  • SMTP Library - Email sending, SMTP operations

07. Frameworks

Location: 07_frameworks/

Web application frameworks and their implementations.

Contents:

  • Django - Django web framework projects
  • Flask - Flask web framework applications

08. Cloud Services

Location: 08_cloud_services/

Cloud platform integrations and services.

Contents:

  • AWS - Amazon Web Services integration
    • SQS message sending and receiving
    • AWS SDK (boto3) examples

09. Algorithms

Location: 09_algorithms/

Algorithm implementations and data structure algorithms.

Contents:

  • Sorting Algorithms - Various sorting techniques
    • Bubble sort, merge sort, quick sort
    • Custom sorting functions
  • Data Search - Search algorithms
    • Linear search, binary search
    • Finding min/max values
  • Heap - Heap data structure implementations

10. Projects

Location: 10_projects/

Complete projects, games, and GUI applications.

Contents:

  • Simple Games - Text-based and simple games
    • Bagels, Blackjack, Coin Toss
    • Dice Roller, Fantasy Game Inventory
    • Guessing Game, Hangman, Higher Lower
    • Random Quiz Generator
    • Rock Paper Scissors, Tic Tac Toe
    • Treasure Island, Zigzag
  • Tkinter - GUI applications using Tkinter
  • Turtle Graphics - Graphics and animation projects

11. Exercises

Location: 11_exercises/

Practice exercises and miscellaneous scripts.

Contents:

  • Harvard CS50 - Harvard CS50 Python course exercises
    • Basic programs (greet, calculator, names)
    • Face detection and identification
    • Phonebook, QR code generation
    • SQL exercises
    • Speech synthesis
  • Miscellaneous - Various practice scripts
    • BMI Calculator, Fizz Buzz, Prime Number Checker
    • Mortgage Calculator, Tip Calculator
    • File operations (backup to ZIP, CSV operations)
    • Data processing (character counting, word counter)
    • System utilities (stopwatch, UUID identifier)
    • Excel operations (census reader, styled sheets)
    • Mathematical programs (factorial, Recamán sequence)
    • Password manager, mail merge
    • And many more practice exercises!

12. Pytest

Location: 12_pytest/

A progressive, hands-on introduction to testing Python code with pytest, ordered from beginner to advanced concepts. See the 12_pytest README for full details on each section.

Contents:

  • source/ - Source modules used as subjects under test
    • my_functions.py - Basic arithmetic functions
    • shapes.py - OOP shape classes (Circle, Rectangle, Square)
    • service.py - Service layer with an external HTTP call
  • tests/ - Test suite organised by increasing complexity
    • test_my_functions.py - Basic assertions, pytest.raises, and test markers (skip, xfail, slow)
    • test_circle.py - Class-based tests with setup_method / teardown_method
    • test_rectangle.py - Function-level fixtures injected from conftest.py
    • test_square.py - Parametrized tests with @pytest.mark.parametrize
    • test_service.py - Mocking external HTTP dependencies with unittest.mock
    • conftest.py - Shared fixtures available across the whole test suite

🚀 Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/psyll0n/python-training.git
cd python-training
  1. Install required dependencies (varies by project):
pip install -r requirements.txt  # If available

Usage

Navigate to any directory and run the Python scripts:

cd 01_fundamentals/conditions
python conditions_example.py

📖 Learning Path

For Beginners:

  1. Start with 01. Fundamentals - Learn basic syntax, conditions, loops, and functions
  2. Move to 02. Data Structures - Master lists, dictionaries, and comprehensions
  3. Practice with 11. Exercises - Apply your knowledge with practical exercises
  4. Try 10. Projects/Simple Games - Build fun projects to solidify concepts

For Intermediate Learners:

  1. Explore 03. Advanced Concepts - OOP, decorators, async programming
  2. Study 04. Standard Library - Learn to use Python's powerful built-in tools
  3. Work with 05. File and Data - Data processing and analysis
  4. Build with 06. Web and APIs - Create real-world applications

For Advanced Learners:

  1. Dive into 07. Frameworks - Web application development
  2. Explore 08. Cloud Services - Cloud integration and deployment
  3. Master 09. Algorithms - Efficient algorithm implementations
  4. Study 12. Pytest - Write professional tests with fixtures, parametrize, and mocking
  5. Create complex applications using multiple concepts together

🤝 Contributing

Contributions are welcome! Feel free to:

  • Add new examples or exercises
  • Improve existing code
  • Fix bugs or typos
  • Enhance documentation

📝 License

This project is licensed under the terms specified in the LICENSE file.


📧 Contact

For questions or suggestions, please open an issue in the repository.


Happy Coding! 🐍