Created
January 16, 2018 11:24
-
-
Save bast/737424bf94517a467e8872da77705833 to your computer and use it in GitHub Desktop.
Extracts programming language statistics from our registration data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import glob | |
from collections import Counter | |
languages = [ | |
'Matlab', | |
'R', | |
'Python', | |
'Perl', | |
'C', | |
'C++', | |
'Fortran 77', | |
'Fortran 90+', | |
'Julia', | |
'Haskell', | |
'Go', | |
] | |
counter = Counter() | |
for file_name in glob.glob('*.csv'): | |
with open(file_name) as f: | |
reader = csv.DictReader(f) | |
for row in reader: | |
for language in languages: | |
if row[language] == language: | |
counter[language] += 1 | |
print(counter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment