To save contributors data of the apache organization to the apache folder, and the contributors data of nixos/nixpkgs to the nixos/nixpkgs folder, run the following command
./get_contributors_for_org.sh -o apache -r nixos/nixpkgs -t TOKEN
where TOKEN must be a valid github access token (this is required in order to prevent being rate-limited).
This command will save all contributors information to the file apache/contributors.json
and nixos/nixpkgs/contributors.json
.
Note that this will take a while, it may never even finish as there are just too many repos and contributors
to https://github.com/apache. You may rerun the script a few times.
If any thing goes wrong, then just run the following command to save partial results.
jq -c '.[]' apache/*/contributors.*.json > apache/contributors.json
or
rm apache/contributors.json
for f in apache/*/contributors.*.json; do jq -c '.[]' "$f" >> apache/contributors.json; done
which is slower, but tolerates incomplete file downloads and can accept an unbounded number of files.
The file ./airdrop.json contains the data from starknet-io/provisions-data, which has a list of all github users with the airdrop amount. We can easily query these data with duckdb. Below are some examples.
select amount, identity from "airdrop.json" where amount > 10000 order by amount desc, identity;
select * from (select min(a.amount) as amount, a.identity as id from "airdrop.json" a join "apache/contributors.json" c on lower(a.identity) = lower(c.login) group by a.identity) order by amount desc, id limit 10;
select sum(amount) from (select min(a.amount) as amount, a.identity as id from "airdrop.json" a join "apache/contributors.json" c on lower(a.identity) = lower(c.login) group by a.identity);