This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PyPDF2 | |
import os | |
def digital_nondigital_checker(files): | |
pdf_reader = PyPDF2.PdfFileReader(path + str(files), 'rb') | |
total_pages = pdf_reader.getNumPages() | |
print("Number of pages in pdf : {}".format(total_pages)) | |
curr_page = 0 | |
page_type_flag = False | |
while total_pages: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------------------- | |
# Import libraries | |
import nltk | |
from nltk.tokenize import wordpunct_tokenize | |
from nltk.corpus import stopwords | |
nltk.download('stopwords') | |
import PyPDF2 | |
import os | |
path = "Input/" | |
import email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Command | |
# use c to run process one by one | |
# use k to run one command only | |
import os | |
## Show all wifi connected before | |
# | |
os.system('cmd /c "netsh wlan show profile"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Word Cloud: | |
- It is data visualization technique used for representing text data in | |
which the size of each word indicates its frequency or importance. | |
- Significant textual data points can be highlighted using a Word Cloud. | |
Installation: | |
- pip install wordcloud | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Take screenshot | |
# pip install PyAutoGUI | |
import pyautogui | |
import sys | |
import time | |
print("Minimize all other screen in 4 sec.") | |
n = len(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
engine = pyttsx3.init() | |
engine.say("Chandu ki chachi ne chadu ke papako chatani chatayi.") | |
engine.runAndWait() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
hostname = socket.gethostname() | |
ip = socket.gethostbyname(hostname) | |
print("Hostname : {}".format(hostname)) | |
print("IP Address : {}".format(ip)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Balance parenthesis check | |
# | |
def checker(s): | |
# Check length | |
if(len(s) % 2 != 0): | |
return False | |
# set of opening brackets | |
opening = set('([{') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## JSON | |
# | |
import json | |
# Open json | |
with open("Service2.json", "r") as file: | |
data = json.load(file) | |
data1 = data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
turtle.bgcolor('black') | |
turtle.pensize(2) | |
def curve(): | |
for i in range(200): | |
turtle.right(1) | |
turtle.forward(1) |
OlderNewer