MCPcopy Index your code
hub / github.com/geekcomputers/Python / get_app

Function get_app

nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py:226–325  ·  view source on GitHub ↗
(Q)

Source from the content-addressed store, hash-verified

224
225
226def get_app(Q):
227 current = Controller()
228 # master
229 if Q == "time":
230 print(datetime.now())
231 x = datetime.now()
232 voice(x)
233 elif Q == "news":
234 speak_news()
235
236 elif Q == "open notepad":
237 subprocess.call(["Notepad.exe"])
238 elif Q == "open calculator":
239 subprocess.call(["calc.exe"])
240 elif Q == "open stikynot":
241 subprocess.call(["StikyNot.exe"])
242 elif Q == "open shell":
243 subprocess.call(["powershell.exe"])
244 elif Q == "open paint":
245 subprocess.call(["mspaint.exe"])
246 elif Q == "open cmd":
247 subprocess.call(["cmd.exe"])
248 elif Q == "open discord":
249 subprocess.call(["discord.exe"])
250 elif Q == "open browser":
251 subprocess.call(["C:\\Program Files\\Internet Explorer\\iexplore.exe"])
252 # patch-1
253 elif Q == "open youtube":
254 webbrowser.open("https://www.youtube.com/") # open youtube
255 elif Q == "open google":
256 webbrowser.open("https://www.google.com/") # open google
257 elif Q == "open github":
258 webbrowser.open("https://github.com/")
259 elif Q == "search for":
260 que = Q.lstrip("search for")
261 answer = ask_gpt3(que)
262
263 elif (
264 Q == "email to other"
265 ): # here you want to change and input your mail and password whenver you implement
266 try:
267 speak("What should I say?")
268 r = sr.Recognizer()
269 with sr.Microphone() as source:
270 print("Listening...")
271 r.pause_threshold = 1
272 audio = r.listen(source)
273 to = "abc@gmail.com"
274 content = input("Enter content")
275 sendEmail(to, content)
276 speak("Email has been sent!")
277 except Exception as e:
278 print(e)
279 speak("Sorry, I can't send the email.")
280 # =======
281 # master
282 elif Q == "Take screenshot":
283 snapshot = ImageGrab.grab()

Callers 1

JARVIS_2.0.pyFile · 0.70

Calls 8

exitFunction · 0.85
voiceFunction · 0.70
speak_newsFunction · 0.70
ask_gpt3Function · 0.70
speakFunction · 0.70
sendEmailFunction · 0.70
saveMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected