20
loading...
This website collects cookies to deliver better user experience
# No need to install any, we use built-in ones
import subprocess #import required library
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n') #store profiles data in "data" variable
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i] #store the profile by converting them to list
for i in profiles:
# running the command to check passwords
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n')
# storing passwords after converting them to list
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))
except IndexError:
print ("{:<30}| {:<}".format(i, ""))
pip install moviepy
from moviepy.editor import VideoFileClip
clip = VideoFileClip("video_file.mp4") # Enter your video's path
clip.write_gif("gif_file.gif", fps = 10)
pip install PyPDF2, pyttsx3
import pyttsx3
import PyPDF2
book = open('mybook.pdf',' rb') # Add path
pdf_reader = PyPDF2.PdfFileReader(book)
num_pages = pdf_reader.numPages
play = pyttsx3.init()
print('Playing Audio Book')
for num in range(0, num_pages): #iterating through all pages
page = pdf_reader.getPage(num)
data = page.extractText() #extracting text
play.say(data)
play.runAndWait()
pip install win10toast, schedule
import win10toast
toaster = win10toast.ToastNotifier()
import schedule
import time
def job():
toaster.show_toast('Reminder', "See far buddy!", duration = 15)
schedule.every().hour.do(job) #scheduling for every hour; you can even change the scheduled time with schedule library
while True:
schedule.run_pending()
time.sleep(1)
Warning: Be careful! This may make you angry.
pip install keyboard
import keyboard
#press sb and space immediately(otherwise the trick wont work)
keyboard.add_abbreviation('sb', 'I am the buddy!') #provide abbreviation and the original word here
# Block forever, like `while True`.
keyboard.wait()
fpdf
. Let’s see how we can do this.pip install fpdf
from fpdf import FPDF
pdf = FPDF()
pdf.add_page() # Add a page
pdf.set_font("Arial", size = 15) # set style and size of font
f = open("game_notes.txt", "r") # open the text file in read mode
# insert the texts in pdf
for x in f:
pdf.cell(50,5, txt = x, ln = 1, align = 'C')
#pdf.output("path where you want to store pdf file\\file_name.pdf")
pdf.output("game_notes.pdf")
pip install opencv-python
import cv2
image = cv2.imread("profile.jpg") #Import the image
grey_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) #Add grey filter.
invert = cv2.bitwise_not(grey_img) #Add inverted filter.
blur = cv2.GaussianBlur(invert,(21,21),0) #Add Blur effect
invertedblur = cv2.bitwise_not(blur)
sketch = cv2.divide(grey_img, invertedblur, scale = 256.0)
cv2.imwrite("profile_sketch.png", sketch) #Export the sketch image
pyautogui
. pip install pyautogui
from time import sleep
import pyautogui
#delay the screenshot time by 10 sec, so that you can go
the desired page you want the screenshot
sleep(10)
myScreenshot = pyautogui.screenshot()
#provide the path to get the screenshot saved
myScreenshot.save(r'screenshot.png')
pip install pyautogui
import pyautogui
import time
pyautogui.FAILSAFE = False
while True:
time.sleep(15)
for i in range(0,100):
pyautogui.moveTo(0,i*5)
for i in range(0,3):
pyautogui.press('shift')