Python projects and examples

Independent Python scripts and small applications for automation, networking, desktop interfaces, image and audio processing, and machine learning.

Repository standards Read the documentation

Start here

For a first run, try the standard-library Custom Exception or Object Clone example. To find a specific task, use the grouped index below or the guide index.

Each project has its own dependencies and platform requirements. Read its guide before executing it: some scripts change files or Windows settings, contact external services, or contain documented defects.

What you can explore

Standard-library and async examples; Rich command-line tools; Tkinter interfaces; Flask and Streamlit dashboards; image, audio and text-to-speech utilities; regression and time-series exercises.

Example index

Open the project guide for its exact command, working directory, dependencies, and limitations.

Web, networking & automation

Project What it does
Async HTTP Interactive asynchronous GET, POST, PUT, and DELETE requests to a sample REST API.
Bookmark Save, search, edit, delete, and open links stored in a local SQLite database.
FixNetwork Windows network diagnostics and repair steps, including network-stack and adapter resets.
Internet Speed Test Measure download, upload, and ping using Speedtest.net servers.
Port Scanner Concurrent TCP connect scans with IPv4/IPv6, optional banners, and open-port JSON output.
Simple Selenium Scraper Use headless Chrome and Selenium to collect cricket-news headlines.
Streamlit Demo Explore Streamlit widgets, interactive data, and charts in a browser app.
WiFi Radar setup · Static dashboard preview Local Flask dashboard for nearby access points, with live scanning and CSV export.
WiFi Scanner Scan nearby wireless networks and display signal, frequency, and security details.
WiFi Profiles Manage saved Windows Wi-Fi profiles and inspect their stored connection details.

Media, images & creative tools

Project What it does
Graphite CLI Convert a photo into a black-and-white graphite pencil sketch with a single OpenCV command.
Image to ASCII Convert an image into ASCII art saved as a text file.
Image2Cartoon Apply OpenCV filters to create a cartoon-style image.
Improve MP3 Quality Re-encode MP3 files with configurable bitrate, channels, and sample rate.
Lyrics Search Genius for song metadata and a lyrics preview.
MP3 Player Shuffle a folder of MP3s with background preloading and crossfade transitions.
MP3 Tags Read ID3 metadata and technical audio details from an MP3 file.
QR Code Generate a styled QR code image from text or a URL.
Remove Background Remove an image background and composite the subject onto a solid backdrop.
Steganography Hide and retrieve text in PNG images using least-significant-bit encoding.
Story Reader Extract text from a PDF and read it aloud with text-to-speech.
Tag Clouds Collect web-page text and render a word cloud using an image mask.
Text2Audio Desktop text-to-speech app with selectable language and locale options.

Desktop apps & system utilities

Project What it does
Contact Book Desktop contact manager backed by Microsoft SQL Server.
Extract CPU Information Display CPU model, architecture, frequency, and core information.
Health Monitor Live process-memory dashboard with heuristic growth warnings.
Load Libraries Call a compiled C#/.NET calculator library from Python using pythonnet.
Password Utility Explore password generation and a character-count rating heuristic.
Setup Wizard — Fruit Wiki Browse fruit images and descriptions in a paginated desktop GUI.
Simple WhatsApp Sender Schedule a WhatsApp message through WhatsApp Web.
Use Twilio Send SMS or WhatsApp messages and place calls through Twilio.
Use Windows Login Demonstrate checking the current Windows account credentials.

Machine learning & data

Project What it does
COVID Forecast Analyze and forecast daily COVID-19 case data with ARIMA/SARIMAX models.
Salary Prediction Train a linear-regression salary model and use it for interactive predictions.

Python fundamentals & persistence

Project What it does
Custom Exception Define, raise, and catch a custom Python exception.
Database Store and retrieve key-value data using Python’s built-in dbm module.
Object Clone Demonstrate independent object copies with copy.deepcopy().

Quick start

Try a standard-library example first. From your terminal:

git clone https://github.com/gcfernando/python-projects-and-examples.git
cd python-projects-and-examples
python "Custom Exception/Console_Code/CustomException.py"

Expected output: Something went wrong. For an independent copy example:

python "Object Clone/Console_Code/CloneObject.py"

Expected output is 20 followed by 10 on separate lines. These examples need no packages, accounts, network requests, or local asset changes.

Prerequisites and installation

Install Python 3 and Git to clone the collection. Check the selected guide for its Python version, third-party packages, platform tools, and required services. Port Scanner and Graphite CLI document Python 3.10+; that is not a tested minimum for every other project.

For examples with packages, create an isolated environment from the repository root:

python -m venv .venv

Use its interpreter directly, without changing shell execution policy:

# Windows PowerShell: install Bookmark's dependency
.\.venv\Scripts\python.exe -m pip install rich
.\.venv\Scripts\python.exe "Bookmark/Console_Code/book_marks.py"
# macOS / Linux: the equivalent commands
.venv/bin/python -m pip install rich
.venv/bin/python "Bookmark/Console_Code/book_marks.py"

Bookmark creates links.db in the current working directory. Other scripts resolve assets from their own documented working directory. There is no repository-wide requirements.txt; install only the packages needed by your selected example.

Configuration

Many scripts contain editable settings rather than CLI options. Check each guide for input/output paths, service endpoints, model files, credentials, and database setup. Environment-variable snippets in a guide are proposed adaptations unless its source already reads them.

Use your own credentials and keep them outside commits and copied terminal output. The SQL Server and API examples require particular care when replacing their embedded settings.

Open in your browser

Application Open in browser Setup guide
WiFi Radar Open the static dashboard preview Run the local Flask scanner

The preview opens as a web page and can display and export simulated data. Live scanning and export of real scan results require the local Flask server; GitHub Pages does not run the scanner.

Repository layout

The projects are independent scripts rather than modules in a single application:

flowchart LR
    Index[Project index] --> Guide[Project guide]
    Guide --> Script[Console_Code or GUI_Code]
    Script --> Dependencies[Project-specific packages and tools]
    Script --> Inputs[Configured files or services]

ML/ groups training and forecasting projects; GUI_Apps/ contains Contact Book. The documentation index provides guide navigation and links to the existing Pages site. No application source layout has to change to use the guides.

Development and testing

There is no repository-wide application test suite; the Repository standards workflow checks metadata separately. Start with the two standard-library commands above, then verify one example at a time with disposable inputs and the setup in its guide. Do not import arbitrary scripts as a test: many execute prompts, GUI code, network operations, or file changes at module scope.

The archived Audio8D workflow guide documents a former application directory and cannot run from its archive location. Current packaging belongs to the separate Audio8D repository.

For documentation and metadata changes, run python .github/scripts/check_repository.py with Python 3.12 or later. See Contributing for the scope of that check.

Troubleshooting and limitations

Symptom or task Check first
ModuleNotFoundError Install the selected guide’s packages with the same interpreter used to run it.
Missing file or DLL Replace hardcoded paths; use the working directory in the guide.
GUI, audio, or platform failure Check desktop/audio availability and Windows-only dependencies; many examples have not been tested across all platforms.
HTTP or browser automation failure External services, selectors, drivers, and unpinned library APIs can change. The Selenium guide documents required source adaptations.
Incorrect numerical or status output Read the CPU temperature, speed-test units, Wi-Fi labels, MP3 bitrate, and memory-growth caveats in their guides.

FixNetwork changes Windows networking settings. Wifi Profiles displays saved credentials and deletes profiles by default. The MP3 re-encoder replaces originals. Review those guides before execution and use appropriate test data. Messaging and API examples contact external services; use intended recipients and your own service configuration.

The Database example documents an existing byte-key bug. The machine-learning examples are teaching exercises, with evaluation and dependency limits explained in their guides.

Contributing

Submit a focused issue or pull request in this repository. Include the project path, operating system, Python/package versions, steps to reproduce, and redacted error output. When changing a script, update its guide with the exact command and working directory you verified.

Security

Avoid posting passwords, tokens, connection strings, saved Wi-Fi data, or private model/input files in public issues. Use the security policy and GitHub private vulnerability reporting for sensitive findings.

Support and license

Use repository issues for setup questions, with the project name and reproducible details. No repository-level license file is tracked; do not infer reuse terms for the code, bundled binaries, fonts, images, or datasets. Third-party components have their own terms.

Guide index · All developer projects

Repository maintenance

Contributing · Security policy · Repository standards