Guest User

Untitled

a guest
Aug 9th, 2015
201
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MY_TEAM_ID=17
  2.  
  3. import os
  4. os.system('rm rankings.js')
  5. os.system('wget https://davar.icfpcontest.org/rankings.js')
  6. s = open('rankings.js').readline()[len('var data = '):]
  7. d = eval(s)
  8.  
  9. time = d['time']
  10. print(time)
  11.  
  12. maps = d['data']['settings']
  13.  
  14. scores = {}
  15. for m in maps:
  16. setting = m['setting']
  17. for scr in m['rankings']:
  18. if scr['teamId'] == MY_TEAM_ID:
  19. scores[setting] = (scr['rank'],scr['score'],
  20. scr['power_score'],scr['tags'])
  21. break
  22.  
  23. for s in scores:
  24. print(s, scores[s])
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×