Created
March 30, 2020 13:27
-
-
Save illustris/e0b110ceb7d947dc3795c5deadfa4ef2 to your computer and use it in GitHub Desktop.
Quick script to count occurrences of terms in metrics
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 collections import Counter | |
c = Counter() | |
for line in sys.stdin: | |
c.update(re.findall('.[^A-Z]*', line.split()[2].split('_')[2])) | |
print(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment