forked from aztec-developers/roundrobin-wan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
24 lines (19 loc) · 640 Bytes
/
Copy pathutils.py
File metadata and controls
24 lines (19 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import csv
import urllib.request
import json
def readCSV(filename):
rows = []
with open(filename) as csvfile:
csvreader = csv.reader(csvfile)
for row in csvreader:
rows.append(row)
return rows
def getGitHubStats(username):
response = urllib.request.urlopen("https://api.github.com/users/aztec-developers/repos")
data = json.load(response)
for el in data:
print(el['name'])
response = urllib.request.urlopen("https://api.github.com/repos/aztec-developers/"+el["name"]+"/stats/contributors")
contributors = json.load(response)
for con in contributors:
print("-"+con['author']['login'] +" "+ str(con['total']))