Skip to content

Commit

Permalink
Add script to generate random sensor files
Browse files Browse the repository at this point in the history
  • Loading branch information
SuppenGeist committed Sep 9, 2016
1 parent b8077b5 commit f655555
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/sensor_files/generate_sensor_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python

import sys
import random
from datetime import datetime

numberOfEntries = 0
logDate = 0

if len(sys.argv) == 2:
numberOfEntries = sys.argv[1]

if len(sys.argv) == 3:
logDate = datetime.strptime(sys.argv[2], "%H:%M:%S")
else:
logDate = datetime.strptime(str(random.randint(0,24))+":"+str(random.randint(0,59))+":"+str(random.randint(0,59)),"%H:%M:%S")

print numberOfEntries
print logDate

0 comments on commit f655555

Please sign in to comment.