Posts

Showing posts from February, 2020

Music Player Using Python And Tkinter

#Belgin Android  # Follow Me At Instagram -- @tech_belgin , @belgin_official  # You Can Also Edit The Following Code To Get Input From The user To Choose Song from  tkinter  import  * from  pygame  import  mixer mixer.init() mixer.music.load( "Bad Boy.mp3" ) mixer.music.set_volume( 0.5 ) window=Tk() window.title( "Music Player" ) window.geometry( "1366x720" ) def   play ():                           #For Playing The Audio     mixer.music.play() btn=Button(window, text = "Start To Play Or Repeat From First" , command =play) btn.grid( column = 100 , row = 0 )    def   Pause ():                           #For Pausing The Audio     mixer.music.pause() btn=Button(window, text = "            Pause The Song         " , command =Pause) btn.grid( column = 100 , row = 101 ) def   UnPause ():                           #For Unpausing The Audio     mixer.music.unpause() btn=Button(window, text = &

Download Instgram Profile Picture And Other Posts Using Python (Without Using WebScrapping) A More Simpler Method

Method 1 #Belgin Android import  instaloader mod=instaloader.Instaloader() a= input ( "Enter The Profile Name --> " ) mod.download_profile(a, profile_pic_only = True )   Method 2 This Code Can Be Used In Linux #belgin Android from  os  import  system  a= input ( "Enter The Profile Name --> " ) system( f "instaloader  { a }  --profile-pic-only " ) Follow Me At Instagram --> Belgin_Official                                          --> Tech_Belgin

Simple Port Finder Program Using Python

#Belgin Android import  socket  def   port ( hostname ):     s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)      try :          for  i  in   range ( 225 ):             res=s.connect_ex((hostname,i))              if  res== 0 :                  print ( "Port is open At  {}  " .format(i))              else :                  pass      except  socket.error:          print ( "Could Not Resolve Host Name" )  port( input ( "Enter The Host Name -- > " ))                   

Text To Speech Program In Python

#belgin Android #Before That pip install gtts #Program to Convert Text To Speech  from  gtts  import  gTTS  import  os f= open ( "test.txt" )  #The File Which It Will Read , Create A Text File Before That text=f.read() out=gTTS( text =text, lang = 'en' , slow = False ) out.save( "spc.mp3" ) os.system( "start spc.mp3" )     #This Program Will Open The converted Audio To The Music Player