#!/usr/bin/env python
# -*- coding: utf-8 -*-

def easyHash(s):
    """
    MDSD used the following hash algorithm to cal a first part of partition key
    """
    strHash = 0
    multiplier = 37
    for c in s:
        strHash = strHash * multiplier + ord(c)
        #Only keep the last 64bit, since the mod base is 100
        strHash = strHash % (1<<64) 
    return strHash % 100  #Assume eventVolume is Large
    
print easyHash(u"àèìòù Hello world! Hello world! Hello world! Hello world! Hello world! Hello world! Hello world!");