-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheck.py
82 lines (69 loc) · 1.71 KB
/
Check.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
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
'''
this is not the Main File It is just to check
functionality of various libraries and code- Logics
'''
# import beautifulsoup3
# import google
# num_page = 3
# search_results = google.search("This is my query", num_page)
# for result in search_results:
# print(result.description)
'''
# It gives source code of the url
import requests
response = requests.get('https://www.youtube.com')
print(response.text)
'''
'''
from urllib.request import urlopen
'''
'''
import webbrowser
import pyttsx3
import speech_recognition as sr
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
def take_command():
# take input from upper microphone and change that to a string
r = sr.Recognizer()
with sr.Microphone() as source:
print("Listening......")
r.pause_threshold = 1
audio = r.listen(source)
try:
print("Recognizing...")
query = r.recognize_google(audio, language='en-in')
print(f"user said: {query} \n")
except Exception as e:
print(e)
print("say that Again Please...")
return "None"
return query
if __name__ == '__main__':
speak("Tell me the url to search")
new = 2
tabUrl = "https://www.google.com/search?q="
term = take_command()
if term=="None":
speak("Sorry,i was unable to hear ")
else:
webbrowser.open(tabUrl + term, new=new)
'''
m = input()
n = input()
s = ''
for i in range(65,91):
s+= chr(i)
ans = ''
for i in range m:
c = s.index(i)
x = ( c+5)%26
ans+ = s[x]
if(sorted(n)==sorted(ans)):
print("Yes",end='')
else:
print("No",end='')