Skip to content

Instantly share code, notes, and snippets.

@marufeuille
Last active January 28, 2020 04:18
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/ba50a3cbde61c1746e682318feb8524d to your computer and use it in GitHub Desktop.
Save marufeuille/ba50a3cbde61c1746e682318feb8524d to your computer and use it in GitHub Desktop.
# データの生成
ar_data = generate(1.4, -0.48, 5, 0.5, 100)
# データをアップロードしやすい形式に変換
timestamps = sorted(range(0, 100))
contents = []
for timestamp in timestamps:
contents.append([
("timestamp", str(timestamp)), # 必ず文字列に変換すること
("value", str(ar_data[timestamp]))
])
# upload
put_logs(client, project, logstore, contents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment