Skip to content

Instantly share code, notes, and snippets.

@stangirala
Created September 19, 2016 02:36
Show Gist options
  • Save stangirala/93a8c17ed18c10e11dd5b4d6a89c24c5 to your computer and use it in GitHub Desktop.
Save stangirala/93a8c17ed18c10e11dd5b4d6a89c24c5 to your computer and use it in GitHub Desktop.
def map(intValue):
store = {}
store[computeBin(intValue)] += 1
print _, store
def reduce(_, *stores):
_store = {}
for store in stores:
for k, v in store:
_store[k] += v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment