Skip to content

Instantly share code, notes, and snippets.

@karakanb
Last active April 5, 2023 20:59
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 karakanb/2753cc2d55d10e88d3fa87197f110ac4 to your computer and use it in GitHub Desktop.
Save karakanb/2753cc2d55d10e88d3fa87197f110ac4 to your computer and use it in GitHub Desktop.
import random
months = 3
every_n_seconds = 5
points = []
for i in range(months * 30 * 24 * 60 * 60 // every_n_seconds):
points.append([i, random.randint(1, 100)])
with open("data.csv", "w") as f:
f.write("time,value \n")
for point in points:
f.write(f"{point[0]},{point[1]} \n")
print("Done!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment