Posts

Corona project(python)

from  plyer  import  notification import  requests from  bs4  import  BeautifulSoup import  time def   notifyMe ( title , message ):     notification.notify(          title  = title,          message  = message,          app_icon =  "Desktop\corona Python\icon.ico" ,          timeout  =  21    ) def   getData ( url ):    r =  requests.get(url)     return  r.text if   __name__  ==  "__main__" :       # notifyMe("Arman","Let stop the Spread of the virus together")       myHtmlData= getData( "https://www.mohfw.gov.in/" )      print (myHtmlData)     soup = BeautifulSoup(myHtmlData,  'html.parser' ) # print(soup.prettify()) myDataStr= "" for  tr  in  soup.find_all( 'tbody' ):   myDataStr +=(tr.get_text())   myDataStr = myDataStr[ 1 :] #  [1].find_all('tr')   itemlist= (myDataStr.split( " \n\n " )) states = [ 'Andaman and Nicobar' , 'Gujarat' , 'West Bengal' , ] for  item  in

Ai project : computer asistent

import  pyttsx3  #pip install pyttsx3 import  speech_recognition  as  sr  #pip install speechRecognition import  datetime import  wikipedia  #pip install wikipedia import  webbrowser import  os import  smtplib engine = pyttsx3.init( 'sapi5' ) voices= engine.getProperty( 'voices' ) # print(voices[0].id) engine.setProperty( 'voice' , voices[ 1 ].id) def   speak  ( audio ):      # pass     engine.say(audio)     engine.runAndWait() def   wishMe ():     hour =  int (datetime.datetime.now().hour)      if  hour>= 0   and  hour< 12 :         speak( "Good Morning!" )      elif  hour>= 12   and  hour< 18 :         speak( "Good Afternoon!" )         else :         speak( "Good Evening!" )       speak( "I am Riimaa . Please tell me how may I help you" ) def   takeCommand ():      #It takes microphone input from the user and returns string output     r = sr.Recognizer()      with  sr.Microphone()  as  source:          print