Last active
December 31, 2015 18:22
-
-
Save kerin/8026010 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
| import cPickle | |
| import gzip | |
| import redis | |
| from datetime import datetime | |
| rds = redis.StrictRedis(host='localhost', port=6379, db=0) | |
| panelist_dates = {int(p): {datetime.strptime(d, '%Y-%m-%d').date() | |
| for d in rds.smembers('panelists:%s:dates' % p) | |
| } | |
| for p in rds.smembers('panelists')} | |
| f = gzip.open('panelist_membership_dates.p.gz', 'w') | |
| cPickle.dump(panelist_dates, f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment