Last active
April 6, 2016 10:52
-
-
Save Dillonb/0b8f36195ee69b29cbc7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env python2 | |
| import csv | |
| import urllib2 | |
| #crns = [ | |
| #13775, # CS274 | |
| #12036, # CS125 | |
| #14284, # MATH173 | |
| #10073, # BIOL002 | |
| #10081, # BIOL002 L08 | |
| #10125, # GEOG60 | |
| #] | |
| # crns = [ | |
| # 94611, # MATH121 | |
| # 92541, # CS204 | |
| # 90681, # ASTR005 | |
| # 92210, # CS228 | |
| # 92026, # RUSS001 | |
| # ] | |
| crns = [ | |
| 90611, # CS201 | |
| 92668, # LAT001 | |
| 92806, # PHIL013 | |
| 94854 # CS295 | |
| ] | |
| courses = 'http://giraffe.uvm.edu/~rgweb/batch/curr_enroll_fall.txt' | |
| response = urllib2.urlopen(courses) | |
| cr = csv.reader(response) | |
| for row in cr: | |
| for crn in crns: | |
| if row[3] == str(crn): | |
| print "%s%s: %s %s - %i total, %i filled, %i remaining"%( | |
| row[0], | |
| row[1], | |
| row[4], | |
| row[2], | |
| int(row[7]), | |
| int(row[8]), | |
| int(row[7])-int(row[8]) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment