Created
September 19, 2016 02:36
-
-
Save stangirala/93a8c17ed18c10e11dd5b4d6a89c24c5 to your computer and use it in GitHub Desktop.
Revisions
-
stangirala created this gist
Sep 19, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 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