I'm looking for a solution to randomly sample repos from Github. The final result is to perform some data analysis on the sample.
What I would like to do is sample by the repository's id: sample an int between 0 and 2.7 million and find the associated repo. After I have the username/repo-name, I'll use the api to get details.
The problem is I do not know how to search by repo id. Any suggestions? I'm open to webscraping or Python solutions.
You can use python to access GitHUb V3 Api (as in "Most suitable python library for Github API v3").
And you can access GitHub repos, from a certain id (GET /repositories, with as parameter, integer ID of the last Repository that you’ve seen: so that can provide a roundabout way to access repos with their id.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With