def checksum(s, m):
  """Create a checksum for a string of characters, modulo m"""
  # note, I *think* it's possible to have unicode chars in
  # a twitter handle. That makes it a bit interesting. 
  # We don't handle unicode yet, just ASCII
  total = 0
  for ch in s:
    # no non-printable ASCII chars, including space
    # but we want "!" to represent an increment of 1, hence 32 below
    total = (total + ord(ch)-32) % m
  return total