CODING HACKING DEVELOPERS COLLEGE
6.14K subscribers
151 photos
8 videos
33 files
78 links
Disclaimer: This Channel is for educational purpose only , no one takes responsibility if you do anything wrong
𝙃𝙖𝙘𝙠 𝙏𝙝𝙚 𝙍𝙞𝙘𝙝💲= 𝙁𝙚𝙚𝙙 𝙏𝙝𝙚 𝙋𝙤𝙤𝙧🙌


FOUNDER:- @TeamVoiceContactBot
Download Telegram
🖥 10 Advanced Python Scripts For Everyday Programming

1. SpeedTest with Python
# pip install pyspeedtest
# pip install speedtest
# pip install speedtest-cli

#method 1
import speedtest

speedTest = speedtest.Speedtest()
print(speedTest.get_best_server())

#Check download speed
print(speedTest.download())

#Check upload speed
print(speedTest.upload())

# Method 2

import pyspeedtest
st = pyspeedtest.SpeedTest()
st.ping()
st.download()
st.upload()

2. Search on Google

# pip install google

from googlesearch import search

query = "Medium.com"

for url in search(query):
print(url)


3. Make Web Bot
# pip install selenium

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

bot = webdriver.Chrome("chromedriver.exe")
bot.get('[http://www.google.com'](http://www.google.com'))

search = bot.find_element_by_name('q')
search.send_keys("@codedev101")
search.send_keys(Keys.RETURN)
time.sleep(5)
bot.quit()


4. Fetch Song Lyrics
# pip install lyricsgenius

import lyricsgenius

api_key = "xxxxxxxxxxxxxxxxxxxxx"

genius = lyricsgenius.Genius(api_key)
artist = genius.search_artist("Pop Smoke", max_songs=5,sort="title")
song = artist.song("100k On a Coupe")

print(song.lyrics)


5. Get Exif Data of Photos
# Get Exif of Photo

# Method 1
# pip install pillow
import PIL.Image
import PIL.ExifTags

img = PIL.Image.open("Img.jpg")
exif_data =
{
PIL.ExifTags.TAGS[i]: j
for i, j in img._getexif().items()
if i in PIL.ExifTags.TAGS
}
print(exif_data)


# Method 2
# pip install ExifRead
import exifread

filename = open(path_name, 'rb')

tags = exifread.process_file(filename)
print(tags)


6. OCR Text from Image
# pip install pytesseract

import pytesseract
from PIL import Image

pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'

t=Image.open("img.png")
text = pytesseract.image_to_string(t, config='')

print(text)


7. Convert Photo into Cartonize

# pip install opencv-python

import cv2

img = cv2.imread('img.jpg')
grayimg = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
grayimg = cv2.medianBlur(grayimg, 5)

edges = cv2.Laplacian(grayimg , cv2.CV_8U, ksize=5)
r,mask =cv2.threshold(edges,100,255,cv2.THRESH_BINARY_INV)

img2 = cv2.bitwise_and(img, img, mask=mask)
img2 = cv2.medianBlur(img2, 5)

cv2.imwrite("cartooned.jpg", mask)


8. Empty Recycle Bin
# pip install winshell

import winshell
try:
winshell.recycle_bin().empty(confirm=False, /show_progress=False, sound=True)
print("Recycle bin is emptied Now")
except:
print("Recycle bin already empty")


9. Python Image Enhancement
# pip install pillow

from PIL import Image,ImageFilter
from PIL import ImageEnhance

im = Image.open('img.jpg')

# Choose your filter
# add Hastag at start if you don't want to any filter below

en = ImageEnhance.Color(im)
en = ImageEnhance.Contrast(im)
en = ImageEnhance.Brightness(im)
en = ImageEnhance.Sharpness(im)

# result
en.enhance(1.5).show("enhanced")


10. Get Window Version
# Window Version

import wmi
data = wmi.WMI()
for os_name in data.Win32_OperatingSystem():
print(os_name.Caption) # Microsoft Windows 11 Home




❤️ If You Want More Content Like This Then Join This Channel 👇
@team_voice_011

Give Reactions 😍❤️
👍2🤩21
🔝 Top 5 Code Editors 👨‍💻 For Beginners & Advanced Coders 👍
This media is not supported in your browser
VIEW IN TELEGRAM
Input Types Cheat Sheet 👨‍💻
👏4🤔2👍1
% of the population that speaks fluent English:

🇨🇳 China - 0.5%
🇧🇷 Brazil - 5%
🇷🇺 Russia - 5%
🇦🇷 Argentina - 6.52%
🇮🇳 India - 10.5%
🇧🇩 Bangladesh - 12%
🇲🇽 Mexico - 12.9%
🇹🇷 Turkey - 17%
🇪🇸 Spain - 22%
🇿🇦 South Africa - 31%
🇮🇹 Italy - 34%
🇵🇰 Pakistan - 49~58%
🇬🇷 Greece - 51%
🇳🇬 Nigeria - 53~60%
🇩🇪 Germany - 56%
🇫🇷 France - 57%
🇵🇭 Philippines - 58%
🇧🇪 Belgium - 60%
🇦🇹 Austria - 73%
🇫🇮 Finland - 75%
🇨🇦 Canada - 83%
🇩🇰 Denmark - 86%
🇸🇪 Sweden - 89%
🇳🇴 Norway - 90%
🇦🇺 Australia - 92.8%
🇺🇸 USA - 95.5%
🇸🇬 Singapore - 96.43%
🇳🇿 New Zealand - 97.82%
🇬🇧 UK - 98.3%
🇮🇪 Ireland - 98.37%
🇧🇧 Barbados - 100%
🇬🇮 Gibraltar - 100%

According to Crystal, Eurobarometer, US Census Bureau, Census, Mikrozensus, British council and EF etc.
👍10
This media is not supported in your browser
VIEW IN TELEGRAM
👍1
Most followed accounts on 𝕏:

1. 🇺🇸Elon Musk: 162.5 million
2. 🇺🇸Barack Obama: 132m
3. 🇨🇦Justin Bieber: 111.6m
4. 🇵🇹Cristiano Ronaldo: 110.2m
5. 🇧🇧Rihanna: 108.5m
6. 🇺🇸Katy Perry: 107.1m
7. 🇺🇸Taylor Swift: 94.7m
8. 🇮🇳Narendra Modi: 93.0m
9. 🇺🇸Donald Trump: 87.4m
10. 🇺🇸Lady Gaga: 83.8m
.
13. 🇺🇸 NASA: 77.9m
16. 🇺🇸 𝕏: 67.1m
42. 🇺🇸 NBA: 44.8m
43. 🇮🇳 Shah Rukh Khan: 43.8m
55. 🇺🇸 Joe Biden: 37.6m
65. 🇺🇸 POTUS: 33.4m
66. 🇺🇸 Instagram: 33.2m
69. 🇺🇸 SpaceX: 32.1m
75. 🇺🇸 Google: 30.9m
102. 🇺🇸 MrBeast: 24.6m
136. 🇺🇸 Tesla: 21.2m
155. 🇵🇰 Imran Khan: 19.9m
349. 🇺🇸 Joe Rogan: 11.9m
436. 🇺🇸 Tucker Carlson: 10.6m
928. 🇺🇸 jack: 6.4m
2,246. 🇺🇸 World of Statistics: 3.4m
2,565. 🇺🇸 Lex Fridman: 3.1m
2,622. 🇺🇸 World of Engineering: 3.1m
23,247. 🇺🇸 Linda Yaccarino: 0.55m
👍7