gpt4 book ai didi

github repo 按语言(和历史数据)计算?

转载 作者:行者123 更新时间:2023-12-01 12:45:56 24 4
gpt4 key购买 nike

我有兴趣获取特定语言集的 github 存储库计数(如果可能,包含历史数据。)

以下是我尝试自己开始收集统计数据的事情:

  1. 屏幕抓取页面,如:

https://github.com/search?q=language%3Aperl&type=&ref=simplesearch

  1. 使用 github API:

https://api.github.com/legacy/repos/search/KEYWORD?language=perl

但不幸的是,这似乎需要关键字才能获得任何结果。另外,我只需要一个计数,而不是每个 repo 上的元数据。

我也对历史数据感兴趣,这些统计数据似乎已经在某处可用。

关于按语言和/或历史数据获取 repo 计数的更好方法有什么想法吗?

最佳答案

你可以试试这个: https://api.github.com/search/repositories?q=language:Python

此外,您还可以查询github archive .使用大查询接口(interface),查询应该是:

bq query 'SELECT repository_language, count(repository_language) as pushes
FROM [githubarchive:github.timeline]
WHERE type="CreateEvent" and repository_fork == "false"
GROUP BY repository_language
ORDER BY pushes DESC'

此查询生成每种语言的 repo 数量统计信息。

关于github repo 按语言(和历史数据)计算?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16003361/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com