Skip to content

Instantly share code, notes, and snippets.

@tscholl2
Last active March 29, 2017 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tscholl2/3c036b6687c0f16b43af018b439415ff to your computer and use it in GitHub Desktop.
Save tscholl2/3c036b6687c0f16b43af018b439415ff to your computer and use it in GitHub Desktop.
most used characters in some files
cat *.go | python3 -c "from sys import stdin;a=[c for c in stdin.read() if c.strip() != ''];b=[(a.count(c),c) for c in set(a)];b.sort();b.reverse();print('\n'.join(map(lambda x: '%d\t%s'%x,b)))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment