Created
March 12, 2013 14:48
-
-
Save justinvdm/5143500 to your computer and use it in GitHub Desktop.
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 characters
def concentrate_datapoints(datapoints, from_time, bucket_size): | |
step = from_time | |
results = [] | |
for datapoint in datapoints: | |
if datapoint['x'] >= step: | |
results.append(datapoint) | |
step += bucket_size | |
return results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment