Thursday 3 March 2016

What amazing things can Python do?

I am learning python for the past few weeks and already loving it. There are a bunch of amazing things you can do with python. Let me list some of them :
  • It can help you download all the episodes of your favourite tv series/anime automatically.
  • If you are a cricket lover , python will take care that you get desktop notifications of the live score .
  • If you are a manga lover then you can  download all the images of your manga automatically without the hassle of downloading the images one by one manually.
  • It can help you organize a disorganized folder.
Before
After
  • Don't miss out on the latest news.
For many days i want to organize my movies as per IMDB ratings but found it too lazy to do . So, I wrote a python script to accomplish this task.
Before
After
Yes, Python can really do some amazing tasks (at least for a person like me who is new to programming)
Update : Made another scripts that runs automatically everyday at 12 am(using crontab) , downloads the Bing image of the day and sets it as my wallpaper.
  1. #! /usr/bin/python3
  2.  
  3. import requests
  4. from bs4 import BeautifulSoup
  5. import os
  6. import datetime
  7.  
  8. dt = datetime.datetime.now()
  9. cd = str(dt.year)+'0'+str(dt.month)+str(dt.day)
  10. os.makedirs('Bing',exist_ok=True)
  11. url = 'Bing™ Wallpaper Gallery'
  12. sc = requests.get(url)
  13. soup = BeautifulSoup(sc.text,'lxml')
  14. image = soup.select('.cursor_zoom img')
  15. image_url = image[0].get('src')
  16. res = requests.get(image_url)
  17. with open(os.path.join('Bing',cd+'.jpg'),'wb') as file:
  18. file.write(res.content)
  19. os.system('gsettings set org.gnome.desktop.background picture-uri http://file:///home/radioactive/Bing/'+cd+'.jpg')
Update 2: If you're preparing for GRE/CAT or just wanna improve your vocabulary then this script will surely help you. This script displays a random word along with its meaning amongst the various words saved inside a text file after every five minutes as  in the image below :
Another script that displays random quotes saved inside another text file .
You can find all the scripts and the text files here:

0 comments:

Post a Comment

Thank you for visiting our site!!

 

Subscribe to our Newsletter

Contact our Support

Email us: youremail@gmail.com

Our Team Memebers