Skip to content

Instantly share code, notes, and snippets.

@jmtd
Created February 18, 2015 16:35
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 jmtd/f2b0347c0a7cbfba77ac to your computer and use it in GitHub Desktop.
Save jmtd/f2b0347c0a7cbfba77ac to your computer and use it in GitHub Desktop.
PGP interestingness
def score(s):
i=1
p = s[0]
for c in s[1:]:
if int(c,base=16) == int(p,base=16)+1:
i += 1
p = c
return i
# or
def altscore(s):
i=1
p = s[0]
for c in s[1:]:
if c == p:
i += 1
p = c
return i
# and some
# grep --color -E '[A-F]+{6}' keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment