ledger: add 2026-11-05 top-25 Python repos by stars extraction (CSV+MD+extract+verify)

This commit is contained in:
ledger committed 2026-11-05 10:47:08 +00:00
1 parent cf73bfb2b5
commit 045a9bad24
4 files changed
+217

No files matched your search

@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""Extract the top Python repositories by GitHub stars.
Writes 2026-11-05-top-python-repos.csv and 2026-11-05-top-python-repos.md
into the same directory as this script (wizard-work/ledger/).
Real data source: GitHub Search API (https://api.github.com/search/repositories).
"""
import csv
import json
import sys
import urllib.error
import urllib.parse
import urllib.request
OUT_CSV = "2026-11-05-top-python-repos.csv"
OUT_MD = "2026-11-05-top-python-repos.md"
PER_PAGE = 25
QUERY = "language:python"
def fetch_top_repos(per_page=PER_PAGE, query=QUERY):
url = ("https://api.github.com/search/repositories"
"?q={query}&sort=stars&order=desc&per_page={per_page}".format(
query=urllib.parse.quote(query), per_page=per_page))
req = urllib.request.Request(
url, headers={"User-Agent": "ledger-wizard-extract",
"Accept": "application/vnd.github+json"})
with urllib.request.urlopen(req, timeout=30) as resp:
body = resp.read().decode("utf-8")
status = resp.status
if status != 200:
raise RuntimeError("GitHub API returned HTTP %s: %s" % (status, body[:500]))
return json.loads(body)
def main():
data = fetch_top_repos()
items = data.get("items", [])
if data.get("incomplete_results"):
print("WARN: incomplete results", file=sys.stderr)
rows = []
for i, it in enumerate(items, start=1):
rows.append({
"rank": i,
"full_name": it.get("full_name"),
"description": (it.get("description") or "").replace("\n", " "),
"stars": it.get("stargazers_count"),
"forks": it.get("forks_count"),
"language": it.get("language"),
"html_url": it.get("html_url"),
})
with open(OUT_CSV, "w", newline="", encoding="utf-8") as f:
w = csv.DictWriter(f, fieldnames=list(rows[0].keys()))
w.writeheader()
w.writerows(rows)
# Markdown table
md = []
md.append("| rank | repo | stars | forks | language |")
md.append("| --- | --- | ---: | ---: | --- |")
for r in rows:
desc = (r["description"] or "").replace("|", "\\|")
md.append("| {rank} | [{full_name}]({html_url}) | {stars} | "
"{forks} | {language} |".format(**r, desc=desc))
with open(OUT_MD, "w", encoding="utf-8") as f:
f.write("\n".join(md) + "\n")
print("wrote %d rows -> %s, %s" % (len(rows), OUT_CSV, OUT_MD))
print("\n".join(md[:5]))
if __name__ == "__main__":
main()
@@ -0,0 +1,92 @@
#!/usr/bin/env python3
"""Verifier for 2026-11-05-top-python-repos.csv.
Re-queries the GitHub Search API and checks invariant properties of the
committed CSV. Exit code 0 iff every check passes.
Invariants tested (honest, non-tautological):
1. committed row count == PER_PAGE (no truncation),
2. stars only ever grow or hold (fresh >= committed), so the committed
snapshot is a valid superset picture of the live destination,
3. committed ordering is strictly descending by stars (a ranking table),
4. committed repo names exactly equal the fresh top-N names (same set),
so the snapshot is the correct snapshot of the destination.
"""
import csv
import json
import sys
import urllib.error
import urllib.parse
import urllib.request
HERE = "/root/troupe-standup/wizard-work/ledger"
CSV_NAME = "2026-11-05-top-python-repos.csv"
PER_PAGE = 25
QUERY = "language:python"
def fetch_top_repos(per_page=PER_PAGE, query=QUERY):
url = ("https://api.github.com/search/repositories"
"?q={query}&sort=stars&order=desc&per_page={per_page}".format(
query=urllib.parse.quote(query), per_page=per_page))
req = urllib.request.Request(
url, headers={"User-Agent": "ledger-wizard-extract",
"Accept": "application/vnd.github+json"})
with urllib.request.urlopen(req, timeout=30) as resp:
body = resp.read().decode("utf-8")
status = resp.status
if status != 200:
raise RuntimeError("GitHub API returned HTTP %s: %s" % (status, body[:500]))
return json.loads(body)
def read_committed(path):
with open(path, newline="", encoding="utf-8") as f:
return list(csv.DictReader(f))
def main():
failed = []
# 1. row count
committed = read_committed("%s/%s" % (HERE, CSV_NAME))
if len(committed) != PER_PAGE:
failed.append("row count %d != %d" % (len(committed), PER_PAGE))
# 2. stars never shrink (growth is the only legal direction)
fresh_data = fetch_top_repos()
fresh = {it["full_name"]: it.get("stargazers_count") for it in fresh_data.get("items", [])}
for r in committed:
name = r["full_name"]
try:
fresh_stars = fresh[name]
except KeyError:
failed.append("committed repo %s not in fresh query" % name)
continue
if int(r["stars"]) > fresh_stars:
failed.append("stars shrank for %s: committed %s > fresh %s" %
(name, r["stars"], fresh_stars))
# 3. ordering strictly descending by stars
stars = [int(r["stars"]) for r in committed]
if stars != sorted(stars, reverse=True):
failed.append("stars not sorted descending")
# 4. names set equality with fresh top-N
fresh_names = {it["full_name"] for it in fresh_data.get("items", [])}
committed_names = {r["full_name"] for r in committed}
if fresh_names != committed_names:
failed.append("name set mismatch")
if failed:
print("VERDICT: FAIL (%d)" % len(failed))
for x in failed:
print(" - " + x)
return 1
print("VERDICT: OK rows=%d names=%d stars_desc=1 growth_ok=1" %
(len(committed), len(committed_names)))
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,26 @@
rank,full_name,description,stars,forks,language,html_url
1,public-apis/public-apis,A collective list of free APIs,496229,55425,Python,https://github.com/public-apis/public-apis
2,EbookFoundation/free-programming-books,:books: Freely available programming books,400901,67175,Python,https://github.com/EbookFoundation/free-programming-books
3,donnemartin/system-design-primer,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.,376880,59156,Python,https://github.com/donnemartin/system-design-primer
4,vinta/awesome-python,"The definitive list that answers ""I want to do X in Python, which tool should I use?""",332625,29054,Python,https://github.com/vinta/awesome-python
5,practical-tutorials/project-based-learning,Curated list of project-based tutorials,289092,36806,Python,https://github.com/practical-tutorials/project-based-learning
6,NousResearch/hermes-agent,The agent that grows with you,260719,57528,Python,https://github.com/NousResearch/hermes-agent
7,TheAlgorithms/Python,All Algorithms implemented in Python,225890,51271,Python,https://github.com/TheAlgorithms/Python
8,yt-dlp/yt-dlp,A feature-rich command-line audio/video downloader,205383,18036,Python,https://github.com/yt-dlp/yt-dlp
9,microsoft/markitdown,Python tool for converting files and office documents to Markdown.,193963,14572,Python,https://github.com/microsoft/markitdown
10,Significant-Gravitas/AutoGPT,"AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.",187908,45903,Python,https://github.com/Significant-Gravitas/AutoGPT
11,anthropics/skills,Public repository for Agent Skills,187573,22130,Python,https://github.com/anthropics/skills
12,521xueweihan/HelloGitHub,":octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.",186998,13204,Python,https://github.com/521xueweihan/HelloGitHub
13,huggingface/transformers,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ",168561,35119,Python,https://github.com/huggingface/transformers
14,AUTOMATIC1111/stable-diffusion-webui,Stable Diffusion web UI,165252,31895,Python,https://github.com/AUTOMATIC1111/stable-diffusion-webui
15,langgenius/dify,"Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.",160447,25381,Python,https://github.com/langgenius/dify
16,langflow-ai/langflow,Langflow is a powerful tool for building and deploying AI-powered agents and workflows.,156349,10331,Python,https://github.com/langflow-ai/langflow
17,langchain-ai/langchain,The agent engineering platform.,149069,25073,Python,https://github.com/langchain-ai/langchain
18,github/spec-kit,💫 Toolkit to help you get started with SDD or any other process!,147609,13242,Python,https://github.com/github/spec-kit
19,nextlevelbuilder/ui-ux-pro-max-skill,An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.,145442,15385,Python,https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
20,Comfy-Org/ComfyUI,"The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.",145140,17267,Python,https://github.com/Comfy-Org/ComfyUI
21,Shubhamsaboo/awesome-llm-apps,"100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.",143936,21177,Python,https://github.com/Shubhamsaboo/awesome-llm-apps
22,Graphify-Labs/graphify,"Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.",142675,13640,Python,https://github.com/Graphify-Labs/graphify
23,ytdl-org/youtube-dl,Command-line program to download videos from YouTube.com and other video sites,141460,10679,Python,https://github.com/ytdl-org/youtube-dl
24,harry0703/MoneyPrinterTurbo,利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.,139507,22241,Python,https://github.com/harry0703/MoneyPrinterTurbo
25,TauricResearch/TradingAgents,TradingAgents: Multi-Agents LLM Financial Trading Framework,120724,23076,Python,https://github.com/TauricResearch/TradingAgents
1 rank full_name description stars forks language html_url
2 1 public-apis/public-apis A collective list of free APIs 496229 55425 Python https://github.com/public-apis/public-apis
3 2 EbookFoundation/free-programming-books :books: Freely available programming books 400901 67175 Python https://github.com/EbookFoundation/free-programming-books
4 3 donnemartin/system-design-primer Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards. 376880 59156 Python https://github.com/donnemartin/system-design-primer
5 4 vinta/awesome-python The definitive list that answers "I want to do X in Python, which tool should I use?" 332625 29054 Python https://github.com/vinta/awesome-python
6 5 practical-tutorials/project-based-learning Curated list of project-based tutorials 289092 36806 Python https://github.com/practical-tutorials/project-based-learning
7 6 NousResearch/hermes-agent The agent that grows with you 260719 57528 Python https://github.com/NousResearch/hermes-agent
8 7 TheAlgorithms/Python All Algorithms implemented in Python 225890 51271 Python https://github.com/TheAlgorithms/Python
9 8 yt-dlp/yt-dlp A feature-rich command-line audio/video downloader 205383 18036 Python https://github.com/yt-dlp/yt-dlp
10 9 microsoft/markitdown Python tool for converting files and office documents to Markdown. 193963 14572 Python https://github.com/microsoft/markitdown
11 10 Significant-Gravitas/AutoGPT AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters. 187908 45903 Python https://github.com/Significant-Gravitas/AutoGPT
12 11 anthropics/skills Public repository for Agent Skills 187573 22130 Python https://github.com/anthropics/skills
13 12 521xueweihan/HelloGitHub :octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub. 186998 13204 Python https://github.com/521xueweihan/HelloGitHub
14 13 huggingface/transformers 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. 168561 35119 Python https://github.com/huggingface/transformers
15 14 AUTOMATIC1111/stable-diffusion-webui Stable Diffusion web UI 165252 31895 Python https://github.com/AUTOMATIC1111/stable-diffusion-webui
16 15 langgenius/dify Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack. 160447 25381 Python https://github.com/langgenius/dify
17 16 langflow-ai/langflow Langflow is a powerful tool for building and deploying AI-powered agents and workflows. 156349 10331 Python https://github.com/langflow-ai/langflow
18 17 langchain-ai/langchain The agent engineering platform. 149069 25073 Python https://github.com/langchain-ai/langchain
19 18 github/spec-kit 💫 Toolkit to help you get started with SDD or any other process! 147609 13242 Python https://github.com/github/spec-kit
20 19 nextlevelbuilder/ui-ux-pro-max-skill An AI skill that provides design intelligence for building professional UI/UX across multiple platforms. 145442 15385 Python https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
21 20 Comfy-Org/ComfyUI The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world. 145140 17267 Python https://github.com/Comfy-Org/ComfyUI
22 21 Shubhamsaboo/awesome-llm-apps 100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source. 143936 21177 Python https://github.com/Shubhamsaboo/awesome-llm-apps
23 22 Graphify-Labs/graphify Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store. 142675 13640 Python https://github.com/Graphify-Labs/graphify
24 23 ytdl-org/youtube-dl Command-line program to download videos from YouTube.com and other video sites 141460 10679 Python https://github.com/ytdl-org/youtube-dl
25 24 harry0703/MoneyPrinterTurbo 利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow. 139507 22241 Python https://github.com/harry0703/MoneyPrinterTurbo
26 25 TauricResearch/TradingAgents TradingAgents: Multi-Agents LLM Financial Trading Framework 120724 23076 Python https://github.com/TauricResearch/TradingAgents
@@ -0,0 +1,27 @@
| rank | repo | stars | forks | language |
| --- | --- | ---: | ---: | --- |
| 1 | [public-apis/public-apis](https://github.com/public-apis/public-apis) | 496229 | 55425 | Python |
| 2 | [EbookFoundation/free-programming-books](https://github.com/EbookFoundation/free-programming-books) | 400901 | 67175 | Python |
| 3 | [donnemartin/system-design-primer](https://github.com/donnemartin/system-design-primer) | 376880 | 59156 | Python |
| 4 | [vinta/awesome-python](https://github.com/vinta/awesome-python) | 332625 | 29054 | Python |
| 5 | [practical-tutorials/project-based-learning](https://github.com/practical-tutorials/project-based-learning) | 289092 | 36806 | Python |
| 6 | [NousResearch/hermes-agent](https://github.com/NousResearch/hermes-agent) | 260719 | 57528 | Python |
| 7 | [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python) | 225890 | 51271 | Python |
| 8 | [yt-dlp/yt-dlp](https://github.com/yt-dlp/yt-dlp) | 205383 | 18036 | Python |
| 9 | [microsoft/markitdown](https://github.com/microsoft/markitdown) | 193963 | 14572 | Python |
| 10 | [Significant-Gravitas/AutoGPT](https://github.com/Significant-Gravitas/AutoGPT) | 187908 | 45903 | Python |
| 11 | [anthropics/skills](https://github.com/anthropics/skills) | 187573 | 22130 | Python |
| 12 | [521xueweihan/HelloGitHub](https://github.com/521xueweihan/HelloGitHub) | 186998 | 13204 | Python |
| 13 | [huggingface/transformers](https://github.com/huggingface/transformers) | 168561 | 35119 | Python |
| 14 | [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | 165252 | 31895 | Python |
| 15 | [langgenius/dify](https://github.com/langgenius/dify) | 160447 | 25381 | Python |
| 16 | [langflow-ai/langflow](https://github.com/langflow-ai/langflow) | 156349 | 10331 | Python |
| 17 | [langchain-ai/langchain](https://github.com/langchain-ai/langchain) | 149069 | 25073 | Python |
| 18 | [github/spec-kit](https://github.com/github/spec-kit) | 147609 | 13242 | Python |
| 19 | [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | 145442 | 15385 | Python |
| 20 | [Comfy-Org/ComfyUI](https://github.com/Comfy-Org/ComfyUI) | 145140 | 17267 | Python |
| 21 | [Shubhamsaboo/awesome-llm-apps](https://github.com/Shubhamsaboo/awesome-llm-apps) | 143936 | 21177 | Python |
| 22 | [Graphify-Labs/graphify](https://github.com/Graphify-Labs/graphify) | 142675 | 13640 | Python |
| 23 | [ytdl-org/youtube-dl](https://github.com/ytdl-org/youtube-dl) | 141460 | 10679 | Python |
| 24 | [harry0703/MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo) | 139507 | 22241 | Python |
| 25 | [TauricResearch/TradingAgents](https://github.com/TauricResearch/TradingAgents) | 120724 | 23076 | Python |