https://github.com/shiningflash/practice-python
lambda expression, iterators, list comprehension etc....
https://github.com/shiningflash/practice-python
Last synced: 17 days ago
JSON representation
lambda expression, iterators, list comprehension etc....
- Host: GitHub
- URL: https://github.com/shiningflash/practice-python
- Owner: shiningflash
- Created: 2021-03-27T07:51:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T01:30:03.000Z (about 1 year ago)
- Last Synced: 2025-04-09T20:02:02.769Z (9 months ago)
- Language: Python
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Practice Python Repository
Welcome to the **Practice Python** repository! This repository is a collection of Python scripts and examples aimed at helping developers improve their Python programming skills through hands-on practice. The repository covers a range of topics, from basic programming concepts to advanced patterns and techniques.
## Features
### 1. **Design Patterns**
- **Decorator Pattern**: Illustrates how decorators can add functionality dynamically.
- **Factory Pattern**: Demonstrates object creation techniques with factories.
- **Proxy Pattern**: Explains how proxy objects can control access to other objects.
### 2. **Data Manipulation and Algorithms**
Located in the `/common/` directory:
- Prime number factorization (`prime_factors.py`)
- Working with dequeues (`deque.py`)
- Lambda expressions and list comprehensions (`lambda_expr.py`, `list_comprehensions.py`)
- String operations: reverse, sort (`reverse_string.py`, `sort_string.py`)
- Palindrome checks (`palindrome.py`)
- Generating random numbers (`random_number.py`)
- Simple statistical calculations (`stat.py`)
### 3. **JSON Handling**
Located in the `/JSON/` directory:
- Reading and parsing JSON files (`json_to_py.py`)
- Sample JSON data for testing (`data.json`)
- Unit testing for JSON-related operations (`test.py`)
### 4. **Matplotlib Visualizations**
Located in the `/Matplotlib/` directory:
- Bar charts, scatter plots, histograms, and pie charts (`Bar.py`, `Scatter.py`, `Histogram.py`, `pie.py`)
- Subplots and advanced plotting techniques (`Subplot.py`, `Labels.py`)
- Annotating and customizing plots (`Marker.py`, `Plotting.py`, `Pyplot.py`)
- Examples include sample images for reference in `/images`.
### 5. **Debugging Tools**
- Introduces the `icecream` library for better debugging (`debug/` directory).
### 6. **Parallel Programming**
- Basic introduction to parallel programming concepts (`parallel-programming/` directory).
## How to Use This Repository
1. Clone the repository:
```bash
git clone https://github.com/shiningflash/practice-python.git
```
## How to Use This Repository
Navigate to specific directories for your area of interest:
- **`/common/`**: Learn algorithms and basic operations.
- **`/Matplotlib/`**: Explore visualization techniques.
- **`/JSON/`**: Work with JSON data.
- **`/decorator/`, `/factory-pattern/`, `/proxy-pattern/`**: Learn design patterns.
Run the Python files with:
```bash
python .py
```
Modify and experiment with the code to reinforce your understanding.
## What You’ll Learn
- **Core Python Concepts**: Algorithms, data manipulation, and string handling.
- **Design Patterns**: Practical applications of patterns like Decorator, Factory, and Proxy.
- **Data Visualization**: Creating and customizing plots using Matplotlib.
- **JSON Handling**: Reading, parsing, and testing JSON data in Python.
- **Debugging Techniques**: Leveraging the `icecream` library for enhanced debugging.
- **Parallel Programming**: Basics of parallel execution for performance optimization.
## Contributing
Contributions are welcome! If you want to add new examples, fix bugs, or improve the repository, feel free to submit a pull request or create an issue.
---
Happy coding! 😊