Skip to content

Instantly share code, notes, and snippets.

@anacrolix
Created April 11, 2017 03:39
Show Gist options
  • Save anacrolix/6679e8b11f3b9c7d82fa408571442d80 to your computer and use it in GitHub Desktop.
Save anacrolix/6679e8b11f3b9c7d82fa408571442d80 to your computer and use it in GitHub Desktop.
usage = chunk(redis_cli('hgetall', key+':'+date), 2)
usage = map(lambda x: x[:1]+(int(x[1]),)+x[2:], usage)
usage = sorted(usage, key=lambda x: x[1], reverse=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment