This repository provides a Home Assistant custom component (solax_modbus) that integrates solar inverters from multiple brands (SolaX, Growatt, Sofar, Solis, SRNE, etc.) via Modbus TCP/serial/RTU. It exposes real-time sensor data, battery status, energy totals, and control entities (numbers, selects, switches, buttons, time) into Home Assistant. The component features a plugin architecture where each inverter brand has its own module defining entity descriptions, register maps, and inverter detection logic. It includes an energy dashboard virtual device that aggregates grid, solar, battery, and home consumption for the native Home Assistant Energy Dashboard. Advanced capabilities include remote power control (VPP modes), autorepeat loops, parallel master-slave support, and automatic bad-register quarantine. The codebase is well-tested with unit tests and CI/CD, but suffers from some duplication across plugins and hardcoded register maps.
pyGIMLi is a mature open-source geophysical modelling and inversion library, implemented as a C++ core with Python bindings. It provides mesh generation, finite-element solvers, data containers, and high-level manager classes for methods such as electrical resistivity tomography (ERT), vertical electrical sounding (VES), frequency-domain electromagnetics (FDEM), magnetics, gravity, traveltime, and spectral induced polarization. The library is not a GUI application; it is a programmatic toolkit with Python entry points, example scripts, and a console-app pattern in some managers.
PyEMD is a pure Python library for computing the Earth Mover's Distance (also known as Wasserstein distance) between histograms. As of version 2.0, it serves as a thin wrapper around the POT (Python Optimal Transport) library, providing three main functions: `emd()` for computing the EMD value, `emd_with_flow()` for getting both the EMD value and the flow matrix, and `emd_samples()` for computing EMD directly from sample arrays. The library implements optimizations from the original C++ implementation, including pre-flow cancellation of mass within same bins for zero-cost transport. It follows modern Python packaging practices with pyproject.toml, uses setuptools_scm for version management, and maintains comprehensive test coverage.
PyPlot.jl is a Julia package that provides a direct interface to the matplotlib.pyplot library from Python, enabling Julia users to create plots using Matplotlib's extensive plotting capabilities. The package uses PyCall to call Matplotlib functions with minimal overhead, passing Julia arrays without copying. It integrates with Julia's multimedia I/O system to display plots in various backends (including IJulia, Jupyter, and GUI windows) and supports automatic backend selection based on available dependencies. The architecture consists of a core module handling the PyPlot interface, separate modules for colormap management and 3D plotting, and initialization code that configures the Matplotlib backend and sets up integration with Julia's display system. Key features include support for LaTeX in plot labels via LaTeXStrings, automatic figure management in interactive environments, and compatibility with both Julia-based and Python-based GUI backends.
Pneumatic is an open-source SaaS workflow management system built with a Django backend and React/TypeScript frontend. The platform enables users to create workflow templates, execute workflows, manage tasks, collaborate with teams, and track progress through a comprehensive UI. It features multi-tenancy, payment processing (Stripe integration), notification systems, file attachments, reporting, and various third-party integrations. The architecture follows a microservices-like separation using Docker Compose, with distinct services for backend, frontend, database (PostgreSQL), caching (Redis), messaging (RabbitMQ), and file storage. The codebase demonstrates solid engineering practices with clear separation of concerns, though it shows some technical debt from using Django 2.2 and accumulated migration complexity.
PyMFEM provides Python bindings for the MFEM finite element library, enabling finite element simulations (PDE solvers) from Python. The architecture consists of SWIG-generated wrapper modules for serial (`mfem.ser`) and parallel MPI (`mfem.par`) execution, built on top of the C++ MFEM library. Key entry points include the core modules (`mfem.ser`, `mfem.par`), a suite of 30+ example scripts covering Laplace, elasticity, Maxwell, Navier-Stokes, and more, and miniapps for specialized applications (DPG, multidomain, field interpolation). The system supports JIT-compiled coefficients via Numba, complex-valued solvers via CHypre, and GPU backends (CUDA, libCEED). While primarily a software library, it has a strong research character due to its advanced numerical methods (DPG, fractional PDEs, topology optimization) and extensive example set that serves as both documentation and validation.
This repository is a storage provider plugin for Synapse, the Matrix homeserver, that stores media in S3-compatible object storage. It is a Python package installed as a module and loaded by Synapse at runtime. The core is a single module, s3_storage_provider.py, which implements Synapse's storage provider API and translates local media operations into S3 GET/PUT/HEAD/DELETE calls via boto3. It supports SSE-C encryption, custom S3 endpoints, and a local cache. A companion CLI script, s3_media_upload, migrates existing local media to S3. Architecturally, the system is a library/plugin rather than a standalone service. Synapse invokes the provider's methods to store and retrieve media; the provider uses background threads (_S3DownloadThread, _S3UploadThread) to perform asynchronous operations with backpressure. The code uses threading locks and events to coordinate concurrent access, and includes tests, CI workflows, and release automation. The primary entry point is the S3StorageProvider class instantiated by Synapse; the module can also be run as a script for maintenance, and scripts/s3_media_upload provides a CLI. External dependencies include boto3 for S3 access, Synapse as the host application, and Twisted for tests. The repository is actively maintained with recent commits, dependabot updates, and GitHub Actions for CI and releases.
Spiel is a terminal-based framework for creating and presenting slide decks using Python. It enables users to define slides as functions that return renderable objects (via Rich), and presents them in a navigable terminal user interface built with Textual. The framework supports features like live reloading during development, slide transitions, and dynamic content generation through a trigger system. The architecture centers around a `Deck` class that manages a sequence of `Slide` objects. Each slide's content is defined by a function that can optionally receive a `Triggers` object for time-based or interactive effects. The presentation is driven by a custom Textual application (`SpielApp`) that handles user input, screen transitions (including slide-to-slide animations), and automatic reloading of the deck when source files change. Key components include the CLI for launching presentations, a flexible slide definition system, and reusable widgets for rendering content such as syntax-highlighted code and images. Notable reusable components include the `Triggers` class for managing interactive state, the `Swipe` transition for slide animations, the `Image` widget for terminal image display, and a set of utility functions (`clamp`, `filter_join`, `chunks`) that solve common programming problems. These components are designed with low coupling and could be extracted for use in other projects with minimal modification.
Falkon is a Python library for large-scale kernel ridge regression and logistic regression, leveraging Nyström approximation and preconditioned conjugate gradient to scale to billions of points. It provides a scikit-learn-like API (fit/predict) with GPU acceleration via custom CUDA/cuBLAS/cuSOLVER kernels and optional KeOps integration for on-the-fly kernel-vector products. The library includes hyperparameter optimization through differentiable objectives (LOOCV, GCV, Nyström compression) with gradient-based solvers, out-of-core operations for GPU memory overflow, and sparse tensor support. Benchmark infrastructure compares Falkon against GPyTorch, GPflow, and EigenPro on datasets like Higgs, TIMIT, MillionSongs. The codebase is well-tested with CI/CD for CPU/GPU builds and pre-built wheels for multiple PyTorch/CUDA combinations. While the core library is production-grade, some benchmark scripts are one-off and a few modules have TODO comments or limited platform support (Linux-only, Windows untested).
Xian Contracting is a Python-based smart contract development and execution framework that enables developers to write smart contracts in Python with a secure, metered runtime environment. The system features a modular architecture with components for compilation, execution, storage, and a standard library providing blockchain primitives. Key capabilities include Python-native smart contract authoring, deterministic execution with resource metering to prevent abuse, a secure storage system using Variables and Hashes, and restricted imports to prevent malicious code execution. The framework provides a ContractingClient as the primary interface for deploying and interacting with contracts, and includes comprehensive testing across unit, integration, performance, and security dimensions.
spotify_sync is a CLI application that downloads Spotify-liked songs and playlists by matching them to Deezer equivalents via ISRC and downloading the matched tracks. It features a modular architecture with separate components for Spotify API interaction, Deezer matching/downloading, persistent data storage, and configuration management. Key features include multi-threaded downloading, scheduling, Pushover notifications, and Plex library scanning via Autoscan. The application supports multiple profiles for different Spotify accounts and includes robust configuration validation with legacy migration capabilities.
AutoGen is a multi-agent AI framework originally from Microsoft Research, now in maintenance mode and succeeded by Microsoft Agent Framework. The codebase is a large monorepo containing Python packages (autogen-core, autogen-agentchat, autogen-ext, autogen-studio, agbench) and a .NET implementation (Microsoft.AutoGen.*), with Python as the primary language. The architecture is layered: Core provides event-driven agent runtime, message passing, and distributed infrastructure via gRPC; AgentChat offers higher-level multi-agent teams and patterns; Extensions integrate external services (OpenAI, Azure, MCP, GraphRAG, etc.); Studio is a FastAPI web UI with a Gatsby frontend for no-code agent prototyping. Key entry points include AssistantAgent, group chat managers, and various team orchestrators. The system relies heavily on LLM clients, Pydantic models, gRPC for distributed runtimes, and OpenTelemetry for tracing. Despite the maintenance mode status, the code shows solid engineering with clear separation of concerns, extensive test suites, and well-structured packages. However, the ecosystem is in transition, with active development shifted to the successor framework.
This repository functions as an educational library of Python code snippets rather than a traditional software application. Its primary operational purpose is to validate and demonstrate surprising behaviors, language quirks, and CPython internals across different Python versions. The architecture is documentation-centric, with the README.md serving as the primary catalog and snippets/ containing the executable artifacts. A Nox-based test harness validates these snippets against multiple Python versions, ensuring the examples remain accurate as the language evolves. The system relies on a flat file structure where code snippets are isolated and self-contained, allowing them to be executed independently or as part of a CI pipeline. External dependencies are minimal, focusing on standard library features and specific CPython implementation details. The project includes tooling for converting documentation to notebooks and managing translations, indicating a focus on community accessibility and content distribution rather than runtime functionality. While highly popular and well-curated, the codebase exhibits inherent technical drift due to its reliance on version-specific behaviors. The presence of obsolete scripts and mixed coding styles (e.g., tabs vs. spaces) suggests maintenance challenges in keeping the documentation synchronized with the latest language standards. However, the validation harness provides a strong safety net for detecting regressions.
Redash is a full-stack business intelligence platform that enables users to connect to multiple data sources, write and schedule queries, build interactive visualizations, and create dashboards with alerting and sharing capabilities. The backend is a Python Flask application with SQLAlchemy for database access, Redis for caching and task queuing, and RQ for background job execution. The frontend is a React single-page application using Ant Design, Plotly, D3, and Leaflet, organized into pages for queries, dashboards, alerts, data sources, and administration. The system exposes a RESTful API for all operations and supports authentication via password, Google OAuth, SAML, LDAP, JWT, and API keys. The architecture follows a modular plugin pattern for query runners and visualizations. Over 35 query runners (e.g., PostgreSQL, BigQuery, Snowflake, MongoDB, Prometheus) are registered via a common base class, each implementing run_query, get_schema, and configuration_schema. The visualization library (viz-lib) is a separate package that registers chart types (line, bar, pie, map, table, cohort, sankey, etc.) with editors and renderers. Dashboards use a grid layout with widgets that can display visualizations, text, or embedded content. Alerts evaluate query results against conditions and send notifications to destinations like Slack, email, PagerDuty, and webhooks. Key data flows: users write SQL or use query runners to fetch data from connected sources; results are cached and can be visualized; dashboards aggregate multiple visualizations with parameter bindings; scheduled queries refresh results and trigger alerts. The system also supports embedding visualizations in external sites and public sharing of dashboards. While primarily an application, the extensive query runner and visualization plugin systems make it a flexible platform for data exploration and operational reporting.
This repository contains the backend API for a trading platform, specifically QuantDinger. It handles strategies, indicators, and market data, and has various tests and scripts for ensuring the quality and functionality of the code.
This is a CLI-based web scraper for Sina Weibo (微博) user data and posts. It scrapes user profiles, weibo contents, images, and videos from the mobile version of Weibo (weibo.cn) using a combination of synchronous (requests, lxml) and asynchronous (aiohttp) HTTP requests. The architecture is a pipeline: parsers extract structured data from HTML, downloaders asynchronously fetch media files, and writers persist results to multiple formats (CSV, TXT, JSON, MySQL, MongoDB, SQLite, Kafka, HTTP POST). The spider is driven by a config file (config.json) that controls user id lists, date ranges, filtering, and download options. It supports retry logic, random delays, and global wait periods to avoid rate limiting. External dependencies include requests, lxml, aiohttp, browser_cookie3, and absl-py; optional dependencies add database and message queue support. The codebase is modular with clear separation of concerns, includes unit tests with mocked HTML fixtures, and demonstrates solid engineering practices for a data collection tool.
ModelScope is a unified framework for model inference, training, and deployment across computer vision, NLP, audio, multi-modal, and scientific domains. It provides a registry-based architecture where models, pipelines, preprocessors, trainers, and metrics are registered by task and can be instantiated from configuration or directly via Python APIs. The framework integrates tightly with the ModelScope Hub for model and dataset distribution, supporting versioned model IDs and snapshot downloads. Key entry points include the `pipeline()` function for inference, `build_trainer` for training, and CLI tools for cache management and server deployment. The architecture is modular with well-defined base classes (TorchModel, Pipeline, Preprocessor, Metric, Hook) and a configuration system that drives component construction. External dependencies span PyTorch, TensorFlow, HuggingFace Transformers, MMDetection, Diffusers, and numerous domain-specific libraries. The codebase is large and actively developed, but shows signs of technical drift through duplicated research code, skipped tests, and legacy TensorFlow 1.x components.
FileCodeBox is a file and text sharing service built with FastAPI and Tortoise ORM. It allows users to upload files or text accessible via short codes, with features including time/count-based expiration, chunked uploads, pre-signed URLs for direct cloud storage uploads, and an admin dashboard for management. The architecture uses a modular design with separate apps for base functionality and admin, storage abstraction for multiple backends (local, S3, OneDrive, WebDAV, OpenDAL), and background tasks for cleanup. Key entry points include main.py (FastAPI setup), apps/base/views.py (public sharing endpoints), and apps/admin/views.py (admin interfaces). The service demonstrates solid engineering practices with reusable components like storage abstraction and security headers, though some areas like settings management and rate limiting show opportunities for improvement in distributed environments.
pysheeet is a comprehensive Python cheat sheet and reference repository. Although it is classified as an application because it contains a Flask web server and operational scripts, its dominant character is educational reference content: a Sphinx-built documentation site with runnable, tested code examples under `src/basic/`, covering core Python, asyncio, concurrency, networking, security, databases, C/C++ extensions, and more recent LLM/HPC topics. The repository also ships a Claude Code plugin that exposes the cheat sheets as AI skills. Beyond documentation, the repo contains real operational artifacts for distributed LLM work: Slurm/Docker launch scripts for vLLM, SGLang, and TensorRT-LLM, Megatron training recipes, NCCL broadcast benchmarks, and Ray-on-Slurm patterns. These scripts demonstrate practical HPC skills such as EFA/NCCL tuning, multi-node container orchestration, and profiling with nsys/VizTracer. The code quality is solid overall: examples are well-structured, many have pytest coverage, and the Flask serving layer is security-conscious. The main weaknesses are duplication across LLM vendor scripts, hardcoded cluster-specific paths, and documentation that occasionally references older Python or library versions, which creates moderate technical drift.
This is the official Google Cloud Platform Python samples repository, a large collection of self-contained, region-tagged code examples demonstrating how to use GCP services from Python. It is not a single deployable application; instead, each directory is an isolated sample set for a specific product such as Cloud Storage, BigQuery, Compute Engine, Cloud Functions, App Engine, Cloud Run, Composer, Dataflow, and Vertex AI. Most samples are small Flask apps, Cloud Functions handlers, CLI scripts, or library-usage snippets, each paired with pytest tests and a noxfile_config.py for CI execution. The dominant character is application-oriented sample code, but the repository is hybrid: it also includes Apache Airflow DAGs, Dataflow pipelines, BigQuery examples, and a small number of notebooks, making it relevant to data engineers as well as application developers. The architecture is intentionally decentralized: every sample directory has its own requirements.txt, tests, and nox configuration, so there is no shared runtime. The value of the repository is as a copy-paste reference and documentation source, backed by a mature testing harness that runs samples against real GCP resources using Kokoro/nox and environment-provided project IDs. Some notable engineering patterns emerge, including a reusable Airflow DAG validation utility and a compute snippet-generation system that composes reusable 'ingredients' into full 'recipes'. Maintenance is active, but the repository carries legacy artifacts such as App Engine Python 2.7 samples, Airflow 1.x DAGs, and some deprecated APIs, so overall technical drift is medium.