Created
December 4, 2019 04:10
-
-
Save rbotzer/d06d8ed9764d113505a003646ef9d835 to your computer and use it in GitHub Desktop.
Three hours of data from one sensor
This file contains 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
key = (namespace, set, "sensor{}-12-31".format(sensor_id)) | |
print("\nRetrieve sensor{} data for 8-11am, December 31st".format(sensor_id)) | |
if options.interactive: | |
pause() | |
starts = 8 * 60 | |
ends = 11 * 60 | |
ops = [ | |
lh.list_get_by_value_range( | |
"t", | |
aerospike.LIST_RETURN_VALUE, | |
[starts, aerospike.null()], | |
[ends, aerospike.null()], | |
) | |
] | |
_, _, b = client.operate(key, ops) | |
pp.pprint(b["t"]) | |
print(spacer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment