-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframes.py
More file actions
executable file
·100 lines (86 loc) · 4.07 KB
/
frames.py
File metadata and controls
executable file
·100 lines (86 loc) · 4.07 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
def single_frames(sequences, iterable):
""" Push many chars into the sequence and render many single frames,
returning the last (current) result from the iteration
Functionally, this affects the sequence table in the same manner as "mass_frame"
but yields _the last_ result:
?: window
# ... 5 more frames.
WORD POS | NEXT | STRT | OPEN | HIT | DROP
apples | | | | |
window 1 | i | | # | # |
ape | | | | |
apex | | | | |
extra | | | | |
tracks | | | | |
stack | | | | |
yes | | | | |
cape | | | | |
cake | | | | |
echo | | | | |
win 1 | i | # | # | |
wind 1 | i | # | # | |
windy 1 | i | # | # | |
w 1 | | # | # | # |
ww 1 | w | # | # | |
ddddd | | | | |
(
('win', 'ww', 'wind', 'w', 'windy'),
('window', 'w'),
()
)
"""
return sequences.table_insert_keys(iterable)
def mass_frame(sequences, iterable):
"""
Push many chars into the sequence and return a concat of all starts, hits,
and drops for the iterable.
?: window
WORD POS | NEXT | STRT | OPEN | HIT | DROP
apples | | | | |
window 1 | i | # | # | # |
ape | | | | |
apex | | | | |
extra | | | | |
tracks | | | | |
stack | | | | |
yes | | | | |
cape | | | | |
cake | | | | |
echo | | | | |
win 1 | i | # | # | # | #
wind 1 | i | # | # | # | #
windy 1 | i | # | # | | #
w 1 | | # | # | # | #
ww 1 | w | # | # | | #
ddddd | | # | | | #
( ('ww', 'windy', 'win', 'wind', 'w', 'window', 'ddddd', 'ww', 'windy',
'win', 'wind', 'w'),
('w', 'win', 'wind', 'window', 'w'),
('w', 'ww', 'win', 'wind', 'windy', 'ddddd')
)
This is useful for mass framing:
V:apextrackstackcapechoappleswwindowwindyyescakedddddf
IndexError for 1 on w
IndexError for 1 on w
WORD POS | NEXT | STRT | OPEN | HIT | DROP
apples | | # | | # | #
window | | # | | # | #
ape | | # | | # | #
apex | | # | | # | #
extra | | # | | # | #
tracks | | # | | # | #
stack | | # | | # | #
yes | | # | | # | #
cape | | # | | # | #
cake | | # | | # | #
echo | | # | | # | #
win | | # | | # | #
wind | | # | | # | #
windy | | # | | # | #
w | | # | | # | #
ww | | # | | # | #
ddddd | | # | | # | #
"""
trip = sequences.insert_keys(*iterable)
sequences.print_state_table(*trip)
return trip