$ show crazyguitar/pysheeet
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.
The LLM identified 3 files worth highlighting for reuse:
A self-contained module of asyncio patterns: bounded concurrency with semaphores, retry with exponential backoff, graceful shutdown, and async connection-pool-like patterns. Each pattern is demonstrated with small runnable functions and paired with tests, making it easy to lift into another Python project as reference code or a starting point for production async utilities.
A minimal, modern pybind11 module template that shows how to expose C++ classes and functions to Python. It is paired with CMake/setuptools build files in `src/cext/`, so it can be copied to bootstrap a new C++ extension project without depending on the rest of the repository.
A standalone offline benchmarking harness for vLLM that avoids starting an API server. It supports tensor/pipeline/data parallelism and integrates profiling tools such as VizTracer and nsys, producing repeatable latency and throughput measurements. This is useful for evaluating LLM inference engines on a cluster without coupling to a live serving stack.