Created
July 31, 2020 16:15
-
-
Save microprediction/39e46e13c69e165318d6471b5f68529f to your computer and use it in GitHub Desktop.
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
from getjson import getjson | |
from pprint import pprint | |
# Human : "I don't see who is winning what." | |
# Crawler: "Hold my beer ..." | |
def descend(d): | |
return {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)} | |
PRIZES = 'https://api.microprediction.org/prizes/' | |
pprint([list(zip(money, descend(getjson(url)))) for url, money in getjson(PRIZES).items()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment