Skip to content

Instantly share code, notes, and snippets.

@justinvdm
Created March 12, 2013 14:48
Show Gist options
  • Save justinvdm/5143500 to your computer and use it in GitHub Desktop.
Save justinvdm/5143500 to your computer and use it in GitHub Desktop.
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