Skip to content

Instantly share code, notes, and snippets.

@shanemhansen
Created June 26, 2012 23:35
Show Gist options
  • Save shanemhansen/3000164 to your computer and use it in GitHub Desktop.
Save shanemhansen/3000164 to your computer and use it in GitHub Desktop.
frequency
import sys
map = {}
while True:
line = sys.stdin.read(8)
if not line:
break
map[line] = map.get(line, 0) + 1
for key in map:
print "%s\t%s" % (map[key], key.encode('hex'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment