git ssb

1+

Zach! / kriya-helper



Commit 552ea90bc6ad550db1490b43e4db3d9a19075fb0

Modular Overhaul!

The first version of this script had everything defined and printed out
on the main page.  This commit drastically changes things so that all
individual asanas are their own module.  Now I can make fixes to
individual ones much more easily.
Zach committed on 10/7/2017, 5:38:52 AM
Parent: 85f6eb0b65b087fc3c99458f840ba0ccea7ea511

Files changed

kriya-helper.pychanged
__init__.pyadded
breath_of_fire.pyadded
cat_cow.pyadded
closing_remark.pyadded
hollow_body.pyadded
intertwingled.pyadded
mantra.pyadded
meditation.pyadded
kriya-helper.pyView
@@ -1,6 +1,13 @@
11 import time
22 import pyglet
3 +import intertwingled
4 +import breath_of_fire
5 +import hollow_body
6 +import cat_cow
7 +import mantra
8 +import meditation
9 +import closing_remark
310
411 def main():
512 print """
613
@@ -36,10 +43,11 @@
3643
3744 """
3845 begin = raw_input("Press Enter > ")
3946 if begin == "":
40- beginning()
47 + intertwingled.beginning()
4148 summary()
49 + closing_remark.main()
4250
4351 def summary():
4452 print """
4553
@@ -78,257 +86,15 @@
7886 run = raw_input("> ")
7987 # only run if the user types y
8088 if run == "y":
8189 kriya()
82-def beginning():
83- chime = pyglet.media.load('sounds/starting_bell.wav', streaming=False)
84- chime.play()
8590
86-def transition():
87- chime = pyglet.media.load('sounds/kriya_chime.wav', streaming=False)
88- breath = 0
89-
90- chime.play()
91- while breath != 1:
92- time.sleep(11.2)
93- breath += 1
94-
9591 #Here are the sections of the kriya
9692 def kriya():
97-
98- mins = 0
99- print """
93 + breath_of_fire.main(3)
94 + hollow_body.main(1)
95 + cat_cow.main(3)
96 + mantra.main(3)
97 + meditation.main(10)
10098
101-
102-
103-
104-
105-
106-888888b. 888 888
107-888 "88b 888 888
108-888 .88P 888 888
109-8888888K. 888d888 .d88b. 8888b. 888888 88888b.
110-888 "Y88b 888P" d8P Y8b "88b 888 888 "88b
111-888 888 888 88888888 .d888888 888 888 888
112-888 d88P 888 Y8b. 888 888 Y88b. 888 888
113-8888888P" 888 "Y8888 "Y888888 "Y888 888 888
114-
115-
116-
117- .d888 8888888888 d8b
118- d88P" 888 Y8P
119- 888 888
120- .d88b. 888888 8888888 888 888d888 .d88b.
121-d88""88b 888 888 888 888P" d8P Y8b
122-888 888 888 888 888 888 88888888
123-Y88..88P 888 888 888 888 Y8b.
124- "Y88P" 888 888 888 888 "Y8888
125-
126-
127-
128-
129-
130-
131-
132-
133- """
134- while mins !=1:
135- time.sleep(10)
136- mins +=1
137- mins = 0
138- transition()
139- print """
140-
141-
142-
143-
144-
145-
146-
147-888 888 888 888
148-888 888 888 888
149-888 888 888 888
150-8888888888 .d88b. 888 888 .d88b. 888 888 888
151-888 888 d88""88b 888 888 d88""88b 888 888 888
152-888 888 888 888 888 888 888 888 888 888 888
153-888 888 Y88..88P 888 888 Y88..88P Y88b 888 d88P
154-888 888 "Y88P" 888 888 "Y88P" "Y8888888P"
155-
156-
157-
158-888888b. 888
159-888 "88b 888
160-888 .88P 888
161-8888888K. .d88b. .d88888 888 888
162-888 "Y88b d88""88b d88" 888 888 888
163-888 888 888 888 888 888 888 888
164-888 d88P Y88..88P Y88b 888 Y88b 888
165-8888888P" "Y88P" "Y88888 "Y88888
166- 888
167- Y8b d88P
168- "Y88P"
169-
170-
171-
172-
173-"""
174- while mins !=1:
175- time.sleep(10)
176- mins += 1
177- mins = 0
178- transition()
179- print """
180-
181-
182-
183-
184-
185-
186-
187- .d8888b. 888
188-d88P Y88b 888
189-888 888 888
190-888 8888b. 888888
191-888 "88b 888
192-888 888 .d888888 888
193-Y88b d88P 888 888 Y88b.
194- "Y8888P" "Y888888 "Y888
195-
196-
197-
198- .d8888b.
199-d88P Y88b
200-888 888
201-888 .d88b. 888 888 888
202-888 d88""88b 888 888 888
203-888 888 888 888 888 888 888
204-Y88b d88P Y88..88P Y88b 888 d88P
205- "Y8888P" "Y88P" "Y8888888P"
206-
207-
208-
209-
210-
211-
212-
213-"""
214- while mins != 3:
215- time.sleep(60)
216- mins += 1
217- mins = 0
218- transition()
219- print """
220-
221-
222-
223-
224-
225-
226-
227-
228-
229-
230-
231-888b d888 888
232-8888b d8888 888
233-88888b.d88888 888
234-888Y88888P888 8888b. 88888b. 888888 888d888 8888b.
235-888 Y888P 888 "88b 888 "88b 888 888P" "88b
236-888 Y8P 888 .d888888 888 888 888 888 .d888888
237-888 " 888 888 888 888 888 Y88b. 888 888 888
238-888 888 "Y888888 888 888 "Y888 888 "Y888888
239-
240-
241-
242-
243-
244-
245-
246-
247-
248-
249-
250-
251-
252- """
253- while mins != 3:
254- time.sleep(60)
255- mins += 1
256- mins = 0
257- transition()
258- print """
259-
260-
261-
262-
263-
264-
265-
266-
267-
268-
269-
270-888b d888 888 d8b 888 888 d8b
271-8888b d8888 888 Y8P 888 888 Y8P
272-88888b.d88888 888 888 888
273-888Y88888P888 .d88b. .d88888 888 888888 8888b. 888888 888 .d88b. 88888b.
274-888 Y888P 888 d8P Y8b d88" 888 888 888 "88b 888 888 d88""88b 888 "88b
275-888 Y8P 888 88888888 888 888 888 888 .d888888 888 888 888 888 888 888
276-888 " 888 Y8b. Y88b 888 888 Y88b. 888 888 Y88b. 888 Y88..88P 888 888
277-888 888 "Y8888 "Y88888 888 "Y888 "Y888888 "Y888 888 "Y88P" 888 888
278-
279-
280-
281-
282-
283-
284-
285-
286-
287-
288-
289-
290-
291- """
292- while mins != 10:
293- time.sleep(60)
294- mins += 1
295- mins = 0
296- transition()
297- print """
298-
299-
300-
301-
302-
303-
304-
305- __ __
306-/ \ / |
307-$$ \ /$$/______ __ __ ______ ______ ______
308- $$ \/$$// \ / | / | / \ / \ / \
309- $$ $$//$$$$$$ |$$ | $$ | $$$$$$ |/$$$$$$ |/$$$$$$ |
310- $$$$/ $$ | $$ |$$ | $$ | / $$ |$$ | $$/ $$ $$ |
311- $$ | $$ \__$$ |$$ \__$$ | /$$$$$$$ |$$ | $$$$$$$$/
312- $$ | $$ $$/ $$ $$/ $$ $$ |$$ | $$ |
313- $$/ $$$$$$/ $$$$$$/ $$$$$$$/ $$/ $$$$$$$/
314-
315-
316-
317- ______ __
318- / \ / |
319-/$$$$$$ | ______ ______ ______ _$$ |_
320-$$ | _$$/ / \ / \ / \ / $$ |
321-$$ |/ |/$$$$$$ |/$$$$$$ | $$$$$$ |$$$$$$/
322-$$ |$$$$ |$$ | $$/ $$ $$ | / $$ | $$ | __
323-$$ \__$$ |$$ | $$$$$$$$/ /$$$$$$$ | $$ |/ |
324-$$ $$/ $$ | $$ |$$ $$ | $$ $$/
325- $$$$$$/ $$/ $$$$$$$/ $$$$$$$/ $$$$/
326-
327-
328-
329-
330-
331-
332-"""
33399 if __name__ == "__main__":
334100 main()
__init__.pyView
breath_of_fire.pyView
@@ -1,0 +1,47 @@
1 +import time
2 +import intertwingled
3 +
4 +def main(duration):
5 + mins = 0
6 + print """
7 +
8 +
9 +
10 +
11 +
12 +
13 +888888b. 888 888
14 +888 "88b 888 888
15 +888 .88P 888 888
16 +8888888K. 888d888 .d88b. 8888b. 888888 88888b.
17 +888 "Y88b 888P" d8P Y8b "88b 888 888 "88b
18 +888 888 888 88888888 .d888888 888 888 888
19 +888 d88P 888 Y8b. 888 888 Y88b. 888 888
20 +8888888P" 888 "Y8888 "Y888888 "Y888 888 888
21 +
22 +
23 +
24 + .d888 8888888888 d8b
25 + d88P" 888 Y8P
26 + 888 888
27 + .d88b. 888888 8888888 888 888d888 .d88b.
28 +d88""88b 888 888 888 888P" d8P Y8b
29 +888 888 888 888 888 888 88888888
30 +Y88..88P 888 888 888 888 Y8b.
31 + "Y88P" 888 888 888 888 "Y8888
32 +
33 +
34 +
35 +
36 +
37 +
38 +
39 +
40 + """
41 + while mins != duration:
42 + time.sleep(60)
43 + mins += 1
44 + intertwingled.transition()
45 +
46 +if __name__ == "__main__":
47 + main()
cat_cow.pyView
@@ -1,0 +1,48 @@
1 +import time
2 +import intertwingled
3 +
4 +def main(duration):
5 + print """
6 +
7 +
8 +
9 +
10 +
11 +
12 +
13 + .d8888b. 888
14 +d88P Y88b 888
15 +888 888 888
16 +888 8888b. 888888
17 +888 "88b 888
18 +888 888 .d888888 888
19 +Y88b d88P 888 888 Y88b.
20 + "Y8888P" "Y888888 "Y888
21 +
22 +
23 +
24 + .d8888b.
25 +d88P Y88b
26 +888 888
27 +888 .d88b. 888 888 888
28 +888 d88""88b 888 888 888
29 +888 888 888 888 888 888 888
30 +Y88b d88P Y88..88P Y88b 888 d88P
31 + "Y8888P" "Y88P" "Y8888888P"
32 +
33 +
34 +
35 +
36 +
37 +
38 +
39 + """
40 + mins = 0
41 + while mins != duration:
42 + time.sleep(60)
43 + mins += 1
44 + intertwingled.transition()
45 +
46 +if __name__ == "__main__":
47 + main()
48 +
closing_remark.pyView
@@ -1,0 +1,41 @@
1 +
2 +def main():
3 + print """
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 +if __name__ == "__main__":
41 + main()
hollow_body.pyView
@@ -1,0 +1,47 @@
1 +import time
2 +import intertwingled
3 +
4 +def main(duration):
5 + print """
6 +
7 +
8 +
9 +
10 +
11 +
12 +
13 +888 888 888 888
14 +888 888 888 888
15 +888 888 888 888
16 +8888888888 .d88b. 888 888 .d88b. 888 888 888
17 +888 888 d88""88b 888 888 d88""88b 888 888 888
18 +888 888 888 888 888 888 888 888 888 888 888
19 +888 888 Y88..88P 888 888 Y88..88P Y88b 888 d88P
20 +888 888 "Y88P" 888 888 "Y88P" "Y8888888P"
21 +
22 +
23 +
24 +888888b. 888
25 +888 "88b 888
26 +888 .88P 888
27 +8888888K. .d88b. .d88888 888 888
28 +888 "Y88b d88""88b d88" 888 888 888
29 +888 888 888 888 888 888 888 888
30 +888 d88P Y88..88P Y88b 888 Y88b 888
31 +8888888P" "Y88P" "Y88888 "Y88888
32 + 888
33 + Y8b d88P
34 + "Y88P"
35 +
36 +
37 +
38 +
39 + """
40 + mins = 0
41 + while mins != duration:
42 + time.sleep(60)
43 + mins += 1
44 + intertwingled.transition()
45 +
46 +if __name__ == "__main__":
47 + main()
intertwingled.pyView
@@ -1,0 +1,17 @@
1 +import time
2 +import pyglet
3 +
4 +'''These are global variables for the whole kriya-helper '''
5 +
6 +def beginning():
7 + chime = pyglet.media.load('sounds/starting_bell.wav', streaming=False)
8 + chime.play()
9 +
10 +def transition():
11 + chime = pyglet.media.load('sounds/kriya_chime.wav', streaming=False)
12 + breath = 0
13 +
14 + chime.play()
15 + while breath != 1:
16 + time.sleep(11.2)
17 + breath += 1
mantra.pyView
@@ -1,0 +1,46 @@
1 +import time
2 +import intertwingled
3 +
4 +def main(duration):
5 + print """
6 +
7 +
8 +
9 +
10 +
11 +
12 +
13 +
14 +
15 +
16 +
17 +888b d888 888
18 +8888b d8888 888
19 +88888b.d88888 888
20 +888Y88888P888 8888b. 88888b. 888888 888d888 8888b.
21 +888 Y888P 888 "88b 888 "88b 888 888P" "88b
22 +888 Y8P 888 .d888888 888 888 888 888 .d888888
23 +888 " 888 888 888 888 888 Y88b. 888 888 888
24 +888 888 "Y888888 888 888 "Y888 888 "Y888888
25 +
26 +
27 +
28 +
29 +
30 +
31 +
32 +
33 +
34 +
35 +
36 +
37 +
38 + """
39 + mins = 0
40 + while mins != duration:
41 + time.sleep(60)
42 + mins += 1
43 + intertwingled.transition()
44 +
45 +if __name__ == "__main__":
46 + main()
meditation.pyView
@@ -1,0 +1,46 @@
1 +import time
2 +import intertwingled
3 +
4 +def main(duration):
5 + print """
6 +
7 +
8 +
9 +
10 +
11 +
12 +
13 +
14 +
15 +
16 +
17 +888b d888 888 d8b 888 888 d8b
18 +8888b d8888 888 Y8P 888 888 Y8P
19 +88888b.d88888 888 888 888
20 +888Y88888P888 .d88b. .d88888 888 888888 8888b. 888888 888 .d88b. 88888b.
21 +888 Y888P 888 d8P Y8b d88" 888 888 888 "88b 888 888 d88""88b 888 "88b
22 +888 Y8P 888 88888888 888 888 888 888 .d888888 888 888 888 888 888 888
23 +888 " 888 Y8b. Y88b 888 888 Y88b. 888 888 Y88b. 888 Y88..88P 888 888
24 +888 888 "Y8888 "Y88888 888 "Y888 "Y888888 "Y888 888 "Y88P" 888 888
25 +
26 +
27 +
28 +
29 +
30 +
31 +
32 +
33 +
34 +
35 +
36 +
37 +
38 + """
39 + mins = 0
40 + while mins != duration:
41 + time.sleep(60)
42 + mins += 1
43 + intertwingled.transition()
44 +
45 +if __name__ == "__main__":
46 + main()

Built with git-ssb-web