Created
November 26, 2019 16:31
-
-
Save jairovadillo/a772e1e56174877795e8ff0c4ea61b10 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
import redis | |
from collections import Counter | |
REDIS_URL = | |
REDIS_PORT = | |
REDIS_DB = | |
REDIS_PASSWORD = | |
r = redis.StrictRedis(host=REDIS_URL, port=REDIS_PORT, db=REDIS_DB, | |
password=REDIS_PASSWORD) | |
result = Counter() | |
for key in r.scan_iter('*'): | |
result[':'.join(['*' if p.isdigit() else p for p in key.decode().split(':')])] += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment