Created
December 20, 2019 19:35
-
-
Save guyroyse/2d6c82c3ea5e45cc1677a47f58acd64c to your computer and use it in GitHub Desktop.
The TopK is Out There
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 redisbloom.client import Client | |
client = Client() | |
client.topkReserve('ufo_words', k=10, width=400, | |
depth=10, decay=0.9) | |
# lots of code to get some words... | |
[client.topkAdd('ufo_words', w) for w in words] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment