The Dependency Injector is a mature, feature-rich dependency injection framework for Python. It provides core DI patterns through providers (Factory, Singleton, Resource, etc.), containers (Declarative/Dynamic), and wiring mechanisms (@inject decorator). The framework emphasizes explicit dependency declaration, testability, and loose coupling while supporting async/await, configuration management from multiple sources, and runtime provider overriding. It includes framework-specific integrations (Flask, Django, FastAPI, etc.) via its wiring module and extension system, though the core remains framework-agnostic. Architecturally, the codebase separates concerns into distinct modules: providers handle object creation/lifecycle, containers manage provider resolution and hierarchy, wiring enables automatic dependency injection into functions/methods, resources manage lifecycle-dependent objects (e.g., DB connections), and configuration providers unify settings from YAML/INI/JSON/env. The framework uses Cython for performance-critical components while maintaining a pure Python interface. Comprehensive documentation, extensive test suite, and numerous examples demonstrate practical integration patterns across web applications, daemons, and cloud services. The project shows strong maintenance with frequent releases, active issue triage, and broad Python version support (3.8-3.14). Technical drift is low due to proactive dependency updates, removal of deprecated Python versions, and adherence to modern Python practices. The codebase exhibits high craftsmanship in its provider patterns, particularly the Resource provider's context-manager semantics and the wiring module's automatic dependency resolution, making it a reusable dependency injection solution for Python applications.
This repository is a collection of educational Python programs and Jupyter notebooks by Peter Norvig, focused on algorithmic problem-solving, puzzle-solving, and data analysis. It is not a deployable application or a formal research pipeline, but rather a set of self-contained explorations that demonstrate a wide range of programming techniques: constraint propagation, recursive search, dynamic programming, Monte Carlo simulation, n-gram language models, and symbolic computation. The code is well-structured, clearly documented, and often includes inline tests and performance benchmarks. While each notebook or script is independent, many contain reusable utility functions and algorithmic patterns that could be extracted for other projects. The repository includes data files (word lists, n-gram counts, bike ride logs, Sudoku puzzles) that are used as inputs for the explorations. The primary value is educational: it teaches how to think algorithmically and write clean, efficient Python code.
This repository provides a Python library for parsing human-readable time expressions into seconds. The core functionality is implemented in the `timeparse` function, which accepts strings in various formats (e.g., '32m', '2h32m', '1w3d2h32m', '4:13:02', '2 days, 4:13:02') and returns the equivalent duration in seconds as an integer or float. The library handles optional signs, fractional values, and ambiguous colon-separated values via a granularity parameter. It has no external dependencies and is designed for simplicity and reliability. The library is structured as a single module with a clear public interface. The implementation uses a series of regular expressions to match different time formats and converts the matched components to seconds using predefined multipliers. The code is well-tested with a comprehensive test suite that covers the various input formats and edge cases. Despite its simplicity, the library demonstrates careful attention to detail in handling the complexities of time expression parsing, such as supporting both written and abbreviated units, handling spaces and commas as separators, and providing control over the interpretation of colon-separated values.
CherryPy is a mature, production-grade Python web framework that maps HTTP requests to Python callables using an object-oriented approach. It provides a built-in HTTP server (via Cheroot), a flexible configuration system, a publish/subscribe bus for lifecycle management, and a rich middleware/tool system for authentication, sessions, caching, static file serving, and more. The architecture is modular: the core request/response pipeline, dispatchers (tree-walking, method-based, routes), and a plugin system allow deep customization. CherryPy can be used standalone or embedded in other WSGI servers. It is not a data research project; it is a pure application framework with extensive testing and documentation.
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 repository provides a Python library and CLI tool for optimizing daily fantasy sports (DFS) lineups on DraftKings and FanDuel. It reads player salary and projection data from CSV files, enforces contest-specific constraints (salary cap, position limits, custom rules like stacks and exposure), and uses Google OR-Tools to solve the constrained optimization problem, producing lineups that maximize projected points. The library supports a wide range of sports (NFL, NBA, MLB, NHL, soccer, golf, NASCAR, tennis, CS:GO, F1, XFL, and various Showdown/Pickem contest types) and includes utilities for downloading salary CSVs and generating upload files for mass lineup entry. The architecture is a classic monolithic Python package with a clear separation of concerns: data parsing (`csv_parse/`), player pool construction (`player_pool.py`), constraint definition (`lineup_constraints.py`, `settings.py`), optimization core (`optimizer.py`), and output formatting (`orm.py`, `uploaders.py`). The test suite is comprehensive with sport-specific tests and CSV fixtures. The codebase demonstrates practical application of constraint programming to a real-world combinatorial optimization problem, though some components are tightly coupled to the DFS domain.
XToolBox is a Flutter-based desktop utility application designed for Windows 10/11 system optimization and debloating. It provides a dashboard for system information, a browser for downloading/installing utilities (debloat tools, browsers, apps, etc.), playbook setup for running Windows optimization configurations, system cleanup tools, and settings management. The application follows a standard Flutter architecture with Provider for state management, featuring separate layers for services (download, installation, network checking, etc.), models, and UI components. The project has reached end-of-life as the developer switched to Linux and no longer maintains Windows software, though the source code remains available.