diff --git a/Scripts/API/Football-Standings/main.py b/Scripts/API/Football-Standings/main.py index 6d9eaa3a7..71fd22d7c 100644 --- a/Scripts/API/Football-Standings/main.py +++ b/Scripts/API/Football-Standings/main.py @@ -30,7 +30,6 @@ def print_standings(league_id): - league_code = league_id.get("code") resource = f"competitions/{league_code}/standings" api_url = API_URL + resource @@ -72,7 +71,6 @@ def print_standings(league_id): if __name__ == "__main__": try: - # If API key is not stored if API_KEY is None or API_KEY == "YOUR_KEY_HERE": print( diff --git a/Scripts/API/GeoCode API/code.py b/Scripts/API/GeoCode API/code.py index 628e90990..fe88fdc83 100644 --- a/Scripts/API/GeoCode API/code.py +++ b/Scripts/API/GeoCode API/code.py @@ -14,7 +14,6 @@ adrs = [] parms = {} for line in fh: - address = line.strip() parms["address"] = address parms["key"] = api_key @@ -26,7 +25,6 @@ raise ValueError from None with urllib.request.urlopen(req) as resp: - data = resp.read().decode() try: diff --git a/Scripts/API/Google-Py Translator/main.py b/Scripts/API/Google-Py Translator/main.py index 1a8aeff0a..3602008a8 100644 --- a/Scripts/API/Google-Py Translator/main.py +++ b/Scripts/API/Google-Py Translator/main.py @@ -21,7 +21,6 @@ def greeting(): def custom(src, dst): - sent = input("\nEnter your sentence : ") if src == 0: @@ -31,7 +30,6 @@ def custom(src, dst): def from_file(src, dst): - name = input("\nEnter absolute path for file : ") try: @@ -69,7 +67,6 @@ def from_file(src, dst): def main(): - prompt = """ Available options : 1. Custom text translation diff --git a/Scripts/API/Random_Album_API/Random_Album_API/application.py b/Scripts/API/Random_Album_API/Random_Album_API/application.py index 90020c9d2..0d853579d 100644 --- a/Scripts/API/Random_Album_API/Random_Album_API/application.py +++ b/Scripts/API/Random_Album_API/Random_Album_API/application.py @@ -10,6 +10,7 @@ "/v1/random-album/", view_func=RandomAlbumAPI.as_view("random-album") ) + # Exception Handler @app.errorhandler(APIException) def handle_invalid_usage(error): diff --git a/Scripts/API/Random_Quote_Notification/main.py b/Scripts/API/Random_Quote_Notification/main.py index c511ef491..b01777f95 100644 --- a/Scripts/API/Random_Quote_Notification/main.py +++ b/Scripts/API/Random_Quote_Notification/main.py @@ -7,6 +7,7 @@ from plyer import notification from apscheduler.schedulers.blocking import BlockingScheduler + # Sub-Routines def fetch(): # This gets the quote from the API and turns it into the quote to be displayed quoteSite = requests.get("http://api.quotable.io/random") diff --git a/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/btm_model.py b/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/btm_model.py index b948db3a5..493af7f54 100644 --- a/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/btm_model.py +++ b/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/btm_model.py @@ -5,7 +5,6 @@ def categorize(tweets_list, number_of_topics=3): - # vectorize texts vec = CountVectorizer(stop_words="english") X = vec.fit_transform(tweets_list).toarray() diff --git a/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/text_cleaning.py b/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/text_cleaning.py index 0625dfc42..3c5b64db4 100644 --- a/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/text_cleaning.py +++ b/Scripts/API/Twitter-topic-modeling-and-sentiment-analysis/text_cleaning.py @@ -19,7 +19,6 @@ def remove_stop_words(sentence): def clean_tweets(tweets): - # remove url no_url_tweets = [re.sub(r"http\S+", "", t) for t in tweets] diff --git a/Scripts/API/simple_api_requests/main.py b/Scripts/API/simple_api_requests/main.py index 7f57a0d0c..a0db3d7f5 100644 --- a/Scripts/API/simple_api_requests/main.py +++ b/Scripts/API/simple_api_requests/main.py @@ -3,6 +3,8 @@ import json app = Flask(__name__) + + # GET ALL API DATA # http://127.0.0.1:8000/ @app.route("/") diff --git a/Scripts/Bots/DiscordBot/bot.py b/Scripts/Bots/DiscordBot/bot.py index 62d4a7000..5546f2ec1 100644 --- a/Scripts/Bots/DiscordBot/bot.py +++ b/Scripts/Bots/DiscordBot/bot.py @@ -158,7 +158,6 @@ async def ping(ctx): @client.event async def on_message(message): if message.content in cursewords: - await message.channel.purge(limit=1) await message.author.create_dm() await message.author.dm_channel.send( diff --git a/Scripts/Bots/Slack-Bot/app.py b/Scripts/Bots/Slack-Bot/app.py index ef3788dc2..011ec84bf 100644 --- a/Scripts/Bots/Slack-Bot/app.py +++ b/Scripts/Bots/Slack-Bot/app.py @@ -11,6 +11,7 @@ os.environ.get("SLACK_EVENTS_TOKEN"), "/slack/events", app ) + # When a 'message' event is detected by the events adapter, forward that payload # to this function. @slack_events_adapter.on("message") diff --git a/Scripts/Bots/Telegram-bot/telegram_bot.py b/Scripts/Bots/Telegram-bot/telegram_bot.py index b26931bdf..c7c1c316a 100644 --- a/Scripts/Bots/Telegram-bot/telegram_bot.py +++ b/Scripts/Bots/Telegram-bot/telegram_bot.py @@ -38,7 +38,6 @@ def client_authenticate(client, phone): # ask either to input token or otp sent to # number or sent or your telegram id if not client.is_user_authorized(): - client.send_code_request(phone) # signing in the client @@ -47,13 +46,11 @@ def client_authenticate(client, phone): def messasge_send(client, user_id, user_hash): try: - receiver = InputPeerUser(user_id, user_hash) # sending message using telegram client client.send_message(receiver, "Hello", parse_mode="html") except Exception as e: - # there may be many error coming in while like peer # error, wwrong access_hash, flood_error, etc print(e) diff --git a/Scripts/Bots/Torrent-Search-Bot/bot.py b/Scripts/Bots/Torrent-Search-Bot/bot.py index c47959188..e2d45c322 100644 --- a/Scripts/Bots/Torrent-Search-Bot/bot.py +++ b/Scripts/Bots/Torrent-Search-Bot/bot.py @@ -7,7 +7,6 @@ def get_quote(search): - data = pirate(search) name = data[0]["name"] if name == "No results returned": @@ -33,7 +32,6 @@ def unknown(update, context): def quote(update, context): update.message.chat_id if update.message: - query = update.message.text context.bot.send_message( chat_id=update.effective_chat.id, diff --git a/Scripts/Bots/Typing_Test_Bot/Typing_test_bot.py b/Scripts/Bots/Typing_Test_Bot/Typing_test_bot.py index 2b3eec9eb..d36ddb26d 100644 --- a/Scripts/Bots/Typing_Test_Bot/Typing_test_bot.py +++ b/Scripts/Bots/Typing_Test_Bot/Typing_test_bot.py @@ -23,7 +23,6 @@ def __init__(self): time.sleep(2) def take_test(self): - # Load textbox element while True: try: diff --git a/Scripts/Bots/Zoom_Meetings_Bot/automate.py b/Scripts/Bots/Zoom_Meetings_Bot/automate.py index 43bd90947..0778f2f36 100644 --- a/Scripts/Bots/Zoom_Meetings_Bot/automate.py +++ b/Scripts/Bots/Zoom_Meetings_Bot/automate.py @@ -4,6 +4,7 @@ # In this program all the text-fields, buttons, check-boxes are located using screenshots # You can change the sleep-time as per the loading time of your pc + # Method to host a new meeting with video off and audio off def zoom_automate(meeting_id, meeting_passcode): # Opens the zoom app diff --git a/Scripts/Miscellaneous/Automatic Birthday Wisher/main.py b/Scripts/Miscellaneous/Automatic Birthday Wisher/main.py index 1c3bea465..c055fb397 100644 --- a/Scripts/Miscellaneous/Automatic Birthday Wisher/main.py +++ b/Scripts/Miscellaneous/Automatic Birthday Wisher/main.py @@ -7,6 +7,7 @@ GMAIL_ID = "Your-Gmail-Id" GMAIL_PWD = "Your-Gmail-Password" + # function for sending email def sendEmail(to, sub, msg): # conncection to gmail diff --git a/Scripts/Miscellaneous/Bulk Certificate Generator and emailer/main.py b/Scripts/Miscellaneous/Bulk Certificate Generator and emailer/main.py index 2c6ecf603..8a262fde8 100644 --- a/Scripts/Miscellaneous/Bulk Certificate Generator and emailer/main.py +++ b/Scripts/Miscellaneous/Bulk Certificate Generator and emailer/main.py @@ -14,7 +14,6 @@ def mail(df, from_, password): - msg = em.Message() msg.add_header("Content-Type", "text/html") @@ -24,7 +23,6 @@ def mail(df, from_, password): to_length = len(to) try: - server = smtplib.SMTP( "smtp.outlook.com", 587 ) # Change it to gamil or yahoo as per requirement @@ -33,7 +31,6 @@ def mail(df, from_, password): print("Login Succesfull \n") for i, j in zip(to, name): - print("" + str(to_length) + " left \n") print("Sending to {}".format(j)) @@ -75,13 +72,11 @@ def mail(df, from_, password): server.quit() except: - print("Make sure have an active internet connection") print("Please check your credentials") def generate_certificate(df): - font = ImageFont.truetype("Caveat-Bold.ttf", 120) for j in df["Name"]: img = Image.open("certificate_template.png") diff --git a/Scripts/Miscellaneous/Connect4Game/connect4game.py b/Scripts/Miscellaneous/Connect4Game/connect4game.py index 6103d3d59..50ce481d4 100644 --- a/Scripts/Miscellaneous/Connect4Game/connect4game.py +++ b/Scripts/Miscellaneous/Connect4Game/connect4game.py @@ -14,6 +14,7 @@ player_names = [] + # adding players def submit(): player_names.append(player_one.get()) @@ -136,7 +137,6 @@ def draw_board(board): try: - root = Tk() root.resizable(0, 0) player_one = StringVar(master=root) @@ -160,7 +160,6 @@ def draw_board(board): root.mainloop() if player_names[0] != "" and player_names[1] != "": - board = create_board() game_over = False @@ -184,7 +183,6 @@ def draw_board(board): myfont = pygame.font.SysFont("monospace", 30) while not game_over: - for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() diff --git a/Scripts/Miscellaneous/Disk_Usage_Stats/disk_usage.py b/Scripts/Miscellaneous/Disk_Usage_Stats/disk_usage.py index aef7b801b..a5fa4d976 100644 --- a/Scripts/Miscellaneous/Disk_Usage_Stats/disk_usage.py +++ b/Scripts/Miscellaneous/Disk_Usage_Stats/disk_usage.py @@ -6,7 +6,6 @@ def get_size(path): - total = 0 for entry in os.scandir(path): try: @@ -24,7 +23,6 @@ def get_size(path): if __name__ == "__main__": - # if you're running this in linux, change the default path to "/home" # also run the code as "sudo python3 Disk_usage.py" or "sudo ./Disk_usage.py" # i.e, with super user permissions @@ -38,7 +36,6 @@ def get_size(path): for entry in os.scandir(directory): if entry.is_dir(follow_symlinks=False): - print(entry.path + " is a directory.") print(get_size(entry.path)) total = get_size(entry.path) diff --git a/Scripts/Miscellaneous/EPUB_MOBI_to_PDF_converter/ebookConverter.py b/Scripts/Miscellaneous/EPUB_MOBI_to_PDF_converter/ebookConverter.py index 7736a89de..7f85b7ad1 100644 --- a/Scripts/Miscellaneous/EPUB_MOBI_to_PDF_converter/ebookConverter.py +++ b/Scripts/Miscellaneous/EPUB_MOBI_to_PDF_converter/ebookConverter.py @@ -49,7 +49,6 @@ def chooseFile(): # function that contacts convertAPI with the file & carries out the conversion def convertToPDF(): - global CHOSEN_FILE_LOC global CHOSEN_FILE_NAME @@ -86,7 +85,6 @@ def convertToPDF(): # first tkinter window of the code def window1(): - # define the labels, input box and buttons label = Label( main_frame, text="Step 1: Sign up at ConvertApi to get your secret key" diff --git a/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_img.py b/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_img.py index ec5eb7114..f0c16d460 100644 --- a/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_img.py +++ b/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_img.py @@ -12,7 +12,6 @@ def face_extraction(frame): - """Detect faces in a frame and extract them""" faces = cascade_model.detectMultiScale(frame, 1.1, 5) @@ -24,7 +23,6 @@ def face_extraction(frame): def image_processing(frame): - """Preprocessing of the image for predictions""" frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) @@ -37,7 +35,6 @@ def image_processing(frame): def detect_expressions(frame, detection_model): - """Detect final expressions and return the predictions done by the detection_model""" diff --git a/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_vid.py b/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_vid.py index 4e672becf..6befefbf6 100644 --- a/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_vid.py +++ b/Scripts/Miscellaneous/Facial Expressions Detection/detection_on_vid.py @@ -12,7 +12,6 @@ def face_extraction(frame): - """Detect faces in a frame and extract them""" faces = cascade_model.detectMultiScale(frame, 1.1, 5) @@ -24,7 +23,6 @@ def face_extraction(frame): def image_processing(frame): - """Preprocessing of the image for predictions""" frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) @@ -37,7 +35,6 @@ def image_processing(frame): def detect_expressions(frame, detection_model): - """Detect final expressions and return the predictions done by the detection_model""" @@ -60,17 +57,14 @@ def detect_expressions(frame, detection_model): cap = cv2.VideoCapture(0) while cap.isOpened(): - _, frame = cap.read() try: - faces = cascade_model.detectMultiScale( frame, 1.1, 5 ) # Detect faces in a frame for x, y, w, h in faces: - cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2) prediction = detect_expressions(frame, model) diff --git a/Scripts/Miscellaneous/Fake_news_web/app.py b/Scripts/Miscellaneous/Fake_news_web/app.py index c18311b20..ad672f222 100644 --- a/Scripts/Miscellaneous/Fake_news_web/app.py +++ b/Scripts/Miscellaneous/Fake_news_web/app.py @@ -15,7 +15,6 @@ def home(): @app.route("/api", methods=["POST"]) def get_delay(): - result = request.form query_title = result["title"] query_author = result["author"] diff --git a/Scripts/Miscellaneous/GUI Password Generator/passwordGenerator.py b/Scripts/Miscellaneous/GUI Password Generator/passwordGenerator.py index e393882f7..e2fc088fd 100644 --- a/Scripts/Miscellaneous/GUI Password Generator/passwordGenerator.py +++ b/Scripts/Miscellaneous/GUI Password Generator/passwordGenerator.py @@ -6,6 +6,8 @@ root.title("Password Generator - By Rohit") root.geometry("1000x700") root.wm_iconbitmap("pass.ico") + + # Function to generate a password def generate(): if passLen.get() == 0: diff --git a/Scripts/Miscellaneous/Github-Folder-Download-Tool/gitfold.py b/Scripts/Miscellaneous/Github-Folder-Download-Tool/gitfold.py index d0ab3b2f5..a2be465a8 100644 --- a/Scripts/Miscellaneous/Github-Folder-Download-Tool/gitfold.py +++ b/Scripts/Miscellaneous/Github-Folder-Download-Tool/gitfold.py @@ -29,7 +29,6 @@ def get_folder_links(folder_url): def download_files(files_to_download): - for file in files_to_download: print("\nfile - ", file) filename = file.split("/")[ @@ -83,7 +82,6 @@ def recursive_folder_download(folder_links_received, file_hrefs_received): if __name__ == "__main__": - os_platform = str(platform).lower() if ( "linux" in os_platform diff --git a/Scripts/Miscellaneous/Gmail_Automation_using_selenium/gmail_automation.py b/Scripts/Miscellaneous/Gmail_Automation_using_selenium/gmail_automation.py index 33cd0916e..b4be92221 100644 --- a/Scripts/Miscellaneous/Gmail_Automation_using_selenium/gmail_automation.py +++ b/Scripts/Miscellaneous/Gmail_Automation_using_selenium/gmail_automation.py @@ -16,7 +16,6 @@ def main(): - # --------------credintials reading-----------! config = configparser.ConfigParser() config.read("details.ini") @@ -39,7 +38,6 @@ def main(): elem.send_keys(username_for_email) mark1 = 1 except AttributeError as exception: - if mark1 == 0: driver.refresh() time.sleep(2) @@ -57,7 +55,6 @@ def main(): except AttributeError as exception: if mark2 == 0: - driver.refresh() time.sleep(3) driver.find_element_by_id("identifierNext").click() @@ -154,7 +151,6 @@ def main(): try: flag = 0 for i in filed: - # pasting sender's email id driver.find_element_by_class_name("vO").send_keys( sending_email_add diff --git a/Scripts/Miscellaneous/JSONtoExcel/JSONtoEXCEL.py b/Scripts/Miscellaneous/JSONtoExcel/JSONtoEXCEL.py index 0fd404d81..059b6ef7f 100644 --- a/Scripts/Miscellaneous/JSONtoExcel/JSONtoEXCEL.py +++ b/Scripts/Miscellaneous/JSONtoExcel/JSONtoEXCEL.py @@ -7,6 +7,7 @@ from pandas import DataFrame import os + # Importing the data from a file using the load method def convert(inp_json_file: str) -> None: """Simple function to convert any .json file to a xlsx file of any name""" diff --git a/Scripts/Miscellaneous/Links_in_a_webpage/links.py b/Scripts/Miscellaneous/Links_in_a_webpage/links.py index be12bf2ef..1cf5466b7 100644 --- a/Scripts/Miscellaneous/Links_in_a_webpage/links.py +++ b/Scripts/Miscellaneous/Links_in_a_webpage/links.py @@ -1,6 +1,7 @@ from selenium import webdriver from bs4 import BeautifulSoup + # Method to find the main website from the given URL def main_website(url): parts = url.split("/") diff --git a/Scripts/Miscellaneous/Mass_Mail_Spammer/main.py b/Scripts/Miscellaneous/Mass_Mail_Spammer/main.py index f865fbfb1..786277efb 100644 --- a/Scripts/Miscellaneous/Mass_Mail_Spammer/main.py +++ b/Scripts/Miscellaneous/Mass_Mail_Spammer/main.py @@ -18,7 +18,6 @@ def greeting(): # error handling for user inputs def check_err(email, target, spam, choice): - if "@" not in email or "@" not in target: print("Error in email/target\nPlease try again\nExiting...\n") sys.exit() @@ -35,7 +34,6 @@ def check_err(email, target, spam, choice): # generate random spam messages def rand_msg(spam): - msg = [] sub = [] N = int(input("Enter the length of random messages : ")) @@ -56,7 +54,6 @@ def rand_msg(spam): # generate user defined messages def custom_msg(spam): - msg = [] sub = [] @@ -70,7 +67,6 @@ def custom_msg(spam): # read files into messages def from_file(spam): - msg = [] sub = [] @@ -90,7 +86,6 @@ def from_file(spam): def main(): - greeting() email = input("Enter your email : ") diff --git a/Scripts/Miscellaneous/Motion Detection and Tracking/tracking.py b/Scripts/Miscellaneous/Motion Detection and Tracking/tracking.py index 3897b809e..6491f89a8 100644 --- a/Scripts/Miscellaneous/Motion Detection and Tracking/tracking.py +++ b/Scripts/Miscellaneous/Motion Detection and Tracking/tracking.py @@ -24,9 +24,7 @@ # Capturing frames while cap.isOpened(): - try: - diff = cv2.absdiff( frame1, frame2 ) # Difference between two frames (frame1 and frame2) diff --git a/Scripts/Miscellaneous/Notepad_clone/notepad.py b/Scripts/Miscellaneous/Notepad_clone/notepad.py index 3ff7625ef..55d6ec96b 100644 --- a/Scripts/Miscellaneous/Notepad_clone/notepad.py +++ b/Scripts/Miscellaneous/Notepad_clone/notepad.py @@ -223,7 +223,6 @@ def edit_toggle_wrap(self): if __name__ == "__main__": - app = QApplication(sys.argv) app.setApplicationName("No2Pads") diff --git a/Scripts/Miscellaneous/PGM_Images_Simple_Processing/PGM.py b/Scripts/Miscellaneous/PGM_Images_Simple_Processing/PGM.py index 55e21216e..537d798da 100644 --- a/Scripts/Miscellaneous/PGM_Images_Simple_Processing/PGM.py +++ b/Scripts/Miscellaneous/PGM_Images_Simple_Processing/PGM.py @@ -1,5 +1,6 @@ import copy + # Creating the class to processing class image_processor_pgm: def __init__(self, path): diff --git a/Scripts/Miscellaneous/Pac-Man/pacman.py b/Scripts/Miscellaneous/Pac-Man/pacman.py index 6ff7adce3..f37f6523d 100644 --- a/Scripts/Miscellaneous/Pac-Man/pacman.py +++ b/Scripts/Miscellaneous/Pac-Man/pacman.py @@ -38,6 +38,7 @@ # else: # pygame.mixer.music.load('panther.mp3') + # Draws a rectangle for the wall def draw_wall(screen, pos): pixels = pixels_from_points(pos) @@ -142,7 +143,6 @@ def pixels_from_points(pos): sys.exit() if event.type == pygame.KEYDOWN: - if event.key == pygame.K_RIGHT: move_direction = RIGHT pac_pos = add_to_pos(pacman_position, move_direction) diff --git a/Scripts/Miscellaneous/PomodoroTimer/main.py b/Scripts/Miscellaneous/PomodoroTimer/main.py index a8bede399..0b920af95 100644 --- a/Scripts/Miscellaneous/PomodoroTimer/main.py +++ b/Scripts/Miscellaneous/PomodoroTimer/main.py @@ -4,7 +4,6 @@ def main(): - # create pomodoro & begin first task task_goal = input("Enter the number of tasks you want to do today: ") @@ -17,13 +16,11 @@ def main(): pomodoro.start_task() while True: - # Initialize last_summary variable to 15 seconds in the past last_summary = pomodoro.timer_start - timedelta(seconds=15) # while the timer is running while pomodoro.get_time_remaining() > timedelta(seconds=0): - current_time = datetime.now() # print a summary of the current timer every 15 seconds @@ -35,7 +32,6 @@ def main(): # if we are on a task, complete the task. Otherwise, we start the task timer if pomodoro.timer_type == Pomodoro.TIMER_TASK: - # complete the task pomodoro.complete_task() diff --git a/Scripts/Miscellaneous/Research_paper_latex_parser/get_details.py b/Scripts/Miscellaneous/Research_paper_latex_parser/get_details.py index bd51fefd5..811106d1b 100644 --- a/Scripts/Miscellaneous/Research_paper_latex_parser/get_details.py +++ b/Scripts/Miscellaneous/Research_paper_latex_parser/get_details.py @@ -134,7 +134,6 @@ def purge_equations(self): # python get_details.py -p papers -o op_json.json if __name__ == "__main__": - # Define description of the script. parser = argparse.ArgumentParser( description="extract title,author,abstract,introduction,results,conclusions and acknowledgments from given set of research papers." @@ -170,7 +169,6 @@ def purge_equations(self): # Read all the files and extract information form each file. for tex_file in tqdm(all_files): - p = os.path.join(directory_path, tex_file) with open(p, "r", encoding="latin-1") as f: diff --git a/Scripts/Miscellaneous/Road Lanes Detector/detection_on_image.py b/Scripts/Miscellaneous/Road Lanes Detector/detection_on_image.py index e14072ae8..9593f1476 100644 --- a/Scripts/Miscellaneous/Road Lanes Detector/detection_on_image.py +++ b/Scripts/Miscellaneous/Road Lanes Detector/detection_on_image.py @@ -38,7 +38,6 @@ def roi(image, vertices): # Step 8) Draw Hough lines def draw_lines(image, hough_lines): - for line in hough_lines: x1, y1, x2, y2 = line[0] cv2.line(image, (x1, y1), (x2, y2), (0, 255, 0), 2) diff --git a/Scripts/Miscellaneous/Road Lanes Detector/detection_on_vid.py b/Scripts/Miscellaneous/Road Lanes Detector/detection_on_vid.py index 84244e0b2..fad0e8902 100644 --- a/Scripts/Miscellaneous/Road Lanes Detector/detection_on_vid.py +++ b/Scripts/Miscellaneous/Road Lanes Detector/detection_on_vid.py @@ -2,6 +2,7 @@ import cv2 import numpy as np + # ROI def roi(image, vertices): mask = np.zeros_like(image) @@ -22,7 +23,6 @@ def draw_lines(image, hough_lines): # Process image for detection def process(img): - height = img.shape[0] width = img.shape[1] diff --git a/Scripts/Miscellaneous/Road Lanes Detector/nyc_lane_detection.py b/Scripts/Miscellaneous/Road Lanes Detector/nyc_lane_detection.py index 9c3c13243..13ad39c61 100644 --- a/Scripts/Miscellaneous/Road Lanes Detector/nyc_lane_detection.py +++ b/Scripts/Miscellaneous/Road Lanes Detector/nyc_lane_detection.py @@ -22,9 +22,7 @@ def draw_lines(lines, image): # Preprocess the frames for detections def process(img): - try: - # Define roi vertices h, w, _ = img.shape roi_vertices = [(200, h), (w / 2, 2 * h / 3), (w - 100, h)] @@ -71,7 +69,6 @@ def process(img): _, frame = cap.read() try: - frame = process(frame) saved_frame.write(frame) cv2.imshow("final", frame) diff --git a/Scripts/Miscellaneous/Scientific_Calculator_GUI/Scientific_Calculator.py b/Scripts/Miscellaneous/Scientific_Calculator_GUI/Scientific_Calculator.py index b8f50c57f..5efe746ad 100644 --- a/Scripts/Miscellaneous/Scientific_Calculator_GUI/Scientific_Calculator.py +++ b/Scripts/Miscellaneous/Scientific_Calculator_GUI/Scientific_Calculator.py @@ -5,7 +5,6 @@ def clearall(): - """Clear function toclear the screen and reset all variables""" @@ -25,7 +24,6 @@ def sgn(a): def clearback(): - """Backspace button function to delete a character from the screen""" @@ -129,7 +127,6 @@ def clearback(): def pressbtn(num): - """Function to determine which button is pressed. Everytime a button a pressed , this function is called and a parameter is passed, which updates the @@ -213,7 +210,6 @@ def pressbtn(num): def equal(): - """On pressing equal to button, this function is called. And it prints the result on the screen.""" @@ -254,6 +250,7 @@ def equal(): area.insert(0, "0") area.grid(row=0, columnspan=8) + # standard calculator def standard(): root.geometry("361x350") diff --git a/Scripts/Miscellaneous/Social_Media_OSINT/main.py b/Scripts/Miscellaneous/Social_Media_OSINT/main.py index 29fb23103..46523b82d 100644 --- a/Scripts/Miscellaneous/Social_Media_OSINT/main.py +++ b/Scripts/Miscellaneous/Social_Media_OSINT/main.py @@ -2,6 +2,7 @@ import re from bs4 import BeautifulSoup + # Define Colors class colors: GREEN = "\033[92m" diff --git a/Scripts/Miscellaneous/Tic_Tac_Toe_Game/main.py b/Scripts/Miscellaneous/Tic_Tac_Toe_Game/main.py index 3a9d3c5b4..8e8c19c03 100644 --- a/Scripts/Miscellaneous/Tic_Tac_Toe_Game/main.py +++ b/Scripts/Miscellaneous/Tic_Tac_Toe_Game/main.py @@ -10,6 +10,7 @@ bclick = True count = 0 + # This function prevents the user from clicking the same button again. def button(buttons): global bclick, count diff --git a/Scripts/Miscellaneous/netcat/netcat.py b/Scripts/Miscellaneous/netcat/netcat.py index 25873ed35..7956568ef 100644 --- a/Scripts/Miscellaneous/netcat/netcat.py +++ b/Scripts/Miscellaneous/netcat/netcat.py @@ -1,5 +1,6 @@ import os, subprocess, threading, socket, sys, argparse + # to run a command def run(cmd): if cmd[:2] == "cd": diff --git a/Scripts/Miscellaneous/newsapp/news/migrations/0001_initial.py b/Scripts/Miscellaneous/newsapp/news/migrations/0001_initial.py index 55971bd2f..dcac4e3f3 100644 --- a/Scripts/Miscellaneous/newsapp/news/migrations/0001_initial.py +++ b/Scripts/Miscellaneous/newsapp/news/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/Scripts/Miscellaneous/xml2csv/xml2csv.py b/Scripts/Miscellaneous/xml2csv/xml2csv.py index 494c8c4ad..a582f7236 100644 --- a/Scripts/Miscellaneous/xml2csv/xml2csv.py +++ b/Scripts/Miscellaneous/xml2csv/xml2csv.py @@ -22,6 +22,7 @@ def getInputAndOutputFiles(): print("started to convert your file...") + # from line 31 to 35 # I read the file from the xmlPath variable, and got the dictory from parseXML # After that I got the first key from the dict (asumming the user passed a single xml liked the test.xml file) diff --git a/Scripts/Web_Scrappers/Algo_Trading_Articles_Scrapper/scraper.py b/Scripts/Web_Scrappers/Algo_Trading_Articles_Scrapper/scraper.py index 08635fd06..cfbdf0e6b 100644 --- a/Scripts/Web_Scrappers/Algo_Trading_Articles_Scrapper/scraper.py +++ b/Scripts/Web_Scrappers/Algo_Trading_Articles_Scrapper/scraper.py @@ -1,6 +1,7 @@ import requests from bs4 import BeautifulSoup + # function to get top 10 articles from quantopian def get_quantopian_articles(): res = requests.get("https://www.quantopian.com/posts") diff --git a/Scripts/Web_Scrappers/Amazon_products_scraper/AmazonScraper.py b/Scripts/Web_Scrappers/Amazon_products_scraper/AmazonScraper.py index 6cd61f1e2..b17a9fb50 100644 --- a/Scripts/Web_Scrappers/Amazon_products_scraper/AmazonScraper.py +++ b/Scripts/Web_Scrappers/Amazon_products_scraper/AmazonScraper.py @@ -10,7 +10,6 @@ def scrape(url): - # The headers our scraper will use. headers = { "dnt": "1", diff --git a/Scripts/Web_Scrappers/Cricbuzz _Live_Cricket_Score/live_scores.py b/Scripts/Web_Scrappers/Cricbuzz _Live_Cricket_Score/live_scores.py index 18049faae..3c34b4954 100644 --- a/Scripts/Web_Scrappers/Cricbuzz _Live_Cricket_Score/live_scores.py +++ b/Scripts/Web_Scrappers/Cricbuzz _Live_Cricket_Score/live_scores.py @@ -1,9 +1,9 @@ import requests from bs4 import BeautifulSoup + # Method for Scrapping the Cricbuzz and displaying live cricket match scores def live_score(): - url = "https://www.cricbuzz.com/cricket-match/live-scores" header = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36" @@ -33,7 +33,6 @@ def live_score(): attrs={"class": "cb-mtch-lst cb-col cb-col-100 cb-tms-itm"} ) for match in matches: - # Finding live score of a match and displaying it schedule = match.find_all( attrs={"class": "cb-col-100 cb-col cb-schdl"} diff --git a/Scripts/Web_Scrappers/DevFest_India_2020_Schedule/devfest_schedule.py b/Scripts/Web_Scrappers/DevFest_India_2020_Schedule/devfest_schedule.py index b069de431..eecdf40d8 100644 --- a/Scripts/Web_Scrappers/DevFest_India_2020_Schedule/devfest_schedule.py +++ b/Scripts/Web_Scrappers/DevFest_India_2020_Schedule/devfest_schedule.py @@ -2,6 +2,7 @@ from selenium import webdriver from bs4 import BeautifulSoup + # Method to scrape and store DevFest Schedule in csv file def devfest_schedule(): url = "https://devfestindia.com/schedule" diff --git a/Scripts/Web_Scrappers/Economictimes_Scraper/economictimes_scraper.py b/Scripts/Web_Scrappers/Economictimes_Scraper/economictimes_scraper.py index cb00d4676..affc6a341 100644 --- a/Scripts/Web_Scrappers/Economictimes_Scraper/economictimes_scraper.py +++ b/Scripts/Web_Scrappers/Economictimes_Scraper/economictimes_scraper.py @@ -5,6 +5,7 @@ import datetime import sys + # Util def datestr_to_date(datestr): [year, month, day] = datestr.split("-") diff --git a/Scripts/Web_Scrappers/GSoC-Scraper/script.py b/Scripts/Web_Scrappers/GSoC-Scraper/script.py index 59dcfc5ec..8d3df709f 100644 --- a/Scripts/Web_Scrappers/GSoC-Scraper/script.py +++ b/Scripts/Web_Scrappers/GSoC-Scraper/script.py @@ -80,7 +80,6 @@ def print_list(): Console().print(table) x = 1 while x != -1: - x = int( input( "Enter the index no. for getting complete links(-1 to quit): " @@ -118,7 +117,6 @@ def print_list(): language = str(input("Enter the language you want to filter out: ")) try: - with yaspin(text="Loading current orgs", color="yellow") as spinner: while True: params = ( @@ -140,7 +138,6 @@ def print_list(): if language_filter( json_data["results"][index]["technology_tags"] ): - name = json_data["results"][index]["name"] tech_stack = json_data["results"][index]["technology_tags"] irc = json_data["results"][index]["irc_channel"] @@ -166,5 +163,4 @@ def print_list(): print(e) finally: - print("Script ran successfully!") diff --git a/Scripts/Web_Scrappers/Movies_by_Genre_scrapper/top100_scrapy.py b/Scripts/Web_Scrappers/Movies_by_Genre_scrapper/top100_scrapy.py index c40c88d73..28f5c27bc 100644 --- a/Scripts/Web_Scrappers/Movies_by_Genre_scrapper/top100_scrapy.py +++ b/Scripts/Web_Scrappers/Movies_by_Genre_scrapper/top100_scrapy.py @@ -6,7 +6,6 @@ def search_with_genre(genre): - # Creating the file name (for CSV file) same as input provided filename = genre diff --git a/Scripts/Web_Scrappers/PlayStoreReviewScrapper/main.py b/Scripts/Web_Scrappers/PlayStoreReviewScrapper/main.py index 4d4317083..761dc84d0 100755 --- a/Scripts/Web_Scrappers/PlayStoreReviewScrapper/main.py +++ b/Scripts/Web_Scrappers/PlayStoreReviewScrapper/main.py @@ -9,7 +9,6 @@ def getPlaystoreReviews(app_id): - # url of the playstore with application_id url = ( "https://play.google.com/store/apps/details?id=" @@ -103,7 +102,6 @@ def getPlaystoreReviews(app_id): def main(): - infile = input("Enter file name: ") # for each application id get the application reviews with open(infile, "r") as file: diff --git a/Scripts/Web_Scrappers/Reddit_Scraper/scraper.py b/Scripts/Web_Scrappers/Reddit_Scraper/scraper.py index 43494ee07..8a4b47ecb 100644 --- a/Scripts/Web_Scrappers/Reddit_Scraper/scraper.py +++ b/Scripts/Web_Scrappers/Reddit_Scraper/scraper.py @@ -11,7 +11,6 @@ ) elif len(sys.argv) > 2: - # Create reddit object reddit = praw.Reddit( client_id=config.client_id, diff --git a/Scripts/Web_Scrappers/Rocket-Schedule/main.py b/Scripts/Web_Scrappers/Rocket-Schedule/main.py index 30588ddc9..9d453fd5e 100644 --- a/Scripts/Web_Scrappers/Rocket-Schedule/main.py +++ b/Scripts/Web_Scrappers/Rocket-Schedule/main.py @@ -37,7 +37,6 @@ print("Mission :", f[j - 1].a.text) if c < len(f1): - # get lauch date myData["launch"] = f1[c].a.text @@ -78,7 +77,6 @@ isHeader = False for emp in myList: if not isHeader: - # Writing headers of CSV file header = emp.keys() csv_writer.writerow(header) diff --git a/Scripts/Web_Scrappers/Top_Torrents_ThePirateBay/toptorrents.py b/Scripts/Web_Scrappers/Top_Torrents_ThePirateBay/toptorrents.py index a88bb2b59..04f99c166 100644 --- a/Scripts/Web_Scrappers/Top_Torrents_ThePirateBay/toptorrents.py +++ b/Scripts/Web_Scrappers/Top_Torrents_ThePirateBay/toptorrents.py @@ -2,6 +2,7 @@ from selenium import webdriver from bs4 import BeautifulSoup + # Method for filtering the contents of "title" variable as "charmap" repeatedly fails to encode some characters def filter_output(s): event = "" @@ -13,7 +14,6 @@ def filter_output(s): # Method for Scrapping top torrents from The Pirate Bay website and storing it in a csv file def top_torrents(cat, subcat): - # To choose the file_name of CSV File print("Type the file_name for the csv file:") file_name = str(input()) diff --git a/Scripts/Web_Scrappers/xmlrpc_tool/xml_tool.py b/Scripts/Web_Scrappers/xmlrpc_tool/xml_tool.py index 7d6eb49b4..d9a101e82 100644 --- a/Scripts/Web_Scrappers/xmlrpc_tool/xml_tool.py +++ b/Scripts/Web_Scrappers/xmlrpc_tool/xml_tool.py @@ -64,7 +64,6 @@ def get_methods_allows(url_site: str, data_xml: str): def main(): - sites_wordpress = get_sites_wordpress() data_xml = get_template_call_simple()