forked from superjohan/jumalauta-irc-ad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timestamp.py
54 lines (34 loc) · 1.05 KB
/
timestamp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# why didn't i just do this in the demo itself? WHO KNOWS
def print_stamps(start, segment, length, stamps, segment_length, limit):
for i in range(0, len(stamps)):
stamp = start + (segment * length) + stamps[i]
if stamp >= segment_length * limit:
break
print('{}, '.format(stamp), end='')
print('let timestamps = [')
segment_length = 32
# pattern 1
for i in range(0, segment_length):
print('{}, '.format(i), end='')
# pattern 2
stamps = [ 0, 0.25, 0.75, 1.25, 1.5, 2, 2.25, 2.5 ]
start = segment_length
length = 2.75
print()
for i in range(0, 12):
print_stamps(start, i, length, stamps, segment_length, 2)
# pattern 3
stamps = [ 0, 0.125, 0.375, 0.625, 0.875, 1.125, 1.25, 1.5 ]
start = segment_length * 2
length = 1.625
print()
for i in range(0, 20):
print_stamps(start, i, length, stamps, segment_length, 3)
# pattern 4
stamps = [ 0, 1.625, 1.875, 2.125 ]
start = segment_length * 3
length = 2.25
print()
for i in range(0, 15):
print_stamps(start, i, length, stamps, segment_length, 4)
print('\n]')