Skip to content

Commit

Permalink
Merge branch 'branchtest'
Browse files Browse the repository at this point in the history
  • Loading branch information
M7-Soliman committed Mar 3, 2024
2 parents cabfbde + e0ea740 commit 465b3ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wearipedia/devices/fitbit/fitbit_sense_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ def get_distance_day(date):
minutes_in_a_day = 1440

for i in range(minutes_in_a_day):

distance = [0, 0.1]
weights = [0.6, 0.3]
max_distance = choices(distance, weights)
Expand All @@ -340,6 +339,9 @@ def get_distance_day(date):
else:
val = random.randint(1, 1000) / 10000

if 0 <= the_time.hour < 6 or 21 <= the_time.hour < 24:
val = 0

distance_day["distance_day"][0]["activities-distance-intraday"][
"dataset"
].append({"time": the_time.strftime("%H:%M:%S"), "value": val})
Expand Down Expand Up @@ -440,3 +442,6 @@ def create_syn_data(seed, start_date, end_date):
full_dict["heart_rate_day"] = full_dict["heart_rate_day"][0]["heart_rate_day"]

return full_dict


print(get_distance_day("2022-02-02"))

0 comments on commit 465b3ff

Please sign in to comment.