-
-
Save num3ric/691f5f808cc543dbbc22 to your computer and use it in GitHub Desktop.
import requests | |
import json | |
import operator | |
companies = [ "adafruit" , "akqa" , "B-Reel" , "thebarbariangroup" , "cinder" , "BBDO" , "breakfastny" , "CLOUDS-Interactive-Documentary" , "deeplocal" , "digitas" , "morethanlogic" , "dreamworksanimation" , "fakelove" , "field" , "google" , "googlecreativelab" , "dataarts" , "MadSciLabs" , "HeliosInteractive" , "hellicarandlewis" , "ideo" , "ideo-digital-shop" , "labatrockwell" , "legworkstudio" , "local-projects" , "msopentech" , "MidnightCommercial" , "mpcdigital" , "otherlab" , "PixarAnimationStudios" , "Psyop" , "razorfish" , "redpaperheart" , "sapient-global" , "sapientnitro" , "sparkfun" , "stopp" , "tbwa" , "therumpusroom" , "warprecords" , "Vidvox" , "warprecords" , "wieden-kennedy" , "YCAMInterlab" , "Your-Majesty" ] | |
company_stars = {} | |
for company in companies: | |
request_string = 'https://api.github.com/users/' + company + '/repos' | |
r = requests.get( request_string ) | |
company_stars[ company ] = -1 #negative star count indicates invalid request | |
if r.ok: | |
repolist = json.loads(r.text or r.content) | |
start_count = 0 | |
for repo in repolist: | |
start_count += repo['stargazers_count'] | |
company_stars[ company ] = start_count | |
sorted_companies = sorted( company_stars.iteritems(), key=operator.itemgetter(1), reverse=True ) | |
for name_count in sorted_companies: | |
print( name_count[0] + ", " + str( name_count[1] ) ) | |
I hope you got the answers you wanted :) We should probably add in openframeworks if we're including cinder...I'll try and add this data manually to that google spreadsheet i have going
@laserpilot I actually prefer the table without any numbers (as it is on your blog now), but this is interesting nonetheless. We're closer to a "this is valuable & useful code" metric.
Yeah definitely interesting, and much more representative of what people are actually finding useful from these places. I also need to find another way to include code from places that share but don't post explicitly to github - or individuals who develop at companies and post to their personal githubs sometimes (I'm guilty of this). Github is unfortunately not always the best place for all of this data collection, but I mostly just wanted to contribute to the conversation in some way.
Ah, just got some results! Need to reverse the sorted order.
sapientnitro, 0
stopp, 0
therumpusroom, 0
local-projects, 0
B-Reel, 1
MidnightCommercial, 4
tbwa, 4
mpcdigital, 4
ideo-digital-shop, 6
Your-Majesty, 6
sapient-global, 7
fakelove, 7
deeplocal, 9
legworkstudio, 10
thebarbariangroup, 11
akqa, 11
MadSciLabs, 15
digitas, 19
breakfastny, 25
otherlab, 26
BBDO, 27
HeliosInteractive, 31
Psyop, 31
redpaperheart, 34
morethanlogic, 51
dreamworksanimation, 99
wieden-kennedy, 99
Vidvox, 102
hellicarandlewis, 103
sparkfun, 106
labatrockwell, 114
CLOUDS-Interactive-Documentary, 123
warprecords, 136
field, 162
msopentech, 187
adafruit, 299
razorfish, 375
YCAMInterlab, 633
ideo, 1013
PixarAnimationStudios, 1294
dataarts, 1418
googlecreativelab, 1758
cinder, 1886
google, 6697