File tree Expand file tree Collapse file tree 4 files changed +69
-0
lines changed
Expand file tree Collapse file tree 4 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ install:
1111 - pip install python-vlc
1212 - pip install pafy
1313 - pip install bs4
14+ - pip install youtube-dl
15+ - chmod +x oobe
16+ - ./oobe
1417# command to run tests
1518script :
1619 - python my.py
Original file line number Diff line number Diff line change 1+ # Guinea pig 1.0
2+ # MIT License
3+ # Allowed also as a commercial use, but only with crediting author, like "c MyTja Team"
4+
5+ def convert (lst ):
6+ res = sum (d * 10 ** i for i , d in enumerate (lst [::- 1 ]))
7+ return (res )
8+
9+ def StrToInt (string ):
10+ intcount = 0
11+ integers = []
12+ print (len (string ))
13+ while (intcount < (len (string ))): #this is a loop
14+ i = string [intcount ]
15+ # print(i) -- enable this for debugging
16+ if i == "1" :
17+ integers .append (1 )
18+ elif i == "2" :
19+ integers .append (2 )
20+ elif i == "3" :
21+ integers .append (3 )
22+ elif i == "4" :
23+ integers .append (4 )
24+ elif i == "5" :
25+ integers .append (5 )
26+ elif i == "6" :
27+ integers .append (6 )
28+ elif i == "7" :
29+ integers .append (7 )
30+ elif i == "8" :
31+ integers .append (8 )
32+ elif i == "9" :
33+ integers .append (9 )
34+ elif i == "0" :
35+ integers .append (0 )
36+
37+ print (i )
38+ intcount = intcount + 1
39+ i = string .lower ()
40+ if i == "zero" :
41+ integers .append (0 )
42+ elif string == "one" :
43+ integers .append (1 )
44+ elif string == "two" :
45+ integers .append (2 )
46+ elif string == "three" :
47+ integers .append (3 )
48+ elif string == "four" :
49+ integers .append (4 )
50+ elif string == "five" :
51+ integers .append (5 )
52+ elif string == "six" :
53+ integers .append (6 )
54+ elif string == "seven" :
55+ integers .append (7 )
56+ elif string == "eight" :
57+ integers .append (8 )
58+ elif string == "nine" :
59+ integers .append (9 )
60+ elif string == "ten" :
61+ integers .append (10 )
62+ else :
63+ return "This string contains unvalid symbols. Check if you have symbols or unvalid letters in string."
64+ intfinal = convert (integers )
65+ return intfinal
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ python -m pip install urllib --user
2020python -m pip install pafy --user
2121cd ~/Desktop
2222touch OWM_license.txt
23+ cd MyAssistantOS-Raspbian
2324python my.py
You can’t perform that action at this time.
0 commit comments