Skip to content

Instantly share code, notes, and snippets.

@marufeuille
Last active January 28, 2020 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marufeuille/5059ec6d2889996f2153bfeabe9c363c to your computer and use it in GitHub Desktop.
Save marufeuille/5059ec6d2889996f2153bfeabe9c363c to your computer and use it in GitHub Desktop.
ar_data = np.concatenate((
generate(1.4, -0.48, 5, 0.5, 450),
generate(1.4, -0.48, 10, 0.5, 100),
generate(1.4, -0.48, 5, 0.5, 450)
))
timestamps = sorted(range(1000))
contents = []
for timestamp in timestamps:
contents.append([
("timestamp", str(timestamp)),
("value", str(ar_data[timestamp]))
])
put_logs(client, project, logstore, contents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment