MCPcopy
hub / github.com/InstaPy/InstaPy / randomize_time

Function randomize_time

instapy/time_util.py:14–22  ·  view source on GitHub ↗
(mean)

Source from the content-addressed store, hash-verified

12
13
14def randomize_time(mean):
15 allowed_range = mean * STDEV
16 stdev = allowed_range / 3 # 99.73% chance to be in the allowed range
17
18 t = 0
19 while abs(mean - t) > allowed_range:
20 t = gauss(mean, stdev)
21
22 return t
23
24
25def set_sleep_percentage(percentage):

Callers 1

sleepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected