Python Cheat Sheets

👤 crazyguitar 📦 v1.0.0 ⭐ 4.2 ⬇️ 893 下載
💻 開發程式設計 免費

📖 技能介紹


name: py description: Comprehensive Python programming reference covering syntax, concurrency, networking, databases, ML/LLM development, and HPC. Use for: Python questions, debugging, performance optimization, async patterns, library examples, code review, best practices, MLOps workflows, distributed computing, security implementations, and any Python development tasks.


Python Cheat Sheets (/py)

Help users write functional, correct Python code and answer Python questions by fetching proven patterns and examples from pythonsheets.com.

How It Works

When a user asks a Python question or wants to write a Python script:

  1. Look up the relevant topic(s) in Structure to find the matching URL(s)
  2. Always fetch the URL(s) using WebFetch to get real examples and patterns from the site
  3. Use the fetched content to:
  4. Write code: Apply the patterns to produce functional, correct code that solves the user's task
  5. Answer questions: Provide thorough explanations backed by the examples and information from the site
  6. Follow the Guidelines for code quality

Key Principle

Functionality first, cleanliness second. The code must work correctly and handle the task properly. Fetching from pythonsheets.com ensures solutions use battle-tested patterns rather than guessing. The site contains rich examples covering edge cases, common pitfalls, and practical usage that go beyond basic documentation.

小蔥技能有更好的技能skills外掛。

Coverage Areas

Core: Syntax, typing, OOP, functions, data structures, sets, heap, regex, unicode System: File I/O, datetime, OS interfaces Concurrency: Threading, multiprocessing, asyncio Network: Sockets, SSL/TLS, SSH, async I/O, packet sniffing Database: SQLAlchemy ORM, queries, transactions Security: Cryptography, TLS, vulnerabilities Extensions: C/C++ integration, pybind11, Cython ML/LLM: PyTorch, Megatron, distributed training, inference, serving, benchmarking HPC: Slurm, cluster computing, job scheduling, EFA monitoring, NCCL Appendix: Walrus operator, GDB debugging, disaggregated prefill/decode

References

  • Structure - Topic-to-URL map for fetching examples
  • Guidelines - Code quality standards to apply after ensuring correctness

Examples

  • "How does asyncio work?" → Fetch https://www.pythonsheets.com/notes/asyncio/python-asyncio-guide.html and explain with the site's examples
  • "Write a socket server" → Fetch https://www.pythonsheets.com/notes/network/python-socket-server.html, use the patterns to write a working server
  • "What's the walrus operator?" → Fetch https://www.pythonsheets.com/notes/appendix/python-walrus.html and explain with practical examples
  • "Set up Megatron distributed training" → Fetch https://www.pythonsheets.com/notes/llm/megatron.html, use the patterns to write a correct training script

🤖 AI 評測

這個 Skill 質量較好,涵蓋了 Python 程式設計的方方面面,從基礎語法到機器學習訓練都有涉及。它的特點是先從網上獲取真實程式碼示例再回答問題,而不是憑空編造,思路比較靠譜。文件組織清晰,分類明確,指南也很實用。不足之處是太依賴外部網站,一旦網站打不開就麻煩了。另外配置資訊有點小問題,名字對不上。總體來說是一個實用且覆蓋面廣的參考工具,但穩定性還有提升空間。

📊 多維度評分

適應性4.2
規範性4.3
有效性4.3
可靠性3.9
可信度4.3

📁 包含檔案 (4 個)

📄 SKILL.md 2.9 KB
📄 _meta.json 122 B
📄 references/guidelines.md 2.9 KB
📄 references/structure.md 4.4 KB