# jackzhenguo/python-small-examples

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jackzhenguo-python-small-examples).**

8,132 stars · 1,780 forks · Python

## Links

- GitHub: https://github.com/jackzhenguo/python-small-examples
- awesome-repositories: https://awesome-repositories.com/repository/jackzhenguo-python-small-examples.md

## Topics

`data-science` `machine-learning` `python` `python-gui` `python-web` `pytorch` `tensorflow`

## Description

This project is a comprehensive library of practical Python code examples and patterns. It provides a collection of scripts and snippets designed to demonstrate a wide range of programming tasks, from basic syntax to advanced implementation patterns.

The repository focuses on several core domains, including the implementation of concurrency and multithreading examples, data analysis snippets for cleaning and manipulating tabular data, and various data visualization examples. It also covers automation scripts for file system management and a variety of general programming patterns.

Additional capabilities include temporal data handling through date and time management utilities, scientific computing operations, and text processing via regular expressions. The collection also spans object-oriented design patterns, functional programming techniques, and low-level data manipulation.

## Tags

### Education & Learning Resources

- [Python Code Examples](https://awesome-repositories.com/f/education-learning-resources/code-centric-tutorials/python-code-examples.md) — Offers a comprehensive library of Python code examples demonstrating various programming tasks and design patterns.
- [Python Programming Guides](https://awesome-repositories.com/f/education-learning-resources/python-programming-guides.md) — Learning fundamental Python syntax through practical examples of data types, loops, and basic logic.
- [Concurrency Control Examples](https://awesome-repositories.com/f/education-learning-resources/concurrency-control-examples.md) — Provides educational examples of multithreading, race conditions, and synchronization mechanisms in Python.
- [Programming Design Patterns](https://awesome-repositories.com/f/education-learning-resources/programming-design-patterns.md) — Demonstrates object-oriented design, functional programming patterns, and advanced Python language features.
- [Python Data Analysis Tutorials](https://awesome-repositories.com/f/education-learning-resources/python-data-analysis-tutorials.md) — Provides code snippets for cleaning, manipulating, and analyzing tabular data using scientific libraries.

### Part of an Awesome List

- [Python Visualization](https://awesome-repositories.com/f/awesome-lists/devtools/python-visualization.md) — Implements practical examples of charts, heatmaps, and animated plots using Python visualization libraries.
- [Regular Expressions](https://awesome-repositories.com/f/awesome-lists/data/regular-expressions.md) — Implements text searching, group capturing, and data extraction using regular expressions. ([source](https://github.com/jackzhenguo/python-small-examples#readme))
- [Regex Pattern Matching](https://awesome-repositories.com/f/awesome-lists/devtools/regex-and-pattern-matching/regex-pattern-matching.md) — Employs regular expressions to validate string formats and extract structured information from text.

### Data & Databases

- [Date and Time Libraries](https://awesome-repositories.com/f/data-databases/date-and-time-libraries.md) — Managing calendar calculations, timestamp formatting, and time series generation for temporal data.
- [Missing Data Removal](https://awesome-repositories.com/f/data-databases/missing-data-removal.md) — Provides a tool to filter out rows or columns containing missing data based on axis nullity. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/175.md))
- [Null Value Counting](https://awesome-repositories.com/f/data-databases/null-value-handling/null-value-counting.md) — Implements a utility to calculate total missing entries for every column in a dataset. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/184.md))
- [Null Value Filling](https://awesome-repositories.com/f/data-databases/null-value-handling/null-value-filling.md) — Implements a tool to replace missing data with specified values or statistics like mean and median. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/175.md))
- [Tabular Data Analysis](https://awesome-repositories.com/f/data-databases/tabular-data-analysis.md) — Provides capabilities for cleaning, resampling, and feature engineering on tabular datasets using Pandas. ([source](https://github.com/jackzhenguo/python-small-examples#readme))
- [Funnel Charts](https://awesome-repositories.com/f/data-databases/funnel-charts.md) — Renders sequential processes or data reduction using funnel-shaped diagrams. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/146.md))
- [Time Series Generation](https://awesome-repositories.com/f/data-databases/time-series-analysis/time-series-generation.md) — Implements a tool to generate data frames with time-based indices for testing temporal patterns. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/183.md))

### Development Tools & Productivity

- [Concurrent Task Execution](https://awesome-repositories.com/f/development-tools-productivity/concurrent-task-execution.md) — Implements the execution of multiple operations in separate threads to share CPU time and process tasks in parallel. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/120.md))
- [Task Automation Scripts](https://awesome-repositories.com/f/development-tools-productivity/task-automation-scripts.md) — Includes various automation scripts for common file system and directory management tasks.

### Programming Languages & Runtimes

- [Common Algorithmic Tasks](https://awesome-repositories.com/f/programming-languages-runtimes/common-algorithmic-tasks.md) — Provides a suite of practical Python operations for flattening lists, calculating modes, and sampling datasets. ([source](https://github.com/jackzhenguo/python-small-examples#readme))
- [Concurrent Thread Execution](https://awesome-repositories.com/f/programming-languages-runtimes/concurrent-thread-execution.md) — Manages concurrent tasks using shared-memory threads and locking mechanisms to handle synchronization.
- [Functional Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/functional-transformations.md) — Applies functional programming patterns using anonymous lambda functions for mapping, filtering, and data encoding.
- [Race Condition Prevention](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/execution-models/multi-threaded-execution/thread-synchronized-execution/race-condition-prevention.md) — Implements locking mechanisms to restrict a block of code to a single thread to prevent data races. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/123.md))
- [Metaprogramming Patterns](https://awesome-repositories.com/f/programming-languages-runtimes/class-inheritance/metaclass-and-type-relationships/metaprogramming-patterns.md) — Utilizes Python meta-programming and inheritance patterns to define custom class behaviors and property decorators.
- [Functional Programming Patterns](https://awesome-repositories.com/f/programming-languages-runtimes/functional-programming-patterns.md) — Implements functional programming patterns using lambda functions, filters, and mapping. ([source](https://github.com/jackzhenguo/python-small-examples#readme))
- [Sequence Generation Algorithms](https://awesome-repositories.com/f/programming-languages-runtimes/sequence-generation-algorithms.md) — Implements mathematical sequence generation, specifically the Fibonacci sequence, using language-specific patterns. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/126.md))
- [Custom Iterators](https://awesome-repositories.com/f/programming-languages-runtimes/sequence-iteration/custom-iterators.md) — Provides practical implementations of custom iterator objects for traversing sequences. ([source](https://github.com/jackzhenguo/python-small-examples#readme))
- [Generative Iterators](https://awesome-repositories.com/f/programming-languages-runtimes/sequence-iteration/generative-iterators.md) — Provides examples of generator expressions that create lazy iterators with filtering conditions. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/165.md))

### Scientific & Mathematical Computing

- [Data Ranking Utilities](https://awesome-repositories.com/f/scientific-mathematical-computing/data-ranking-utilities.md) — Provides algorithms for assigning numerical ranks to data samples based on value priority. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/181.md))
- [Data Visualizations](https://awesome-repositories.com/f/scientific-mathematical-computing/data-visualizations.md) — Creating charts, heatmaps, and animated plots to visually represent complex data and relationships.
- [Scientific Computing](https://awesome-repositories.com/f/scientific-mathematical-computing/high-performance-execution-environments/scientific-computing-platforms/scientific-computing.md) — Integrates NumPy and Pandas to perform scientific computing, including matrix operations and data cleaning. ([source](https://github.com/jackzhenguo/python-small-examples#readme))

### Software Engineering & Architecture

- [File System Automation](https://awesome-repositories.com/f/software-engineering-architecture/codebase-file-manipulation/file-system-automation.md) — Provides programmatic tools for bulk file renaming, extension modification, and directory traversal.
- [Asynchronous Concurrency Managers](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-execution-managers/asynchronous-concurrency-managers.md) — Implementing multithreading, locking mechanisms, and parallel task execution to handle shared resources and race conditions.
- [Lazy Sequence Processing](https://awesome-repositories.com/f/software-engineering-architecture/declarative-sequence-processing/lazy-sequence-processing.md) — Uses lazy evaluation and generators to process large datasets and nested lists without allocating full intermediate collections.
- [Function Decorators](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping/function-decorators.md) — Implements function decorators to inject cross-cutting concerns like execution timing and logging.
- [Object-Oriented Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/object-oriented-design-patterns.md) — Illustrates object-oriented design patterns including class methods, property decorators, and metaclasses. ([source](https://github.com/jackzhenguo/python-small-examples#readme))

### Graphics & Multimedia

- [Coordinate-Based Plotting](https://awesome-repositories.com/f/graphics-multimedia/coordinate-based-plotting.md) — Transforms numerical arrays into coordinate-based graphical representations using specialized plotting libraries.
- [Image Filters](https://awesome-repositories.com/f/graphics-multimedia/image-filters.md) — Transforms visual data using predefined filters to create effects such as contouring. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/169.md))
- [Image Orientation Manipulators](https://awesome-repositories.com/f/graphics-multimedia/image-orientation-manipulators.md) — Provides utilities for rotating and resizing images to adjust orientation while maintaining aspect ratios. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/169.md))

### Operating Systems & Systems Programming

- [Archive Compression](https://awesome-repositories.com/f/operating-systems-systems-programming/file-archiving/archive-compression.md) — A Python utility that walks a directory tree and archives all files into a single compressed zip file. ([source](https://github.com/jackzhenguo/python-small-examples/blob/master/md/108.md))
