diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..fa0d3b7c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: [DhanushNehru] +patreon: dhanushnehru +open_collective: # Replace with a single Open Collective username +ko_fi: dhanushnehru +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: dhanushnehru +thanks_dev: dhanushnehru +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.gitignore b/.gitignore index e2825f9f..5109c9bf 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ node_modules/ creds.js # Private Files -*.json *.csv *.csv.gz *.tsv diff --git a/Arrange It/README.md b/Arrange It/README.md index fb4553fb..86e7f8eb 100644 --- a/Arrange It/README.md +++ b/Arrange It/README.md @@ -1,18 +1,46 @@ # Arrange It -With the help of this script, files can be moved automatically to the folder that corresponds to their extension (for example, ".jpg" or ".png" ==> "/Pictures," and ".mp4" ==> "/Videos"). +With the help of this script, files can be moved automatically to the folder that corresponds to their extension (for example, .jpg or .png files go to the /Pictures folder, and .mp4 files go to /Videos). -## How To Run +## New Feature: Custom Folder Configuration -- Put in Download Folder Or Wherever You want to automatically move the file and Just run +Now, you can customize how files are arranged by defining your own folder structure and file extensions using a config.json file. This allows for more flexibility without needing to modify the Python code itself. +`python arrangeit.py` -For CLI +# How To Use the config.json File + +1. The config.json file contains the mappings of file extensions to folder names. +2. You can modify, add, or remove folder categories and file extensions as per your needs. + +Example config.json: ```bash -python arrangeit.py +{ + "Programming Files": ["ipynb", "py", "java", "cs", "js"], + "Music": ["mp3", "wav", "aac"], + "Videos": ["mp4", "mkv", "avi"], + "Pictures": ["jpeg", "png", "gif"], + "Documents": ["pdf", "docx", "xlsx"] +} +``` + +# How To Run + +Put the script and the config.json file in the folder where you want to automatically move the files. + +Run the following command from the terminal: - +```bash +python arrangeit.py ``` - - \ No newline at end of file +The script will create folders and move files based on the folder-extension mappings in the config.json file. + + +# Benefits + +**Customizable:** Easily modify the config.json file to tailor the organization to your preferences. + +**User-Friendly:** No need to modify Python code—just update the config.json file. + +**Scalable:** Works with different folder structures for different use cases. diff --git a/Arrange It/arrangeit.py b/Arrange It/arrangeit.py index 682f398b..1f9beb28 100644 --- a/Arrange It/arrangeit.py +++ b/Arrange It/arrangeit.py @@ -1,22 +1,18 @@ from shutil import move -from os import path import os - - -directory = { - 'Programming Files': set(['ipynb', 'py', 'java', 'cs', 'js', 'vsix', 'jar', 'cc', 'ccc', 'html', 'xml', 'kt']), - 'Music': set(['mp3', 'wav', 'wma', 'mpa', 'ram', 'ra', 'aac', 'aif', 'm4a', 'tsa']), - 'Videos': set(['mp4', 'webm', 'mkv', 'MPG', 'MP2', 'MPEG', 'MPE', 'MPV', 'OGG', 'M4P', 'M4V', 'WMV', 'MOV', 'QT', 'FLV', 'SWF', 'AVCHD', 'avi', 'mpg', 'mpe', 'mpeg', 'asf', 'wmv', 'mov', 'qt', 'rm']), - 'Pictures': set(['jpeg', 'jpg', 'png', 'gif', 'tiff', 'raw', 'webp', 'jfif', 'ico', 'psd', 'svg', 'ai']), - 'Applications': set(['exe', 'msi', 'deb', 'rpm']), - 'Compressed': set(['zip', 'rar', 'arj', 'gz', 'sit', 'sitx', 'sea', 'ace', 'bz2', '7z']), - 'Documents': set(['txt', 'pdf', 'doc', 'xlsx', 'pdf', 'ppt', 'pps', 'docx', 'pptx']), - 'Other': set([]) -} - - -def create_folders(): - +import json + +# Load folder-extension mappings from config.json +def load_config(file='config.json'): + try: + with open(file, 'r') as f: + return json.load(f) + except FileNotFoundError: + print(f"Configuration file {file} not found! Using default settings.") + return {} + +# Create folders based on config.json +def create_folders(directory): for dir_ in directory: try: os.mkdir(dir_) @@ -24,24 +20,23 @@ def create_folders(): except OSError: print(f'{dir_:20} Already Exists') - -def get_folder(ext): - - for f, ex in directory.items(): - if ext in ex: - return f +# Determine which folder a file belongs to +def get_folder(ext, directory): + for folder, extensions in directory.items(): + if ext in extensions: + return folder return 'Other' - -def start(): +# Start moving files based on their extensions +def start(directory): for filename in os.listdir(): if filename != __file__ and filename[0] != '.' and '.' in filename: ext = os.path.basename(filename).split('.')[-1] - folder = get_folder(ext) + folder = get_folder(ext, directory) if not os.path.isfile(os.path.join(folder, filename)): move(filename, folder) - if __name__ == '__main__': - create_folders() - start() + config = load_config() # Load configuration + create_folders(config) # Create necessary folders + start(config) # Start organizing files diff --git a/Arrange It/config.json b/Arrange It/config.json new file mode 100644 index 00000000..d573f41d --- /dev/null +++ b/Arrange It/config.json @@ -0,0 +1,11 @@ +{ + "Programming Files": ["ipynb", "py", "java", "cs", "js", "vsix", "jar", "cc", "ccc", "html", "xml", "kt"], + "Music": ["mp3", "wav", "wma", "mpa", "ram", "ra", "aac", "aif", "m4a", "tsa"], + "Videos": ["mp4", "webm", "mkv", "MPG", "MP2", "MPEG", "MPE", "MPV", "OGG", "M4P", "M4V", "WMV", "MOV", "QT", "FLV", "SWF", "AVCHD", "avi", "mpg", "mpe", "mpeg", "asf", "wmv", "mov", "qt", "rm"], + "Pictures": ["jpeg", "jpg", "png", "gif", "tiff", "raw", "webp", "jfif", "ico", "psd", "svg", "ai"], + "Applications": ["exe", "msi", "deb", "rpm"], + "Compressed": ["zip", "rar", "arj", "gz", "sit", "sitx", "sea", "ace", "bz2", "7z"], + "Documents": ["txt", "pdf", "doc", "xlsx", "ppt", "pps", "docx", "pptx"], + "Other": [] + } + \ No newline at end of file diff --git a/Auto WiFi Check/requirements.txt b/Auto WiFi Check/requirements.txt new file mode 100644 index 00000000..4d227ca1 --- /dev/null +++ b/Auto WiFi Check/requirements.txt @@ -0,0 +1 @@ +schedule==1.2.2 diff --git a/Auto WiFi Check/wifi_checker.py b/Auto WiFi Check/wifi_checker.py index c2c3048c..e0c20b9b 100644 --- a/Auto WiFi Check/wifi_checker.py +++ b/Auto WiFi Check/wifi_checker.py @@ -2,44 +2,99 @@ import subprocess import sys import time -from datetime import datetime +import logging import schedule as sc +# Create the log file if it doesn't already exist +LOG_FILE = "wifi_status_log.txt" +PING_HOST = "www.google.com" + +try: + with open(LOG_FILE, 'x') as file: + file.write("Logs:\n") + print(f"File '{LOG_FILE}' created successfully.") +except FileExistsError: + print(f"File '{LOG_FILE}' already exists.") + +# Set up logging to log to a file with timestamps +logging.basicConfig(filename=LOG_FILE, + level=logging.INFO, + format='%(asctime)s - %(message)s', + filemode='a') # Append mode def enable(): - subprocess.call("netsh interface set interface Wi-Fi enabled") - print("Turning On the laptop WiFi") + try: + subprocess.call("netsh interface set interface Wi-Fi enabled", shell=True) + print("Turning On the laptop WiFi") + logging.info("WiFi enabled") + except Exception as e: + print(f"Failed to enable WiFi: {e}") + logging.error(f"Failed to enable WiFi: {e}") def disable(): - subprocess.call("netsh interface set interface Wi-Fi disabled") - print("Turning Off the laptop WiFi") - + try: + subprocess.call("netsh interface set interface Wi-Fi disabled", shell=True) + print("Turning Off the laptop WiFi") + logging.info("WiFi disabled") + except Exception as e: + print(f"Failed to disable WiFi: {e}") + logging.error(f"Failed to disable WiFi: {e}") - def job(): - if subprocess.call("netsh interface set interface Wi-Fi enabled") == 0: + try: + subprocess.call("netsh interface set interface Wi-Fi enabled", shell=True) print("WiFi is enabled and connected to internet") - hostname = "www.google.com" - response = subprocess.call("ping -n 1 " + hostname) + logging.info("WiFi is enabled and connected to the internet.") + + response = subprocess.call(f"ping -n 1 {PING_HOST}", shell=True) + if response == 1: print("Your Connection is not working") - disable() - time.sleep(1) - enable() + logging.warning("WiFi connection not working, ping failed.") + + attempt_counter = 0 + max_attempts = 3 + + while attempt_counter < max_attempts: + print(f"Attempt {attempt_counter + 1} to reconnect...") + logging.info(f"Attempt {attempt_counter + 1} to reconnect...") + + disable() + time.sleep(1) + enable() + + time.sleep(5) + + response = subprocess.call(f"ping -n 1 {PING_HOST}", shell=True) + if response == 0: + print("Reconnection successful!") + logging.info("Reconnection successful!") + break + else: + print(f"Reconnection attempt {attempt_counter + 1} failed.") + logging.warning(f"Reconnection attempt {attempt_counter + 1} failed.") + + attempt_counter += 1 + + if attempt_counter == max_attempts and response != 0: + print(f"Failed to reconnect after {max_attempts} attempts.") + logging.error(f"Failed to reconnect after {max_attempts} attempts.") + except Exception as e: + print(f"Error during WiFi check: {e}") + logging.error(f"Error during WiFi check: {e}") def is_admin(): try: return ctypes.windll.shell32.IsUserAnAdmin() - except: + except Exception as e: + logging.error(f"Admin check failed: {e}") return False if is_admin(): - # job() sc.every(50).seconds.do(job) else: ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1) - while True: sc.run_pending() - time.sleep(1) \ No newline at end of file + time.sleep(1) diff --git a/Auto WiFi Check/wifi_status_log.txt b/Auto WiFi Check/wifi_status_log.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Auto WiFi Check/wifi_status_log.txt @@ -0,0 +1 @@ + diff --git a/AutoCert/README.md b/AutoCert/README.md index c2600978..2a1e0709 100644 --- a/AutoCert/README.md +++ b/AutoCert/README.md @@ -12,10 +12,10 @@ A Python script to auto generate e-certificates in bulk. # Instruction to use
    -
  1. First install all the dependencies, present in the requirements.txt file
  2. -
  3. Put a certificate template with blank fields, in the project folder, with the name `certificateTemplate.png` .Make sure the template is in `png` format only
  4. +
  5. First install all the dependencies, present in the requirements.txt file.
  6. +
  7. Put a certificate template with blank fields, in the project folder, with the name `certificateTemplate.png`. Make sure the template is in `png` format only.
  8. Put the input `csv` file containing a list of the participant names by under a column name.
  9. -
  10. Once all this is done, run `python3 main.py` in your terminal
  11. +
  12. Once all this is done, run `python3 main.py` in your terminal.
  13. The generated certificates would be present under the *export* folder, with each certificate having the name of the participant.
diff --git a/Autocomplete Notes App/README.md b/Autocomplete Notes App/README.md new file mode 100644 index 00000000..ed1e94bc --- /dev/null +++ b/Autocomplete Notes App/README.md @@ -0,0 +1,32 @@ +# Autocomplete Notes App + +## Overview + +The Autocomplete Notes App is a simple graphical user interface (GUI) application that allows users to take notes efficiently. It features an autocomplete functionality, where suggestions for completing words are displayed as the user types. This app is built using Python and the Tkinter library for the GUI, with the addition of word suggestions from a predefined word list. + +## Features + +- **Text Input**: A large text area for users to enter notes. +- **Autocomplete**: As users type, a suggestion box displays the full word based on the entered text. +- **Tab Functionality**: Users can press the Tab key to automatically fill in the suggested word into the text area. +- **Save Notes**: Users can choose a filename to save their notes to a `.txt` file. +- **Dynamic Sizing**: The app window resizes based on user actions. + +## Requirements + +- Python 3.x +- Tkinter (usually comes pre-installed with Python) +- A `wordlist.txt` file containing words for autocomplete suggestions. + +## Installation + +1. Clone the repository or download the source code files. +2. Ensure you have Python 3.x installed on your machine. +3. Make sure `wordlist.txt` is in the same directory as the application code. This file should contain words, each on a new line. + +## Usage + +1. Open a terminal or command prompt and navigate to the directory containing the application code. +2. Run the application using the command: + ```bash + python app.py diff --git a/Autocomplete Notes App/app.py b/Autocomplete Notes App/app.py new file mode 100644 index 00000000..90c2ff03 --- /dev/null +++ b/Autocomplete Notes App/app.py @@ -0,0 +1,95 @@ +import tkinter as tk +from tkinter import filedialog, messagebox + +class AutocompleteApp: + def __init__(self, root): + self.root = root + self.root.title("Autocomplete Notes App") + + # Load words from wordlist.txt + self.autocomplete_list = self.load_wordlist("wordlist.txt") + + self.create_widgets() + + def load_wordlist(self, filename): + """Load words from a specified file.""" + try: + with open(filename, 'r') as file: + words = [line.strip() for line in file.readlines() if line.strip()] + return words + except FileNotFoundError: + messagebox.showerror("Error", f"File '{filename}' not found.") + return [] + + def create_widgets(self): + self.large_entry = tk.Text(self.root, wrap=tk.WORD) + self.large_entry.grid(row=0, column=0, padx=10, pady=10, sticky="nsew") + + self.suggestion_entry = tk.Entry(self.root, width=60, state='readonly') + self.suggestion_entry.grid(row=1, column=0, padx=10, pady=5, sticky="ew") + + self.save_button = tk.Button(self.root, text="Save Notes", command=self.save_notes) + self.save_button.grid(row=2, column=0, padx=10, pady=5, sticky="ew") + + self.root.grid_rowconfigure(0, weight=1) + self.root.grid_columnconfigure(0, weight=1) + + self.large_entry.bind("", self.update_suggestion) + self.large_entry.bind("", self.insert_complete_word) + + def update_suggestion(self, event): + """Update the suggestion based on the current input.""" + current_input = self.get_last_word() + suggestion = "" + + if current_input: + matches = [word for word in self.autocomplete_list if word.startswith(current_input)] + if matches: + suggestion = matches[0] + + self.suggestion_entry.config(state='normal') + self.suggestion_entry.delete(0, tk.END) + self.suggestion_entry.insert(0, suggestion) + self.suggestion_entry.config(state='readonly') + + def get_last_word(self): + """Get the last word from the current line of the large entry.""" + cursor_index = self.large_entry.index(tk.INSERT) + line_number = cursor_index.split('.')[0] + line_text = self.large_entry.get(f"{line_number}.0", f"{line_number}.end").strip() # Get the current line text + words = line_text.split() + return words[-1] if words else "" + + def insert_complete_word(self, event): + """Insert the complete word into the large entry when Tab is pressed.""" + complete_word = self.suggestion_entry.get() + if complete_word: + cursor_index = self.large_entry.index(tk.INSERT) + line_number = cursor_index.split('.')[0] + line_text = self.large_entry.get(f"{line_number}.0", f"{line_number}.end").strip() + words = line_text.split() + if words: + words[-1] = complete_word + self.large_entry.delete(f"{line_number}.0", f"{line_number}.end") + self.large_entry.insert(f"{line_number}.0", ' '.join(words)) + + return "break" + + def save_notes(self): + """Save the notes to a file.""" + notes = self.large_entry.get("1.0", tk.END).strip() + if notes: + file_path = filedialog.asksaveasfilename(defaultextension=".txt", + filetypes=[("Text files", "*.txt"), + ("All files", "*.*")]) + if file_path: + with open(file_path, 'w') as file: + file.write(notes) + messagebox.showinfo("Success", "Notes saved successfully!") + else: + messagebox.showwarning("Warning", "No notes to save!") + +if __name__ == "__main__": + root = tk.Tk() + app = AutocompleteApp(root) + root.mainloop() diff --git a/Autocomplete Notes App/wordlist.py b/Autocomplete Notes App/wordlist.py new file mode 100644 index 00000000..a0804248 --- /dev/null +++ b/Autocomplete Notes App/wordlist.py @@ -0,0 +1,9993 @@ +abandoned +abilities +ability +able +aboriginal +abortion +about +above +abraham +abroad +abs +absence +absent +absolute +absolutely +absorption +abstract +abstracts +abu +abuse +ac +academic +academics +academy +acc +accent +accept +acceptable +acceptance +accepted +accepting +accepts +access +accessed +accessibility +accessible +accessing +accessories +accessory +accident +accidents +accommodate +accommodation +accommodations +accompanied +accompanying +accomplish +accomplished +accordance +according +accordingly +account +accountability +accounting +accounts +accreditation +accredited +accuracy +accurate +accurately +accused +acdbentity +ace +acer +achieve +achieved +achievement +achievements +achieving +acid +acids +acknowledge +acknowledged +acm +acne +acoustic +acquire +acquired +acquisition +acquisitions +acre +acres +acrobat +across +acrylic +act +acting +action +actions +activated +activation +active +actively +activists +activities +activity +actor +actors +actress +acts +actual +actually +acute +ad +ada +adam +adams +adaptation +adapted +adapter +adapters +adaptive +adaptor +add +added +addiction +adding +addition +additional +additionally +additions +address +addressed +addresses +addressing +adds +adelaide +adequate +adidas +adipex +adjacent +adjust +adjustable +adjusted +adjustment +adjustments +admin +administered +administration +administrative +administrator +administrators +admission +admissions +admit +admitted +adobe +adolescent +adopt +adopted +adoption +adrian +ads +adsl +adult +adults +advance +advanced +advancement +advances +advantage +advantages +adventure +adventures +adverse +advert +advertise +advertisement +advertisements +advertiser +advertisers +advertising +advice +advise +advised +advisor +advisors +advisory +advocacy +advocate +adware +ae +aerial +aerospace +af +affair +affairs +affect +affected +affecting +affects +affiliate +affiliated +affiliates +affiliation +afford +affordable +afghanistan +afraid +africa +african +after +afternoon +afterwards +ag +again +against +age +aged +agencies +agency +agenda +agent +agents +ages +aggregate +aggressive +aging +ago +agree +agreed +agreement +agreements +agrees +agricultural +agriculture +ah +ahead +ai +aid +aids +aim +aimed +aims +air +aircraft +airfare +airline +airlines +airplane +airport +airports +aj +ak +aka +al +ala +alabama +alan +alarm +alaska +albania +albany +albert +alberta +album +albums +albuquerque +alcohol +alert +alerts +alex +alexander +alexandria +alfred +algebra +algeria +algorithm +algorithms +ali +alias +alice +alien +align +alignment +alike +alive +all +allah +allan +alleged +allen +allergy +alliance +allied +allocated +allocation +allow +allowance +allowed +allowing +allows +alloy +almost +alone +along +alot +alpha +alphabetical +alpine +already +also +alt +alter +altered +alternate +alternative +alternatively +alternatives +although +alto +aluminium +aluminum +alumni +always +am +amanda +amateur +amazing +amazon +amazoncom +amazoncouk +ambassador +amber +ambien +ambient +amd +amend +amended +amendment +amendments +amenities +america +american +americans +americas +amino +among +amongst +amount +amounts +amp +ampland +amplifier +amsterdam +amy +an +ana +anaheim +anal +analog +analyses +analysis +analyst +analysts +analytical +analyze +analyzed +anatomy +anchor +ancient +and +andale +anderson +andorra +andrea +andreas +andrew +andrews +andy +angel +angela +angeles +angels +anger +angle +angola +angry +animal +animals +animated +animation +anime +ann +anna +anne +annex +annie +anniversary +annotated +annotation +announce +announced +announcement +announcements +announces +annoying +annual +annually +anonymous +another +answer +answered +answering +answers +ant +antarctica +antenna +anthony +anthropology +anti +antibodies +antibody +anticipated +antigua +antique +antiques +antivirus +antonio +anxiety +any +anybody +anymore +anyone +anything +anytime +anyway +anywhere +aol +ap +apache +apart +apartment +apartments +api +apnic +apollo +app +apparatus +apparel +apparent +apparently +appeal +appeals +appear +appearance +appeared +appearing +appears +appendix +apple +appliance +appliances +applicable +applicant +applicants +application +applications +applied +applies +apply +applying +appointed +appointment +appointments +appraisal +appreciate +appreciated +appreciation +approach +approaches +appropriate +appropriations +approval +approve +approved +approx +approximate +approximately +apps +apr +april +apt +aqua +aquarium +aquatic +ar +arab +arabia +arabic +arbitrary +arbitration +arc +arcade +arch +architect +architects +architectural +architecture +archive +archived +archives +arctic +are +area +areas +arena +arg +argentina +argue +argued +argument +arguments +arise +arising +arizona +arkansas +arlington +arm +armed +armenia +armor +arms +armstrong +army +arnold +around +arrange +arranged +arrangement +arrangements +array +arrest +arrested +arrival +arrivals +arrive +arrived +arrives +arrow +art +arthritis +arthur +article +articles +artificial +artist +artistic +artists +arts +artwork +aruba +as +asbestos +ascii +ash +ashley +asia +asian +aside +asin +ask +asked +asking +asks +asn +asp +aspect +aspects +aspnet +ass +assault +assembled +assembly +assess +assessed +assessing +assessment +assessments +asset +assets +assign +assigned +assignment +assignments +assist +assistance +assistant +assisted +assists +associate +associated +associates +association +associations +assume +assumed +assumes +assuming +assumption +assumptions +assurance +assure +assured +asthma +astrology +astronomy +asus +at +ata +ate +athens +athletes +athletic +athletics +ati +atlanta +atlantic +atlas +atm +atmosphere +atmospheric +atom +atomic +attach +attached +attachment +attachments +attack +attacked +attacks +attempt +attempted +attempting +attempts +attend +attendance +attended +attending +attention +attitude +attitudes +attorney +attorneys +attract +attraction +attractions +attractive +attribute +attributes +au +auburn +auckland +auction +auctions +aud +audi +audience +audio +audit +auditor +aug +august +aurora +aus +austin +australia +australian +austria +authentic +authentication +author +authorities +authority +authorization +authorized +authors +auto +automated +automatic +automatically +automation +automobile +automobiles +automotive +autos +autumn +av +availability +available +avatar +ave +avenue +average +avg +avi +aviation +avoid +avoiding +avon +aw +award +awarded +awards +aware +awareness +away +awesome +awful +axis +aye +az +azerbaijan +b +ba +babe +babes +babies +baby +bachelor +back +backed +background +backgrounds +backing +backup +bacon +bacteria +bacterial +bad +badge +badly +bag +baghdad +bags +bahamas +bahrain +bailey +baker +baking +balance +balanced +bald +bali +ball +ballet +balloon +ballot +balls +baltimore +ban +banana +band +bands +bandwidth +bang +bangbus +bangkok +bangladesh +bank +banking +bankruptcy +banks +banned +banner +banners +baptist +bar +barbados +barbara +barbie +barcelona +bare +barely +bargain +bargains +barn +barnes +barrel +barrier +barriers +barry +bars +base +baseball +based +baseline +basement +basename +bases +basic +basically +basics +basin +basis +basket +basketball +baskets +bass +bat +batch +bath +bathroom +bathrooms +baths +batman +batteries +battery +battle +battlefield +bay +bb +bbc +bbs +bbw +bc +bd +bdsm +be +beach +beaches +beads +beam +bean +beans +bear +bearing +bears +beast +beastality +beastiality +beat +beatles +beats +beautiful +beautifully +beauty +beaver +became +because +become +becomes +becoming +bed +bedding +bedford +bedroom +bedrooms +beds +bee +beef +been +beer +before +began +begin +beginner +beginners +beginning +begins +begun +behalf +behavior +behavioral +behaviour +behind +beijing +being +beings +belarus +belfast +belgium +belief +beliefs +believe +believed +believes +belize +belkin +bell +belle +belly +belong +belongs +below +belt +belts +ben +bench +benchmark +bend +beneath +beneficial +benefit +benefits +benjamin +bennett +benz +berkeley +berlin +bermuda +bernard +berry +beside +besides +best +bestiality +bestsellers +bet +beta +beth +better +betting +betty +between +beverage +beverages +beverly +beyond +bg +bhutan +bi +bias +bible +biblical +bibliographic +bibliography +bicycle +bid +bidder +bidding +bids +big +bigger +biggest +bike +bikes +bikini +bill +billing +billion +bills +billy +bin +binary +bind +binding +bingo +bio +biodiversity +biographies +biography +biol +biological +biology +bios +biotechnology +bird +birds +birmingham +birth +birthday +bishop +bit +bitch +bite +bits +biz +bizarre +bizrate +bk +bl +black +blackberry +blackjack +blacks +blade +blades +blah +blair +blake +blame +blank +blanket +blast +bleeding +blend +bless +blessed +blind +blink +block +blocked +blocking +blocks +blog +blogger +bloggers +blogging +blogs +blond +blonde +blood +bloody +bloom +bloomberg +blow +blowing +blowjob +blowjobs +blue +blues +bluetooth +blvd +bm +bmw +bo +board +boards +boat +boating +boats +bob +bobby +boc +bodies +body +bold +bolivia +bolt +bomb +bon +bond +bondage +bonds +bone +bones +bonus +boob +boobs +book +booking +bookings +bookmark +bookmarks +books +bookstore +bool +boolean +boom +boost +boot +booth +boots +booty +border +borders +bored +boring +born +borough +bosnia +boss +boston +both +bother +botswana +bottle +bottles +bottom +bought +boulder +boulevard +bound +boundaries +boundary +bouquet +boutique +bow +bowl +bowling +box +boxed +boxes +boxing +boy +boys +bp +br +bra +bracelet +bracelets +bracket +brad +bradford +bradley +brain +brake +brakes +branch +branches +brand +brandon +brands +bras +brass +brave +brazil +brazilian +breach +bread +break +breakdown +breakfast +breaking +breaks +breast +breasts +breath +breathing +breed +breeding +breeds +brian +brick +bridal +bride +bridge +bridges +brief +briefing +briefly +briefs +bright +brighton +brilliant +bring +bringing +brings +brisbane +bristol +britain +britannica +british +britney +broad +broadband +broadcast +broadcasting +broader +broadway +brochure +brochures +broke +broken +broker +brokers +bronze +brook +brooklyn +brooks +bros +brother +brothers +brought +brown +browse +browser +browsers +browsing +bruce +brunei +brunette +brunswick +brush +brussels +brutal +bryan +bryant +bs +bt +bubble +buck +bucks +budapest +buddy +budget +budgets +buf +buffalo +buffer +bufing +bug +bugs +build +builder +builders +building +buildings +builds +built +bukkake +bulgaria +bulgarian +bulk +bull +bullet +bulletin +bumper +bunch +bundle +bunny +burden +bureau +buried +burke +burlington +burn +burner +burning +burns +burst +burton +bus +buses +bush +business +businesses +busty +busy +but +butler +butt +butter +butterfly +button +buttons +butts +buy +buyer +buyers +buying +buys +buzz +bw +by +bye +byte +bytes +c +ca +cab +cabin +cabinet +cabinets +cable +cables +cache +cached +cad +cadillac +cafe +cage +cake +cakes +cal +calcium +calculate +calculated +calculation +calculations +calculator +calculators +calendar +calendars +calgary +calibration +calif +california +call +called +calling +calls +calm +calvin +cam +cambodia +cambridge +camcorder +camcorders +came +camel +camera +cameras +cameron +cameroon +camp +campaign +campaigns +campbell +camping +camps +campus +cams +can +canada +canadian +canal +canberra +cancel +cancellation +cancelled +cancer +candidate +candidates +candle +candles +candy +cannon +canon +cant +canvas +canyon +cap +capabilities +capability +capable +capacity +cape +capital +capitol +caps +captain +capture +captured +car +carb +carbon +card +cardiac +cardiff +cardiovascular +cards +care +career +careers +careful +carefully +carey +cargo +caribbean +caring +carl +carlo +carlos +carmen +carnival +carol +carolina +caroline +carpet +carried +carrier +carriers +carries +carroll +carry +carrying +cars +cart +carter +cartoon +cartoons +cartridge +cartridges +cas +casa +case +cases +casey +cash +cashiers +casino +casinos +casio +cassette +cast +casting +castle +casual +cat +catalog +catalogs +catalogue +catalyst +catch +categories +category +catering +cathedral +catherine +catholic +cats +cattle +caught +cause +caused +causes +causing +caution +cave +cayman +cb +cbs +cc +ccd +cd +cdna +cds +cdt +ce +cedar +ceiling +celebrate +celebration +celebrities +celebrity +celebs +cell +cells +cellular +celtic +cement +cemetery +census +cent +center +centered +centers +central +centre +centres +cents +centuries +century +ceo +ceramic +ceremony +certain +certainly +certificate +certificates +certification +certified +cest +cet +cf +cfr +cg +cgi +ch +chad +chain +chains +chair +chairman +chairs +challenge +challenged +challenges +challenging +chamber +chambers +champagne +champion +champions +championship +championships +chan +chance +chancellor +chances +change +changed +changelog +changes +changing +channel +channels +chaos +chapel +chapter +chapters +char +character +characteristic +characteristics +characterization +characterized +characters +charge +charged +charger +chargers +charges +charging +charitable +charity +charles +charleston +charlie +charlotte +charm +charming +charms +chart +charter +charts +chase +chassis +chat +cheap +cheaper +cheapest +cheat +cheats +check +checked +checking +checklist +checkout +checks +cheers +cheese +chef +chelsea +chem +chemical +chemicals +chemistry +chen +cheque +cherry +chess +chest +chester +chevrolet +chevy +chi +chicago +chick +chicken +chicks +chief +child +childhood +children +childrens +chile +china +chinese +chip +chips +cho +chocolate +choice +choices +choir +cholesterol +choose +choosing +chorus +chose +chosen +chris +christ +christian +christianity +christians +christina +christine +christmas +christopher +chrome +chronic +chronicle +chronicles +chrysler +chubby +chuck +church +churches +ci +cia +cialis +ciao +cigarette +cigarettes +cincinnati +cindy +cinema +cingular +cio +cir +circle +circles +circuit +circuits +circular +circulation +circumstances +circus +cisco +citation +citations +cite +cited +cities +citizen +citizens +citizenship +city +citysearch +civic +civil +civilian +civilization +cj +cl +claim +claimed +claims +claire +clan +clara +clarity +clark +clarke +class +classes +classic +classical +classics +classification +classified +classifieds +classroom +clause +clay +clean +cleaner +cleaners +cleaning +cleanup +clear +clearance +cleared +clearing +clearly +clerk +cleveland +click +clicking +clicks +client +clients +cliff +climate +climb +climbing +clinic +clinical +clinics +clinton +clip +clips +clock +clocks +clone +close +closed +closely +closer +closes +closest +closing +closure +cloth +clothes +clothing +cloud +clouds +cloudy +club +clubs +cluster +clusters +cm +cms +cn +cnet +cnetcom +cnn +co +coach +coaches +coaching +coal +coalition +coast +coastal +coat +coated +coating +cock +cocks +cod +code +codes +coding +coffee +cognitive +cohen +coin +coins +col +cold +cole +coleman +colin +collaboration +collaborative +collapse +collar +colleague +colleagues +collect +collectables +collected +collectible +collectibles +collecting +collection +collections +collective +collector +collectors +college +colleges +collins +cologne +colombia +colon +colonial +colony +color +colorado +colored +colors +colour +colours +columbia +columbus +column +columnists +columns +com +combat +combination +combinations +combine +combined +combines +combining +combo +come +comedy +comes +comfort +comfortable +comic +comics +coming +comm +command +commander +commands +comment +commentary +commented +comments +commerce +commercial +commission +commissioner +commissioners +commissions +commit +commitment +commitments +committed +committee +committees +commodities +commodity +common +commonly +commons +commonwealth +communicate +communication +communications +communist +communities +community +comp +compact +companies +companion +company +compaq +comparable +comparative +compare +compared +comparing +comparison +comparisons +compatibility +compatible +compensation +compete +competent +competing +competition +competitions +competitive +competitors +compilation +compile +compiled +compiler +complaint +complaints +complement +complete +completed +completely +completing +completion +complex +complexity +compliance +compliant +complicated +complications +complimentary +comply +component +components +composed +composer +composite +composition +compound +compounds +comprehensive +compressed +compression +compromise +computation +computational +compute +computed +computer +computers +computing +con +concentrate +concentration +concentrations +concept +concepts +conceptual +concern +concerned +concerning +concerns +concert +concerts +conclude +concluded +conclusion +conclusions +concord +concrete +condition +conditional +conditioning +conditions +condo +condos +conduct +conducted +conducting +conf +conference +conferences +conferencing +confidence +confident +confidential +confidentiality +config +configuration +configure +configured +configuring +confirm +confirmation +confirmed +conflict +conflicts +confused +confusion +congo +congratulations +congress +congressional +conjunction +connect +connected +connecticut +connecting +connection +connections +connectivity +connector +connectors +cons +conscious +consciousness +consecutive +consensus +consent +consequence +consequences +consequently +conservation +conservative +consider +considerable +consideration +considerations +considered +considering +considers +consist +consistency +consistent +consistently +consisting +consists +console +consoles +consolidated +consolidation +consortium +conspiracy +const +constant +constantly +constitute +constitutes +constitution +constitutional +constraint +constraints +construct +constructed +construction +consult +consultancy +consultant +consultants +consultation +consulting +consumer +consumers +consumption +contact +contacted +contacting +contacts +contain +contained +container +containers +containing +contains +contamination +contemporary +content +contents +contest +contests +context +continent +continental +continually +continue +continued +continues +continuing +continuity +continuous +continuously +contract +contracting +contractor +contractors +contracts +contrary +contrast +contribute +contributed +contributing +contribution +contributions +contributor +contributors +control +controlled +controller +controllers +controlling +controls +controversial +controversy +convenience +convenient +convention +conventional +conventions +convergence +conversation +conversations +conversion +convert +converted +converter +convertible +convicted +conviction +convinced +cook +cookbook +cooked +cookie +cookies +cooking +cool +cooler +cooling +cooper +cooperation +cooperative +coordinate +coordinated +coordinates +coordination +coordinator +cop +cope +copied +copies +copper +copy +copying +copyright +copyrighted +copyrights +coral +cord +cordless +core +cork +corn +cornell +corner +corners +cornwall +corp +corporate +corporation +corporations +corps +corpus +correct +corrected +correction +corrections +correctly +correlation +correspondence +corresponding +corruption +cos +cosmetic +cosmetics +cost +costa +costs +costume +costumes +cottage +cottages +cotton +could +council +councils +counsel +counseling +count +counted +counter +counters +counties +counting +countries +country +counts +county +couple +coupled +couples +coupon +coupons +courage +courier +course +courses +court +courtesy +courts +cove +cover +coverage +covered +covering +covers +cow +cowboy +cox +cp +cpu +cr +crack +cradle +craft +crafts +craig +crap +craps +crash +crawford +crazy +cream +create +created +creates +creating +creation +creations +creative +creativity +creator +creature +creatures +credit +credits +creek +crest +crew +cricket +crime +crimes +criminal +crisis +criteria +criterion +critical +criticism +critics +crm +croatia +crop +crops +cross +crossing +crossword +crowd +crown +crucial +crude +cruise +cruises +cruz +cry +crystal +cs +css +cst +ct +cu +cuba +cube +cubic +cuisine +cult +cultural +culture +cultures +cum +cumshot +cumshots +cumulative +cunt +cup +cups +cure +curious +currencies +currency +current +currently +curriculum +cursor +curtis +curve +curves +custody +custom +customer +customers +customise +customize +customized +customs +cut +cute +cuts +cutting +cv +cvs +cw +cyber +cycle +cycles +cycling +cylinder +cyprus +cz +czech +d +da +dad +daddy +daily +dairy +daisy +dakota +dale +dallas +dam +damage +damaged +damages +dame +damn +dan +dana +dance +dancing +danger +dangerous +daniel +danish +danny +dans +dare +dark +darkness +darwin +das +dash +dat +data +database +databases +date +dated +dates +dating +daughter +daughters +dave +david +davidson +davis +dawn +day +days +dayton +db +dc +dd +ddr +de +dead +deadline +deadly +deaf +deal +dealer +dealers +dealing +deals +dealt +dealtime +dean +dear +death +deaths +debate +debian +deborah +debt +debug +debut +dec +decade +decades +december +decent +decide +decided +decimal +decision +decisions +deck +declaration +declare +declared +decline +declined +decor +decorating +decorative +decrease +decreased +dedicated +dee +deemed +deep +deeper +deeply +deer +def +default +defeat +defects +defence +defend +defendant +defense +defensive +deferred +deficit +define +defined +defines +defining +definitely +definition +definitions +degree +degrees +del +delaware +delay +delayed +delays +delegation +delete +deleted +delhi +delicious +delight +deliver +delivered +delivering +delivers +delivery +dell +delta +deluxe +dem +demand +demanding +demands +demo +democracy +democrat +democratic +democrats +demographic +demonstrate +demonstrated +demonstrates +demonstration +den +denial +denied +denmark +dennis +dense +density +dental +dentists +denver +deny +department +departmental +departments +departure +depend +dependence +dependent +depending +depends +deployment +deposit +deposits +depot +depression +dept +depth +deputy +der +derby +derek +derived +des +descending +describe +described +describes +describing +description +descriptions +desert +deserve +design +designated +designation +designed +designer +designers +designing +designs +desirable +desire +desired +desk +desktop +desktops +desperate +despite +destination +destinations +destiny +destroy +destroyed +destruction +detail +detailed +details +detect +detected +detection +detective +detector +determination +determine +determined +determines +determining +detroit +deutsch +deutsche +deutschland +dev +devel +develop +developed +developer +developers +developing +development +developmental +developments +develops +deviant +deviation +device +devices +devil +devon +devoted +df +dg +dh +di +diabetes +diagnosis +diagnostic +diagram +dial +dialog +dialogue +diameter +diamond +diamonds +diana +diane +diary +dice +dick +dicke +dicks +dictionaries +dictionary +did +die +died +diego +dies +diesel +diet +dietary +diff +differ +difference +differences +different +differential +differently +difficult +difficulties +difficulty +diffs +dig +digest +digit +digital +dildo +dildos +dim +dimension +dimensional +dimensions +dining +dinner +dip +diploma +dir +direct +directed +direction +directions +directive +directly +director +directories +directors +directory +dirt +dirty +dis +disabilities +disability +disable +disabled +disagree +disappointed +disaster +disc +discharge +disciplinary +discipline +disciplines +disclaimer +disclaimers +disclose +disclosure +disco +discount +discounted +discounts +discover +discovered +discovery +discrete +discretion +discrimination +discs +discuss +discussed +discusses +discussing +discussion +discussions +disease +diseases +dish +dishes +disk +disks +disney +disorder +disorders +dispatch +dispatched +display +displayed +displaying +displays +disposal +disposition +dispute +disputes +dist +distance +distances +distant +distinct +distinction +distinguished +distribute +distributed +distribution +distributions +distributor +distributors +district +districts +disturbed +div +dive +diverse +diversity +divide +divided +dividend +divine +diving +division +divisions +divorce +divx +diy +dj +dk +dl +dm +dna +dns +do +doc +dock +docs +doctor +doctors +doctrine +document +documentary +documentation +documentcreatetextnode +documented +documents +dod +dodge +doe +does +dog +dogs +doing +doll +dollar +dollars +dolls +dom +domain +domains +dome +domestic +dominant +dominican +don +donald +donate +donated +donation +donations +done +donna +donor +donors +dont +doom +door +doors +dos +dosage +dose +dot +double +doubt +doug +douglas +dover +dow +down +download +downloadable +downloadcom +downloaded +downloading +downloads +downtown +dozen +dozens +dp +dpi +dr +draft +drag +dragon +drain +drainage +drama +dramatic +dramatically +draw +drawing +drawings +drawn +draws +dream +dreams +dress +dressed +dresses +dressing +drew +dried +drill +drilling +drink +drinking +drinks +drive +driven +driver +drivers +drives +driving +drop +dropped +drops +drove +drug +drugs +drum +drums +drunk +dry +dryer +ds +dsc +dsl +dt +dts +du +dual +dubai +dublin +duck +dude +due +dui +duke +dumb +dump +duncan +duo +duplicate +durable +duration +durham +during +dust +dutch +duties +duty +dv +dvd +dvds +dx +dying +dylan +dynamic +dynamics +e +ea +each +eagle +eagles +ear +earl +earlier +earliest +early +earn +earned +earning +earnings +earrings +ears +earth +earthquake +ease +easier +easily +east +easter +eastern +easy +eat +eating +eau +ebay +ebony +ebook +ebooks +ec +echo +eclipse +eco +ecological +ecology +ecommerce +economic +economics +economies +economy +ecuador +ed +eddie +eden +edgar +edge +edges +edinburgh +edit +edited +editing +edition +editions +editor +editorial +editorials +editors +edmonton +eds +edt +educated +education +educational +educators +edward +edwards +ee +ef +effect +effective +effectively +effectiveness +effects +efficiency +efficient +efficiently +effort +efforts +eg +egg +eggs +egypt +egyptian +eh +eight +either +ejaculation +el +elder +elderly +elect +elected +election +elections +electoral +electric +electrical +electricity +electro +electron +electronic +electronics +elegant +element +elementary +elements +elephant +elevation +eleven +eligibility +eligible +eliminate +elimination +elite +elizabeth +ellen +elliott +ellis +else +elsewhere +elvis +em +emacs +email +emails +embassy +embedded +emerald +emergency +emerging +emily +eminem +emirates +emission +emissions +emma +emotional +emotions +emperor +emphasis +empire +empirical +employ +employed +employee +employees +employer +employers +employment +empty +en +enable +enabled +enables +enabling +enb +enclosed +enclosure +encoding +encounter +encountered +encourage +encouraged +encourages +encouraging +encryption +encyclopedia +end +endangered +ended +endif +ending +endless +endorsed +endorsement +ends +enemies +enemy +energy +enforcement +eng +engage +engaged +engagement +engaging +engine +engineer +engineering +engineers +engines +england +english +enhance +enhanced +enhancement +enhancements +enhancing +enjoy +enjoyed +enjoying +enlarge +enlargement +enormous +enough +enquiries +enquiry +enrolled +enrollment +ensemble +ensure +ensures +ensuring +ent +enter +entered +entering +enterprise +enterprises +enters +entertaining +entertainment +entire +entirely +entities +entitled +entity +entrance +entrepreneur +entrepreneurs +entries +entry +envelope +environment +environmental +environments +enzyme +eos +ep +epa +epic +epinions +epinionscom +episode +episodes +epson +eq +equal +equality +equally +equation +equations +equilibrium +equipment +equipped +equity +equivalent +er +era +eric +ericsson +erik +erotic +erotica +erp +error +errors +es +escape +escort +escorts +especially +espn +essay +essays +essence +essential +essentially +essentials +essex +est +establish +established +establishing +establishment +estate +estates +estimate +estimated +estimates +estimation +estonia +et +etc +eternal +ethernet +ethical +ethics +ethiopia +ethnic +eu +eugene +eur +euro +europe +european +euros +ev +eva +eval +evaluate +evaluated +evaluating +evaluation +evaluations +evanescence +evans +eve +even +evening +event +events +eventually +ever +every +everybody +everyday +everyone +everything +everywhere +evidence +evident +evil +evolution +ex +exact +exactly +exam +examination +examinations +examine +examined +examines +examining +example +examples +exams +exceed +excel +excellence +excellent +except +exception +exceptional +exceptions +excerpt +excess +excessive +exchange +exchanges +excited +excitement +exciting +exclude +excluded +excluding +exclusion +exclusive +exclusively +excuse +exec +execute +executed +execution +executive +executives +exempt +exemption +exercise +exercises +exhaust +exhibit +exhibition +exhibitions +exhibits +exist +existed +existence +existing +exists +exit +exotic +exp +expand +expanded +expanding +expansion +expansys +expect +expectations +expected +expects +expedia +expenditure +expenditures +expense +expenses +expensive +experience +experienced +experiences +experiencing +experiment +experimental +experiments +expert +expertise +experts +expiration +expired +expires +explain +explained +explaining +explains +explanation +explicit +explicitly +exploration +explore +explorer +exploring +explosion +expo +export +exports +exposed +exposure +express +expressed +expression +expressions +ext +extend +extended +extending +extends +extension +extensions +extensive +extent +exterior +external +extra +extract +extraction +extraordinary +extras +extreme +extremely +eye +eyed +eyes +ez +f +fa +fabric +fabrics +fabulous +face +faced +faces +facial +facilitate +facilities +facility +facing +fact +factor +factors +factory +facts +faculty +fail +failed +failing +fails +failure +failures +fair +fairfield +fairly +fairy +faith +fake +fall +fallen +falling +falls +false +fame +familiar +families +family +famous +fan +fancy +fans +fantastic +fantasy +faq +faqs +far +fare +fares +farm +farmer +farmers +farming +farms +fascinating +fashion +fast +faster +fastest +fat +fatal +fate +father +fathers +fatty +fault +favor +favorite +favorites +favors +favour +favourite +favourites +fax +fbi +fc +fcc +fd +fda +fe +fear +fears +feat +feature +featured +features +featuring +feb +february +fed +federal +federation +fee +feed +feedback +feeding +feeds +feel +feeling +feelings +feels +fees +feet +fell +fellow +fellowship +felt +female +females +fence +feof +ferrari +ferry +festival +festivals +fetish +fever +few +fewer +ff +fg +fi +fiber +fibre +fiction +field +fields +fifteen +fifth +fifty +fig +fight +fighter +fighters +fighting +figure +figured +figures +fiji +file +filed +filename +files +filing +fill +filled +filling +film +filme +films +filter +filtering +filters +fin +final +finally +finals +finance +finances +financial +financing +find +findarticles +finder +finding +findings +findlaw +finds +fine +finest +finger +fingering +fingers +finish +finished +finishing +finite +finland +finnish +fioricet +fire +fired +firefox +fireplace +fires +firewall +firewire +firm +firms +firmware +first +fiscal +fish +fisher +fisheries +fishing +fist +fisting +fit +fitness +fits +fitted +fitting +five +fix +fixed +fixes +fixtures +fl +fla +flag +flags +flame +flash +flashers +flashing +flat +flavor +fleece +fleet +flesh +flex +flexibility +flexible +flickr +flight +flights +flip +float +floating +flood +floor +flooring +floors +floppy +floral +florence +florida +florist +florists +flour +flow +flower +flowers +flows +floyd +flu +fluid +flush +flux +fly +flyer +flying +fm +fo +foam +focal +focus +focused +focuses +focusing +fog +fold +folder +folders +folding +folk +folks +follow +followed +following +follows +font +fonts +foo +food +foods +fool +foot +footage +football +footwear +for +forbes +forbidden +force +forced +forces +ford +forecast +forecasts +foreign +forest +forestry +forests +forever +forge +forget +forgot +forgotten +fork +form +formal +format +formation +formats +formatting +formed +former +formerly +forming +forms +formula +fort +forth +fortune +forty +forum +forums +forward +forwarding +fossil +foster +foto +fotos +fought +foul +found +foundation +foundations +founded +founder +fountain +four +fourth +fox +fp +fr +fraction +fragrance +fragrances +frame +framed +frames +framework +framing +france +franchise +francis +francisco +frank +frankfurt +franklin +fraser +fraud +fred +frederick +free +freebsd +freedom +freelance +freely +freeware +freeze +freight +french +frequencies +frequency +frequent +frequently +fresh +fri +friday +fridge +friend +friendly +friends +friendship +frog +from +front +frontier +frontpage +frost +frozen +fruit +fruits +fs +ft +ftp +fu +fuck +fucked +fucking +fuel +fuji +fujitsu +full +fully +fun +function +functional +functionality +functioning +functions +fund +fundamental +fundamentals +funded +funding +fundraising +funds +funeral +funk +funky +funny +fur +furnished +furnishings +furniture +further +furthermore +fusion +future +futures +fuzzy +fw +fwd +fx +fy +g +ga +gabriel +gadgets +gage +gain +gained +gains +galaxy +gale +galleries +gallery +gambling +game +gamecube +games +gamespot +gaming +gamma +gang +gangbang +gap +gaps +garage +garbage +garcia +garden +gardening +gardens +garlic +garmin +gary +gas +gasoline +gate +gates +gateway +gather +gathered +gathering +gauge +gave +gay +gays +gazette +gb +gba +gbp +gc +gcc +gd +gdp +ge +gear +geek +gel +gem +gen +gender +gene +genealogy +general +generally +generate +generated +generates +generating +generation +generations +generator +generators +generic +generous +genes +genesis +genetic +genetics +geneva +genius +genome +genre +genres +gentle +gentleman +gently +genuine +geo +geographic +geographical +geography +geological +geology +geometry +george +georgia +gerald +german +germany +get +gets +getting +gg +ghana +ghost +ghz +gi +giant +giants +gibraltar +gibson +gif +gift +gifts +gig +gilbert +girl +girlfriend +girls +gis +give +given +gives +giving +gl +glad +glance +glasgow +glass +glasses +glen +glenn +global +globe +glory +glossary +gloves +glow +glucose +gm +gmbh +gmc +gmt +gnome +gnu +go +goal +goals +goat +god +gods +goes +going +gold +golden +golf +gone +gonna +good +goods +google +gordon +gore +gorgeous +gospel +gossip +got +gothic +goto +gotta +gotten +gourmet +gov +governance +governing +government +governmental +governments +governor +govt +gp +gpl +gps +gr +grab +grace +grad +grade +grades +gradually +graduate +graduated +graduates +graduation +graham +grain +grammar +grams +grand +grande +granny +grant +granted +grants +graph +graphic +graphical +graphics +graphs +gras +grass +grateful +gratis +gratuit +grave +gravity +gray +great +greater +greatest +greatly +greece +greek +green +greene +greenhouse +greensboro +greeting +greetings +greg +gregory +grenada +grew +grey +grid +griffin +grill +grip +grocery +groove +gross +ground +grounds +groundwater +group +groups +grove +grow +growing +grown +grows +growth +gs +gsm +gst +gt +gtk +guam +guarantee +guaranteed +guarantees +guard +guardian +guards +guatemala +guess +guest +guestbook +guests +gui +guidance +guide +guided +guidelines +guides +guild +guilty +guinea +guitar +guitars +gulf +gun +guns +guru +guy +guyana +guys +gym +gzip +h +ha +habitat +habits +hack +hacker +had +hair +hairy +haiti +half +halfcom +halifax +hall +halloween +halo +ham +hamburg +hamilton +hammer +hampshire +hampton +hand +handbags +handbook +handed +handheld +handhelds +handjob +handjobs +handle +handled +handles +handling +handmade +hands +handy +hang +hanging +hans +hansen +happen +happened +happening +happens +happiness +happy +harassment +harbor +harbour +hard +hardcore +hardcover +harder +hardly +hardware +hardwood +harley +harm +harmful +harmony +harold +harper +harris +harrison +harry +hart +hartford +harvard +harvest +harvey +has +hash +hat +hate +hats +have +haven +having +hawaii +hawaiian +hawk +hay +hayes +hazard +hazardous +hazards +hb +hc +hd +hdtv +he +head +headed +header +headers +heading +headline +headlines +headphones +headquarters +heads +headset +healing +health +healthcare +healthy +hear +heard +hearing +hearings +heart +hearts +heat +heated +heater +heath +heather +heating +heaven +heavily +heavy +hebrew +heel +height +heights +held +helen +helena +helicopter +hell +hello +helmet +help +helped +helpful +helping +helps +hence +henderson +henry +hentai +hepatitis +her +herald +herb +herbal +herbs +here +hereby +herein +heritage +hero +heroes +herself +hewlett +hey +hh +hi +hidden +hide +hierarchy +high +higher +highest +highland +highlight +highlighted +highlights +highly +highs +highway +highways +hiking +hill +hills +hilton +him +himself +hindu +hint +hints +hip +hire +hired +hiring +his +hispanic +hist +historic +historical +history +hit +hitachi +hits +hitting +hiv +hk +hl +ho +hobbies +hobby +hockey +hold +holdem +holder +holders +holding +holdings +holds +hole +holes +holiday +holidays +holland +hollow +holly +hollywood +holmes +holocaust +holy +home +homeland +homeless +homepage +homes +hometown +homework +hon +honda +honduras +honest +honey +hong +honolulu +honor +honors +hood +hook +hop +hope +hoped +hopefully +hopes +hoping +hopkins +horizon +horizontal +hormone +horn +horny +horrible +horror +horse +horses +hose +hospital +hospitality +hospitals +host +hosted +hostel +hostels +hosting +hosts +hot +hotel +hotels +hotelscom +hotmail +hottest +hour +hourly +hours +house +household +households +houses +housewares +housewives +housing +houston +how +howard +however +howto +hp +hq +hr +href +hrs +hs +ht +html +http +hu +hub +hudson +huge +hugh +hughes +hugo +hull +human +humanitarian +humanities +humanity +humans +humidity +humor +hundred +hundreds +hung +hungarian +hungary +hunger +hungry +hunt +hunter +hunting +huntington +hurricane +hurt +husband +hwy +hybrid +hydraulic +hydrocodone +hydrogen +hygiene +hypothesis +hypothetical +hyundai +hz +i +ia +ian +ibm +ic +ice +iceland +icon +icons +icq +ict +id +idaho +ide +idea +ideal +ideas +identical +identification +identified +identifier +identifies +identify +identifying +identity +idle +idol +ids +ie +ieee +if +ignore +ignored +ii +iii +il +ill +illegal +illinois +illness +illustrated +illustration +illustrations +im +ima +image +images +imagination +imagine +imaging +img +immediate +immediately +immigrants +immigration +immune +immunology +impact +impacts +impaired +imperial +implement +implementation +implemented +implementing +implications +implied +implies +import +importance +important +importantly +imported +imports +impose +imposed +impossible +impressed +impression +impressive +improve +improved +improvement +improvements +improving +in +inappropriate +inbox +inc +incentive +incentives +incest +inch +inches +incidence +incident +incidents +incl +include +included +includes +including +inclusion +inclusive +income +incoming +incomplete +incorporate +incorporated +incorrect +increase +increased +increases +increasing +increasingly +incredible +incurred +ind +indeed +independence +independent +independently +index +indexed +indexes +india +indian +indiana +indianapolis +indians +indicate +indicated +indicates +indicating +indication +indicator +indicators +indices +indie +indigenous +indirect +individual +individually +individuals +indonesia +indonesian +indoor +induced +induction +industrial +industries +industry +inexpensive +inf +infant +infants +infected +infection +infections +infectious +infinite +inflation +influence +influenced +influences +info +inform +informal +information +informational +informative +informed +infrared +infrastructure +ing +ingredients +inherited +initial +initially +initiated +initiative +initiatives +injection +injured +injuries +injury +ink +inkjet +inline +inn +inner +innocent +innovation +innovations +innovative +inns +input +inputs +inquire +inquiries +inquiry +ins +insects +insert +inserted +insertion +inside +insider +insight +insights +inspection +inspections +inspector +inspiration +inspired +install +installation +installations +installed +installing +instance +instances +instant +instantly +instead +institute +institutes +institution +institutional +institutions +instruction +instructional +instructions +instructor +instructors +instrument +instrumental +instrumentation +instruments +insulin +insurance +insured +int +intake +integer +integral +integrate +integrated +integrating +integration +integrity +intel +intellectual +intelligence +intelligent +intend +intended +intense +intensity +intensive +intent +intention +inter +interact +interaction +interactions +interactive +interest +interested +interesting +interests +interface +interfaces +interference +interim +interior +intermediate +internal +international +internationally +internet +internship +interpretation +interpreted +interracial +intersection +interstate +interval +intervals +intervention +interventions +interview +interviews +intimate +intl +into +intranet +intro +introduce +introduced +introduces +introducing +introduction +introductory +invalid +invasion +invention +inventory +invest +investigate +investigated +investigation +investigations +investigator +investigators +investing +investment +investments +investor +investors +invisible +invision +invitation +invitations +invite +invited +invoice +involve +involved +involvement +involves +involving +io +ion +iowa +ip +ipaq +ipod +ips +ir +ira +iran +iraq +iraqi +irc +ireland +irish +iron +irrigation +irs +is +isa +isaac +isbn +islam +islamic +island +islands +isle +iso +isolated +isolation +isp +israel +israeli +issn +issue +issued +issues +ist +istanbul +it +italia +italian +italiano +italic +italy +item +items +its +itsa +itself +itunes +iv +ivory +ix +j +ja +jack +jacket +jackets +jackie +jackson +jacksonville +jacob +jade +jaguar +jail +jake +jam +jamaica +james +jamie +jan +jane +janet +january +japan +japanese +jar +jason +java +javascript +jay +jazz +jc +jd +je +jean +jeans +jeep +jeff +jefferson +jeffrey +jelsoft +jennifer +jenny +jeremy +jerry +jersey +jerusalem +jesse +jessica +jesus +jet +jets +jewel +jewellery +jewelry +jewish +jews +jill +jim +jimmy +jj +jm +jo +joan +job +jobs +joe +joel +john +johnny +johns +johnson +johnston +join +joined +joining +joins +joint +joke +jokes +jon +jonathan +jones +jordan +jose +joseph +josh +joshua +journal +journalism +journalist +journalists +journals +journey +joy +joyce +jp +jpeg +jpg +jr +js +juan +judge +judges +judgment +judicial +judy +juice +jul +julia +julian +julie +july +jump +jumping +jun +junction +june +jungle +junior +junk +jurisdiction +jury +just +justice +justify +justin +juvenile +jvc +k +ka +kai +kansas +karaoke +karen +karl +karma +kate +kathy +katie +katrina +kay +kazakhstan +kb +kde +keen +keep +keeping +keeps +keith +kelkoo +kelly +ken +kennedy +kenneth +kenny +keno +kent +kentucky +kenya +kept +kernel +kerry +kevin +key +keyboard +keyboards +keys +keyword +keywords +kg +kick +kid +kidney +kids +kijiji +kill +killed +killer +killing +kills +kilometers +kim +kinase +kind +kinda +kinds +king +kingdom +kings +kingston +kirk +kiss +kissing +kit +kitchen +kits +kitty +klein +km +knee +knew +knife +knight +knights +knit +knitting +knives +knock +know +knowing +knowledge +knowledgestorm +known +knows +ko +kodak +kong +korea +korean +kruger +ks +kurt +kuwait +kw +ky +kyle +l +la +lab +label +labeled +labels +labor +laboratories +laboratory +labour +labs +lace +lack +ladder +laden +ladies +lady +lafayette +laid +lake +lakes +lamb +lambda +lamp +lamps +lan +lancaster +lance +land +landing +lands +landscape +landscapes +lane +lanes +lang +language +languages +lanka +lap +laptop +laptops +large +largely +larger +largest +larry +las +laser +last +lasting +lat +late +lately +later +latest +latex +latin +latina +latinas +latino +latitude +latter +latvia +lauderdale +laugh +laughing +launch +launched +launches +laundry +laura +lauren +law +lawn +lawrence +laws +lawsuit +lawyer +lawyers +lay +layer +layers +layout +lazy +lb +lbs +lc +lcd +ld +le +lead +leader +leaders +leadership +leading +leads +leaf +league +lean +learn +learned +learners +learning +lease +leasing +least +leather +leave +leaves +leaving +lebanon +lecture +lectures +led +lee +leeds +left +leg +legacy +legal +legally +legend +legendary +legends +legislation +legislative +legislature +legitimate +legs +leisure +lemon +len +lender +lenders +lending +length +lens +lenses +leo +leon +leonard +leone +les +lesbian +lesbians +leslie +less +lesser +lesson +lessons +let +lets +letter +letters +letting +leu +level +levels +levitra +levy +lewis +lexington +lexmark +lexus +lf +lg +li +liabilities +liability +liable +lib +liberal +liberia +liberty +librarian +libraries +library +libs +licence +license +licensed +licenses +licensing +licking +lid +lie +liechtenstein +lies +life +lifestyle +lifetime +lift +light +lighter +lighting +lightning +lights +lightweight +like +liked +likelihood +likely +likes +likewise +lil +lime +limit +limitation +limitations +limited +limiting +limits +limousines +lincoln +linda +lindsay +line +linear +lined +lines +lingerie +link +linked +linking +links +linux +lion +lions +lip +lips +liquid +lisa +list +listed +listen +listening +listing +listings +listprice +lists +lit +lite +literacy +literally +literary +literature +lithuania +litigation +little +live +livecam +lived +liver +liverpool +lives +livesex +livestock +living +liz +ll +llc +lloyd +llp +lm +ln +lo +load +loaded +loading +loads +loan +loans +lobby +loc +local +locale +locally +locate +located +location +locations +locator +lock +locked +locking +locks +lodge +lodging +log +logan +logged +logging +logic +logical +login +logistics +logitech +logo +logos +logs +lol +lolita +london +lone +lonely +long +longer +longest +longitude +look +looked +looking +looks +looksmart +lookup +loop +loops +loose +lopez +lord +los +lose +losing +loss +losses +lost +lot +lots +lottery +lotus +lou +loud +louis +louise +louisiana +louisville +lounge +love +loved +lovely +lover +lovers +loves +loving +low +lower +lowest +lows +lp +ls +lt +ltd +lu +lucas +lucia +luck +lucky +lucy +luggage +luis +luke +lunch +lung +luther +luxembourg +luxury +lycos +lying +lynn +lyric +lyrics +m +ma +mac +macedonia +machine +machinery +machines +macintosh +macro +macromedia +mad +madagascar +made +madison +madness +madonna +madrid +mae +mag +magazine +magazines +magic +magical +magnet +magnetic +magnificent +magnitude +mai +maiden +mail +mailed +mailing +mailman +mails +mailto +main +maine +mainland +mainly +mainstream +maintain +maintained +maintaining +maintains +maintenance +major +majority +make +maker +makers +makes +makeup +making +malawi +malaysia +maldives +male +males +mali +mall +malpractice +malta +mambo +man +manage +managed +management +manager +managers +managing +manchester +mandate +mandatory +manga +manhattan +manitoba +manner +manor +manual +manually +manuals +manufacture +manufactured +manufacturer +manufacturers +manufacturing +many +map +maple +mapping +maps +mar +marathon +marble +marc +march +marco +marcus +mardi +margaret +margin +maria +mariah +marie +marijuana +marilyn +marina +marine +mario +marion +maritime +mark +marked +marker +markers +market +marketing +marketplace +markets +marking +marks +marriage +married +marriott +mars +marshall +mart +martha +martial +martin +marvel +mary +maryland +mas +mask +mason +mass +massachusetts +massage +massive +master +mastercard +masters +masturbating +masturbation +mat +match +matched +matches +matching +mate +material +materials +maternity +math +mathematical +mathematics +mating +matrix +mats +matt +matter +matters +matthew +mattress +mature +maui +mauritius +max +maximize +maximum +may +maybe +mayor +mazda +mb +mba +mc +mcdonald +md +me +meal +meals +mean +meaning +meaningful +means +meant +meanwhile +measure +measured +measurement +measurements +measures +measuring +meat +mechanical +mechanics +mechanism +mechanisms +med +medal +media +median +medicaid +medical +medicare +medication +medications +medicine +medicines +medieval +meditation +mediterranean +medium +medline +meet +meeting +meetings +meets +meetup +mega +mel +melbourne +melissa +mem +member +members +membership +membrane +memo +memorabilia +memorial +memories +memory +memphis +men +mens +ment +mental +mention +mentioned +mentor +menu +menus +mercedes +merchandise +merchant +merchants +mercury +mercy +mere +merely +merge +merger +merit +merry +mesa +mesh +mess +message +messages +messaging +messenger +met +meta +metabolism +metadata +metal +metallic +metallica +metals +meter +meters +method +methodology +methods +metres +metric +metro +metropolitan +mexican +mexico +meyer +mf +mfg +mg +mh +mhz +mi +mia +miami +mic +mice +michael +michel +michelle +michigan +micro +microphone +microsoft +microwave +mid +middle +midi +midlands +midnight +midwest +might +mighty +migration +mike +mil +milan +mild +mile +mileage +miles +milf +milfhunter +milfs +military +milk +mill +millennium +miller +million +millions +mills +milton +milwaukee +mime +min +mind +minds +mine +mineral +minerals +mines +mini +miniature +minimal +minimize +minimum +mining +minister +ministers +ministries +ministry +minneapolis +minnesota +minolta +minor +minority +mins +mint +minus +minute +minutes +miracle +mirror +mirrors +misc +miscellaneous +miss +missed +missile +missing +mission +missions +mississippi +missouri +mistake +mistakes +mistress +mit +mitchell +mitsubishi +mix +mixed +mixer +mixing +mixture +mj +ml +mlb +mls +mm +mn +mo +mobile +mobiles +mobility +mod +mode +model +modeling +modelling +models +modem +modems +moderate +moderator +moderators +modern +modes +modification +modifications +modified +modify +mods +modular +module +modules +moisture +mold +moldova +molecular +molecules +mom +moment +moments +momentum +moms +mon +monaco +monday +monetary +money +mongolia +monica +monitor +monitored +monitoring +monitors +monkey +mono +monroe +monster +montana +monte +montgomery +month +monthly +months +montreal +mood +moon +moore +moral +more +moreover +morgan +morning +morocco +morris +morrison +mortality +mortgage +mortgages +moscow +moses +moss +most +mostly +motel +motels +mother +motherboard +mothers +motion +motivated +motivation +motor +motorcycle +motorcycles +motorola +motors +mount +mountain +mountains +mounted +mounting +mounts +mouse +mouth +move +moved +movement +movements +movers +moves +movie +movies +moving +mozambique +mozilla +mp +mpeg +mpegs +mpg +mph +mr +mrna +mrs +ms +msg +msgid +msgstr +msie +msn +mt +mtv +mu +much +mud +mug +multi +multimedia +multiple +mumbai +munich +municipal +municipality +murder +murphy +murray +muscle +muscles +museum +museums +music +musical +musician +musicians +muslim +muslims +must +mustang +mutual +muze +mv +mw +mx +my +myanmar +myers +myrtle +myself +mysimon +myspace +mysql +mysterious +mystery +myth +n +na +nail +nails +naked +nam +name +named +namely +names +namespace +namibia +nancy +nano +naples +narrative +narrow +nasa +nascar +nasdaq +nashville +nasty +nat +nathan +nation +national +nationally +nations +nationwide +native +nato +natural +naturally +naturals +nature +naughty +nav +naval +navigate +navigation +navigator +navy +nb +nba +nbc +nc +ncaa +nd +ne +near +nearby +nearest +nearly +nebraska +nec +necessarily +necessary +necessity +neck +necklace +need +needed +needle +needs +negative +negotiation +negotiations +neighbor +neighborhood +neighbors +neil +neither +nelson +neo +neon +nepal +nerve +nervous +nest +nested +net +netherlands +netscape +network +networking +networks +neural +neutral +nevada +never +nevertheless +new +newark +newbie +newcastle +newer +newest +newfoundland +newly +newport +news +newscom +newsletter +newsletters +newspaper +newspapers +newton +next +nextel +nfl +ng +nh +nhl +nhs +ni +niagara +nicaragua +nice +nicholas +nick +nickel +nickname +nicole +niger +nigeria +night +nightlife +nightmare +nights +nike +nikon +nil +nine +nintendo +nipple +nipples +nirvana +nissan +nitrogen +nj +nl +nm +nn +no +noble +nobody +node +nodes +noise +nokia +nominated +nomination +nominations +non +none +nonprofit +noon +nor +norfolk +norm +normal +normally +norman +north +northeast +northern +northwest +norton +norway +norwegian +nos +nose +not +note +notebook +notebooks +noted +notes +nothing +notice +noticed +notices +notification +notifications +notified +notify +notion +notre +nottingham +nov +nova +novel +novels +novelty +november +now +nowhere +np +nr +ns +nsw +nt +ntsc +nu +nuclear +nude +nudist +nudity +nuke +null +number +numbers +numeric +numerical +numerous +nurse +nursery +nurses +nursing +nut +nutrition +nutritional +nuts +nutten +nv +nvidia +nw +ny +nyc +nylon +nz +o +oak +oakland +oaks +oasis +ob +obesity +obituaries +obj +object +objective +objectives +objects +obligation +obligations +observation +observations +observe +observed +observer +obtain +obtained +obtaining +obvious +obviously +oc +occasion +occasional +occasionally +occasions +occupation +occupational +occupations +occupied +occur +occurred +occurrence +occurring +occurs +ocean +oclc +oct +october +odd +odds +oe +oecd +oem +of +off +offense +offensive +offer +offered +offering +offerings +offers +office +officer +officers +offices +official +officially +officials +offline +offset +offshore +often +og +oh +ohio +oil +oils +ok +okay +oklahoma +ol +old +older +oldest +olive +oliver +olympic +olympics +olympus +om +omaha +oman +omega +omissions +on +once +one +ones +ongoing +onion +online +only +ons +ontario +onto +oo +ooo +oops +op +open +opened +opening +openings +opens +opera +operate +operated +operates +operating +operation +operational +operations +operator +operators +opinion +opinions +opponent +opponents +opportunities +opportunity +opposed +opposite +opposition +opt +optical +optics +optimal +optimization +optimize +optimum +option +optional +options +or +oracle +oral +orange +orbit +orchestra +order +ordered +ordering +orders +ordinance +ordinary +oregon +org +organ +organic +organisation +organisations +organised +organisms +organization +organizational +organizations +organize +organized +organizer +organizing +orgasm +orgy +oriental +orientation +oriented +origin +original +originally +origins +orlando +orleans +os +oscar +ot +other +others +otherwise +ottawa +ou +ought +our +ours +ourselves +out +outcome +outcomes +outdoor +outdoors +outer +outlet +outline +outlined +outlook +output +outputs +outreach +outside +outsourcing +outstanding +oval +oven +over +overall +overcome +overhead +overnight +overseas +overview +owen +own +owned +owner +owners +ownership +owns +oxford +oxide +oxygen +oz +ozone +p +pa +pac +pace +pacific +pack +package +packages +packaging +packard +packed +packet +packets +packing +packs +pad +pads +page +pages +paid +pain +painful +paint +paintball +painted +painting +paintings +pair +pairs +pakistan +pal +palace +pale +palestine +palestinian +palm +palmer +pam +pamela +pan +panama +panasonic +panel +panels +panic +panties +pants +pantyhose +paper +paperback +paperbacks +papers +papua +par +para +parade +paradise +paragraph +paragraphs +paraguay +parallel +parameter +parameters +parcel +parent +parental +parenting +parents +paris +parish +park +parker +parking +parks +parliament +parliamentary +part +partial +partially +participant +participants +participate +participated +participating +participation +particle +particles +particular +particularly +parties +partition +partly +partner +partners +partnership +partnerships +parts +party +pas +paso +pass +passage +passed +passenger +passengers +passes +passing +passion +passive +passport +password +passwords +past +pasta +paste +pastor +pat +patch +patches +patent +patents +path +pathology +paths +patient +patients +patio +patricia +patrick +patrol +pattern +patterns +paul +pavilion +paxil +pay +payable +payday +paying +payment +payments +paypal +payroll +pays +pb +pc +pci +pcs +pct +pd +pda +pdas +pdf +pdt +pe +peace +peaceful +peak +pearl +peas +pediatric +pee +peeing +peer +peers +pen +penalties +penalty +pencil +pendant +pending +penetration +penguin +peninsula +penis +penn +pennsylvania +penny +pens +pension +pensions +pentium +people +peoples +pepper +per +perceived +percent +percentage +perception +perfect +perfectly +perform +performance +performances +performed +performer +performing +performs +perfume +perhaps +period +periodic +periodically +periods +peripheral +peripherals +perl +permalink +permanent +permission +permissions +permit +permits +permitted +perry +persian +persistent +person +personal +personality +personalized +personally +personals +personnel +persons +perspective +perspectives +perth +peru +pest +pet +pete +peter +petersburg +peterson +petite +petition +petroleum +pets +pf +pg +pgp +ph +phantom +pharmaceutical +pharmaceuticals +pharmacies +pharmacology +pharmacy +phase +phases +phd +phenomenon +phentermine +phi +phil +philadelphia +philip +philippines +philips +phillips +philosophy +phoenix +phone +phones +photo +photograph +photographer +photographers +photographic +photographs +photography +photos +photoshop +php +phpbb +phrase +phrases +phys +physical +physically +physician +physicians +physics +physiology +pi +piano +pic +pichunter +pick +picked +picking +picks +pickup +picnic +pics +picture +pictures +pie +piece +pieces +pierce +pierre +pig +pike +pill +pillow +pills +pilot +pin +pine +ping +pink +pins +pioneer +pipe +pipeline +pipes +pirates +piss +pissing +pit +pitch +pittsburgh +pix +pixel +pixels +pizza +pj +pk +pl +place +placed +placement +places +placing +plain +plains +plaintiff +plan +plane +planes +planet +planets +planned +planner +planners +planning +plans +plant +plants +plasma +plastic +plastics +plate +plates +platform +platforms +platinum +play +playback +playboy +played +player +players +playing +playlist +plays +playstation +plaza +plc +pleasant +please +pleased +pleasure +pledge +plenty +plot +plots +plug +plugin +plugins +plumbing +plus +plymouth +pm +pmc +pmid +pn +po +pocket +pockets +pod +podcast +podcasts +poem +poems +poet +poetry +point +pointed +pointer +pointing +points +pokemon +poker +poland +polar +pole +police +policies +policy +polish +polished +political +politicians +politics +poll +polls +pollution +polo +poly +polyester +polymer +polyphonic +pond +pontiac +pool +pools +poor +pop +pope +popular +popularity +population +populations +por +porcelain +pork +porn +porno +porsche +port +portable +portal +porter +portfolio +portion +portions +portland +portrait +portraits +ports +portsmouth +portugal +portuguese +pos +pose +posing +position +positioning +positions +positive +possess +possession +possibilities +possibility +possible +possibly +post +postage +postal +postcard +postcards +posted +poster +posters +posting +postings +postposted +posts +pot +potato +potatoes +potential +potentially +potter +pottery +poultry +pound +pounds +pour +poverty +powder +powell +power +powered +powerful +powerpoint +powers +powerseller +pp +ppc +ppm +pr +practical +practice +practices +practitioner +practitioners +prague +prairie +praise +pray +prayer +prayers +pre +preceding +precious +precipitation +precise +precisely +precision +predict +predicted +prediction +predictions +prefer +preference +preferences +preferred +prefers +prefix +pregnancy +pregnant +preliminary +premier +premiere +premises +premium +prep +prepaid +preparation +prepare +prepared +preparing +prerequisite +prescribed +prescription +presence +present +presentation +presentations +presented +presenting +presently +presents +preservation +preserve +president +presidential +press +pressed +pressing +pressure +preston +pretty +prev +prevent +preventing +prevention +preview +previews +previous +previously +price +priced +prices +pricing +pride +priest +primarily +primary +prime +prince +princess +princeton +principal +principle +principles +print +printable +printed +printer +printers +printing +prints +prior +priorities +priority +prison +prisoner +prisoners +privacy +private +privilege +privileges +prix +prize +prizes +pro +probability +probably +probe +problem +problems +proc +procedure +procedures +proceed +proceeding +proceedings +proceeds +process +processed +processes +processing +processor +processors +procurement +produce +produced +producer +producers +produces +producing +product +production +productions +productive +productivity +products +prof +profession +professional +professionals +professor +profile +profiles +profit +profits +program +programme +programmer +programmers +programmes +programming +programs +progress +progressive +prohibited +project +projected +projection +projector +projectors +projects +prominent +promise +promised +promises +promising +promo +promote +promoted +promotes +promoting +promotion +promotional +promotions +prompt +promptly +proof +propecia +proper +properly +properties +property +prophet +proportion +proposal +proposals +propose +proposed +proposition +proprietary +pros +prospect +prospective +prospects +prostate +prostores +prot +protect +protected +protecting +protection +protective +protein +proteins +protest +protocol +protocols +prototype +proud +proudly +prove +proved +proven +provide +provided +providence +provider +providers +provides +providing +province +provinces +provincial +provision +provisions +proxy +prozac +ps +psi +psp +pst +psychiatry +psychological +psychology +pt +pts +pty +pub +public +publication +publications +publicity +publicly +publish +published +publisher +publishers +publishing +pubmed +pubs +puerto +pull +pulled +pulling +pulse +pump +pumps +punch +punishment +punk +pupils +puppy +purchase +purchased +purchases +purchasing +pure +purple +purpose +purposes +purse +pursuant +pursue +pursuit +push +pushed +pushing +pussy +put +puts +putting +puzzle +puzzles +pvc +python +q +qatar +qc +qld +qt +qty +quad +qualification +qualifications +qualified +qualify +qualifying +qualities +quality +quantitative +quantities +quantity +quantum +quarter +quarterly +quarters +que +quebec +queen +queens +queensland +queries +query +quest +question +questionnaire +questions +queue +qui +quick +quickly +quiet +quilt +quit +quite +quiz +quizzes +quotations +quote +quoted +quotes +r +ra +rabbit +race +races +rachel +racial +racing +rack +racks +radar +radiation +radical +radio +radios +radius +rage +raid +rail +railroad +railway +rain +rainbow +raise +raised +raises +raising +raleigh +rally +ralph +ram +ran +ranch +rand +random +randy +range +rangers +ranges +ranging +rank +ranked +ranking +rankings +ranks +rap +rape +rapid +rapidly +rapids +rare +rarely +rat +rate +rated +rates +rather +rating +ratings +ratio +rational +ratios +rats +raw +ray +raymond +rays +rb +rc +rca +rd +re +reach +reached +reaches +reaching +reaction +reactions +read +reader +readers +readily +reading +readings +reads +ready +real +realistic +reality +realize +realized +really +realm +realtor +realtors +realty +rear +reason +reasonable +reasonably +reasoning +reasons +rebate +rebates +rebecca +rebel +rebound +rec +recall +receipt +receive +received +receiver +receivers +receives +receiving +recent +recently +reception +receptor +receptors +recipe +recipes +recipient +recipients +recognised +recognition +recognize +recognized +recommend +recommendation +recommendations +recommended +recommends +reconstruction +record +recorded +recorder +recorders +recording +recordings +records +recover +recovered +recovery +recreation +recreational +recruiting +recruitment +recycling +red +redeem +redhead +reduce +reduced +reduces +reducing +reduction +reductions +reed +reef +reel +ref +refer +reference +referenced +references +referral +referrals +referred +referring +refers +refinance +refine +refined +reflect +reflected +reflection +reflections +reflects +reform +reforms +refresh +refrigerator +refugees +refund +refurbished +refuse +refused +reg +regard +regarded +regarding +regardless +regards +reggae +regime +region +regional +regions +register +registered +registrar +registration +registry +regression +regular +regularly +regulated +regulation +regulations +regulatory +rehab +rehabilitation +reid +reject +rejected +rel +relate +related +relates +relating +relation +relations +relationship +relationships +relative +relatively +relatives +relax +relaxation +relay +release +released +releases +relevance +relevant +reliability +reliable +reliance +relief +religion +religions +religious +reload +relocation +rely +relying +remain +remainder +remained +remaining +remains +remark +remarkable +remarks +remedies +remedy +remember +remembered +remind +reminder +remix +remote +removable +removal +remove +removed +removing +renaissance +render +rendered +rendering +renew +renewable +renewal +reno +rent +rental +rentals +rentcom +rep +repair +repairs +repeat +repeated +replace +replaced +replacement +replacing +replica +replication +replied +replies +reply +report +reported +reporter +reporters +reporting +reports +repository +represent +representation +representations +representative +representatives +represented +representing +represents +reprint +reprints +reproduce +reproduced +reproduction +reproductive +republic +republican +republicans +reputation +request +requested +requesting +requests +require +required +requirement +requirements +requires +requiring +res +rescue +research +researcher +researchers +reseller +reservation +reservations +reserve +reserved +reserves +reservoir +reset +residence +resident +residential +residents +resist +resistance +resistant +resolution +resolutions +resolve +resolved +resort +resorts +resource +resources +respect +respected +respective +respectively +respiratory +respond +responded +respondent +respondents +responding +response +responses +responsibilities +responsibility +responsible +rest +restaurant +restaurants +restoration +restore +restored +restrict +restricted +restriction +restrictions +restructuring +result +resulted +resulting +results +resume +resumes +retail +retailer +retailers +retain +retained +retention +retired +retirement +retreat +retrieval +retrieve +retrieved +retro +return +returned +returning +returns +reunion +reuters +rev +reveal +revealed +reveals +revelation +revenge +revenue +revenues +reverse +review +reviewed +reviewer +reviewing +reviews +revised +revision +revisions +revolution +revolutionary +reward +rewards +reynolds +rf +rfc +rg +rh +rhode +rhythm +ri +ribbon +rica +rice +rich +richard +richards +richardson +richmond +rick +rico +rid +ride +rider +riders +rides +ridge +riding +right +rights +rim +ring +rings +ringtone +ringtones +rio +rip +ripe +rise +rising +risk +risks +river +rivers +riverside +rj +rl +rm +rn +rna +ro +road +roads +rob +robert +roberts +robertson +robin +robinson +robot +robots +robust +rochester +rock +rocket +rocks +rocky +rod +roger +rogers +roland +role +roles +roll +rolled +roller +rolling +rolls +rom +roman +romance +romania +romantic +rome +ron +ronald +roof +room +roommate +roommates +rooms +root +roots +rope +rosa +rose +roses +ross +roster +rotary +rotation +rouge +rough +roughly +roulette +round +rounds +route +router +routers +routes +routine +routines +routing +rover +row +rows +roy +royal +royalty +rp +rpg +rpm +rr +rrp +rs +rss +rt +ru +rubber +ruby +rug +rugby +rugs +rule +ruled +rules +ruling +run +runner +running +runs +runtime +rural +rush +russell +russia +russian +ruth +rv +rw +rwanda +rx +ryan +s +sa +sacramento +sacred +sacrifice +sad +saddam +safari +safe +safely +safer +safety +sage +sagem +said +sail +sailing +saint +saints +sake +salad +salaries +salary +sale +salem +sales +sally +salmon +salon +salt +salvador +salvation +sam +samba +same +samoa +sample +samples +sampling +samsung +samuel +san +sand +sandra +sandwich +sandy +sans +santa +sanyo +sao +sap +sapphire +sara +sarah +sas +saskatchewan +sat +satellite +satin +satisfaction +satisfactory +satisfied +satisfy +saturday +saturn +sauce +saudi +savage +savannah +save +saved +saver +saves +saving +savings +saw +say +saying +says +sb +sbjct +sc +scale +scales +scan +scanned +scanner +scanners +scanning +scary +scenario +scenarios +scene +scenes +scenic +schedule +scheduled +schedules +scheduling +schema +scheme +schemes +scholar +scholars +scholarship +scholarships +school +schools +sci +science +sciences +scientific +scientist +scientists +scoop +scope +score +scored +scores +scoring +scotia +scotland +scott +scottish +scout +scratch +screen +screening +screens +screensaver +screensavers +screenshot +screenshots +screw +script +scripting +scripts +scroll +scsi +scuba +sculpture +sd +se +sea +seafood +seal +sealed +sean +search +searchcom +searched +searches +searching +seas +season +seasonal +seasons +seat +seating +seats +seattle +sec +second +secondary +seconds +secret +secretariat +secretary +secrets +section +sections +sector +sectors +secure +secured +securely +securities +security +see +seed +seeds +seeing +seek +seeker +seekers +seeking +seeks +seem +seemed +seems +seen +sees +sega +segment +segments +select +selected +selecting +selection +selections +selective +self +sell +seller +sellers +selling +sells +semester +semi +semiconductor +seminar +seminars +sen +senate +senator +senators +send +sender +sending +sends +senegal +senior +seniors +sense +sensitive +sensitivity +sensor +sensors +sent +sentence +sentences +seo +sep +separate +separated +separately +separation +sept +september +seq +sequence +sequences +ser +serbia +serial +series +serious +seriously +serum +serve +served +server +servers +serves +service +services +serving +session +sessions +set +sets +setting +settings +settle +settled +settlement +setup +seven +seventh +several +severe +sewing +sex +sexcam +sexo +sexual +sexuality +sexually +sexy +sf +sg +sh +shade +shades +shadow +shadows +shaft +shake +shakespeare +shakira +shall +shame +shanghai +shannon +shape +shaped +shapes +share +shared +shareholders +shares +shareware +sharing +shark +sharon +sharp +shaved +shaw +she +shed +sheep +sheer +sheet +sheets +sheffield +shelf +shell +shelter +shemale +shemales +shepherd +sheriff +sherman +shield +shift +shine +ship +shipment +shipments +shipped +shipping +ships +shirt +shirts +shit +shock +shoe +shoes +shoot +shooting +shop +shopper +shoppercom +shoppers +shopping +shoppingcom +shops +shopzilla +shore +short +shortcuts +shorter +shortly +shorts +shot +shots +should +shoulder +show +showcase +showed +shower +showers +showing +shown +shows +showtimes +shut +shuttle +si +sic +sick +side +sides +sie +siemens +sierra +sig +sight +sigma +sign +signal +signals +signature +signatures +signed +significance +significant +significantly +signing +signs +signup +silence +silent +silicon +silk +silly +silver +sim +similar +similarly +simon +simple +simplified +simply +simpson +simpsons +sims +simulation +simulations +simultaneously +sin +since +sing +singapore +singer +singh +singing +single +singles +sink +sip +sir +sister +sisters +sit +site +sitemap +sites +sitting +situated +situation +situations +six +sixth +size +sized +sizes +sk +skating +ski +skiing +skill +skilled +skills +skin +skins +skip +skirt +skirts +sku +sky +skype +sl +slave +sleep +sleeping +sleeps +sleeve +slide +slides +slideshow +slight +slightly +slim +slip +slope +slot +slots +slovak +slovakia +slovenia +slow +slowly +slut +sluts +sm +small +smaller +smart +smell +smile +smilies +smith +smithsonian +smoke +smoking +smooth +sms +smtp +sn +snake +snap +snapshot +snow +snowboard +so +soa +soap +soc +soccer +social +societies +society +sociology +socket +socks +sodium +sofa +soft +softball +software +soil +sol +solar +solaris +sold +soldier +soldiers +sole +solely +solid +solo +solomon +solution +solutions +solve +solved +solving +soma +somalia +some +somebody +somehow +someone +somerset +something +sometimes +somewhat +somewhere +son +song +songs +sonic +sons +sony +soon +soonest +sophisticated +sorry +sort +sorted +sorts +sought +soul +souls +sound +sounds +soundtrack +soup +source +sources +south +southampton +southeast +southern +southwest +soviet +sox +sp +spa +space +spaces +spain +spam +span +spanish +spank +spanking +sparc +spare +spas +spatial +speak +speaker +speakers +speaking +speaks +spears +spec +special +specialist +specialists +specialized +specializing +specially +specials +specialties +specialty +species +specific +specifically +specification +specifications +specifics +specified +specifies +specify +specs +spectacular +spectrum +speech +speeches +speed +speeds +spell +spelling +spencer +spend +spending +spent +sperm +sphere +spice +spider +spies +spin +spine +spirit +spirits +spiritual +spirituality +split +spoke +spoken +spokesman +sponsor +sponsored +sponsors +sponsorship +sport +sporting +sports +spot +spotlight +spots +spouse +spray +spread +spreading +spring +springer +springfield +springs +sprint +spy +spyware +sq +sql +squad +square +squirt +squirting +sr +src +sri +ss +ssl +st +stability +stable +stack +stadium +staff +staffing +stage +stages +stainless +stakeholders +stamp +stamps +stan +stand +standard +standards +standing +standings +stands +stanford +stanley +star +starring +stars +starsmerchant +start +started +starter +starting +starts +startup +stat +state +stated +statement +statements +states +statewide +static +stating +station +stationery +stations +statistical +statistics +stats +status +statute +statutes +statutory +stay +stayed +staying +stays +std +ste +steady +steal +steam +steel +steering +stem +step +stephanie +stephen +steps +stereo +sterling +steve +steven +stevens +stewart +stick +sticker +stickers +sticks +sticky +still +stock +stockholm +stockings +stocks +stolen +stomach +stone +stones +stood +stop +stopped +stopping +stops +storage +store +stored +stores +stories +storm +story +str +straight +strain +strand +strange +stranger +strap +strategic +strategies +strategy +stream +streaming +streams +street +streets +strength +strengthen +strengthening +strengths +stress +stretch +strict +strictly +strike +strikes +striking +string +strings +strip +stripes +strips +stroke +strong +stronger +strongly +struck +struct +structural +structure +structured +structures +struggle +stuart +stuck +stud +student +students +studied +studies +studio +studios +study +studying +stuff +stuffed +stunning +stupid +style +styles +stylish +stylus +su +sub +subaru +subcommittee +subdivision +subject +subjects +sublime +sublimedirectory +submission +submissions +submit +submitted +submitting +subscribe +subscriber +subscribers +subscription +subscriptions +subsection +subsequent +subsequently +subsidiaries +subsidiary +substance +substances +substantial +substantially +substitute +subtle +suburban +succeed +success +successful +successfully +such +suck +sucking +sucks +sudan +sudden +suddenly +sue +suffer +suffered +suffering +sufficient +sufficiently +sugar +suggest +suggested +suggesting +suggestion +suggestions +suggests +suicide +suit +suitable +suite +suited +suites +suits +sullivan +sum +summaries +summary +summer +summit +sun +sunday +sunglasses +sunny +sunrise +sunset +sunshine +super +superb +superintendent +superior +supervision +supervisor +supervisors +supplement +supplemental +supplements +supplied +supplier +suppliers +supplies +supply +support +supported +supporters +supporting +supports +suppose +supposed +supreme +sur +sure +surely +surf +surface +surfaces +surfing +surge +surgeon +surgeons +surgery +surgical +surname +surplus +surprise +surprised +surprising +surrey +surround +surrounded +surrounding +surveillance +survey +surveys +survival +survive +survivor +survivors +susan +suse +suspect +suspected +suspended +suspension +sussex +sustainability +sustainable +sustained +suzuki +sv +sw +swap +sweden +swedish +sweet +swift +swim +swimming +swing +swingers +swiss +switch +switched +switches +switching +switzerland +sword +sydney +symantec +symbol +symbols +sympathy +symphony +symposium +symptoms +sync +syndicate +syndication +syndrome +synopsis +syntax +synthesis +synthetic +syracuse +syria +sys +system +systematic +systems +t +ta +tab +table +tables +tablet +tablets +tabs +tackle +tactics +tag +tagged +tags +tahoe +tail +taiwan +take +taken +takes +taking +tale +talent +talented +tales +talk +talked +talking +talks +tall +tamil +tampa +tan +tank +tanks +tanzania +tap +tape +tapes +tar +target +targeted +targets +tariff +task +tasks +taste +tattoo +taught +tax +taxation +taxes +taxi +taylor +tb +tba +tc +tcp +td +te +tea +teach +teacher +teachers +teaches +teaching +team +teams +tear +tears +tech +technical +technician +technique +techniques +techno +technological +technologies +technology +techrepublic +ted +teddy +tee +teen +teenage +teens +teeth +tel +telecharger +telecom +telecommunications +telephone +telephony +telescope +television +televisions +tell +telling +tells +temp +temperature +temperatures +template +templates +temple +temporal +temporarily +temporary +ten +tenant +tend +tender +tennessee +tennis +tension +tent +term +terminal +terminals +termination +terminology +terms +terrace +terrain +terrible +territories +territory +terror +terrorism +terrorist +terrorists +terry +test +testament +tested +testimonials +testimony +testing +tests +tex +texas +text +textbook +textbooks +textile +textiles +texts +texture +tf +tft +tgp +th +thai +thailand +than +thank +thanks +thanksgiving +that +thats +the +theater +theaters +theatre +thee +theft +thehun +their +them +theme +themes +themselves +then +theology +theorem +theoretical +theories +theory +therapeutic +therapist +therapy +there +thereafter +thereby +therefore +thereof +thermal +thesaurus +these +thesis +they +thick +thickness +thin +thing +things +think +thinking +thinkpad +thinks +third +thirty +this +thomas +thompson +thomson +thong +thongs +thorough +thoroughly +those +thou +though +thought +thoughts +thousand +thousands +thread +threaded +threads +threat +threatened +threatening +threats +three +threesome +threshold +thriller +throat +through +throughout +throw +throwing +thrown +throws +thru +thu +thumb +thumbnail +thumbnails +thumbs +thumbzilla +thunder +thursday +thus +thy +ti +ticket +tickets +tide +tie +tied +tier +ties +tiffany +tiger +tigers +tight +til +tile +tiles +till +tim +timber +time +timeline +timely +timer +times +timing +timothy +tin +tiny +tion +tions +tip +tips +tire +tired +tires +tissue +tit +titanium +titans +title +titled +titles +tits +titten +tm +tmp +tn +to +tobacco +tobago +today +todd +toddler +toe +together +toilet +token +tokyo +told +tolerance +toll +tom +tomato +tomatoes +tommy +tomorrow +ton +tone +toner +tones +tongue +tonight +tons +tony +too +took +tool +toolbar +toolbox +toolkit +tools +tooth +top +topic +topics +topless +tops +toronto +torture +toshiba +total +totally +totals +touch +touched +tough +tour +touring +tourism +tourist +tournament +tournaments +tours +toward +towards +tower +towers +town +towns +township +toxic +toy +toyota +toys +tp +tr +trace +track +trackback +trackbacks +tracked +tracker +tracking +tracks +tract +tractor +tracy +trade +trademark +trademarks +trader +trades +trading +tradition +traditional +traditions +traffic +tragedy +trail +trailer +trailers +trails +train +trained +trainer +trainers +training +trains +tramadol +trance +tranny +trans +transaction +transactions +transcript +transcription +transcripts +transexual +transexuales +transfer +transferred +transfers +transform +transformation +transit +transition +translate +translated +translation +translations +translator +transmission +transmit +transmitted +transparency +transparent +transport +transportation +transsexual +trap +trash +trauma +travel +traveler +travelers +traveling +traveller +travelling +travels +travesti +travis +tray +treasure +treasurer +treasures +treasury +treat +treated +treating +treatment +treatments +treaty +tree +trees +trek +trembl +tremendous +trend +trends +treo +tri +trial +trials +triangle +tribal +tribe +tribes +tribunal +tribune +tribute +trick +tricks +tried +tries +trigger +trim +trinidad +trinity +trio +trip +tripadvisor +triple +trips +triumph +trivia +troops +tropical +trouble +troubleshooting +trout +troy +truck +trucks +true +truly +trunk +trust +trusted +trustee +trustees +trusts +truth +try +trying +ts +tsunami +tt +tu +tub +tube +tubes +tucson +tue +tuesday +tuition +tulsa +tumor +tune +tuner +tunes +tuning +tunisia +tunnel +turbo +turkey +turkish +turn +turned +turner +turning +turns +turtle +tutorial +tutorials +tv +tvcom +tvs +twelve +twenty +twice +twiki +twin +twinks +twins +twist +twisted +two +tx +ty +tyler +type +types +typical +typically +typing +u +uc +uganda +ugly +uh +ui +uk +ukraine +ul +ultimate +ultimately +ultra +ultram +um +un +una +unable +unauthorized +unavailable +uncertainty +uncle +und +undefined +under +undergraduate +underground +underlying +understand +understanding +understood +undertake +undertaken +underwear +undo +une +unemployment +unexpected +unfortunately +uni +unified +uniform +union +unions +uniprotkb +unique +unit +united +units +unity +univ +universal +universe +universities +university +unix +unknown +unless +unlike +unlikely +unlimited +unlock +unnecessary +unsigned +unsubscribe +until +untitled +unto +unusual +unwrap +up +upc +upcoming +update +updated +updates +updating +upgrade +upgrades +upgrading +upload +uploaded +upon +upper +ups +upset +upskirt +upskirts +ur +urban +urge +urgent +uri +url +urls +uruguay +urw +us +usa +usage +usb +usc +usd +usda +use +used +useful +user +username +users +uses +usgs +using +usps +usr +usual +usually +ut +utah +utc +utilities +utility +utilization +utilize +utils +uv +uw +uzbekistan +v +va +vacancies +vacation +vacations +vaccine +vacuum +vagina +val +valentine +valid +validation +validity +valium +valley +valuable +valuation +value +valued +values +valve +valves +vampire +van +vancouver +vanilla +var +variable +variables +variance +variation +variations +varied +varies +variety +various +vary +varying +vast +vat +vatican +vault +vb +vbulletin +vc +vcr +ve +vector +vegas +vegetable +vegetables +vegetarian +vegetation +vehicle +vehicles +velocity +velvet +vendor +vendors +venezuela +venice +venture +ventures +venue +venues +ver +verbal +verde +verification +verified +verify +verizon +vermont +vernon +verse +version +versions +versus +vertex +vertical +very +verzeichnis +vessel +vessels +veteran +veterans +veterinary +vg +vhs +vi +via +viagra +vibrator +vibrators +vic +vice +victim +victims +victor +victoria +victorian +victory +vid +video +videos +vids +vienna +vietnam +vietnamese +view +viewed +viewer +viewers +viewing +viewpicture +views +vii +viii +viking +villa +village +villages +villas +vincent +vintage +vinyl +violation +violations +violence +violent +violin +vip +viral +virgin +virginia +virtual +virtually +virtue +virus +viruses +visa +visibility +visible +vision +visit +visited +visiting +visitor +visitors +visits +vista +visual +vital +vitamin +vitamins +vocabulary +vocal +vocals +vocational +voice +voices +void +voip +vol +volkswagen +volleyball +volt +voltage +volume +volumes +voluntary +volunteer +volunteers +volvo +von +vote +voted +voters +votes +voting +voyeur +voyeurweb +voyuer +vp +vpn +vs +vsnet +vt +vulnerability +vulnerable +w +wa +wage +wages +wagner +wagon +wait +waiting +waiver +wake +wal +wales +walk +walked +walker +walking +walks +wall +wallace +wallet +wallpaper +wallpapers +walls +walnut +walt +walter +wan +wang +wanna +want +wanted +wanting +wants +war +warcraft +ward +ware +warehouse +warm +warming +warned +warner +warning +warnings +warrant +warranties +warranty +warren +warrior +warriors +wars +was +wash +washer +washing +washington +waste +watch +watched +watches +watching +water +waterproof +waters +watershed +watson +watt +watts +wav +wave +waves +wax +way +wayne +ways +wb +wc +we +weak +wealth +weapon +weapons +wear +wearing +weather +web +webcam +webcams +webcast +weblog +weblogs +webmaster +webmasters +webpage +webshots +website +websites +webster +wed +wedding +weddings +wednesday +weed +week +weekend +weekends +weekly +weeks +weight +weighted +weights +weird +welcome +welding +welfare +well +wellington +wellness +wells +welsh +wendy +went +were +wesley +west +western +westminster +wet +whale +what +whatever +whats +wheat +wheel +wheels +when +whenever +where +whereas +wherever +whether +which +while +whilst +white +who +whole +wholesale +whom +whore +whose +why +wi +wichita +wicked +wide +widely +wider +widescreen +widespread +width +wife +wifi +wiki +wikipedia +wild +wilderness +wildlife +wiley +will +william +williams +willing +willow +wilson +win +wind +window +windows +winds +windsor +wine +wines +wing +wings +winner +winners +winning +wins +winston +winter +wire +wired +wireless +wires +wiring +wisconsin +wisdom +wise +wish +wishes +wishlist +wit +witch +with +withdrawal +within +without +witness +witnesses +wives +wizard +wm +wma +wn +wolf +woman +women +womens +won +wonder +wonderful +wondering +wood +wooden +woods +wool +worcester +word +wordpress +words +work +worked +worker +workers +workflow +workforce +working +workout +workplace +works +workshop +workshops +workstation +world +worldcat +worlds +worldsex +worldwide +worm +worn +worried +worry +worse +worship +worst +worth +worthy +would +wound +wow +wp +wr +wrap +wrapped +wrapping +wrestling +wright +wrist +write +writer +writers +writes +writing +writings +written +wrong +wrote +ws +wt +wto +wu +wv +ww +www +wx +wy +wyoming +x +xanax +xbox +xerox +xhtml +xi +xl +xml +xnxx +xp +xx +xxx +y +ya +yacht +yahoo +yale +yamaha +yang +yard +yards +yarn +ye +yea +yeah +year +yearly +years +yeast +yellow +yemen +yen +yes +yesterday +yet +yield +yields +yn +yo +yoga +york +yorkshire +you +young +younger +your +yours +yourself +youth +yr +yrs +yu +yugoslavia +yukon +z +za +zambia +zdnet +zealand +zen +zero +zimbabwe +zinc +zip +zoloft +zone +zones +zoning +zoo +zoom +zoophilia +zope +zshops +zu +zum +zus \ No newline at end of file diff --git a/Automate Emails Daily/README.md b/Automate Emails Daily/README.md new file mode 100644 index 00000000..b4b02f72 --- /dev/null +++ b/Automate Emails Daily/README.md @@ -0,0 +1,151 @@ +# Guidebook: Email Automation Script with Advanced Features + +# Overview + +This Python script automates the process of sending emails to multiple recipients with enhanced features such as support for attachments and HTML-formatted emails. The script uses Python's built-in libraries (smtplib, ssl, and email) to send emails securely through Gmail's SMTP server. It also allows the user to customize the email's content, subject, recipients, and more via environment variables or in-script configuration. + +# Features Added + +1. Support for Attachments: You can now attach files to the email, making it more versatile for different use cases like sending reports, documents, or images. +2. HTML Email Support: You can send emails in HTML format, giving you more flexibility with rich text formatting, embedded links, and other styling options. + +# Prerequisites + +1. Python 3.x +2. A Gmail account (with less secure apps access enabled or an app-specific password if using 2FA) +3. Required libraries: smtplib, ssl, os, email (all built-in Python libraries) + +# Environment Setup +To ensure security, it's recommended to store sensitive information like email credentials in environment variables. For this guide, we will store the Gmail password as an environment variable: + +export EMAIL_PASSWORD='your_gmail_password' + +# Code Breakdown +1. Import Required Modules + +import smtplib +import ssl +import os +from email.message import EmailMessage +from email.utils import formataddr +------------------------------------------------------------------------------------- +smtplib: Used to create the connection to the Gmail SMTP server. +ssl: Provides a layer of security for the email communication. +os: Used to access environment variables (like the email password). +email.message: Allows crafting email messages, including text, HTML, and attachments. + +**send_email Function** + +This is the main function that sends the email. + +Function Parameters: +sender_email (str): The email address sending the email. +sender_name (str): The sender's name that will appear in the email. +password (str): The sender's email password, pulled from environment variables. +receiver_emails (list): A list of email addresses to send the email to. +email_body (str): The body of the email, which can be in plain text or HTML. +email_subject (str): The subject line of the email. Default is "No subject." + +**Example Function** + +send_email( + sender_email="youremail@gmail.com", + sender_name="Your Name", + password=os.environ.get("EMAIL_PASSWORD"), + receiver_emails=["recipient1@gmail.com", "recipient2@gmail.com"], + email_body="Hello, this is a test email!", + email_subject="Test Email" +) + +------------------------------------------------------------------------------------- + +**Setting Up Email Headers** +The email headers include the subject, sender, recipient, and format: + +msg["Subject"] = email_subject +msg["From"] = formataddr((f"{sender_name}", f"{sender_email}")) +msg["BCC"] = sender_email +msg.set_content(email_body) # This can also be an HTML body + +------------------------------------------------------------------------------------- + +**SMTP Server Connection** +Here we establish a connection to Gmail's SMTP server and use TLS (Transport Layer Security) to ensure a secure connection. + +smtp_port = 587 +smtp_server = "smtp.gmail.com" +ssl_context = ssl.create_default_context() + +------------------------------------------------------------------------------------- + +**Login and Sending the Email** +After logging in, the script loops through each recipient in the receiver_emails list and sends the email. + +my_server = smtplib.SMTP(smtp_server, smtp_port) +my_server.starttls(context=ssl_context) +my_server.login(sender_email, password) + +------------------------------------------------------------------------------------- + +**Adding Attachments** +If you want to send attachments, use the following modification: + +if attachments: + for file in attachments: + with open(file, "rb") as f: + file_data = f.read() + file_name = os.path.basename(file) + msg.add_attachment(file_data, maintype='application', subtype='octet-stream', filename=file_name) + +------------------------------------------------------------------------------------- + +**Sending HTML Emails** +To send HTML emails, modify the email body to contain HTML: + +msg.add_alternative("""\ + + +

Hello,
+ This is an HTML email!

+ + + """, subtype='html') + + ------------------------------------------------------------------------------------- + +**Error Handling** +The script includes basic error handling to notify you if the connection or email-sending process fails: + +except Exception as e: + print(f"ERROR: {e}") + +-------------------------------------------------------------------------------------- + +**Full Example with Attachment and HTML Support** + +send_email( + sender_email="youremail@gmail.com", + sender_name="Your Name", + password=os.environ.get("EMAIL_PASSWORD"), + receiver_emails=["recipient1@gmail.com", "recipient2@gmail.com"], + email_body="

This is a Test Email with HTML

", + email_subject="Test Email with HTML and Attachment", + attachments=["path/to/attachment1", "path/to/attachment2"] +) + + +-------------------------------------------------------------------------------------- + +# How to run the script + +Ensure the required environment variable (EMAIL_PASSWORD) is set. +Customize the sender email, receiver emails, email body, and subject in the script. +Run the script from the command line: + +python email_automation.py or main.py + +You can also schedule the script to run daily using cron jobs or Task Scheduler (Windows). + + +# Thank You for reading this tutorial. I hope you found it helpful. If you have any questions or need further + diff --git a/Automate Emails Daily/main.py b/Automate Emails Daily/main.py index 38698858..490e48ee 100644 --- a/Automate Emails Daily/main.py +++ b/Automate Emails Daily/main.py @@ -3,20 +3,46 @@ import os from email.message import EmailMessage from email.utils import formataddr +from mimetypes import guess_type def send_email(sender_email: str, sender_name: str, password:str, - receiver_emails: str , + receiver_emails: list, email_body: str, - email_subject: str="No subject",)-> None: + email_subject: str = "No subject", + is_html: bool = False, + attachments: list = None) -> None: msg = EmailMessage() msg["Subject"] = email_subject msg["From"] = formataddr((f"{sender_name}", f"{sender_email}")) - msg["BCC"] = sender_email - msg.set_content(email_body) + msg["BCC"] = sender_email # Can add CC or BCC here if needed + # Support both plain text and HTML emails + if is_html: + msg.add_alternative(email_body, subtype='html') + else: + msg.set_content(email_body) + + # Add attachments if provided + if attachments: + for file_path in attachments: + try: + with open(file_path, 'rb') as file: + file_data = file.read() + file_name = os.path.basename(file_path) + mime_type, _ = guess_type(file_path) + if mime_type: + mime_main, mime_subtype = mime_type.split('/') + else: + mime_main, mime_subtype = 'application', 'octet-stream' + + msg.add_attachment(file_data, maintype=mime_main, subtype=mime_subtype, filename=file_name) + print(f"Attached file: {file_name}") + except Exception as e: + print(f"Failed to attach {file_path}: {e}") + smtp_port = 587 smtp_server = "smtp.gmail.com" @@ -48,14 +74,18 @@ def send_email(sender_email: str, finally: my_server.quit() -# change these variables to suite your requirements +# Example usage sender_email = "your-email@gmail.com" sender_name = "your name" password = os.environ.get("EMAIL_PASSWORD") -email_subject = "good morning" -email_body = "good morning, hope you have a wonderful day" - -receiver_emails = ["receiver1-email@gmail.com", "receiver2-email@gmail.com", "receiver3-email@gmail.com"] +email_subject = "Good morning" +email_body = """ +

Good Morning!

+

Hope you have a wonderful day.

+""" +receiver_emails = ["receiver1-email@gmail.com", "receiver2-email@gmail.com"] +attachments = ["path/to/attachment1.pdf", "path/to/attachment2.jpg"] -send_email(sender_email, sender_name, password, receiver_emails, email_body,email_subject) \ No newline at end of file +# Sending the email as HTML with attachments +send_email(sender_email, sender_name, password, receiver_emails, email_body, email_subject, is_html=True, attachments=attachments) diff --git a/Black Hat Python/README.md b/Black Hat Python/README.md index 037a1d45..b2ac355f 100644 --- a/Black Hat Python/README.md +++ b/Black Hat Python/README.md @@ -4,9 +4,13 @@ Source code for the book "Black Hat Python" by Justin Seitz. ## Usage Simply choose a directory (DIR) in which to clone the project using -`git clone`, create a new virtual environment or `venv` for it (recommended -) and install the requirements using `pip install`. +```bash +git clone https://github.com/DhanushNehru/Python-Scripts/Black Hat Python.git +``` +create a new virtual environment or `venv` for it (recommended) and install the requirements using `pip install`. + + + - \ No newline at end of file diff --git a/Blackjack/BlackjackGame.py b/Blackjack/BlackjackGame.py index 11032a30..92ad5e92 100644 --- a/Blackjack/BlackjackGame.py +++ b/Blackjack/BlackjackGame.py @@ -58,6 +58,7 @@ def getScore(self): self.score = 0 for card in self.cards: self.score += self.scoreDictionary[card] + self.adjustAceValue() return self.score def adjustAceValue(self): @@ -145,25 +146,17 @@ def playRound3(self): print("My Money: " + str(player.money)) def removeLossers(self): - i = 0 - for player in self.playerlist: - if player.money <= 0: - self.playerlist.pop(i) - i += 1 + self.playerlist = [player for player in self.playerlist if player.money > 0] def refreshPlayerCard(self): for player in self.playerlist: player.cards = [] - dealer.cards = [] + self.dealer.cards = [] def genDeck(self): - cardType = ['2','3','4','5','6','7','8','9','10','J','Q','K','A'] - self.cardDeck = [] - for card in cardType: - self.cardDeck.append(card) - self.cardDeck.append(card) - self.cardDeck.append(card) - self.cardDeck.append(card) + cardType = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'] + self.cardDeck = [card for card in cardType for _ in range(4)] + random.shuffle(self.cardDeck) # Set betting limits min_bet = 5 @@ -192,4 +185,4 @@ def genDeck(self): game1.drawCardsRound2() game1.playRound3() game1.removeLossers() - gameRound += 1 \ No newline at end of file + gameRound += 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..68ebedab --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to This Repository + +Thank you for your interest in contributing! We welcome contributions of Python scripts and improvements to this repository. + +## How to Contribute + +1. **Discuss First** + Before making any changes, please open an issue to discuss your idea with the maintainers. This helps us coordinate and avoid duplication. + +2. **Make Your Contribution** + - Fork the repository. + - Create a new folder named after your script or its purpose (short and descriptive). + - Add your Python script(s) inside this folder. + - Include a `README.md` in that folder explaining what your script does and any prerequisites. + - Update the main `README.md` by adding your script to the **List of Scripts** with its name, a brief description, and a link to your script folder. + +3. **Open a Pull Request (PR)** + - Link your PR to the issue you created earlier. + - We will review your changes and provide feedback or merge it if everything looks good. + +4. **Clean Up** + Ensure any temporary install or build dependencies are removed before submitting your PR. + +## First-Time Contributors + +If this is your first time contributing to an open source project, check out this helpful guide: +[How to Make Your First Contribution](https://opensource.guide/how-to-contribute/) + +## Code of Conduct + +We strive to maintain a welcoming and inclusive community. Please read and respect our [Code of Conduct](https://github.com/DhanushNehru/Python-Scripts/blob/master/CODE_OF_CONDUCT.md) in all your interactions. diff --git a/CSV to Excel/README.md b/CSV to Excel/README.md new file mode 100644 index 00000000..8774d1c9 --- /dev/null +++ b/CSV to Excel/README.md @@ -0,0 +1,23 @@ +# Explanation of Modifications + +**Support for Multiple CSV Files:** + +Modification: We now accept multiple CSV files, split by commas, in the csv_files list. + +Sheet Name: For each CSV file, a new sheet is created, named after the CSV file (without the extension). + +Loop: We loop over each CSV file in csv_files and process it individually. + +**Automatic CSV Header Detection and Formatting:** + +Modification: The first row of each CSV file is detected as the header. + +Formatting: The header row is formatted with bold text (Font(bold=True)) and a yellow background (PatternFill). + +Flag: A header_detected flag ensures that formatting is only applied to the first row + +**Handling Empty or Invalid Files:** + +Error handling remains in place for file not found and general exceptions. + +#Thank You \ No newline at end of file diff --git a/CSV to Excel/csv_excel.py b/CSV to Excel/csv_excel.py index 19fa8e11..4fca88ed 100644 --- a/CSV to Excel/csv_excel.py +++ b/CSV to Excel/csv_excel.py @@ -1,37 +1,62 @@ import openpyxl import os +from openpyxl.styles import Font, PatternFill # Get the CSV and Excel file names from the user -csv_name = input("Name of the input CSV file with extension: ") -sep = input("Separator of the CSV file: ") -excel_name = input("Name of the output excel file with extension: ") -sheet_name = input("Name of the output excel sheet: ") +csv_files = input("Enter the CSV files separated by commas (e.g., file1.csv, file2.csv): ").split(',') +sep = input("Separator of the CSV files (default is ','): ") or ',' # Default to comma separator if not provided +excel_name = input("Name of the output Excel file with extension: ") -# Load the CSV file +# Load or create Excel workbook if os.path.exists(excel_name): workbook = openpyxl.load_workbook(excel_name) - sheet = workbook[sheet_name] if sheet_name in workbook.sheetnames else workbook.create_sheet(sheet_name) else: workbook = openpyxl.Workbook() - sheet = workbook.active - sheet.title = sheet_name - -# Write the CSV data to the Excel sheet -try: - with open(csv_name, "r", encoding="utf-8") as file: - excel_row = 1 - for line in file: - data = line.strip().split(sep) - excel_column = 1 - for value in data: - sheet.cell(row=excel_row, column=excel_column, value=value) - excel_column += 1 - excel_row += 1 - - # Save the Excel file - workbook.save(excel_name) - -except FileNotFoundError: - print("Error: The CSV file was not found.") -except Exception as e: - print(f"An error occurred: {e}") \ No newline at end of file + +# Loop over multiple CSV files to write them into different sheets +for csv_name in csv_files: + csv_name = csv_name.strip() # Trim any whitespace + sheet_name = os.path.splitext(os.path.basename(csv_name))[0] # Sheet name based on the CSV filename + + # Create a new sheet for each CSV file + if sheet_name in workbook.sheetnames: + sheet = workbook[sheet_name] + else: + sheet = workbook.create_sheet(sheet_name) + + # Write CSV data to the Excel sheet + try: + with open(csv_name, "r", encoding="utf-8") as file: + excel_row = 1 + header_detected = False # Flag to check if header formatting should be applied + + for line in file: + data = line.strip().split(sep) + excel_column = 1 + + # Apply header formatting for the first row (headers) + if not header_detected: + for value in data: + cell = sheet.cell(row=excel_row, column=excel_column, value=value) + # Apply bold font and background color for the header row + cell.font = Font(bold=True) + cell.fill = PatternFill(start_color="FFFF00", end_color="FFFF00", fill_type="solid") + excel_column += 1 + header_detected = True # Mark the first row as header + else: + for value in data: + sheet.cell(row=excel_row, column=excel_column, value=value) + excel_column += 1 + + excel_row += 1 + + except FileNotFoundError: + print(f"Error: The CSV file '{csv_name}' was not found.") + except Exception as e: + print(f"An error occurred while processing {csv_name}: {e}") + +# Save the Excel file with all sheets +workbook.save(excel_name) + +print(f"All CSV files have been processed and saved to {excel_name}.") + diff --git a/Cafe Management System/README.md b/Cafe Management System/README.md index b5cf86ab..9589c958 100644 --- a/Cafe Management System/README.md +++ b/Cafe Management System/README.md @@ -1,6 +1,6 @@ # Cafe Management System - This is a cafe Management System Coded by Python using `tkinter` library. -- You need to install `Pillow`by entering `pip install Pillow`. +- You need to install `Pillow` by entering `pip install Pillow`. \ No newline at end of file diff --git a/Chess Board/ChessBoard.py b/Chess Board/ChessBoard.py index 3a7971d0..2c64f25c 100644 --- a/Chess Board/ChessBoard.py +++ b/Chess Board/ChessBoard.py @@ -1,20 +1,63 @@ import matplotlib.pyplot as plt import numpy as np -from matplotlib.colors import LogNorm +from matplotlib.patches import Rectangle -dx, dy = 0.015, 0.05 -#numpy.arange returns evenly spaced values within a given interval -x = np.arange(-04.0, 4.0, dx) -y = np.arange(-04.0, 4.0, dy) -#returns coordinate matrices from coordinate vectors -X, Y = np.meshgrid(x, y) +# Chess symbols for pieces (Unicode) +chess_pieces = { + "rook_white": "\u2656", + "rook_black": "\u265C", + "pawn_white": "\u2659", + "pawn_black": "\u265F", +} -extent = np.min(x), np.max(x), np.min(y), np.max(y) +# Initial piece positions for demonstration +initial_pieces = [ + (0, 0, chess_pieces["rook_black"]), + (0, 7, chess_pieces["rook_black"]), + (7, 0, chess_pieces["rook_white"]), + (7, 7, chess_pieces["rook_white"]), + (1, 0, chess_pieces["pawn_black"]), + (1, 7, chess_pieces["pawn_black"]), + (6, 0, chess_pieces["pawn_white"]), + (6, 7, chess_pieces["pawn_white"]), +] -Z1 = np.add.outer(range(8), range(8)) % 2 +# Function to draw the chessboard +def draw_chessboard(highlight_squares=None): + board_size = 8 + chessboard = np.add.outer(range(board_size), range(board_size)) % 2 -plt.imshow(Z1, cmap="binary_r", interpolation="nearest", extent = extent, alpha=1) + fig, ax = plt.subplots(figsize=(8, 8)) + ax.imshow(chessboard, cmap="cividis", interpolation="nearest") -plt.title("Chess Board", fontweight="bold") + # Remove axes for a cleaner look + ax.set_xticks([]) + ax.set_yticks([]) -plt.show() \ No newline at end of file + # Add grid lines to separate the squares + for i in range(board_size + 1): + ax.axhline(i - 0.5, color="black", linewidth=1, alpha=0.7) + ax.axvline(i - 0.5, color="black", linewidth=1, alpha=0.7) + + # Highlight specific squares + if highlight_squares: + for (row, col) in highlight_squares: + ax.add_patch(Rectangle((col - 0.5, row - 0.5), 1, 1, color="yellow", alpha=0.4)) + + # Add chess pieces + for row, col, piece in initial_pieces: + ax.text(col, row, piece, fontsize=28, ha="center", va="center", color="black" if (row + col) % 2 == 0 else "white") + + # Add coordinate labels + for i in range(board_size): + ax.text(-0.8, i, str(8 - i), fontsize=12, va="center") # Row labels + ax.text(i, 8 - 0.3, chr(65 + i), fontsize=12, ha="center") # Column labels + + # Title + ax.set_title("Chess Board", fontweight="bold", fontsize=16) + + plt.show() + +# Highlight squares (optional demo) +highlight = [(0, 0), (7, 7), (3, 3)] # Example of squares to highlight +draw_chessboard(highlight_squares=highlight) diff --git a/Chess Board/README.md b/Chess Board/README.md index 5b085375..b00c6b01 100644 --- a/Chess Board/README.md +++ b/Chess Board/README.md @@ -1,4 +1,4 @@ -This repository consists of a list of python scripts to automate few tasks. +This repository consists of a list of python scripts to automate a few tasks. You can contribute by adding more python scripts which can be used to automate things. Some of already done are listed below. Incase you have anything to be followed while executing the python script mention it as well diff --git a/Connect Four/README.md b/Connect Four/README.md new file mode 100644 index 00000000..622a49d8 --- /dev/null +++ b/Connect Four/README.md @@ -0,0 +1,37 @@ +# Connect Four +I have created the board game, "Connect Four", using the programming language Python. The entire project was created all on one file. This was a project I chose to develop during my spare time as this was not a common project constructed by other developers. The program follows all rules of the game, where players can win by either having 4 in a row horizontally, vertically, or diagonally. The dimensions for this particular game is a 6x7 board. In other words, the board is designed as 6 rows and 7 columns. Therefore, I initialized a nested list called board that contains the 7 columns as elements, and the 6 rows within each element. + +``` +board = [["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6] +``` + + +Determining the logic for a player to have 4 in a row diagonally proved to be the most challenging in my opinion. The best solution was to view this as positive and negative slopes since these diagonals were +either from the bottom left to top right, or the top left to bottom right. Afterwards, I created two separate boards to determine all possible coordinates that can be starting points to create 4 in a row as shown +in the table below: + +Note: The coordinate is [col, row] + +### Positive Slope Possible Starting Points +| | | | | | | | +|------------|------------|------------|------------|------------|------------|------------| +| 1.1 | 2.1 | 3.1 | 4.1 | 5.1 | 6.1 | 7.1 | +| 1.2 | 2.2 | 3.2 | 4.2 | 5.2 | 6.2 | 7.2 | +| 1.3 | 2.3 | 3.3 | 4.3 | 5.3 | 6.3 | 7.3 | +| 1.4 | 2.4 | 3.4 | 4.4 | 5.4 | 6.4 | 7.4 | +| 1.5 | 2.5 | 3.5 | 4.5 | 5.5 | 6.5 | 7.5 | +| 1.6 | 2.6 | 3.6 | 4.6 | 5.6 | 6.6 | 7.6 | + + +### Negative Slope Possible Starting Points +| | | | | | | | +|------------|------------|------------|------------|------------|------------|------------| +| 1.1 | 2.1 | 3.1 | 4.1 | 5.1 | 6.1 | 7.1 | +| 1.2 | 2.2 | 3.2 | 4.2 | 5.2 | 6.2 | 7.2 | +| 1.3 | 2.3 | 3.3 | 4.3 | 5.3 | 6.3 | 7.3 | +| 1.4 | 2.4 | 3.4 | 4.4 | 5.4 | 6.4 | 7.4 | +| 1.5 | 2.5 | 3.5 | 4.5 | 5.5 | 6.5 | 7.5 | +| 1.6 | 2.6 | 3.6 | 4.6 | 5.6 | 6.6 | 7.6 | + +What I noticed is the positive slope starting points are from rows 4-6 and columns 1-4, while the negatiive slope starting points are from rows 1-3 and columns 1-4. Therefore, each type of slope has its own +function and nested for loop that iterates through only the possible starting points. \ No newline at end of file diff --git a/Connect Four/connectfour.py b/Connect Four/connectfour.py new file mode 100644 index 00000000..c5fd146e --- /dev/null +++ b/Connect Four/connectfour.py @@ -0,0 +1,242 @@ +import random + +board = [["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6, ["-"] * 6] + + +def gamePlayTwoPlayers(p1, p2): + win = "" + while win == "": + column = int(input("{}'s turn. Enter which column you would like to drop your piece into: ".format(p1))) + connectFourBoard(column, "X") + + if check_vertical_win(p1, p2, column): + print() + print(check_vertical_win(p1, p2, column)) + break + if check_horizontal_win(p1, p2): + print() + print(check_horizontal_win(p1, p2)) + break + if check_positive_diagonal_win(p1, p2): + print() + print(check_positive_diagonal_win(p1, p2)) + break + if check_negative_diagonal_win(p1, p2): + print() + print(check_negative_diagonal_win(p1, p2)) + break + + column = int(input("{}'s turn. Enter which column you would like to drop your piece into: ".format(p2))) + connectFourBoard(column, "O") + + if check_vertical_win(p1, p2, column): + print() + print(check_vertical_win(p1, p2, column)) + break + if check_horizontal_win(p1, p2): + print() + print(check_horizontal_win("x", "O")) + break + if check_positive_diagonal_win(p1, p2): + print() + print(check_positive_diagonal_win(p1, p2)) + break + if check_negative_diagonal_win(p1, p2): + print() + print(check_negative_diagonal_win(p1, p2)) + break + + +def gamePlayOnePlayer(p1, p2): + win = "" + while win == "": + column = int(input("{}'s turn. Enter which column you would like to drop your piece into: ".format(p1))) + connectFourBoard(column, "X") + + if check_vertical_win(p1, p2, column): + print() + print(check_vertical_win(p1, p2, column)) + break + if check_horizontal_win(p1, p2): + print() + print(check_horizontal_win(p1, p2)) + break + if check_positive_diagonal_win(p1, p2): + print() + print(check_positive_diagonal_win(p1, p2)) + break + if check_negative_diagonal_win(p1, p2): + print() + print(check_negative_diagonal_win(p1, p2)) + break + + print() + + column = random.randint(1, 7) + connectFourBoard(column, "O") + + if check_vertical_win(p1, p2, column): + print() + print(check_vertical_win(p1, p2, column)) + break + if check_horizontal_win(p1, p2): + print() + print(check_horizontal_win(p1, p2)) + break + if check_positive_diagonal_win(p1, p2): + print() + print(check_positive_diagonal_win(p1, p2)) + break + if check_negative_diagonal_win(p1, p2): + print() + print(check_negative_diagonal_win(p1, p2)) + break + + +def connectFourBoard(col, playerIcon): + col -= 1 + coordinate = [] + + for row in range(len(board[col])-1, -1, -1): + if board[col][row] == "-": + board[col][row] = playerIcon + coordinate.append([row, col]) + break + for row in range(len(board)): + for col in range(len(board[row])): + print("|", board[row][col], "|", board[row+1][col], "|", board[row+2][col], "|", board[row+3][col], "|", + board[row+4][col], "|", board[row+5][col], "|", board[row+6][col], "|") + break + + +def check_vertical_win(p1, p2, col): + playerCount1 = 0 + playerCount2 = 0 + col -= 1 + + for row in range(len(board[col])-1, -1, -1): + if board[col][row] == "X": + playerCount1 += 1 + playerCount2 = 0 + elif board[col][row] == "O": + playerCount2 += 1 + playerCount1 = 0 + + if playerCount1 == 4: + return "{} Wins".format(p1) + elif playerCount2 == 4: + return "{} Wins".format(p2) + + +def check_horizontal_win(p1, p2): + for row in range(len(board[0])-1, -1, -1): + playerCount1 = 0 + playerCount2 = 0 + for col in range(len(board)): + if board[col][row] == "X": + playerCount1 += 1 + playerCount2 = 0 + elif board[col][row] == "O": + playerCount2 += 1 + playerCount1 = 0 + elif board[col][row] == "-": + playerCount1 = 0 + playerCount2 = 0 + + if playerCount1 == 4: + return "{} Wins".format(p1) + elif playerCount2 == 4: + return "{} Wins".format(p2) + + +def check_positive_diagonal_win(p1, p2): + playerCount1 = 0 + playerCount2 = 0 + + for row in range(len(board[0])-1, -1, -1): + for col in range(len(board)-3): + if board[col][row] == "X": + playerCount1 += 1 + while playerCount1 < 4: + col += 1 + row -= 1 + if board[col][row] == "X": + playerCount1 += 1 + else: + playerCount1 = 0 + break + elif board[col][row] == "O": + playerCount1 += 1 + while playerCount1 < 4: + col += 1 + row -= 1 + if board[col][row] == "O": + playerCount1 += 1 + else: + playerCount1 = 0 + break + + if playerCount1 == 4: + return "{} Wins".format(p1) + elif playerCount2 == 4: + return "{} Wins".format(p2) + else: + playerCount1 = 0 + playerCount2 = 0 + + +def check_negative_diagonal_win(p1, p2): + playerCount1 = 0 + playerCount2 = 0 + + for row in range(len(board[0])-3): + for col in range(len(board)-3): + if board[col][row] == "X": + playerCount1 += 1 + while playerCount1 < 4: + col += 1 + row -= 1 + if board[col][row] == "X": + playerCount1 += 1 + else: + playerCount1 = 0 + break + elif board[col][row] == "O": + playerCount1 += 1 + while playerCount1 < 4: + col += 1 + row += 1 + if board[col][row] == "O": + playerCount1 += 1 + else: + playerCount1 = 0 + break + + if playerCount1 == 4: + return "{} Wins".format(p1) + elif playerCount2 == 4: + return "{} Wins".format(p2) + else: + playerCount1 = 0 + playerCount2 = 0 + + +def main(): + print("Welcome to Connect Four! Connect 4 of your pieces in either horizontal, vertical, or diagonal to win.") + + numPlayers = int(input("Choose how many players: ")) + + while numPlayers not in [1,2]: + numPlayers = int(input("Sorry for the value you entered was invalid. Are you playing with 1 or 2 players: ")) + + if numPlayers == 1: + player1 = input("Player 1, please enter your name: ") + player2 = "CPU" + gamePlayTwoPlayers(player1, player2) + elif numPlayers == 2: + player1 = input("Player 1, please enter your name: ") + player2 = input("Player 2, please enter your name: ") + gamePlayTwoPlayers(player1, player2) + + +main() \ No newline at end of file diff --git a/Contributions.md b/Contributions.md deleted file mode 100644 index c12a00f8..00000000 --- a/Contributions.md +++ /dev/null @@ -1,94 +0,0 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue, with the maintainers of this repository before making a change. - -First time contributers can refer to various resources on how -to make their first contribution, one which we would refer is [this.][first] - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull Request Process - -1. Create an issue and fork the repository, add a new folder with a name that describes your script in short. You'll place your Python script(s) in there. -2. Add a `README.md` in that file which explains your script -and any prerequisites it may have. -3. Update the main `README.md`, adding your script to the List of Scripts in Repo, providing the script's name, a link to it, and a brief description. -4. Mention the issue you made in 1) in your Pull Request, which will be then verified and merged accordingly. -5. Ensure any install or build dependencies are removed before the end of the layer when doing a build. - ---- -## Code of Conduct - -### Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -### Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -### Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -### Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -### Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at [INSERT EMAIL ADDRESS]. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -### Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available [here.][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ -[first]: https://dev.to/diballesteros/step-by-step-guide-for-the-first-time-open-source-contribution-48bo diff --git a/Currency Script/.idea/.gitignore b/Currency Script/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/Currency Script/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/Currency Script/.idea/Currency Script.iml b/Currency Script/.idea/Currency Script.iml new file mode 100644 index 00000000..f552a87a --- /dev/null +++ b/Currency Script/.idea/Currency Script.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Currency Script/.idea/inspectionProfiles/Project_Default.xml b/Currency Script/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..c48cec66 --- /dev/null +++ b/Currency Script/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/Currency Script/.idea/inspectionProfiles/profiles_settings.xml b/Currency Script/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/Currency Script/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/Currency Script/.idea/misc.xml b/Currency Script/.idea/misc.xml new file mode 100644 index 00000000..84dd86c7 --- /dev/null +++ b/Currency Script/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Currency Script/.idea/modules.xml b/Currency Script/.idea/modules.xml new file mode 100644 index 00000000..ff381672 --- /dev/null +++ b/Currency Script/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Currency Script/.idea/vcs.xml b/Currency Script/.idea/vcs.xml new file mode 100644 index 00000000..6c0b8635 --- /dev/null +++ b/Currency Script/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Currency Script/currency.py b/Currency Script/currency.py deleted file mode 100644 index 66258ca0..00000000 --- a/Currency Script/currency.py +++ /dev/null @@ -1,37 +0,0 @@ -# Python program to convert the currency -# of one country to that of another country - -# Import the modules needed -import requests - -class Currency_convertor: - # empty dict to store the conversion rates - rates = {} - def __init__(self, url): - data = requests.get(url).json() - - # Extracting only the rates from the json data - self.rates = data["rates"] - - # function to do a simple cross multiplication between - # the amount and the conversion rates - def convert(self, from_currency, to_currency, amount): - initial_amount = amount - if from_currency != 'EUR' : - amount = amount / self.rates[from_currency] - - # limiting the precision to 2 decimal places - amount = round(amount * self.rates[to_currency], 2) - print('{} {} = {} {}'.format(initial_amount, from_currency, amount, to_currency)) - -# Driver code -if __name__ == "__main__": - - # YOUR_ACCESS_KEY = 'GET YOUR ACCESS KEY FROM fixer.io' - url = str.__add__('http://data.fixer.io/api/latest?access_key=', YOUR_ACCESS_KEY) - c = Currency_convertor(url) - from_country = input("From Country: ") - to_country = input("TO Country: ") - amount = int(input("Amount: ")) - - c.convert(from_country, to_country, amount) diff --git a/Currency Script/currency_calculator.py b/Currency Script/currency_calculator.py deleted file mode 100644 index 05f294fb..00000000 --- a/Currency Script/currency_calculator.py +++ /dev/null @@ -1,37 +0,0 @@ -from locale import currency -import requests -import json - -currency = input().lower() -cache = {} - -while True: - - currency_exch = input().lower() - - if currency_exch == '': - break - - amount_to_exch = int(input()) - - URL = f'http://www.floatrates.com/daily/{currency}.json' - - exch = json.loads(requests.get(URL).text) - - if currency == 'usd': - cache.update(eur=exch['eur']['rate']) - elif currency == 'eur': - cache.update(usd=exch['usd']['rate']) - else: - cache.update(usd=exch['usd']['rate'], eur=exch['eur']['rate']) - - print("Checking the cache...") - if currency_exch in cache: - rate = round(amount_to_exch * cache[currency_exch], 2) - print("Oh! It is in the cache!") - print(f"You received {rate} {currency_exch.upper()}.") - else: - #print("Sorry, but it is not in the cache!") - cache[currency_exch] = exch[currency_exch]['rate'] - rate = round(amount_to_exch * cache[currency_exch], 2) - print(f"You received {rate} {currency_exch.upper()}.") diff --git a/Currency Script/main.py b/Currency Script/main.py new file mode 100644 index 00000000..ed705b92 --- /dev/null +++ b/Currency Script/main.py @@ -0,0 +1,2 @@ +# TODO IMPORT API / CONVERTER / CURRENCY MODULES +# TODO UPDATE / POPULATE MAIN TO ENSURE THERE IS A INTUITIVE SIMPLE UI \ No newline at end of file diff --git a/Currency Script/readme.txt b/Currency Script/readme.txt new file mode 100644 index 00000000..3202240d --- /dev/null +++ b/Currency Script/readme.txt @@ -0,0 +1 @@ +# TODO - UPDATE README \ No newline at end of file diff --git a/Currency Script/requirements.txt b/Currency Script/requirements.txt new file mode 100644 index 00000000..ef92400b --- /dev/null +++ b/Currency Script/requirements.txt @@ -0,0 +1 @@ +# TODO - UPDATE REQUIREMENTS TO NOTE INSTALLS ARE NOTED \ No newline at end of file diff --git a/Currency Script/setup.py b/Currency Script/setup.py new file mode 100644 index 00000000..d1322786 --- /dev/null +++ b/Currency Script/setup.py @@ -0,0 +1 @@ +# UPDATE SETUP TO NOTE SET UP / PACKAGES \ No newline at end of file diff --git a/Currency Script/src/__init__.py b/Currency Script/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/Currency Script/src/api_handler.py b/Currency Script/src/api_handler.py new file mode 100644 index 00000000..226c88d8 --- /dev/null +++ b/Currency Script/src/api_handler.py @@ -0,0 +1,18 @@ +import requests +import json + +def get_exchange_data(api_url: str = "https://theratesapi.com/api/latest/") -> dict: + """Fetch latest exchange data from the API.""" + response = requests.get(api_url) + if response.status_code != 200: + raise Exception(f"API request failed with status {response.status_code}") + + data = response.json() + return data # This includes 'base', 'date', and 'rates' + +# NOTE - for logging & debugging +if __name__ == "__main__": + exchange_data = get_exchange_data() + print("Base currency:", exchange_data["base"]) + print("Date:", exchange_data["date"]) + print("Rates:", list(exchange_data["rates"].items())[:5]) diff --git a/Currency Script/src/converter.py b/Currency Script/src/converter.py new file mode 100644 index 00000000..fbcc0274 --- /dev/null +++ b/Currency Script/src/converter.py @@ -0,0 +1,39 @@ +# TODO REVIEW AND ENSURE THE PURPOSE OF THIS MODULE IS TO CONVERT +# Python program to convert the currency +# of one country to that of another country + +# Import the modules needed +import requests + +class Currency_convertor: + # empty dict to store the conversion rates + rates = {} + + def __init__(self, url): + data = requests.get(url).json() + # Extracting only the rates from the json data + self.rates = data["rates"] + + # function to do a simple cross multiplication between + # the amount and the conversion rates + def convert(self, from_currency, to_currency, amount): + initial_amount = amount + if from_currency != 'EUR': + amount = amount / self.rates[from_currency] + + # limiting the precision to 2 decimal places + amount = round(amount * self.rates[to_currency], 2) + print('{} {} = {} {}'.format(initial_amount, from_currency, amount, to_currency)) + +# Driver code +if __name__ == "__main__": + + YOUR_ACCESS_KEY = 'YOUR_ACCESS_KEY_HERE' # Define your access key + url = f'http://data.fixer.io/api/latest?access_key={YOUR_ACCESS_KEY}' # Use f-string for cleaner concatenation + c = Currency_convertor(url) + + from_country = input("From Country (currency code): ") + to_country = input("To Country (currency code): ") + amount = float(input("Amount: ")) # Use float for decimal support + + c.convert(from_country, to_country, amount) diff --git a/Currency Script/src/currencies.py b/Currency Script/src/currencies.py new file mode 100644 index 00000000..409605f7 --- /dev/null +++ b/Currency Script/src/currencies.py @@ -0,0 +1,56 @@ +# TODO REVIEW BELOW CODE TO ENSURE THAT WHAT IS IN THIS MODULE FOR FUNCTION RECALLING CURRENCY FROM API +# Importing necessary modules for currency formatting and HTTP requests +from locale import currency +import requests +import json + +# Get the base currency input from the user and convert it to lowercase +currency = input("Enter the base currency (e.g., USD, EUR): ").lower() + +# Initialize an empty cache to store exchange rates +cache = {} + +# Infinite loop to process exchange requests until the user exits +while True: + + # Get the target currency input from the user and convert it to lowercase + currency_exch = input("Enter the currency to exchange to (leave blank to exit): ").lower() + + # If the input is blank, break out of the loop (exit condition) + if currency_exch == '': + break + + # Get the amount to exchange from the user + amount_to_exch = int(input("Enter the amount to exchange: ")) + + # URL for getting exchange rates from floatrates.com + URL = f'http://www.floatrates.com/daily/{currency}.json' + + # Fetch the exchange rates in JSON format + exch = json.loads(requests.get(URL).text) + + # Update cache for USD and EUR based on the base currency + if currency == 'usd': + # If base currency is USD, cache EUR rate + cache.update(eur=exch['eur']['rate']) + elif currency == 'eur': + # If base currency is EUR, cache USD rate + cache.update(usd=exch['usd']['rate']) + else: + # For other base currencies, cache both USD and EUR rates + cache.update(usd=exch['usd']['rate'], eur=exch['eur']['rate']) + + print("Checking the cache...") + + # Check if the target currency's rate is in the cache + if currency_exch in cache: + # If the rate is in the cache, calculate the exchanged amount + rate = round(amount_to_exch * cache[currency_exch], 2) + print("Oh! It is in the cache!") + print(f"You received {rate} {currency_exch.upper()}.") + else: + # If the rate is not in the cache, fetch it from the exchange rates and store it in cache + print("Sorry, but it is not in the cache!") + cache[currency_exch] = exch[currency_exch]['rate'] + rate = round(amount_to_exch * cache[currency_exch], 2) + print(f"You received {rate} {currency_exch.upper()}.") diff --git a/Distance Calculator/README.md b/Distance Calculator/README.md new file mode 100644 index 00000000..4d00f8b1 --- /dev/null +++ b/Distance Calculator/README.md @@ -0,0 +1,14 @@ +# Program +This is a *distance calculator*, used to calculate the distance between two points on a 2D plane. + +# How to use + +## Use any of the following commands - +`python distance_calculator.py` + +`python3 distance_calculator.py` + +## Example +![image](https://github.com/user-attachments/assets/987537c2-236e-4560-9a06-3de4bbe98f5e) + +Made by Mathdallas_code(me) diff --git a/Distance Calculator/distance_calculator.py b/Distance Calculator/distance_calculator.py new file mode 100644 index 00000000..b5b393c8 --- /dev/null +++ b/Distance Calculator/distance_calculator.py @@ -0,0 +1,71 @@ +# Uses the pythagorean theorem to calculate the distance between two points on a 2D plane. +# The points are represented as tuples of two numbers. +# The function should return a float. + +# Sample :- startX = 0, startY = 0, endX = 3, endY = 4. +# So, according to pythagorean theorem, the distance between these two points is 5.0. + +# Hope this helps! + +# Importing module(s) +import math + +# Main loop +while True: + use_program=input("Do you want to calculate the distance between two points? (yes/no): ") + if use_program.lower() == "yes": + pass + elif use_program.lower() == "no": + print("Thank you for using the distance calculator!") + quit() + else: + print("Invalid input! Please enter 'yes' or 'no'.") + continue + + # Input validation for startX, startY, endX, endY + + # startX + while True: + startX = input("Enter starting x-coordinate: ") + if not startX.isnumeric(): + print("Error! Input has to be a number!") + continue + else: + break + + # startY + while True: + startY = input("Enter starting y-coordinate: ") + if not startY.isnumeric(): + print("Error! Input has to be a number!") + continue + else: + break + + # endX + while True: + endX = input("Enter ending x-coordinate: ") + if not endX.isnumeric(): + print("Error! Input has to be a number!") + continue + else: + break + + # endY + while True: + endY = input("Enter ending y-coordinate: ") + if not endY.isnumeric(): + print("Error! Input has to be a number!") + continue + else: + break + + # Converting the values to floats + startX = float(startX) + startY = float(startY) + endX = float(endX) + endY = float(endY) + + # The calculation + distance = math.sqrt(math.pow(startX - endX, 2) + math.pow(startY - endY, 2)) + print(f"The distance between ({startX}, {startY}) and ({endX}, {endY}) is {distance} units.") diff --git a/Duplicate Finder/Readme.md b/Duplicate Finder/Readme.md index 14055ffb..aae927f7 100644 --- a/Duplicate Finder/Readme.md +++ b/Duplicate Finder/Readme.md @@ -33,4 +33,17 @@ Always backup your data before using scripts that modify files. The author is no - \ No newline at end of file + + + +# KEY MODIFICATIONS + +File Type Filtering: + +Added an input prompt to specify file extensions for filtering. +Modified the find_duplicates function to only consider files with the specified extensions. + +Generate Report: + +Added a new generate_report function that creates a JSON report of duplicate files. +Added the option for the user to choose to generate a report instead of deleting or moving files. \ No newline at end of file diff --git a/Duplicate Finder/duplicate-finder.py b/Duplicate Finder/duplicate-finder.py index 47d7bb7e..f36fa390 100644 --- a/Duplicate Finder/duplicate-finder.py +++ b/Duplicate Finder/duplicate-finder.py @@ -1,5 +1,6 @@ import os import hashlib +import json # Import for generating reports def get_file_hash(filepath): """Return the MD5 hash of a file.""" @@ -9,13 +10,16 @@ def get_file_hash(filepath): hasher.update(buf) return hasher.hexdigest() -def find_duplicates(directory, min_size=0): - """Find duplicate files in a directory.""" +def find_duplicates(directory, min_size=0, file_extensions=None): + """Find duplicate files in a directory, with optional file type filtering.""" hashes = {} duplicates = {} for dirpath, dirnames, filenames in os.walk(directory): for filename in filenames: + if file_extensions and not filename.lower().endswith(tuple(file_extensions)): + continue # Skip files that don't match the extensions + filepath = os.path.join(dirpath, filename) if os.path.getsize(filepath) >= min_size: file_hash = get_file_hash(filepath) @@ -29,11 +33,20 @@ def find_duplicates(directory, min_size=0): return {k: v for k, v in duplicates.items() if len(v) > 1} +def generate_report(duplicates, report_path): + """Generate a report of duplicate files in JSON format.""" + with open(report_path, 'w') as report_file: + json.dump(duplicates, report_file, indent=4) + print(f"Report generated: {report_path}") + def main(): directory = input("Enter the directory to scan for duplicates: ") min_size = int(input("Enter the minimum file size to consider (in bytes, default is 0): ") or "0") - duplicates = find_duplicates(directory, min_size) + file_type_input = input("Enter the file extensions to check (comma-separated, e.g. .jpg,.png), or press Enter to check all: ") + file_extensions = [ext.strip().lower() for ext in file_type_input.split(",")] if file_type_input else None + + duplicates = find_duplicates(directory, min_size, file_extensions) if not duplicates: print("No duplicates found.") @@ -45,7 +58,7 @@ def main(): print(path) print("------") - action = input("\nChoose an action: (D)elete, (M)ove, (N)o action: ").lower() + action = input("\nChoose an action: (D)elete, (M)ove, (R)eport, (N)o action: ").lower() if action == "d": for _, paths in duplicates.items(): @@ -64,6 +77,10 @@ def main(): os.rename(path, target_path) print(f"Moved {path} to {target_path}") + elif action == "r": + report_path = input("Enter the path to save the report (e.g., duplicates_report.json): ") + generate_report(duplicates, report_path) + else: print("No action taken.") diff --git a/Expense Tracker/Expense Tracker.db b/Expense Tracker/Expense Tracker.db new file mode 100644 index 00000000..fe88adda Binary files /dev/null and b/Expense Tracker/Expense Tracker.db differ diff --git a/Expense Tracker/README.md b/Expense Tracker/README.md index 29d399b5..920b6aa7 100644 --- a/Expense Tracker/README.md +++ b/Expense Tracker/README.md @@ -7,6 +7,7 @@ Install the required dependencies using pip: ``` pip install -r requirements.txt ``` +or you can manually install single Library. Run the expense.py file to start the bot: diff --git a/Expense Tracker/expense.py b/Expense Tracker/expense.py index 56be5299..c6d21136 100644 --- a/Expense Tracker/expense.py +++ b/Expense Tracker/expense.py @@ -1,50 +1,294 @@ +import datetime +import sqlite3 +from tkcalendar import DateEntry +from tkinter import * +import tkinter.messagebox as tb +import tkinter.ttk as ttk + +# Functions +def list_all_expenses(): + global connector, table + + table.delete(*table.get_children()) + + all_data = connector.execute('SELECT * FROM ExpenseTracker') + data = all_data.fetchall() + + for values in data: + table.insert('', END, values=values) + +def clear_fields(): + global Desc, payee, amnt, MoP, date, table + + today_date = datetime.datetime.now().date() + + Desc.set('') ; payee.set('') ; amnt.set(0.0) ; MoP.set('Cash'), date.set_date(today_date) + table.selection_remove(*table.selection()) + +def remove_expense(): + if not table.selection(): + tb.showerror('No record selected!', 'Please select a record to delete!') + return + + current_selected_expense = table.item(table.focus()) + values_selected = current_selected_expense['values'] + + surety = tb.askyesno('Are you sure?', f'Are you sure that you want to delete the record of {values_selected[2]}') + + if surety: + connector.execute('DELETE FROM ExpenseTracker WHERE ID=%d' % values_selected[0]) + connector.commit() + + list_all_expenses() + tb.showinfo('Record deleted successfully!', 'The record you wanted to delete has been deleted successfully') + +def remove_all_expenses(): + surety = tb.askyesno('Are you sure?', 'Are you sure that you want to delete all the expense items from the database?', icon='warning') + + if surety: + table.delete(*table.get_children()) + + connector.execute('DELETE FROM ExpenseTracker') + connector.commit() + + clear_fields() + list_all_expenses() + tb.showinfo('All Expenses deleted', 'All the expenses were successfully deleted') + else: + tb.showinfo('Ok then', 'The task was aborted and no expense was deleted!') + +def search_expenses(search_term): + """ + Search and display expenses based on a search term in any column. + """ + global table + table.delete(*table.get_children()) + + query = f""" + SELECT * FROM ExpenseTracker WHERE + Date LIKE ? OR + Payee LIKE ? OR + Description LIKE ? OR + Amount LIKE ? OR + ModeOfPayment LIKE ?; + """ + search_param = f"%{search_term}%" + results = connector.execute(query, (search_param,) * 5) + + for data in results.fetchall(): + table.insert('', END, values=data) + + +def filter_expenses_by_date(date_from, date_to): + """ + Filter and display expenses based on a date range. + """ + global table + table.delete(*table.get_children()) + + query = """ + SELECT * FROM ExpenseTracker WHERE Date BETWEEN ? AND ?; + """ + results = connector.execute(query, (date_from, date_to)) + + for data in results.fetchall(): + table.insert('', END, values=data) + + +def sort_expenses(column, order): + """ + Sort expenses by a column in ascending or descending order. + """ + global table + table.delete(*table.get_children()) + + query = f"SELECT * FROM ExpenseTracker ORDER BY {column} {order};" + results = connector.execute(query) + + for data in results.fetchall(): + table.insert('', END, values=data) + + + +def add_another_expense(): + global date, payee, Desc, amnt, MoP + global connector + + if not date.get() or not payee.get() or not Desc.get() or not amnt.get() or not MoP.get(): + tb.showerror('Fields empty!', "Please fill all the missing fields before pressing the add button!") + else: + connector.execute( + 'INSERT INTO ExpenseTracker (Date, Payee, Description, Amount, ModeOfPayment) VALUES (?, ?, ?, ?, ?)', + (date.get_date(), payee.get(), Desc.get(), amnt.get(), MoP.get()) + ) + connector.commit() + + clear_fields() + list_all_expenses() + tb.showinfo('Expense added', 'The expense whose details you just entered has been added to the database') + +def expense_to_words_before_adding(): + global date, Desc, amnt, payee, MoP + + if not date or not Desc or not amnt or not payee or not MoP: + tb.showerror('Incomplete data', 'The data is incomplete, meaning fill all the fields first!') + + message = f'Your expense can be read like: \n"You paid {amnt.get()} to {payee.get()} for {Desc.get()} on {date.get_date()} via {MoP.get()}"' + + add_question = tb.askyesno('Read your record like: ', f'{message}\n\nShould I add it to the database?') + + if add_question: + add_another_expense() + else: + tb.showinfo('Ok', 'Please take your time to add this record') + +# Connecting to the Database +connector = sqlite3.connect("Expense Tracker.db") +cursor = connector.cursor() + +connector.execute( + 'CREATE TABLE IF NOT EXISTS ExpenseTracker (ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Date DATETIME, Payee TEXT, Description TEXT, Amount FLOAT, ModeOfPayment TEXT)' +) +connector.commit() + +# Backgrounds and Fonts +dataentery_frame_bg = 'light blue' +buttons_frame_bg = 'tomato' +hlb_btn_bg = 'Indianred' + +lbl_font = ('Georgia', 13) +entry_font = 'Times 13 bold' +btn_font = ('Gill Sans MT', 13) + +# Initializing the GUI window +root = Tk() +root.title('DebEx') +root.geometry('1200x550') +root.resizable(0, 0) + +Label(root, text='DebEx', font=('white', 21, 'bold'), bg=hlb_btn_bg).pack(side=TOP, fill=X) + +# StringVar and DoubleVar variables +Desc = StringVar() +amnt = DoubleVar() +payee = StringVar() +MoP = StringVar(value='Cash') + +# Frames +data_entry_frame = Frame(root, bg=dataentery_frame_bg) +data_entry_frame.place(x=0, y=35, relheight=0.95, relwidth=0.25) + +buttons_frame = Frame(root, bg=buttons_frame_bg) +buttons_frame.place(relx=0.25, rely=0.063, relwidth=0.75, relheight=0.12) + +tree_frame = Frame(root) +tree_frame.place(relx=0.25, rely=0.18, relwidth=0.75, relheight=0.8) + +# Data Entry Frame +Label(data_entry_frame, text='Date (M/DD/YY) :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=50) +date = DateEntry(data_entry_frame, date=datetime.datetime.now().date(), font=entry_font) +date.place(x=160, y=50) + +Label(data_entry_frame, text='Payee\t :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=230) +Entry(data_entry_frame, font=entry_font, width=31, text=payee).place(x=10, y=260) + +Label(data_entry_frame, text='Description :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=100) +Entry(data_entry_frame, font=entry_font, width=31, text=Desc).place(x=10, y=130) + +Label(data_entry_frame, text='Amount\t :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=180) +Entry(data_entry_frame, font=entry_font, width=14, text=amnt).place(x=160, y=180) + +Label(data_entry_frame, text='Mode of Payment:', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=310) +dd1 = OptionMenu(data_entry_frame, MoP, *['Cash', 'Cheque', 'Credit Card', 'Debit Card', 'Paytm', 'Google Pay', 'Razorpay']) +dd1.place(x=160, y=305) ; dd1.configure(width=10, font=entry_font) + +Button(data_entry_frame, text='Add expense', command=add_another_expense, font=btn_font, width=30, + bg=hlb_btn_bg).place(x=10, y=395) + +# Buttons' Frame +Button(buttons_frame, text='Delete Expense', font=btn_font, width=25, bg=hlb_btn_bg, command=remove_expense).place(x=30, y=5) + +Button(buttons_frame, text='Clear Fields in DataEntry Frame', font=btn_font, width=25, bg=hlb_btn_bg, + command=clear_fields).place(x=335, y=5) + +Button(buttons_frame, text='Delete All Expenses', font=btn_font, width=25, bg=hlb_btn_bg, command=remove_all_expenses).place(x=640, y=5) + import csv -import os +from tkinter.filedialog import asksaveasfilename + -CSV_FILE = "expenses.csv" +def export_to_csv(): + """ + Export the table data to a CSV file. + """ + data = connector.execute('SELECT * FROM ExpenseTracker').fetchall() + if not data: + tb.showerror("Export Failed", "No expenses to export!") + return -def initialize_csv(): - if not os.path.exists(CSV_FILE): - with open(CSV_FILE, "w", newline="") as file: + save_file_path = asksaveasfilename( + defaultextension=".csv", + filetypes=[("CSV files", "*.csv"), ("All files", "*.*")], + title="Save As" + ) + + if save_file_path: + with open(save_file_path, mode='w', newline='') as file: writer = csv.writer(file) - writer.writerow(["Date", "Description", "Amount"]) + # Write the header + writer.writerow(['ID', 'Date', 'Payee', 'Description', 'Amount', 'Mode of Payment']) + # Write the data + writer.writerows(data) + + tb.showinfo("Export Successful", f"Expenses exported to {save_file_path}") + + +filter_frame = Frame(root, bg="light gray") +filter_frame.place(x=10, y=500, width=1165, height=35) + +Label(filter_frame, text="Date From:", font=("Georgia", 10), bg="light gray").place(x=10, y=5) +date_from = DateEntry(filter_frame, date=datetime.datetime.now().date(), width=10) +date_from.place(x=90, y=5) + +Label(filter_frame, text="Date To:", font=("Georgia", 10), bg="light gray").place(x=200, y=5) +date_to = DateEntry(filter_frame, date=datetime.datetime.now().date(), width=10) +date_to.place(x=270, y=5) -def add_expense(date, description, amount): - with open(CSV_FILE, "a", newline="") as file: - writer = csv.writer(file) - writer.writerow([date, description, amount]) +Button(filter_frame, text="Filter", font=('Gill Sans MT', 10), width=10, bg=hlb_btn_bg, + command=lambda: filter_expenses_by_date(date_from.get_date(), date_to.get_date())).place(x=400, y=3) -def view_expenses(): - with open(CSV_FILE, "r") as file: - reader = csv.reader(file) - for row in reader: - print(", ".join(row)) +Button(filter_frame, text="Export to CSV", font=('Gill Sans MT', 10), width=15, bg=hlb_btn_bg, + command=export_to_csv).place(x=500, y=3) -if __name__ == "__main__": - initialize_csv() - while True: - print("\nExpense Tracker Menu:") - print("1. Add Expense") - print("2. View Expenses") - print("3. Exit") +# Treeview Frame +table = ttk.Treeview(tree_frame, selectmode=BROWSE, columns=('ID', 'Date', 'Payee', 'Description', 'Amount', 'Mode of Payment')) - choice = input("Enter your choice: ") +X_Scroller = Scrollbar(table, orient=HORIZONTAL, command=table.xview) +Y_Scroller = Scrollbar(table, orient=VERTICAL, command=table.yview) +X_Scroller.pack(side=BOTTOM, fill=X) +Y_Scroller.pack(side=RIGHT, fill=Y) - if choice == "1": - date = input("Enter the date (YYYY-MM-DD): ") - description = input("Enter the description: ") - amount = input("Enter the amount: ") +table.config(yscrollcommand=Y_Scroller.set, xscrollcommand=X_Scroller.set) - add_expense(date, description, amount) - print("Expense added successfully!") +table.heading('ID', text='S No.', anchor=CENTER) +table.heading('Date', text='Date', anchor=CENTER) +table.heading('Payee', text='Payee', anchor=CENTER) +table.heading('Description', text='Description', anchor=CENTER) +table.heading('Amount', text='Amount', anchor=CENTER) +table.heading('Mode of Payment', text='Mode of Payment', anchor=CENTER) - elif choice == "2": - print("Expenses:") - view_expenses() +table.column('#0', width=0, stretch=NO) +table.column('#1', width=50, stretch=NO) +table.column('#2', width=95, stretch=NO) # Date column +table.column('#3', width=150, stretch=NO) # Payee column +table.column('#4', width=325, stretch=NO) # Title column +table.column('#5', width=135, stretch=NO) # Amount column +table.column('#6', width=125, stretch=NO) # Mode of Payment column - elif choice == "3": - break +table.place(relx=0, y=0, relheight=1, relwidth=1) - else: - print("Invalid choice. Please try again.") +list_all_expenses() +# Finalizing the GUI window +root.update() +root.mainloop() diff --git a/Expense Tracker/requirements.txt b/Expense Tracker/requirements.txt index 8d34d431..324f637a 100644 --- a/Expense Tracker/requirements.txt +++ b/Expense Tracker/requirements.txt @@ -1,2 +1,4 @@ -csv -os +datetime +sqlite3 +tkcalendar +tkinter \ No newline at end of file diff --git a/Face Reaction/README.md b/Face Reaction/README.md new file mode 100644 index 00000000..36b74c4e --- /dev/null +++ b/Face Reaction/README.md @@ -0,0 +1,79 @@ + +# Face Reaction with Custom Emojis and Emotion History + +This project uses OpenCV and FER (Facial Expression Recognition) to capture live video from the webcam, detect facial expressions in real time, and display corresponding emoji images for each detected emotion. Additionally, this enhanced version features custom emoji support and emotion detection history tracking, which provides a list of recently detected emotions. + + + + +## Acknowledgements + + We would like to express our sincere gratitude to the following: + +OpenCV for providing powerful tools for computer vision, enabling us to process real-time video feeds with ease. + +FER (Facial Expression Recognition) for simplifying the process of emotion detection with advanced facial expression recognition algorithms. + +The open-source community for providing constant support, knowledge, and resources that have helped improve and evolve this project. + +Contributors to this repository for their efforts in enhancing the functionality and maintaining the quality of the code. + +Special thanks to all the libraries, frameworks, and developers whose work has made this project possible! + + +## Features Added to Project + +Real-Time Emotion Detection: + +The system detects emotions such as angry, happy, sad, surprise, and more in real time using the FER library. +Custom Emojis: + +Users can provide their own custom emoji images to represent emotions. +Emotion Detection History: + +The program keeps track of the last 10 detected emotions and displays them on the screen, allowing users to see the emotion flow during the session. +Smooth Emoji Overlay: + +The corresponding emoji for the detected emotion is displayed on the video feed in a designated corner of the screen. +## Prerequisites + +Ensure that you have the following installed before running the script: + +Python 3.x +OpenCV +Numpy +FER (Facial Expression Recognition) + +You can install the required libraries by running: +pip install opencv-python numpy fer + + +## How to Run + +Clone the Repository : + +git clone https://github.com/your-repo/face-reaction.git + +Run the Python script: + +python face_reaction.py + + +## Custom Emoji Support + +To add your custom emoji, replace the URLs or paths in the script with the path to your custom emoji image files. The supported emotions include angry, happy, sad, disgust, fear, surprise, and neutral. + + +## Code Explanation + +Emotion Detection: The FER library is used to detect the dominant emotion in the video frame, with the highest probability score. + +Custom Emoji Overlay: Based on the detected emotion, the corresponding emoji image is resized and overlaid on the video feed. + +Emotion History: The recent emotions are displayed at the top-left corner of the video frame, showing the last 10 detected emotions during the session. + + +## Future Improvements + +Support for additional facial expressions. +Integration with cloud services for storing emotion history. \ No newline at end of file diff --git a/Face Reaction/app.py b/Face Reaction/app.py index 27357872..166252b1 100644 --- a/Face Reaction/app.py +++ b/Face Reaction/app.py @@ -1,43 +1,72 @@ import cv2 import numpy as np from fer import FER +import os +import json -scr = cv2.VideoCapture(0) #30fps +# Load custom emojis from a config file (custom_emojis.json) +def load_custom_emojis(config_file='custom_emojis.json'): + if os.path.exists(config_file): + with open(config_file, 'r') as file: + return json.load(file) + return {} + +# Save the emotion detection history +def save_emotion_history(history, filename='emotion_history.txt'): + with open(filename, 'a') as file: + for emotion in history: + file.write(f"{emotion}\n") + +# Initialize the webcam +scr = cv2.VideoCapture(0) # 30fps scr.set(3, 640) scr.set(4, 480) -#init FRE (Facial expression recognition from images) +# Initialize FER (Facial Expression Recognition) detector = FER(mtcnn=True) -while True: +# Load custom emojis +custom_emojis = load_custom_emojis() - ret,frame = scr.read() - # frame = cv2.flip(frame,1) +# Initialize emotion detection history +emotion_history = [] - #return emotion name and % of true detection +while True: + ret, frame = scr.read() + + # Return emotion name and % of true detection emotion, score = detector.top_emotion(frame) - print(emotion,score) - if emotion == 'angry': - emoj = cv2.imread('https://i.ibb.co/QN0gqNH/angry.png') - elif emotion == 'disgust': - emoj = cv2.imread('https://i.ibb.co/tJDxrhD/disgust.png') - elif emotion == 'fear': - emoj = cv2.imread('https://i.ibb.co/yBczSFB/fear.png') - elif emotion == 'happy': - emoj = cv2.imread('https://i.ibb.co/g6DW0Cf/happy.png') - elif emotion == 'sad': - emoj = cv2.imread('https://i.ibb.co/NyF0sDq/sad.png') - elif emotion == 'surprise': - emoj = cv2.imread('https://i.ibb.co/D4rDyfM/surprise.png') - elif emotion == 'neutral': - emoj = cv2.imread('https://i.ibb.co/KX7VSjh/neutral.png') - else: - emoj = cv2.imread('https://i.ibb.co/LdnS9nL/none.png') + # Append detected emotion to the history + emotion_history.append(emotion) + # Optionally save the history to a file (uncomment to enable) + # save_emotion_history(emotion_history) + print(emotion, score) - #Adding Image on Screen - + # Use custom emoji if available, otherwise fall back to default + if emotion in custom_emojis: + emoj = cv2.imread(custom_emojis[emotion]) + else: + # Default emojis if no custom emojis are set + if emotion == 'angry': + emoj = cv2.imread('https://i.ibb.co/QN0gqNH/angry.png') + elif emotion == 'disgust': + emoj = cv2.imread('https://i.ibb.co/tJDxrhD/disgust.png') + elif emotion == 'fear': + emoj = cv2.imread('https://i.ibb.co/yBczSFB/fear.png') + elif emotion == 'happy': + emoj = cv2.imread('https://i.ibb.co/g6DW0Cf/happy.png') + elif emotion == 'sad': + emoj = cv2.imread('https://i.ibb.co/NyF0sDq/sad.png') + elif emotion == 'surprise': + emoj = cv2.imread('https://i.ibb.co/D4rDyfM/surprise.png') + elif emotion == 'neutral': + emoj = cv2.imread('https://i.ibb.co/KX7VSjh/neutral.png') + else: + emoj = cv2.imread('https://i.ibb.co/LdnS9nL/none.png') + + # Adding Image on Screen # Read emoj and resize size = 150 emoj = cv2.resize(emoj, (size, size)) @@ -47,27 +76,25 @@ ret, mask = cv2.threshold(img2gray, 1, 255, cv2.THRESH_BINARY) roi = frame[-size-20:-20, -size-20:-20] - # roi = frame[-size-310:-310, -size-470:-470] # Set an index of where the mask is roi[np.where(mask)] = 0 roi += emoj - - #add text + # Add text font = cv2.FONT_HERSHEY_SIMPLEX org = (40, 210) fontScale = 1 color = (255, 0, 0) thickness = 2 - cv2.putText(frame,emotion, org, font, fontScale, color, thickness, cv2.LINE_AA) - - #show screen - cv2.imshow('frame',frame) - - #stop + cv2.putText(frame, emotion, org, font, fontScale, color, thickness, cv2.LINE_AA) + + # Show screen + cv2.imshow('frame', frame) + + # Stop if cv2.waitKey(1) & 0xff == ord('q'): break +# Release resources scr.release() - -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows() diff --git a/Fake Profile/FakeProfile.py b/Fake Profile/FakeProfile.py index c3b81ded..aa15d01c 100644 --- a/Fake Profile/FakeProfile.py +++ b/Fake Profile/FakeProfile.py @@ -1,22 +1,101 @@ from faker import Faker +from typing import List +import json + +# Initialize Faker with multiple locales fake = Faker(['it_IT', 'en_US', 'ja_JP']) -print("### ALL faker Attribute") -print(dir(fake)) - -profile = """ -### Faker Profile ### -Name : {} -Email : {} -Social Security number (SSN) : {} -Address : {} -Location : {}, {} -URL : {} -""".format(fake.name(), - fake.email(), - fake.ssn(), - fake.address(), - fake.latitude(), fake.longitude(), - fake.url() - ) - -print(profile) + + +def generate_fake_profiles(num_profiles: int) -> List[dict]: + """ + Generate a list of fake profiles. + + Args: + num_profiles (int): Number of profiles to generate. + + Returns: + List[dict]: A list of dictionaries where each represents a profile. + """ + profiles = [] + for _ in range(num_profiles): + profile = { + "Locale": fake.locales, + "Name": fake.name(), + "Email": fake.email(), + "SSN": fake.ssn(), + "Address": fake.address(), + "Latitude": fake.latitude(), + "Longitude": fake.longitude(), + "URL": fake.url() + } + profiles.append(profile) + return profiles + + +def display_profiles(profiles: List[dict]): + """ + Display the generated profiles in a formatted way. + + Args: + profiles (List[dict]): A list of profiles to print. + """ + for index, profile in enumerate(profiles, start=1): + print(f"\n### Faker Profile {index} ###") + print(f"Locale : {', '.join(profile['Locale'])}") + print(f"Name : {profile['Name']}") + print(f"Email : {profile['Email']}") + print(f"Social Security number (SSN) : {profile['SSN']}") + print(f"Address : {profile['Address']}") + print(f"Location : ({profile['Latitude']}, {profile['Longitude']})") + print(f"URL : {profile['URL']}") + print("-" * 40) + + +def save_profiles_to_file(profiles: List[dict], filename: str) -> None: + """ + Save the list of profiles to a file in JSON format. + + Args: + profiles (List[dict]): The list of profiles to save. + filename (str): The name of the output file. + """ + try: + with open(filename, "w") as file: + json.dump(profiles, file, indent=4) + print(f"\nProfiles successfully saved to {filename}") + except Exception as e: + print(f"Error while saving profiles to file: {e}") + + +def main(): + """ + Main function to handle user interaction and workflow. + """ + print("\n### Faker Profile Generator ###") + try: + num_profiles = int(input("Enter the number of profiles to generate: ")) + if num_profiles < 1: + raise ValueError("Number of profiles must be greater than 0.") + + # Generate fake profiles + profiles = generate_fake_profiles(num_profiles) + + # Display profiles + display_profiles(profiles) + + # Save to file + save_option = input("Do you want to save the profiles to a file? (y/n): ").strip().lower() + if save_option == "y": + filename = input("Enter filename (e.g., profiles.json): ").strip() + save_profiles_to_file(profiles, filename) + + print("\nProcess completed successfully!") + except ValueError as ve: + print(f"Invalid input: {ve}") + except Exception as e: + print(f"An unexpected error occurred: {e}") + + +# Run the script +if __name__ == "__main__": + main() diff --git a/FileOrganizer/FileOrganizer.py b/FileOrganizer/FileOrganizer.py new file mode 100644 index 00000000..0ca91093 --- /dev/null +++ b/FileOrganizer/FileOrganizer.py @@ -0,0 +1,43 @@ +import os +import shutil + +# Prompt the user for the directory path to organize files +path = input("Enter path: ") + +# Check if the directory exists +if not os.path.exists(path): + print("Error: The specified directory does not exist.") +else: + # List all items in the specified directory + files = os.listdir(path) + +# Iterate through each file in the directory + for file in files: + file_path = os.path.join(path, file) + + # Skip directories + if os.path.isdir(file_path): + continue + + # Split the filename and extension + filename, extension = os.path.splitext(file) + extension = extension[1:] if extension else "NoExtension" # Handle files without extensions + + # Destination folder for the extension + dest_folder = os.path.join(path, extension) + + # Create the directory if it does not exist + if not os.path.exists(dest_folder): + os.makedirs(dest_folder) + + # Handle duplicate files by renaming them + dest_file_path = os.path.join(dest_folder, file) + counter = 1 + while os.path.exists(dest_file_path): + newfilename = f"{filename}{counter}.{extension}" if extension != "NoExtension" else f"{filename}_{counter}" + dest_file_path = os.path.join(dest_folder, new_filename) + counter += 1 + + # Move the file + shutil.move(file_path, dest_file_path) + print(f"Moved: {file} → {dest_file_path}") \ No newline at end of file diff --git a/FileOrganizer/README.md b/FileOrganizer/README.md new file mode 100644 index 00000000..5606765c --- /dev/null +++ b/FileOrganizer/README.md @@ -0,0 +1,22 @@ +# File Organizer Script +## Description +The `FileOrganizer.py` script is a simple utility for organizing files in a specified directory. It automatically sorts files into subdirectories based on their file extensions, making it easier to manage and locate files. +## Features +- *Automatic Organization:* Files are moved into subfolders named after their extensions (e.g., all `.jpg` files go into a folder named `jpg`). +- *Dynamic Folder Creation:* If a folder for a specific file type doesn't exist, it will be created automatically. +## Usage +1. Ensure you have Python installed on your machine. +2. Download the FileOrganizer.py script. +3. Open a terminal or command prompt and navigate to the directory where the script is located. +4. Run the script using the following command: +python FileOrganizer.py +5. When prompted, enter the path of the directory you want to organize. +Enter path: /path/to/your/directory +6. The script will process the files in the specified directory and create folders for each file type, moving the corresponding files into their respective folders. +## Requirements +- Python 3.x +- Basic understanding of file paths in your operating system. +## License +This script is open-source and free to use. Feel free to modify and distribute as needed. +## Contributing +If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes or enhancements. \ No newline at end of file diff --git a/FileRenamer/File_Renamer.py b/FileRenamer/File_Renamer.py new file mode 100644 index 00000000..4576396a --- /dev/null +++ b/FileRenamer/File_Renamer.py @@ -0,0 +1,31 @@ +import os +import re + +# Prompt the user for the directory path where files need to be renamed +directory = input("Enter path: ") + +# Provide instructions on how to use regex for searching specific files +print("To look for specific files, enter what you know, using .* for any characters you don't know.") +print("For example: IMG.* will filter files that start with IMG") + +# Get the regex pattern to match files and the new base name for renaming +pattern = input("Enter pattern: ") +new_name = input("Enter the new name: ") + +def rename_files(directory, pattern, new_name): + # List all files in the specified directory + files = os.listdir(directory) + counter = 0 # Initialize a counter for unique naming + + # Iterate over each file in the directory + for file in files: + # Check if the file matches the given pattern + if re.match(pattern, file): + # Get the file extension + filetype = file.split('.')[-1] + # Rename the file with the new base name and counter + os.rename(directory + '/' + file, directory + '/' + new_name + str(counter) + '.' + filetype) + counter += 1 # Increment the counter for the next file + +# Call the function to rename files +rename_files(directory, pattern, new_name) diff --git a/FileRenamer/README.md b/FileRenamer/README.md new file mode 100644 index 00000000..72e7b43e --- /dev/null +++ b/FileRenamer/README.md @@ -0,0 +1,27 @@ +# File Renamer Script +## Description +The `FileRenamer.py` script is a utility designed to rename multiple files in a specified directory based on a given regex pattern. This script helps users quickly standardize file names, making file management easier. +## Features +- *Batch Renaming:* Rename multiple files that match a specified regex pattern. +- *Custom Naming:* Users can provide a new base name for the renamed files, with a counter appended to ensure unique names. +## Usage +1. Ensure you have Python installed on your machine. +2. Download the `FileRenamer.py` script. +3. Open a terminal or command prompt and navigate to the directory where the script is located. +4. Run the script using the following command: +python `FileRenamer.py` +5. When prompted, enter the path of the directory containing the files you want to rename. +Enter path: /path/to/your/directory +6. Enter the regex pattern for the files you want to rename. For example: +Enter pattern: IMG.* +7. Enter the new base name for the renamed files. +Enter the new name: NewImageName +8. The script will rename all matching files in the specified directory according to the new name format. +## Requirements +- Python 3.x +- Basic understanding of file paths in your operating system. +- Familiarity with regex patterns for filtering files. +## License +This script is open-source and free to use. Feel free to modify and distribute as needed. +## Contributing +If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes or enhancements. \ No newline at end of file diff --git a/FileTextSearch/FileTextSearch.py b/FileTextSearch/FileTextSearch.py new file mode 100644 index 00000000..443711fe --- /dev/null +++ b/FileTextSearch/FileTextSearch.py @@ -0,0 +1,55 @@ +import os +import uuid + +# Initialize a list to store files containing the keyword +contains = [] + +# Generate a unique identifier for this search session (not currently used) +id_ = uuid.uuid4() + +# List of file extensions to search within +extensions = [".txt", ".docx", ".pdf"] + +def change_direct(): + # Prompt the user to enter the directory path + path = input("Enter path: ") + # Prompt the user to enter the keyword or phrase to search for + keyword = input("Keyword/Phrase: ") + # Start searching the specified folder + search_folder(path, keyword) + +def search_folder(path, keyword): + global contains # Declare the global variable to store found files + # Check if the given path is a directory + if os.path.isdir(path): + # List all files and directories in the specified path + files = os.listdir(path) + # Iterate over each file in the directory + for file in files: + # Construct the full path to the file or directory + full_path = os.path.join(path, file) + + # If the current path is a directory, recursively search inside it + if os.path.isdir(full_path): + search_folder(full_path, keyword) + else: + # Get the file extension and convert it to lowercase + filetype = os.path.splitext(file)[-1].lower() + # Check if the file type is in the allowed extensions + if filetype in extensions: + try: + # Open the file and read its content + with open(full_path, 'r', encoding='utf-8', errors='ignore') as file_: + # Check if the keyword is found in the file content + if keyword in file_.read(): + contains.append(file) # Add the file to the list of found files + print(keyword, "found in", file) # Print the result + except Exception as e: + # Print any errors encountered while reading the file + print(f"Error reading {full_path}: {e}") + else: + # Print an error message if the provided path is not a directory + print(f"{path} is not a directory.") + +# Start the process by calling the change_direct function +change_direct() diff --git a/FileTextSearch/README.md b/FileTextSearch/README.md new file mode 100644 index 00000000..3540b5c5 --- /dev/null +++ b/FileTextSearch/README.md @@ -0,0 +1,26 @@ +# File Text Search Script +## Description +The `FileTextSearch.py` script is a utility designed to search for a specific keyword or phrase within text-based files located in a specified directory. The script searches through files with the following extensions: `.txt`, `.docx`, and `.pdf`. It can recursively search through subdirectories, making it easier to locate documents containing the desired information. +## Features +- Recursive Searching: The script can search within specified subdirectories. +- Keyword Matching: Users can input a keyword or phrase to find within the text files. +- Supported Formats: The script can read `.txt`, `.docx`, and `.pdf` file formats. +## Usage +1. Ensure you have Python installed on your machine. +2. Download the `FileTextSearch.py` script. +3. Open a terminal or command prompt and navigate to the directory where the script is located. +4. Run the script using the following command: +python FileTextSearch.py +5. When prompted, enter the path of the directory you want to search. +Enter path: /path/to/your/directory +6. Enter the keyword or phrase you want to search for in the files. +Keyword/Phrase: your_keyword +7. The script will search through the specified directory and print out the names of any files where the keyword is found. +## Requirements +- Python 3.x +- Basic understanding of file paths in your operating system. +- The script will read text-based files, so ensure the files are not encrypted or password protected. +## License +This script is open-source and free to use. Feel free to modify and distribute as needed. +## Contributing +If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes or enhancements. \ No newline at end of file diff --git a/File_Search/file_search.py b/File_Search/file_search.py new file mode 100644 index 00000000..e0b8321f --- /dev/null +++ b/File_Search/file_search.py @@ -0,0 +1,23 @@ +import pathlib +all_files_path = pathlib.Path('Place the folder path here under quotes') +file_paths = [] + +for file in all_files_path.rglob('*'): + if file.is_file(): + file_paths.append(str(file)) + +formatted_output = '[\n' + ',\n'.join(f' "{path}"' for path in file_paths) + '\n]' +print(formatted_output) + + +file_extensions = [] + +for file in all_files_path.rglob('*'): + if file.is_file(): + ext = file.suffix.lower() + if ext and ext not in file_extensions: + file_extensions.append(ext) + + +formattedd_output = '[\n' + ',\n'.join(f' "{ext}"' for ext in file_extensions) + '\n]' +print(formattedd_output) diff --git a/File_Search/readme.md b/File_Search/readme.md new file mode 100644 index 00000000..597c155e --- /dev/null +++ b/File_Search/readme.md @@ -0,0 +1,31 @@ +Automated File Explorer: +This Python script searches a specified folder for all files, regardless of file type, within its directory and subdirectories. It outputs the paths of all files found and also lists all unique file extensions present in the folder. The script uses Python's pathlib module, which is cross-platform and simplifies working with file paths. + +Features: +File Path Finder: The script scans a folder and lists the file paths of all files it finds within the specified directory and its subdirectories. +Unique File Extension Lister: The script identifies all unique file extensions present in the folder, displaying them in lowercase format. + +Requirements: Python 3.x + +Set the Folder Path: + +Replace 'Place the folder path here under quotes' in the script with the path to the folder you want to scan: +all_files_path = pathlib.Path('path/to/your/folder') + +Run the Script: + +Save the script as file_finder.py (or another name of your choice). +Open your terminal or command prompt. +Navigate to the folder containing the script and run it with: +python file_finder.py + +Output: +The script will output two lists: +The first list contains the paths of all files found within the specified folder and its subdirectories. +The second list contains all unique file extensions in the folder, displayed in lowercase. + + +Example output: + +[ "path/to/folder/document.txt", "path/to/folder/image.jpg", "path/to/folder/subfolder/script.py"] +[ ".txt", ".jpg", ".py"] diff --git a/Hangman-Game/README.md b/Hangman-Game/README.md new file mode 100644 index 00000000..3c58e78b --- /dev/null +++ b/Hangman-Game/README.md @@ -0,0 +1,47 @@ + +# Hangman-Game + +This is a Python implementation of the classic Hangman game. In this game, the player tries to guess a randomly selected word by suggesting letters within a certain number of tries. The player wins if they guess the word correctly before running out of attempts. + + + +## How to Play +1)The computer selects a random word from the provided word list. + +2)The player guesses letters or the entire word. + +3)For each correct guess, the corresponding letters are revealed in the word. + +4)If the player makes an incorrect guess, they lose one of their remaining tries. + +5)The game ends when the player either guesses the word or runs out of tries. +## Requirements +Python 3.x +## How to Run + +1) Clone the repository: + +```bash + git clone https://github.com/your-username/Python-Scripts.git + +``` +2) Navigate to the Hangman-Game folder: +```bash + cd Python-Scripts/Hangman-Game +``` +3) Run the game: +```bash + python hangman_game.py +``` +## Files +1)hangman_game.py: The main Python script containing the Hangman game logic. + +2)words.py: A Python file that contains a list of words (word_list) from which the game selects the word to guess. + +3)README.md: This documentation file. +## Future Improvements +1) Introducing an AI against whom the players can play. +2) Addition of hints +3) Expanding the word list +## Contributions +Contributions are welcome! Feel free to open an issue or submit a pull request to add new features, improve the code, or fix bugs. \ No newline at end of file diff --git a/Hangman-Game/hangman_game.py b/Hangman-Game/hangman_game.py new file mode 100644 index 00000000..f1796ba2 --- /dev/null +++ b/Hangman-Game/hangman_game.py @@ -0,0 +1,151 @@ +import random +from words import word_list + +def get_word(): + word = random.choice(word_list) + return word.upper() + +def play(word): + word_completion = "_" * len(word) + guessed = False + guessed_letters = [] + guessed_words = [] + tries = 6 + print("Let's play Hangman!") + print(display_hangman(tries)) + print(word_completion) + print("\n") + + while not guessed and tries > 0: + guess = input("Please guess a letter or word:").upper() + if len(guess) == 1 and guess.isalpha(): + if guess in guessed_letters: + print("You have already guessed this letter : ", guess) + + elif guess not in word: + print(guess, "is not in the word.") + tries = tries - 1 + guessed_letters.append(guess) + + else: + print("Good job !", guess, "is in the word.") + guessed_letters.append(guess) + word_as_list = list(word_completion) #Find all instances where guess appears in the word so we first convert that into a list + indices = [i for i, letter in enumerate(word) if letter == guess] + for index in indices: + word_as_list[index] = guess + word_completion = "". join(word_as_list) + if "_" not in word_completion: + guessed = True + + + elif len(guess) == len(word) and guess.isalpha(): + if guess in guessed_words: + print("you already guessed this word !") + + elif guess != word: + print(guess, "is not the word") + tries = tries - 1 + guessed_words.append(guess) + else: + guessed = True + word_completion = word + + + else: + print("Not a valid guess!") + + print(display_hangman(tries)) + print(word_completion) + print("\n") + + if guessed : + print("Congrats, yoiu guessed the word You win.") + else: + print("sorry you ran out of tries. The word was " + word + " Maybe next time") + +def display_hangman(tries): + stages = [ # final state: head, torso, both arms, and both legs + """ + -------- + | | + | O + | \\|/ + | | + | / \\ + - + """, + # head, torso, both arms, and one leg + """ + -------- + | | + | O + | \\|/ + | | + | / + - + """, + # head, torso, and both arms + """ + -------- + | | + | O + | \\|/ + | | + | + - + """, + # head, torso, and one arm + """ + -------- + | | + | O + | \\| + | | + | + - + """, + # head and torso + """ + -------- + | | + | O + | | + | | + | + - + """, + # head + """ + -------- + | | + | O + | + | + | + - + """, + # initial empty state + """ + -------- + | | + | + | + | + | + - + """ + ] + return stages[tries] + + +def main(): + word = get_word() + play(word) + while input("Play again ? (Y/N) ").upper() == "Y": + word = get_word() + play(word) + + +if __name__ == "__main__" : #our program will run by running our script on the command line + main() \ No newline at end of file diff --git a/Hangman-Game/words.py b/Hangman-Game/words.py new file mode 100644 index 00000000..7860de50 --- /dev/null +++ b/Hangman-Game/words.py @@ -0,0 +1,441 @@ +word_list = [ + 'wares', + 'soup', + 'mount', + 'extend', + 'brown', + 'expert', + 'tired', + 'humidity', + 'backpack', + 'crust', + 'dent', + 'market', + 'knock', + 'smite', + 'windy', + 'coin', + 'throw', + 'silence', + 'bluff', + 'downfall', + 'climb', + 'lying', + 'weaver', + 'snob', + 'kickoff', + 'match', + 'quaker', + 'foreman', + 'excite', + 'thinking', + 'mend', + 'allergen', + 'pruning', + 'coat', + 'emerald', + 'coherent', + 'manic', + 'multiple', + 'square', + 'funded', + 'funnel', + 'sailing', + 'dream', + 'mutation', + 'strict', + 'mystic', + 'film', + 'guide', + 'strain', + 'bishop', + 'settle', + 'plateau', + 'emigrate', + 'marching', + 'optimal', + 'medley', + 'endanger', + 'wick', + 'condone', + 'schema', + 'rage', + 'figure', + 'plague', + 'aloof', + 'there', + 'reusable', + 'refinery', + 'suffer', + 'affirm', + 'captive', + 'flipping', + 'prolong', + 'main', + 'coral', + 'dinner', + 'rabbit', + 'chill', + 'seed', + 'born', + 'shampoo', + 'italian', + 'giggle', + 'roost', + 'palm', + 'globe', + 'wise', + 'grandson', + 'running', + 'sunlight', + 'spending', + 'crunch', + 'tangle', + 'forego', + 'tailor', + 'divinity', + 'probe', + 'bearded', + 'premium', + 'featured', + 'serve', + 'borrower', + 'examine', + 'legal', + 'outlive', + 'unnamed', + 'unending', + 'snow', + 'whisper', + 'bundle', + 'bracket', + 'deny', + 'blurred', + 'pentagon', + 'reformed', + 'polarity', + 'jumping', + 'gain', + 'laundry', + 'hobble', + 'culture', + 'whittle', + 'docket', + 'mayhem', + 'build', + 'peel', + 'board', + 'keen', + 'glorious', + 'singular', + 'cavalry', + 'present', + 'cold', + 'hook', + 'salted', + 'just', + 'dumpling', + 'glimmer', + 'drowning', + 'admiral', + 'sketch', + 'subject', + 'upright', + 'sunshine', + 'slide', + 'calamity', + 'gurney', + 'adult', + 'adore', + 'weld', + 'masking', + 'print', + 'wishful', + 'foyer', + 'tofu', + 'machete', + 'diced', + 'behemoth', + 'rout', + 'midwife', + 'neglect', + 'mass', + 'game', + 'stocking', + 'folly', + 'action', + 'bubbling', + 'scented', + 'sprinter', + 'bingo', + 'egyptian', + 'comedy', + 'rung', + 'outdated', + 'radical', + 'escalate', + 'mutter', + 'desert', + 'memento', + 'kayak', + 'talon', + 'portion', + 'affirm', + 'dashing', + 'fare', + 'battle', + 'pupil', + 'rite', + 'smash', + 'true', + 'entrance', + 'counting', + 'peruse', + 'dioxide', + 'hermit', + 'carving', + 'backyard', + 'homeless', + 'medley', + 'packet', + 'tickle', + 'coming', + 'leave', + 'swing', + 'thicket', + 'reserve', + 'murder', + 'costly', + 'corduroy', + 'bump', + 'oncology', + 'swatch', + 'rundown', + 'steal', + 'teller', + 'cable', + 'oily', + 'official', + 'abyss', + 'schism', + 'failing', + 'guru', + 'trim', + 'alfalfa', + 'doubt', + 'booming', + 'bruised', + 'playful', + 'kicker', + 'jockey', + 'handmade', + 'landfall', + 'rhythm', + 'keep', + 'reassure', + 'garland', + 'sauna', + 'idiom', + 'fluent', + 'lope', + 'gland', + 'amend', + 'fashion', + 'treaty', + 'standing', + 'current', + 'sharpen', + 'cinder', + 'idealist', + 'festive', + 'frame', + 'molten', + 'sill', + 'glisten', + 'fearful', + 'basement', + 'minutia', + 'coin', + 'stick', + 'featured', + 'soot', + 'static', + 'crazed', + 'upset', + 'robotics', + 'dwarf', + 'shield', + 'butler', + 'stitch', + 'stub', + 'sabotage', + 'parlor', + 'prompt', + 'heady', + 'horn', + 'bygone', + 'rework', + 'painful', + 'composer', + 'glance', + 'acquit', + 'eagle', + 'solvent', + 'backbone', + 'smart', + 'atlas', + 'leap', + 'danger', + 'bruise', + 'seminar', + 'tinge', + 'trip', + 'narrow', + 'while', + 'jaguar', + 'seminary', + 'command', + 'cassette', + 'draw', + 'anchovy', + 'scream', + 'blush', + 'organic', + 'applause', + 'parallel', + 'trolley', + 'pathos', + 'origin', + 'hang', + 'pungent', + 'angular', + 'stubble', + 'painted', + 'forward', + 'saddle', + 'muddy', + 'orchid', + 'prudence', + 'disprove', + 'yiddish', + 'lobbying', + 'neuron', + 'tumor', + 'haitian', + 'swift', + 'mantel', + 'wardrobe', + 'consist', + 'storied', + 'extreme', + 'payback', + 'control', + 'dummy', + 'influx', + 'realtor', + 'detach', + 'flake', + 'consign', + 'adjunct', + 'stylized', + 'weep', + 'prepare', + 'pioneer', + 'tail', + 'platoon', + 'exercise', + 'dummy', + 'clap', + 'actor', + 'spark', + 'dope', + 'phrase', + 'welsh', + 'wall', + 'whine', + 'fickle', + 'wrong', + 'stamina', + 'dazed', + 'cramp', + 'filet', + 'foresee', + 'seller', + 'award', + 'mare', + 'uncover', + 'drowning', + 'ease', + 'buttery', + 'luxury', + 'bigotry', + 'muddy', + 'photon', + 'snow', + 'oppress', + 'blessed', + 'call', + 'stain', + 'amber', + 'rental', + 'nominee', + 'township', + 'adhesive', + 'lengthy', + 'swarm', + 'court', + 'baguette', + 'leper', + 'vital', + 'push', + 'digger', + 'setback', + 'accused', + 'taker', + 'genie', + 'reverse', + 'fake', + 'widowed', + 'renewed', + 'goodness', + 'featured', + 'curse', + 'shocked', + 'shove', + 'marked', + 'interact', + 'mane', + 'hawk', + 'kidnap', + 'noble', + 'proton', + 'effort', + 'patriot', + 'showcase', + 'parish', + 'mosaic', + 'coil', + 'aide', + 'breeder', + 'concoct', + 'pathway', + 'hearing', + 'bayou', + 'regimen', + 'drain', + 'bereft', + 'matte', + 'bill', + 'medal', + 'prickly', + 'sarcasm', + 'stuffy', + 'allege', + 'monopoly', + 'lighter', + 'repair', + 'worship', + 'vent', + 'hybrid', + 'buffet', + 'lively'] diff --git a/Hardware Detector/README.md b/Hardware Detector/README.md new file mode 100644 index 00000000..cf63726d --- /dev/null +++ b/Hardware Detector/README.md @@ -0,0 +1,54 @@ +# Hardware Resource Monitor in Python + +## Description + +This project is a Python-based hardware resource monitoring tool that provides real-time information about the system's hardware specifications and resource usage. It uses the `psutil` and `pynvml` libraries to gather data about the CPU, RAM, disk space, and GPU. + +## Features + +- Detects and displays GPU specifications, including: + - GPU name + - Total memory (in GB) + - Used memory (in GB) +- Detects and displays system specifications, including: + - Total and used RAM (in GB) + - Available disk space (in GB) + - Number of CPU cores + - CPU usage percentage +- Continuously monitors hardware resources with a customizable update interval. +- Displays data in a clean and user-friendly format in the console. + +## Requirements + +The following Python libraries are required to run the project: + +- `psutil` +- `pynvml` +- `typing` (built-in for Python 3.5+) + +You can install the required dependencies using the following command: + +```bash +pip install -r requirements.txt +``` + +## Usage + +1. Clone the repository or download the project files. +2. Install the required dependencies using the `requirements.txt` file. +3. Run the `hardware_detector.py` script to start monitoring hardware resources: + +```bash +python hardware_detector.py +``` + +4. Press `Ctrl+C` to stop the monitoring process. + +## Notes + +- Ensure that your system has a CUDA-enabled GPU with the correct drivers installed to retrieve GPU information. +- The script clears the console output on each update for a clean display. This behavior may vary depending on the operating system. + +## License + +This project is licensed under the MIT License. See the `LICENSE` file for more details. diff --git a/Hardware Detector/hardware_detector.py b/Hardware Detector/hardware_detector.py new file mode 100644 index 00000000..3086f962 --- /dev/null +++ b/Hardware Detector/hardware_detector.py @@ -0,0 +1,76 @@ +import psutil +import pynvml +import time +import os + + +class HardwareDetector: + """ + This class detects the hardware specifications of the computer and monitors them continuously. + """ + + def __init__(self): + self.hardware_profile = {} + + def get_gpu_specs(self) -> None: + """ + Detects the GPU specifications of the computer. + :return: None + """ + pynvml.nvmlInit() + device_count = pynvml.nvmlDeviceGetCount() + if device_count == 0: + self.hardware_profile['gpu_name'] = "None available" + self.hardware_profile['gpu_total_memory_gb'] = 0 + self.hardware_profile['gpu_used_memory_gb'] = 0 + return + gpu_handle = pynvml.nvmlDeviceGetHandleByIndex(0) + gpu_name = pynvml.nvmlDeviceGetName(gpu_handle) + gpu_mem_info = pynvml.nvmlDeviceGetMemoryInfo(gpu_handle) + gpu_total_mem = gpu_mem_info.total / (1024 ** 3) + gpu_used_mem = gpu_mem_info.used / (1024 ** 3) + pynvml.nvmlShutdown() + self.hardware_profile['gpu_name'] = gpu_name + self.hardware_profile['gpu_total_memory_gb'] = round(gpu_total_mem, 2) + self.hardware_profile['gpu_used_memory_gb'] = round(gpu_used_mem, 2) + + def get_computer_specs(self) -> None: + """ + Detects the computer specifications including RAM, available disk space, and CPU cores. + :return: None + """ + memory = psutil.virtual_memory() + ram_total = memory.total + ram_used = memory.used + available_diskspace = psutil.disk_usage('/').free / (1024 ** 3) + cpu_cores = psutil.cpu_count(logical=True) + cpu_usage = psutil.cpu_percent(interval=0.1) + self.hardware_profile['ram_total_gb'] = round(ram_total / (1024 ** 3), 2) + self.hardware_profile['ram_used_gb'] = round(ram_used / (1024 ** 3), 2) + self.hardware_profile['available_diskspace_gb'] = round(available_diskspace, 2) + self.hardware_profile['cpu_cores'] = cpu_cores + self.hardware_profile['cpu_usage_percent'] = cpu_usage + + def monitor_resources(self, interval: int = 1) -> None: + """ + Continuously monitors and displays hardware resources. + :param interval: Time in seconds between updates. + :return: None + """ + try: + while True: + self.get_computer_specs() + self.get_gpu_specs() + os.system('cls' if os.name == 'nt' else 'clear') # Clear the console for a clean display + print("Hardware Resource Monitor") + print("==========================") + for key, value in self.hardware_profile.items(): + print(f"{key}: {value}") + time.sleep(interval) + except KeyboardInterrupt: + print("\nMonitoring stopped.") + + +# Run the continuous monitor +hardware = HardwareDetector() +hardware.monitor_resources(interval=0.5) \ No newline at end of file diff --git a/Hardware Detector/requirements.txt b/Hardware Detector/requirements.txt new file mode 100644 index 00000000..f767002e --- /dev/null +++ b/Hardware Detector/requirements.txt @@ -0,0 +1,3 @@ +psutil +pynvml +typing \ No newline at end of file diff --git a/Image Uploader/.gitignore b/Image Uploader/.gitignore new file mode 100644 index 00000000..30fe0fbc --- /dev/null +++ b/Image Uploader/.gitignore @@ -0,0 +1 @@ +secret.env \ No newline at end of file diff --git a/Image Uploader/README.md b/Image Uploader/README.md new file mode 100644 index 00000000..61efce3d --- /dev/null +++ b/Image Uploader/README.md @@ -0,0 +1,23 @@ +# Image Upload Script + +## Overview + +This Python script allows users to upload images from their clipboard directly to Imgur by pressing a keyboard shortcut. It utilizes the Imgur API for image uploads and the `python-dotenv` package to manage environment variables securely. + +## Features + +- **Clipboard Image Capture**: Captures images from the clipboard. +- **Imgur API Integration**: Uploads images to Imgur using a simple API call. +- **Keyboard Shortcut**: Allows users to trigger the upload with a predefined keyboard shortcut (`Ctrl + Alt + S`). +- **Environment Variable Management**: Utilizes a `secret.env` file for managing sensitive data, such as the Imgur Client ID and add it under the name `IMGUR_CLIENT_ID`. + + +**Note**: You can add an image in your clipboard using `Win + Shift + S` +Also press Esc to end the program + +## Example Screenshot + +Here’s how the application looks when running: + +![Screenshot of the app](https://i.imgur.com/e35Pvyh.png) +![Screenshot of the app](https://i.imgur.com/ZfyHcsx.png) \ No newline at end of file diff --git a/Image Uploader/main.py b/Image Uploader/main.py new file mode 100644 index 00000000..edad516f --- /dev/null +++ b/Image Uploader/main.py @@ -0,0 +1,45 @@ +import os +import requests +import keyboard +from PIL import ImageGrab +import io +import base64 +from dotenv import load_dotenv + + +load_dotenv("secret.env") +# Set your Imgur API client ID here +CLIENT_ID = os.getenv("IMGUR_CLIENT_ID") + +def upload_to_imgur(image_data): + headers = {"Authorization": f"Client-ID {CLIENT_ID}"} + response = requests.post("https://api.imgur.com/3/image", headers=headers, data={"image": image_data}) + return response.json() + +def upload_image(): + try: + image = ImageGrab.grabclipboard() + if image is None: + print("No image found in the clipboard.") + return + + + with io.BytesIO() as output: + image.save(output, format='PNG') + image_data = base64.b64encode(output.getvalue()).decode() # converted to base64 + + # Upload the image to Imgur + response = upload_to_imgur(image_data) + + if response.get("success"): + print("Image uploaded successfully:", response["data"]["link"]) + else: + print("Failed to upload image:", response) + except Exception as e: + print(f"An error occurred: {e}") + + +keyboard.add_hotkey('ctrl+alt+s', upload_image) + +print("Listening for the shortcut... (Press ESC to stop)") +keyboard.wait('esc') diff --git a/Images to WebP Converter/README.md b/Images to WebP Converter/README.md new file mode 100644 index 00000000..e7e9b947 --- /dev/null +++ b/Images to WebP Converter/README.md @@ -0,0 +1,58 @@ +# Image to WebP Converter + +This repository contains two Python scripts for converting images to WebP format. One script is for command-line usage, and the other provides a graphical user interface (GUI) for easier interaction. + +## Files + +1. `image_to_webp.py`: A command-line tool for converting images to WebP format. +2. `image_to_webp_gui.py`: A GUI tool for converting images to WebP format. + +## Requirements + +- Python 3.x +- Pillow library +- Tkinter library (for the GUI tool) + +You can install the required libraries using pip: + +```sh +pip install Pillow +``` + +Tkinter is included with standard Python installations. If you encounter issues, you may need to install it separately. + +## Usage + +### Command-Line Tool + +The `image_to_webp.py` script allows you to convert images to WebP format using the command line. + +#### Arguments + +- `files`: Paths to the image files to convert. +- `save_directory`: Directory to save the converted WebP images. +- `quality`: Quality of the output WebP images (1-100). + +#### Example + +```sh +python image_to_webp.py image1.jpg image2.png /path/to/save/directory 80 +``` + +### GUI Tool + +The `image_to_webp_gui.py` script provides a graphical user interface for converting images to WebP format. + +#### Steps + +1. Run the script: + + ```sh + python image_to_webp_gui.py + ``` + +2. A file dialog will appear to select multiple image files. +3. Another dialog will appear to select the directory to save the converted WebP images. +4. A dialog will prompt you to enter the quality of the output WebP images (1-100). +5. The images will be converted and saved to the specified directory. + diff --git a/Images to WebP Converter/image_to_webp.py b/Images to WebP Converter/image_to_webp.py new file mode 100644 index 00000000..1ce4b2d2 --- /dev/null +++ b/Images to WebP Converter/image_to_webp.py @@ -0,0 +1,29 @@ +import argparse +from PIL import Image +import os + +# Set up argument parser +parser = argparse.ArgumentParser(description="Convert images to WebP format.") +parser.add_argument("files", nargs='+', help="Paths to the image files to convert.") +parser.add_argument("save_directory", help="Directory to save the converted WebP images.") +parser.add_argument("quality", type=int, help="Quality of the output WebP images (1-100).") + +args = parser.parse_args() + +webp_paths = [] + +for path in args.files: + if path: + # Open the image file + im = Image.open(path) + base_name = os.path.basename(path) + name, ext = os.path.splitext(base_name) + # Define the save path for the WebP image + save_path = os.path.join(args.save_directory, f"{name}.webp") + # Save the image as WebP with the specified quality + im.save(save_path, 'webp', quality=args.quality) + webp_paths.append(save_path) + print(f"Image converted and saved to: {save_path}") + +# python image_to_webp.py +# python image_to_webp.py image1.jpg image2.png /path/to/save/directory 80 \ No newline at end of file diff --git a/Images to WebP Converter/image_to_webp_gui.py b/Images to WebP Converter/image_to_webp_gui.py new file mode 100644 index 00000000..589e76e1 --- /dev/null +++ b/Images to WebP Converter/image_to_webp_gui.py @@ -0,0 +1,35 @@ +from tkinter import Label, Tk, simpledialog +from PIL import Image, ImageTk +import tkinter.filedialog as tkFileDialog +import os + +# Initialize the Tkinter root window +root = Tk() +root.withdraw() # Hide the root window + +# Open file dialog to select multiple image files +paths = tkFileDialog.askopenfilenames(filetypes=[("Image Files", ('.jpg', '.jpeg', '.png', '.bmp', '.gif'))]) +webp_paths = [] + +if paths: + # Open directory dialog to select the save directory + save_directory = tkFileDialog.askdirectory() + if save_directory: + # Ask user for the quality of the output WebP images + quality = simpledialog.askinteger("Quality", "Enter quality (1-100):", minvalue=1, maxvalue=100) + if quality: + for path in paths: + if path: + # Open the image file + im = Image.open(path) + base_name = os.path.basename(path) + name, ext = os.path.splitext(base_name) + # Define the save path for the WebP image + save_path = os.path.join(save_directory, f"{name}.webp") + # Save the image as WebP with the specified quality + im.save(save_path, 'webp', quality=quality) + webp_paths.append(save_path) + print(f"Image converted and saved to: {save_path}") + +# Close the Tkinter window +root.destroy() # Close the Tkinter window \ No newline at end of file diff --git a/LinkedIn Bot/requirements.txt b/LinkedIn Bot/requirements.txt index 11f5b10f..9585d5eb 100644 --- a/LinkedIn Bot/requirements.txt +++ b/LinkedIn Bot/requirements.txt @@ -1,3 +1,3 @@ -selenium -beautifulsoup4 -csv \ No newline at end of file +Selenium: 4.12.1 +BeautifulSoup4: 4.13.0 +CSV diff --git a/Longitude Latitude conical converter/lonlat_converter_lambert.py b/Longitude Latitude conical converter/lonlat_converter_lambert.py new file mode 100644 index 00000000..fb8371eb --- /dev/null +++ b/Longitude Latitude conical converter/lonlat_converter_lambert.py @@ -0,0 +1,35 @@ +from pyproj import Proj +from shapely.geometry import Point +from shapely.geometry.polygon import Polygon + +# Definition of lambert conical projection. +lambert = {'proj': 'lcc', # Lambert Conformal Conic 2SP (epsg:9802) + 'ellps': 'GRS80', #'epsg:7019', #'epsg:9802', # 'epsg:6651', + 'lon_0': -102.00000000, + 'lat_0': 12.00000000, # 12° 00’ 0.0’’ N + 'lat_1': 17.50000000, # 17° 30’ 0.00’’ N + 'lat_2': 29.50000000, # 29° 30’ 0.00’’ N + 'x_0': 2500000, + 'y_0': 0} + +prj = Proj(lambert) + +# Coordinates for the city of Monterrey, Nuevo León, México + +city = {'c_name': 'Monterrey', 'lon': -100.316116, 'lat': 25.686613} + +x, y = prj(city['lon'], city['lat']) + +print(' X Y') +print(city['c_name'], ': lon:', city['lon'], ' , lat:', city['lat']) +print('Lambert function:', x, ',', y) +print(' Should return: 2668223.843 , 1516271.922') + +# Should return: + +""" + X Y +Monterrey : lon: -100.316116 , lat: 25.686613 +Lambert function: 2668223.842598227 , 1516271.9216458194 + Should return: 2668223.843 , 1516271.922 +""" diff --git a/Longitude Latitude conical converter/readme.md b/Longitude Latitude conical converter/readme.md new file mode 100644 index 00000000..a22092a3 --- /dev/null +++ b/Longitude Latitude conical converter/readme.md @@ -0,0 +1,21 @@ +## Longitude and Latitude to Conical Converter + +This script converts longitude and latitude to [Lambert conformal conic projection](https://en.wikipedia.org/wiki/Lambert_conformal_conic_projection). +The example used is for Mexico, under International Terrestrial Reference Frame 2008, which uses Lambert Conformal Conic projection 2SP (epsg:9802). + +This script is useful to combine census and geographic data, with traditional Longitude and Latitude from the more international frame of reference. + +For more reference, see [National Geography institute explanatory PDF](https://www.inegi.org.mx/contenidos/temas/MapaDigital/Doc/asignar_sistema_coordenadas.pdf) +and [Pyproj, Lambert projections](https://proj.org/operations/projections/lcc.html). + +## Prerequisites +- Python 3.x installed on your machine. + +## Dependencies +The script requires the following Python libraries: +`pyproj` +`shapely` + +You can install the required library using pip: +`pip install pyproj` +`pip install shapely` diff --git a/Mood based youtube song generator/README.md b/Mood based youtube song generator/README.md new file mode 100644 index 00000000..efadd890 --- /dev/null +++ b/Mood based youtube song generator/README.md @@ -0,0 +1,35 @@ +# Mood Based Youtube Song Generator +This Python script fetches a random song from YouTube based on your mood input and opens it in your default web browser. + +## Features +Accepts mood input (e.g., happy, sad, energetic) and finds related songs on YouTube. +Opens the YouTube song URL in your browser. + +## Setup + +### 1. Install dependencies: +```shell +pip install -r requirements.txt +``` + +### 2. Get your YouTube API key: +- Follow the instructions to get your YouTube Data API key. + +### 3. Set your API key: +Replace the api_key variable in the script with your own [YouTube Data API key](https://developers.google.com/youtube/v3/getting-started) +```python +api_key = "YOUR_YOUTUBE_API_KEY" +``` + +### 4. Run the script: +```shell +python random_song_generator.py +``` + +## Example +Input: +```bash +Enter your mood (e.g., happy, sad, energetic): happy +``` +The script will fetch a song and open it in your browser. + diff --git a/Mood based youtube song generator/random_song_generator.py b/Mood based youtube song generator/random_song_generator.py new file mode 100644 index 00000000..241b432c --- /dev/null +++ b/Mood based youtube song generator/random_song_generator.py @@ -0,0 +1,33 @@ +import random +import webbrowser +from googleapiclient.discovery import build + + +def fetch_youtube_songs(mood): + api_key = "your_youtube_api_key" + youtube = build("youtube", "v3", developerKey=api_key) + request = youtube.search().list( + q=f"{mood} song", part="snippet", type="video", maxResults=10 + ) + response = request.execute() + songs = [ + f"{item['snippet']['title']} - https://www.youtube.com/watch?v={item['id']['videoId']}" + for item in response['items'] + ] + return songs + + +def random_song_generator(): + mood = input("Enter your mood (e.g., happy, sad, energetic): ").lower() + try: + songs = fetch_youtube_songs(mood) + random_song = random.choice(songs) + song_title, song_url = random_song.split(" - ") + webbrowser.open(song_url) + print(f"Here's a song for your mood ({mood}):\n{random_song}") + except Exception as e: + print("Error fetching songs. Please check your API key and mood.") + + +if __name__ == "__main__": + random_song_generator() diff --git a/Mood based youtube song generator/requirements.txt b/Mood based youtube song generator/requirements.txt new file mode 100644 index 00000000..704bcd50 --- /dev/null +++ b/Mood based youtube song generator/requirements.txt @@ -0,0 +1 @@ +google-api-python-client \ No newline at end of file diff --git a/Morse Code/README.md b/Morse Code/README.md new file mode 100644 index 00000000..bcb53263 --- /dev/null +++ b/Morse Code/README.md @@ -0,0 +1,24 @@ +# Morse Code Encoder/Decoder + +## Overview + +This project provides a simple Python program to encode text into Morse code and decode Morse code back into text. It includes exception handling for invalid characters and offers default values when no input is provided. + +## Features + +- **Encoding**: Convert plain text into Morse code. +- **Decoding**: Convert Morse code back into plain text. +- **Exception Handling**: Handles invalid characters gracefully. +- **Default Values**: If no input is provided, it uses default values ('SOS' for encoding and '... --- ...' for decoding). + +## Installation + +1. Ensure you have Python installed on your machine. +2. Download the `morse_code.py` file. + +## Usage + +Run the script directly from the command line: + +```bash +python morse_code.py diff --git a/Morse Code/main.py b/Morse Code/main.py new file mode 100644 index 00000000..fdcad69d --- /dev/null +++ b/Morse Code/main.py @@ -0,0 +1,46 @@ +class MorseCode: + # Morse code dictionary + morse_dict = { + 'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', + 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', + 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', + 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', + 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', + 'Z': '--..', '1': '.----', '2': '..---', '3': '...--', + '4': '....-', '5': '.....', '6': '-....', '7': '--...', + '8': '---..', '9': '----.', '0': '-----', ' ': '/' + } + + @classmethod + def encode(cls, text=""): + """Encodes a given text into Morse code.""" + if not text: + text = "SOS" # Default value if no input is provided + try: + return ' '.join(cls.morse_dict[char.upper()] for char in text) + except KeyError as e: + print(f"Error: Character '{e.args[0]}' cannot be encoded in Morse code.") + return None + + @classmethod + def decode(cls, morse_code=""): + """Decodes a given Morse code into plain text.""" + if not morse_code: + morse_code = "... --- ..." # Default value if no input is provided + try: + reverse_dict = {v: k for k, v in cls.morse_dict.items()} + return ''.join(reverse_dict[code] for code in morse_code.split()) + except KeyError as e: + print(f"Error: Morse code '{e.args[0]}' cannot be decoded.") + return None + + +if __name__ == "__main__": + # Example usage + text = input("Enter text to encode (leave blank for default 'SOS'): ") + morse_code = MorseCode.encode(text) + print(f"Morse Code: {morse_code}") + + morse_input = input("Enter Morse code to decode (leave blank for default '... --- ...'): ") + decoded_text = MorseCode.decode(morse_input) + print(f"Decoded Text: {decoded_text}") diff --git a/PDF Merger and Splitter/PDF Merger and Splitter.py b/PDF Merger and Splitter/PDF Merger and Splitter.py new file mode 100644 index 00000000..09e37467 --- /dev/null +++ b/PDF Merger and Splitter/PDF Merger and Splitter.py @@ -0,0 +1,23 @@ +from PyPDF2 import PdfReader, PdfWriter + +def merge_pdfs(pdfs, output): + pdf_writer = PdfWriter() + for pdf in pdfs: + reader = PdfReader(pdf) + for page in range(len(reader.pages)): + pdf_writer.add_page(reader.pages[page]) + + with open(output, 'wb') as out: + pdf_writer.write(out) + +def split_pdf(pdf): + reader = PdfReader(pdf) + for page_num, page in enumerate(reader.pages): + writer = PdfWriter() + writer.add_page(page) + output_filename = f'{pdf.split(".")[0]}_page_{page_num+1}.pdf' + with open(output_filename, 'wb') as out: + writer.write(out) + +merge_pdfs(['file1.pdf', 'file2.pdf'], 'merged.pdf') +split_pdf('merged.pdf') diff --git a/PDF Merger and Splitter/readme.md b/PDF Merger and Splitter/readme.md new file mode 100644 index 00000000..a0aa8fcf --- /dev/null +++ b/PDF Merger and Splitter/readme.md @@ -0,0 +1,35 @@ +# PDF Merger and Splitter + +This Python script allows you to merge multiple PDF files into a single PDF and split a PDF file into individual pages. It utilizes the `PyPDF2` library for handling PDF files. + +## Features + +- **Merge PDFs**: Combine multiple PDF files into one. +- **Split PDF**: Divide a single PDF file into separate pages, saving each page as a new PDF file. + +## Requirements + +Make sure you have Python installed on your machine. This script also requires the `PyPDF2` library. You can install it using pip: + +```bash +pip install PyPDF2 +``` + +# Usage +## Merging PDFs +- Place the PDF files you want to merge in the same directory as the script. +- Modify the merge_pdfs function call in the script to include the names of the PDF files you want to merge. For example: + ```bash + merge_pdfs(['file1.pdf', 'file2.pdf'], 'merged.pdf') + ``` +- Run the script: + ```bash + python pdf_merger_splitter.py + ``` +## Splitting PDFs +- After merging, the script automatically splits the merged PDF file (merged.pdf) into separate pages. Each page will be saved as a new PDF file named merged_page_X.pdf, where X is the page number. +- You can also split any PDF file by calling the split_pdf function in the script: + ```bash + split_pdf('your_pdf_file.pdf') + ``` +- Run the script to create separate PDF files for each page. diff --git a/Password Generator/PasswordGenerator.py b/Password Generator/PasswordGenerator.py index c07c70fa..ec34ebec 100644 --- a/Password Generator/PasswordGenerator.py +++ b/Password Generator/PasswordGenerator.py @@ -1,96 +1,87 @@ import random as rr import string as ss - - -""" -ASCII -A -> Z : 65 -> 90 -a -> z : 97 -> 122 -""" - characters = ['@', '#', '$', '%', '&', '?'] -pass_len = int(input('How lengthy do you want your password to be : ')) +def generate_password(pass_len): + # Initialize counters + total_nums = 0 + total_symbols = 0 + total_cap = 0 + total_low = 0 -tempy, tempz = 0, 0 -tempx = rr.randint(2, pass_len-1) # alphabets + # Ensure at least one of each type + tempx = rr.randint(2, max(2, pass_len - 2)) # at least 2 letters + remaining = pass_len - tempx -if tempx != pass_len: - tempy = rr.randint(1, (pass_len - tempx - 1)) # numbers + tempy = rr.randint(1, max(1, remaining - 1)) # at least 1 number + remaining -= tempy total_nums = tempy -if (tempx + tempy) != pass_len: - tempz = rr.randint(1, (pass_len-(tempx+tempy))) # special characters + tempz = remaining # rest goes to special characters total_symbols = tempz -# password : empty string for now -pass_word = '' - -# adding alphabets - -while tempx: - x = tempx - num_cap = rr.randint(0, x) - num_low = x-num_cap + # Generate password + pass_word = '' + # Add alphabets + num_cap = rr.randint(1, tempx - 1) # at least 1 uppercase + num_low = tempx - num_cap # rest lowercase total_cap = num_cap total_low = num_low - # capitals in password : - while num_cap: - temp = chr(rr.randint(65, 90)) - pass_word = pass_word + str(temp) - num_cap -= 1 - - # lower-case in password : - while num_low: - temp = chr(rr.randint(97, 122)) - pass_word = pass_word + str(temp) - num_low -= 1 - - break - -# adding numbers to the password -while tempy: - temp = (rr.randint(0, 9)) - pass_word = pass_word + str(temp) - tempy -= 1 - -# adding special characters to the password -while tempz: - temp = rr.randint(0, len(characters)-1) - pass_word = pass_word + characters[temp] - tempz -= 1 - -#shuffles the string + # Add capitals + pass_word += ''.join(chr(rr.randint(65, 90)) for _ in range(num_cap)) + + # Add lowercase + pass_word += ''.join(chr(rr.randint(97, 122)) for _ in range(num_low)) + + # Add numbers + pass_word += ''.join(str(rr.randint(0, 9)) for _ in range(tempy)) + + # Add special characters + pass_word += ''.join(rr.choice(characters) for _ in range(tempz)) + + return pass_word, total_cap, total_low, total_nums, total_symbols + + def shuffle_(alpha): str_temp = list(alpha) rr.shuffle(str_temp) - alpha = ''.join(str_temp) - return alpha + return ''.join(str_temp) + -#adds colour to the text def colored(r, g, b, text): return "\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(r, g, b, text) -final_pass =colored(200,200,50, (shuffle_(shuffle_(shuffle_(pass_word))))) +def main(): + pass_len = int(input('How lengthy do you want your password to be : ')) -# result & summary -result = """ -Generate Password Summary : + if pass_len < 4: + print("Password length must be at least 4 characters") + return -Charactor Uppercase : {0} -Charactor Lowercase : {1} + pass_word, total_cap, total_low, total_nums, total_symbols = generate_password(pass_len) + + # Shuffle multiple times + final_pass = colored(200, 200, 50, shuffle_(shuffle_(shuffle_(pass_word)))) + + result = """ +Generate Password Summary: + +Character Uppercase : {0} +Character Lowercase : {1} Numbers : {2} Symbols : {3} -Your computer generated password is : +Your computer generated password is: {4} """.format(total_cap, total_low, total_nums, total_symbols, final_pass) -print(result) + print(result) + -# print(f"\nYour computer generated password is : {final_pass}\n\n") +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Password Strength Checker/README.md b/Password Strength Checker/README.md new file mode 100644 index 00000000..70cabe2e --- /dev/null +++ b/Password Strength Checker/README.md @@ -0,0 +1,24 @@ +# Password Strength Checker + +## Description +A password strength checker that utilizes machine learning to classify the strength of passwords. This project provides a simple interface for users to input their passwords and receive feedback on their strength based on various criteria. + +## Features +- Classifies password strength into multiple categories. + +## Installation +1. Clone the repository: + ```bash + git clone https://github.com/DhanushNehru/Python-Scripts + cd "Password Strength Checker" +2. Create and activate a virtual environment: + ```bash + python3 -m venv venv + source venv/bin/activate # On Windows use `venv\Scripts\activate` +3. Install the required packages: + ```bash + pip install -r requirements.txt +## Usage +To run the password strength checker: + ```bash + python main.py \ No newline at end of file diff --git a/Password Strength Checker/main.py b/Password Strength Checker/main.py new file mode 100644 index 00000000..2ae79e81 --- /dev/null +++ b/Password Strength Checker/main.py @@ -0,0 +1,8 @@ +from model.model import predict # import model + +def main(): + password_to_test = input("Enter a password to check its strength: ") # get password from terminal + predicted_class = int(predict(password_to_test)) # evaluate password strength + print(f"Password strength classification: {predicted_class} / 2") # output 0 - weak, 1 - moderate, or 2 - strong + +if __name__ == "__main__": main() \ No newline at end of file diff --git a/Password Strength Checker/model/README.md b/Password Strength Checker/model/README.md new file mode 100644 index 00000000..98f3e1d0 --- /dev/null +++ b/Password Strength Checker/model/README.md @@ -0,0 +1,15 @@ +# Password Strength Classification Model + +## Overview +This model is designed to evaluate the strength of passwords using machine learning techniques. It analyzes input passwords and classifies them based on their strength, providing feedback for users to create stronger passwords. + +## Model Architecture +- **Input Layer**: The model accepts passwords as input. +- **Dense Layers**: A series of dense layers with activation functions (e.g., ReLU) process the input features. +- **Output Layer**: The final layer outputs a classification score indicating password strength (e.g., weak - 0, medium - 1, strong - 2). + +## Training +- The model is trained on a labeled dataset of passwords classified by strength. + +## Future improvements +- In feature engineering, columns about the amount of common used passwords (etc. 'password') or common used words should be added and be taken into consideration properly in model training. diff --git a/Password Strength Checker/model/deep_learning_model.h5 b/Password Strength Checker/model/deep_learning_model.h5 new file mode 100644 index 00000000..6fd66c9e Binary files /dev/null and b/Password Strength Checker/model/deep_learning_model.h5 differ diff --git a/Password Strength Checker/model/model.py b/Password Strength Checker/model/model.py new file mode 100644 index 00000000..d7255bd1 --- /dev/null +++ b/Password Strength Checker/model/model.py @@ -0,0 +1,68 @@ +# disable debugging messages +def warn(*args, **kwargs): + pass +import warnings +warnings.warn = warn +warnings.filterwarnings("ignore", category=DeprecationWarning) +import os +os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' +os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' +from silence_tensorflow import silence_tensorflow +silence_tensorflow("WARNING") + +import pandas as pd +import pickle + +from tensorflow.keras.models import Sequential +from tensorflow.keras.layers import Dense +from model.utils.functions import calculate_entropy, count_repeats, count_sequential +from model.utils.preprocessing import run_preprocessing +from model.utils.training import run_training + +# run preprocessing and training +# run_preprocessing() # uncomment to run preprocessing +# run_training() # uncomment to train the model + +def prepare_input(password): # function to prepare input features from password + # create a dataframe for a single input + data = { + 'length': [len(password)], # calculate password length + 'lowercase_count': [sum(c.islower() for c in password)], # count lowercase characters + 'uppercase_count': [sum(c.isupper() for c in password)], # count uppercase characters + 'digit_count': [sum(c.isdigit() for c in password)], # count digits + 'special_count': [sum(not c.isalnum() for c in password)], # count special characters + 'entropy': [calculate_entropy(password)], # calculate entropy + 'repetitive_count': [count_repeats(password)], # count repetitive characters + 'sequential_count': [count_sequential(password)] # count sequential characters + } + + with open('model/scaler.pkl', 'rb') as file: # load the fitted scaler from file + scaler = pickle.load(file) + + # convert to dataframe + input_df = pd.DataFrame(data) + + # normalize using the previously fitted scaler + normalized_input = scaler.transform(input_df) + + return pd.DataFrame(normalized_input, columns=input_df.columns) # return normalized input as dataframe + +def predict(password): # function to predict password strength + # load the model + model = Sequential() # create a sequential model + model.add(Dense(128, activation='relu', input_shape=(8,))) # add input layer with 128 neurons + model.add(Dense(64, activation='relu')) # add hidden layer with 64 neurons + model.add(Dense(3, activation='softmax')) # add output layer with softmax activation + + # load trained weights + model.load_weights('model/deep_learning_model.h5') # load weights from the trained model file + + # prepare the input + password_to_test = password # assign password to test + input_features = prepare_input(password_to_test) # prepare input features + + # make the prediction + prediction = model.predict(input_features, verbose=0) # predict using the model + predicted_class = prediction.argmax(axis=-1) # get the predicted class index + + return predicted_class # return the predicted class \ No newline at end of file diff --git a/Password Strength Checker/model/scaler.pkl b/Password Strength Checker/model/scaler.pkl new file mode 100644 index 00000000..a7002b2a Binary files /dev/null and b/Password Strength Checker/model/scaler.pkl differ diff --git a/Password Strength Checker/model/utils/functions.py b/Password Strength Checker/model/utils/functions.py new file mode 100644 index 00000000..e3e2a0b7 --- /dev/null +++ b/Password Strength Checker/model/utils/functions.py @@ -0,0 +1,18 @@ +import numpy as np + +def calculate_entropy(password): # function to calculate the entropy of a password + if len(password) == 0: # check if the password is empty + return 0 # return 0 for empty passwords + char_counts = np.array(list(password)) # convert password to a numpy array + unique, counts = np.unique(char_counts, return_counts=True) # get unique characters and their counts + probabilities = counts / len(password) # calculate the probability of each character + entropy = -np.sum(probabilities * np.log2(probabilities)) # compute the entropy using the probabilities + return entropy # return the calculated entropy + +def count_repeats(password): # function to count consecutive repeated characters in the password + return sum(password[i] == password[i + 1] for i in range(len(password) - 1)) # sum the repeated characters + +def count_sequential(password): # function to count sequential characters in the password + sequences = [''.join(chr(i) for i in range(start, start + 3)) for start in range(ord('a'), ord('z') - 1)] # generate sequences of 3 lowercase letters + sequences += [''.join(str(i) for i in range(start, start + 3)) for start in range(10)] # generate sequences of 3 digits + return sum(1 for seq in sequences if seq in password) # count how many of the sequences are in the password \ No newline at end of file diff --git a/Password Strength Checker/model/utils/preprocessing.py b/Password Strength Checker/model/utils/preprocessing.py new file mode 100644 index 00000000..7be80eee --- /dev/null +++ b/Password Strength Checker/model/utils/preprocessing.py @@ -0,0 +1,32 @@ +import pandas as pd +import pickle + +from model.utils.functions import calculate_entropy, count_repeats, count_sequential +from sklearn.preprocessing import StandardScaler + +def run_preprocessing(): + # import data + dataframe = pd.read_csv('model/passwords.csv', on_bad_lines='skip') # read csv data file + dataframe = dataframe.dropna() # remove rows with empty values + dataframe = dataframe.drop_duplicates(subset='password') # remove duplicates + + # add new columns + dataframe['length'] = dataframe['password'].str.len() # column for password length + dataframe['lowercase_count'] = dataframe['password'].apply(lambda x: sum(c.islower() for c in x)) # column for amount of lowercase characters + dataframe['uppercase_count'] = dataframe['password'].apply(lambda x: sum(c.isupper() for c in x)) # column for amount of uppercase characters + dataframe['digit_count'] = dataframe['password'].apply(lambda x: sum(c.isdigit() for c in x)) # column for amount of digits + dataframe['special_count'] = dataframe['password'].apply(lambda x: sum(not c.isalnum() for c in x)) # column for amount of special characters + dataframe['entropy'] = dataframe['password'].apply(calculate_entropy) # column for entropy + dataframe['repetitive_count'] = dataframe['password'].apply(count_repeats) # column for amount of repetitive characters + dataframe['sequential_count'] = dataframe['password'].apply(count_sequential) # column for amount of sequential characters + + scaler = StandardScaler() # use standard scaler because there is a gaussian distribution in passwords.csv + numerical_features = ['length', 'lowercase_count', 'uppercase_count', 'digit_count', 'special_count', 'entropy', 'repetitive_count', 'sequential_count'] + dataframe[numerical_features] = scaler.fit_transform(dataframe[numerical_features]) + + # save scaler model for future use + with open('model/scaler.pkl', 'wb') as file: + pickle.dump(scaler, file) + + # save preprocessed data + dataframe.to_csv('model/output.csv', index=False, header=True) \ No newline at end of file diff --git a/Password Strength Checker/model/utils/training.py b/Password Strength Checker/model/utils/training.py new file mode 100644 index 00000000..7b82ca12 --- /dev/null +++ b/Password Strength Checker/model/utils/training.py @@ -0,0 +1,47 @@ +# disable debugging messages +def warn(*args, **kwargs): + pass +import warnings +warnings.warn = warn +warnings.filterwarnings("ignore", category=DeprecationWarning) +import os +os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' +os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' +from silence_tensorflow import silence_tensorflow +silence_tensorflow("WARNING") + +import pandas as pd + +from sklearn.model_selection import train_test_split +from tensorflow.keras.models import Sequential +from tensorflow.keras.layers import Dense +from tensorflow.keras.utils import to_categorical + + +def run_training(): # function to run the training process + dataframe = pd.read_csv('model/output.csv') # load the processed data from output.csv + + # split the data into features and target variable + X = dataframe[['length', 'lowercase_count', 'uppercase_count', 'digit_count', 'special_count', 'entropy', 'repetitive_count', 'sequential_count']] # feature columns + y = dataframe['strength'] # target variable + + # convert target variable to categorical + y = to_categorical(y) # convert labels to categorical format for multi-class classification + + # split into training and test sets + X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # 80-20 split + + # initialize the model + model = Sequential() # create a sequential model + model.add(Dense(128, activation='relu', input_shape=(X_train.shape[1],))) # add input layer with 128 neurons + model.add(Dense(64, activation='relu')) # add hidden layer with 64 neurons + model.add(Dense(y.shape[1], activation='softmax')) # add output layer with softmax activation + + # compile the model + model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) # compile the model with adam optimizer + + # train the model + model.fit(X_train, y_train, epochs=50, batch_size=32, validation_split=0.2) # fit the model on training data + + # save the model to a file + model.save('model/deep_learning_model.h5') # save the trained model \ No newline at end of file diff --git a/Password Strength Checker/requirements.txt b/Password Strength Checker/requirements.txt new file mode 100644 index 00000000..e2b7e64a --- /dev/null +++ b/Password Strength Checker/requirements.txt @@ -0,0 +1,46 @@ +absl-py==2.1.0 +astunparse==1.6.3 +certifi==2024.8.30 +charset-normalizer==3.4.0 +flatbuffers==24.3.25 +gast==0.6.0 +google-pasta==0.2.0 +grpcio==1.67.0 +h5py==3.12.1 +idna==3.10 +joblib==1.4.2 +keras==3.6.0 +libclang==18.1.1 +Markdown==3.7 +markdown-it-py==3.0.0 +MarkupSafe==3.0.1 +mdurl==0.1.2 +ml-dtypes==0.4.1 +namex==0.0.8 +numpy==1.26.4 +opt_einsum==3.4.0 +optree==0.13.0 +packaging==24.1 +pandas==2.2.3 +protobuf==4.25.5 +Pygments==2.18.0 +python-dateutil==2.9.0.post0 +pytz==2024.2 +requests==2.32.3 +rich==13.9.2 +scikit-learn==1.5.2 +scipy==1.14.1 +setuptools==78.1.1 +silence_tensorflow==1.2.2 +six==1.16.0 +tensorboard==2.17.1 +tensorboard-data-server==0.7.2 +tensorflow-cpu==2.17.0 +termcolor==2.5.0 +threadpoolctl==3.5.0 +typing_extensions==4.12.2 +tzdata==2024.2 +urllib3==2.2.3 +Werkzeug==3.0.4 +wheel==0.44.0 +wrapt==1.16.0 diff --git a/Pizza Order/PizzaTest.py b/Pizza Order/PizzaTest.py new file mode 100644 index 00000000..bc77171d --- /dev/null +++ b/Pizza Order/PizzaTest.py @@ -0,0 +1,112 @@ +import subprocess + + +def runTest (file, inText): + if file =="order": + res = subprocess.run("python " + file + ".py", input=inText, capture_output=True, text=True, shell=True) + return res.stdout + + if file == "pizzaReceipt": + res = subprocess.run("python -c \"from pizzaReceipt import *; generateReceipt([" +inText+ "])\"", capture_output=True, text=True, shell= True) + return res.stdout + + +def equalWithoutSpaces(expected, student): + expected = expected.replace(" ", "") + expected = expected.replace("\t", "") + student = student.replace(" ", "") + student = student.replace("\t", "") + return expected == student + + + +# --------------- Test 1 - No Order--------------- + +inputString = "" +studentOutput = runTest("pizzaReceipt", inputString) +expectedOutput = "You did not order anything\n" + +# Compare studentOutput to expectedOutput +if studentOutput == expectedOutput: + print("Test 1 Passed. (Receipt for empty order)") +else: + print("Test 1 Failed. (Receipt for empty order)") + +#print(studentOutput) + +# --------------- Test 2 - List of Orders--------------- + +inputString = "('L', ['HAM', 'BACON', 'ONION', 'TOMATO']), ('S', ['PEPPERONI', 'SAUSAGE', 'CHICKEN', 'HAM']), ('L', ['BROCCOLI', 'CHICKEN', 'ONION'])" +studentOutput = runTest("pizzaReceipt", inputString) +expectedOutput = "Your order: \nPizza 1: L 11.99\n- HAM\n- BACON\n- ONION\n- TOMATO\nExtra Topping (L) 1.00\n" +expectedOutput += "Pizza 2: S 7.99\n- PEPPERONI\n- SAUSAGE\n- CHICKEN\n- HAM\nExtra Topping (S) 0.50\n" +expectedOutput += "Pizza 3: L 11.99\n- BROCCOLI\n- CHICKEN\n- ONION\nTax: 4.35\nTotal: 37.82\n" + +# Compare studentOutput to expectedOutput +#if studentOutput == expectedOutput: +if equalWithoutSpaces(expectedOutput, studentOutput): + print("Test 2 Passed. (Receipt for empty order of 3 pizzas)") +else: + print("Test 2 Failed. (Receipt for empty order of 3 pizzas)") + + +# --------------- Test 3 - List of Orders--------------- + +inputString = "('XL', ['GREEN PEPPER', 'HOT PEPPER', 'MUSHROOM', 'ONION', 'SPINACH']), ('L', ['PEPPERONI', 'ONION', 'OLIVE', 'MUSHROOM']), ('L', ['PINEAPPLE', 'HAM']), ('M', ['GROUND BEEF', 'TOMATO', 'ONION', 'SPINACH'])" +studentOutput = runTest("pizzaReceipt", inputString) +expectedOutput = "Your order: \nPizza 1: XL 13.99\n- GREEN PEPPER\n- HOT PEPPER\n- MUSHROOM\n- ONION\n- SPINACH\nExtra Topping (XL) 1.25\n" +expectedOutput += "Extra Topping (XL) 1.25\nPizza 2: L 11.99\n- PEPPERONI\n- ONION\n- OLIVE\n- MUSHROOM\n" +expectedOutput += "Extra Topping (L) 1.00\nPizza 3: L 11.99\n- PINEAPPLE\n- HAM\nPizza 4: M 9.99\n" +expectedOutput += "- GROUND BEEF\n- TOMATO\n- ONION\n- SPINACH\nExtra Topping (M) 0.75\nTax: 6.79\nTotal: 59.00\n" + +# Compare studentOutput to expectedOutput +if equalWithoutSpaces(expectedOutput, studentOutput): + print("Test 3 Passed. (Receipt for empty order of 4 pizzas)") +else: + print("Test 3 Failed. (Receipt for empty order of 4 pizzas)") + +# --------------- Test 4 - Find Specific Values in Output --------------- + +studentOutput = runTest("order", "Yes\nL\nHAM\nX\nNo\n") + +if studentOutput.find("13.55") != -1: + print("Test 4 Passed. (Ordering system for order of 1 pizza)") +else: + print("Test 4 Failed. (Ordering system for order of 1 pizza)") + +#print(studentOutput) + +# --------------- Test 5 - Find Specific Values in Output--------------- + +studentOutput = runTest("order", "Yes\nmedium\nM\nLIST\npepperoni\nonion\nmushroom\nhot pepper\ntomato\nX\nq\n") + +if studentOutput.find("\"X\"\n('") != -1 and studentOutput.count("Choose a size:") == 2 and studentOutput.count("Type in one of our toppings") == 7 and studentOutput.find("1.49") != -1 and studentOutput.find("12.98") != -1: + print("Test 5 Passed. (Ordering system with typo and use of LIST)") +else: + + print("Test 5 Failed. (Ordering system with typo and use of LIST)") + +print() +print(studentOutput.find("\"X\"\n('") != -1) +print(studentOutput.count("Choose a size:") == 2) +print(studentOutput.count("Type in one of our toppings") == 7) +print(studentOutput.find("1.49") != -1) +print(studentOutput.find("12.98") != -1) +print() + +# --------------- Find Specific Values in Output --------------- + +studentOutput = runTest("order", "y\nm\nsausage\nbacon\nonion\nX\ny\nXl\nchicken\ntomato\nspinach\nmushroom\nx\ny\nm\nolive\nbroccoli\nhot pepper\ngreen pepper\nx\nno\n") + +if studentOutput.count("Type in one of our toppings") == 14 and studentOutput.find("4.68") != -1 and studentOutput.find("40.65") != -1: + print("Test 6 Passed. (Ordering system for order of 3 pizzas)") +else: + print("Test 6 Failed. (Ordering system for order of 3 pizzas)") + +# print(studentOutput) +# print(expectedOutput) +# -------------------------------- + + + + diff --git a/Pizza Order/README.md b/Pizza Order/README.md new file mode 100644 index 00000000..b859e05f --- /dev/null +++ b/Pizza Order/README.md @@ -0,0 +1,6 @@ +# OrderPizza + A program that I created in one of my computer science courses containing a frontend and backend. The frontend deals with asking the user for their order, while the backend focuses on storing the information in a receipt format along with its calculations by using functions, lists, and tuples. + + In the frontend, the user first asks if the customer would like to order. If they say no, the code exits completely and is terminated. If the user says yes, it will then ask for the size of pizza as each have a different price range. After, the user will ask for toppings. The maximum that they can enter is three. Afterwards, every topping will cost an additional price to its total. After they have completed asking toppings, the program creates the order in a tuple and is stored in a variable. If the user would like to continue to ordering, the program would loop once more using a while loop and repeat the same questions that were asked in the last instance Afterwards, the second order is incremented to the variable containing the tuple. Otherwise, the code exits and the pizza receipt file is called using the variable of the tuple containing the pizza order and will print a receipt detailing the order and the total. + + In the backend, once the customer has finished ordering, the function is called using the variable as a paramter containing the customers order and creates a receipt by first showing the first pizza, its size, toppings and the amount is placed on the right hand side. If there are more than three toppings, it will show its additional cost as well. If there are more pizzas included, it will repeat the process once more. Afterwards, it shows the total before tax, the additional 13% tax in dollar amount and the total with tax. diff --git a/Pizza Order/order.py b/Pizza Order/order.py new file mode 100644 index 00000000..3ece1594 --- /dev/null +++ b/Pizza Order/order.py @@ -0,0 +1,80 @@ +# purpose of order.py is the front end for users to submit their order +from pizzaReceipt import * # asks to import all functions found in the pizzaReceipt.py file + +# set all initial variables before beginning +size = "" +pizza_lst = [] +pizza_lst_current = [] +toppings_lst = [] # list to be a parameter for generateReceipt function +list_order_yes = ["Yes", "yes", "Y", "y", "YES"] +list_order_no = ["No", "no", "Q", "NO", "N", "n"] +TOPPINGS = ("ONION", "TOMATO", "GREEN PEPPER", "MUSHROOM", "OLIVE", "SPINACH", "BROCCOLI", "PINEAPPLE", + "HOT PEPPER", "PEPPERONI", "HAM", "BACON", "GROUND BEEF", "CHICKEN", "SAUSAGE") + +# ask user whether they want to order. +order = input("Do you want to order a pizza? ") + +# case for when an invalid input is submitted +while (order not in list_order_yes) and (order not in list_order_no): + order = input("Do you want to order a pizza? ") + +# ask for size +if order in list_order_yes: + size = input("Choose a size: ") + size.upper() + + # case for when a user inputs invalid size + while size.upper() not in ["S", "M", "L", "XL"]: + size = input("Choose a size: ") + +# entire loop to repeat if user wants to order more than one pizza +while order in list_order_yes: + # set empty toppings list as it will show empty each time loop is made + toppings_lst = [] + # ask user for topping, whether they want to see a list of the toppings, or to finish ordering toppings. + topping = input('Type in one of our toppings to add it to your pizza. To see the list of toppings, enter "LIST". ' + 'When you are done adding toppings, enter "X" ') + + # cae for when a user places an invalid input for this question + while (topping.upper() != "X") and (topping.upper() != "LIST") and (topping.upper() not in TOPPINGS): + topping = input('Type in one of our toppings to add it to your pizza. To see the list of toppings, enter "LIST". ' + 'When you are done adding toppings, enter "X" ') + + print() + # toppings while loop which ask for toppings selection or list view, multiple times until user enters X + while topping.upper() != "X": + TOPPINGS = ("ONION", "TOMATO", "GREEN PEPPER", "MUSHROOM", "OLIVE", "SPINACH", "BROCCOLI", "PINEAPPLE", + "HOT PEPPER", "PEPPERONI", "HAM", "BACON", "GROUND BEEF", "CHICKEN", "SAUSAGE") + if topping.upper() == "LIST": + print(topping.upper()) + print(TOPPINGS) + topping = input('Type in one of our toppings to add it to your pizza. To see the list of toppings, enter "LIST". ' + 'When you are done adding toppings, enter "X" \n \n') + elif topping.upper() in TOPPINGS: + print(topping.upper()) + print("Added", topping.upper(), "to your pizza") + toppings_lst.append(topping) + topping = input('Type in one of our toppings to add it to your pizza. To see the list of toppings, enter "LIST". ' + 'When you are done adding toppings, enter "X" \n \n') + + # add the size and toppings list as a tuple to pizza_lst + pizza_lst.append((size.upper(), toppings_lst)) + print(pizza_lst) + # ask whether they want to continue ordering + order = input("Do you want to continue ordering? ") + + # case for when user types invalid input + while (order not in list_order_yes) and (order not in list_order_no): + order = input("Do you want to order a pizza? ") + + # if they say no, break the loop and go through the last line of the code + if order in list_order_no: + break + elif order in list_order_yes: + size = input("Choose a size: ") # if they want to order again start by asking size + + # case for when user types invalid input + while size.upper() not in ["S", "M", "L", "XL"]: + size = input("Choose a size: ") + +generateReceipt(pizza_lst) # at the end of program, call function using pizza_lst as a parameter diff --git a/Pizza Order/pizzaReceipt.py b/Pizza Order/pizzaReceipt.py new file mode 100644 index 00000000..b7ff1d3d --- /dev/null +++ b/Pizza Order/pizzaReceipt.py @@ -0,0 +1,105 @@ +# purpose of pizzaReceipt.py is the back end where the developers create methods and functions to properly format the receipt and its total +def generateReceipt(pizzaOrder): + # parameter will be placed with pizza_lst = ("M", ["PEPPERONI", "OLIVE"], -----) + # set initial variables + size = "" + additional_price = 0 + price_before_tax = 0 + tax = 1.13 + counter = 1 # pizza number + size_price = 0 + additional_price_tag = float(0) + additional_price_tag_format = "" + + # if its an empty list, display this statement + if len(pizzaOrder) == 0: + print("You did not order anything") + exit() + + # beginning of the format of receipt + print("Your order: ") + + # a for loop which goes through all tuples in the list based on its indices + for pizza in range(len(pizzaOrder)): + # cases to determine the sizes selected and its price + if pizzaOrder[pizza][0] == "S": + size_price = 7.99 + size = "S" + elif pizzaOrder[pizza][0] == "M": + size_price = 9.99 + size = "M" + elif pizzaOrder[pizza][0] == "L": + size_price = 11.99 + size = "L" + elif pizzaOrder[pizza][0] == "XL": + size_price = 13.99 + size = "XL" + + # add the price of the size to the final price before tax + price_before_tax += size_price + + # formatting the pizza number and its size beside it and the price on the other side + if size == "XL": + print("Pizza", str(counter) + ":", str(size) + " \t\t\t " + str(size_price)) + elif size == "L": + print("Pizza", str(counter) + ":", str(size) + " \t\t\t " + str(size_price)) + elif size == "M": + print("Pizza", str(counter) + ":", str(size) + " \t\t\t " + str(size_price)) + elif size == "S": + print("Pizza", str(counter) + ":", str(size) + " \t\t\t " + str(size_price)) + + # increment counter variable by one for the pizza number + counter += 1 + + # format the toppings with a dash in front + for j in range(len(pizzaOrder[pizza][1])): + print("- " + str(pizzaOrder[pizza][1][j])) + + # if theres more than three toppings, calculate the total additional price and added to the total price before tax + if len(pizzaOrder[pizza][1]) > 3: + n = len(pizzaOrder[pizza][1]) - 3 + if size == "S": + additional_price_tag = 0.50 + additional_price_tag_format = "{:.2f}".format(additional_price_tag) + additional_price = 0.50 * n + price_before_tax += additional_price + elif size == "M": + additional_price_tag = 0.75 + additional_price = 0.75 * n + price_before_tax += additional_price + elif size == "L": + additional_price_tag = 1.00 + additional_price_tag_format = "{:.2f}".format(additional_price_tag) + additional_price = 1.00 * n + price_before_tax += additional_price + elif size == "XL": + additional_price_tag = 1.25 + additional_price = 1.25 * n + price_before_tax += additional_price + + # format the extra topping portion of the receipt with its size and price on the other side + float_additional_price = float(additional_price) + format_additional_price = "{:.2f}" .format(float_additional_price) + + for extra in range(len(pizzaOrder[pizza][1])): + if extra > 2: + if size == "XL": + print("Extra Topping", "(" + size + ")" + "\t\t " + str(additional_price_tag)) + elif size == "L": + print("Extra Topping", "(" + size + ")" + "\t\t " + str(additional_price_tag_format)) + elif size == "M": + print("Extra Topping", "(" + size + ")" + "\t\t " + str(additional_price_tag)) + elif size == "S": + print("Extra Topping", "(" + size + ")" + "\t\t " + str(additional_price_tag_format)) + # outside of loop begins, calculates the price before tax with the tax value set earlier + price_final = price_before_tax * tax + + # add the tax price to be added and set it to a float, as well as the final price with tax + float1 = float(price_before_tax * (13/100)) + float2 = float(price_final) + formatFloat1 = "{:.2f}" .format(float1) + formatFloat2 = "{:.2f}" .format(float2) + + # format the price of the tax, and the total with both values on the other side + print("Tax:" + "\t\t\t\t\t " + formatFloat1) + print("Total:" + "\t\t\t\t\t " + formatFloat2) diff --git a/Pizza Order/pyvenv.cfg b/Pizza Order/pyvenv.cfg new file mode 100644 index 00000000..b83f8fb7 --- /dev/null +++ b/Pizza Order/pyvenv.cfg @@ -0,0 +1,8 @@ +home = /Library/Frameworks/Python.framework/Versions/3.10 +implementation = CPython +version_info = 3.10.0.final.0 +virtualenv = 20.13.0 +include-system-site-packages = false +base-prefix = /Library/Frameworks/Python.framework/Versions/3.10 +base-exec-prefix = /Library/Frameworks/Python.framework/Versions/3.10 +base-executable = /usr/local/bin/python3.10 diff --git a/Pomodoro Timer/Pomodoro Timer MacOS Linux.py b/Pomodoro Timer/Pomodoro Timer MacOS Linux.py new file mode 100644 index 00000000..43fca53d --- /dev/null +++ b/Pomodoro Timer/Pomodoro Timer MacOS Linux.py @@ -0,0 +1,24 @@ +# Pomodoro Timer for macOS/Linux +import time +import os + +def pomodoro_timer_unix(work_duration=25, break_duration=5, cycles=4): + for cycle in range(cycles): + print(f"Cycle {cycle + 1}/{cycles}: Start working for {work_duration} minutes.") + time.sleep(work_duration * 60) + os.system('echo -e "\a"') # Make a beep sound on macOS/Linux + print("Time's up! Take a break.") + + print(f"Break time! Relax for {break_duration} minutes.") + time.sleep(break_duration * 60) + os.system('echo -e "\a"') # Make a beep sound on macOS/Linux + print("Break is over! Back to work.") + + print("All cycles completed! Great job!") + +if __name__ == "__main__": + work_duration = int(input("Enter work duration in minutes (default is 25): ") or 25) + break_duration = int(input("Enter break duration in minutes (default is 5): ") or 5) + cycles = int(input("Enter number of cycles (default is 4): ") or 4) + + pomodoro_timer_unix(work_duration, break_duration, cycles) diff --git a/Pomodoro Timer/Pomodoro Timer Windows.py b/Pomodoro Timer/Pomodoro Timer Windows.py new file mode 100644 index 00000000..8687c954 --- /dev/null +++ b/Pomodoro Timer/Pomodoro Timer Windows.py @@ -0,0 +1,24 @@ +# Pomodoro Timer for Windows +import time +import winsound + +def pomodoro_timer_windows(work_duration=25, break_duration=5, cycles=4): + for cycle in range(cycles): + print(f"Cycle {cycle + 1}/{cycles}: Start working for {work_duration} minutes.") + time.sleep(work_duration * 60) + winsound.Beep(1000, 1000) # Sound an alert to indicate work period end + print("Time's up! Take a break.") + + print(f"Break time! Relax for {break_duration} minutes.") + time.sleep(break_duration * 60) + winsound.Beep(1000, 1000) # Sound an alert to indicate break period end + print("Break is over! Back to work.") + + print("All cycles completed! Great job!") + +if __name__ == "__main__": + work_duration = int(input("Enter work duration in minutes (default is 25): ") or 25) + break_duration = int(input("Enter break duration in minutes (default is 5): ") or 5) + cycles = int(input("Enter number of cycles (default is 4): ") or 4) + + pomodoro_timer_windows(work_duration, break_duration, cycles) diff --git a/Pomodoro Timer/README.md b/Pomodoro Timer/README.md new file mode 100644 index 00000000..b1620918 --- /dev/null +++ b/Pomodoro Timer/README.md @@ -0,0 +1,33 @@ +# Pomodoro Timer +## 📋 Overview +The Pomodoro Timer is a productivity tool designed to help you manage your time efficiently using the Pomodoro Technique. It splits your work into intervals—typically 25 minutes of focused work followed by a 5-minute break. This cycle helps to boost focus and prevent burnout by encouraging regular breaks. The script is cross-platform, supporting both Windows and macOS/Linux. + +## ✨ Features +- **Customizable Work and Break Durations:** Set your preferred time for work and break sessions. +- **Support for Multiple Cycles:** Run multiple Pomodoro sessions in a row. +- **Platform-Specific Alerts:** +- **Windows:** Uses sound alerts (winsound) to notify users when a session is complete. +- **macOS/Linux:** Uses terminal beep commands for notifications. + +## Running the script +1. **Clone the Repository or Download the Script:** +- clone the repository: +``` +git clone https://github.com/max-lopzzz/Python-Scripts/tree/master/Pomodoro%20Timer +``` +- Or download the script directly from the repository page. +2. **Navigate to the Script Location:** Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and navigate to the folder containing the script: +``` +cd path/to/your/script +``` +3. **Run the Script:** Execute the script using Python: +``` +python pomodoro_timer.py +``` +or, if `python` points to Python 2.x on your system: +``` +python3 pomodoro_timer.py +``` +### Customizing Durations +- Once the script runs, it may prompt you to enter custom durations for both work and break intervals. +- Simply follow the prompts to customize your session lengths. diff --git a/Python GUI Notepad/Python GUI Notepad.py b/Python GUI Notepad/Python GUI Notepad.py new file mode 100644 index 00000000..6aa14693 --- /dev/null +++ b/Python GUI Notepad/Python GUI Notepad.py @@ -0,0 +1,29 @@ +import tkinter as tk +from tkinter import filedialog + +def save_file(): + file = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text Files", "*.txt")]) + if file: + with open(file, 'w') as f: + f.write(text_area.get(1.0, tk.END)) + +def open_file(): + file = filedialog.askopenfilename(filetypes=[("Text Files", "*.txt")]) + if file: + with open(file, 'r') as f: + text_area.delete(1.0, tk.END) + text_area.insert(tk.END, f.read()) + +root = tk.Tk() +root.title("Notepad") +text_area = tk.Text(root, wrap='word') +text_area.pack(expand='yes', fill='both') + +menu = tk.Menu(root) +root.config(menu=menu) +file_menu = tk.Menu(menu, tearoff=0) +menu.add_cascade(label="File", menu=file_menu) +file_menu.add_command(label="Open", command=open_file) +file_menu.add_command(label="Save As", command=save_file) + +root.mainloop() diff --git a/Python GUI Notepad/Readme.md b/Python GUI Notepad/Readme.md new file mode 100644 index 00000000..ceccdd5a --- /dev/null +++ b/Python GUI Notepad/Readme.md @@ -0,0 +1,34 @@ +# Python GUI Notepad + +This Python script provides a simple graphical user interface (GUI) Notepad application that allows users to open and save text files. It is built using the `tkinter` library, which comes with Python. + +## Features + +- **Open Files**: Open and edit existing `.txt` files. +- **Save Files**: Save the current text as a new `.txt` file. + +## Requirements + +Make sure you have Python installed on your machine. This script uses the built-in `tkinter` library, so no additional installations are necessary. + +## Usage + +### Opening Files + +- Run the script by executing the following command: + ```bash + python gui_notepad.py + ``` +- Click on the "File" menu and select "Open" to browse and open a .txt file. +- The contents of the selected file will be loaded into the text editor for editing. + +### Saving Files +- After making edits, click on the "File" menu and select "Save As" to save your work as a new .txt file. +- The file will be saved with the provided name in the location of your choice. + +### Example +1) Open an existing text file: + - Click on "File" -> "Open" and select the .txt file you want to edit. +2) Edit the contents in the text area. +3) Save the edited text: + - Click on "File" -> "Save As" to save the changes to a new or existing file. diff --git a/QR Code Generator/QRcode.py b/QR Code Generator/QRcode.py index adf4bcd0..bd1dffb5 100644 --- a/QR Code Generator/QRcode.py +++ b/QR Code Generator/QRcode.py @@ -1,8 +1,29 @@ import qrcode +from qrcode.constants import ERROR_CORRECT_L -qr = qrcode.QRCode(version=1, error_correction=qrcode.constants.ERROR_CORRECT_L) -qr.add_data("INSERT YOUR LINK HERE") -qr.make(fit=True) +def generate_qrcode(data: str, file_path: str = "qrcode.png", fill_color: str = "black", back_color: str = "white"): + """ + Generates a QR code from the provided data and saves it as an image file. + + Parameters: + - data (str): The content the QR code should contain (URL, text, etc.). + - file_path (str): The path to save the QR code image file (default: "qrcode.png"). + - fill_color (str): Color of the QR code (default: "black"). + - back_color (str): Background color of the QR code (default: "white"). + """ + qr = qrcode.QRCode( + version=1, + error_correction=ERROR_CORRECT_L, + box_size=10, + border=4 + ) + qr.add_data(data) + qr.make(fit=True) + + # Generate the image with specified colors + img = qr.make_image(fill_color=fill_color, back_color=back_color) + img.save(file_path) + print(f"QR code saved as {file_path}") -img = qr.make_image(fill_color="black", back_color="white") -img.save("qrcode.png") +# Usage example +generate_qrcode("https://example.com", "my_qrcode.png") diff --git a/QR Code Scanner/Readme.md b/QR Code Scanner/Readme.md new file mode 100644 index 00000000..45b586d5 --- /dev/null +++ b/QR Code Scanner/Readme.md @@ -0,0 +1,52 @@ +# QR Code Scanner Script + +This script enables users to scan and decode QR codes from image files (PNG and JPG formats). It uses OpenCV and Pyzbar for decoding QR codes and provides a simple file dialog for selecting images on your local machine. + +## Requirements + +To run this script, you'll need Python 3.x installed on your machine. The required libraries are listed in `requirements.txt`, including: + +- **opencv-python**: For image processing. +- **pyzbar**: For decoding QR codes. +- **Pillow**: Required for handling image formats. +- **tk**: Provides a file dialog for image selection. + +## Installation + +1. **Clone the repository** (or download the script and `requirements.txt` directly): + ```bash + git clone + cd + ``` +2. **Install dependencies:**(Run the following command to install the necessary libraries from `requirements.txt`:) + + ```bash + pip install -r requirements.txt + ``` + +## Usage + +1. **Run the script** (Execute the QR code scanner script using:) + ```bash + python qr_code_scanner.py + ``` +2. **Select an Image** + - A file dialog will open, allowing you to select a PNG or JPG image containing a QR code. + - Once an image is selected, the script will attempt to decode any QR code present in the image. +3. **View the Output** + - If a QR code is detected, its contents will be displayed in the terminal. + +## Requirements.txt File + +The `requirements.txt` file lists all dependencies for the QR code scanner script. This file ensures that the correct versions of each library are installed to avoid compatibility issues. Libraries in `requirements.txt` include: + +```bash +opencv-python +pyzbar +Pillow +tk +``` + +Make sure to install these libraries by running pip install -r `requirements.txt` before using the script. + +## License diff --git a/QR Code Scanner/qr_code.png b/QR Code Scanner/qr_code.png new file mode 100644 index 00000000..c75d16d8 Binary files /dev/null and b/QR Code Scanner/qr_code.png differ diff --git a/QR Code Scanner/qr_scanner.py b/QR Code Scanner/qr_scanner.py new file mode 100644 index 00000000..67577003 --- /dev/null +++ b/QR Code Scanner/qr_scanner.py @@ -0,0 +1,37 @@ +import cv2 +from pyzbar.pyzbar import decode +from tkinter import filedialog +from tkinter import Tk +from PIL import Image + +def scan_qrcode(image_path): + # Load the image using OpenCV + img = cv2.imread(image_path) + + # Decode the QR code in the image + decoded_objects = decode(img) + + # Check if any QR code is found + if decoded_objects: + for obj in decoded_objects: + print(f"QR Code Detected: {obj.data.decode('utf-8')}") + else: + print("No QR code detected in the image.") + +def open_file(): + # Open a file dialog to allow the user to select an image file (PNG or JPG) + root = Tk() + root.withdraw() # Hide the main tkinter window + file_path = filedialog.askopenfilename( + title="Select Image", + filetypes=[("Image files", "*.png;*.jpg;*.jpeg")] + ) + + if file_path: + print(f"Selected file: {file_path}") + scan_qrcode(file_path) + else: + print("No file selected.") + +if __name__ == "__main__": + open_file() diff --git a/QR Code Scanner/requirements.txt b/QR Code Scanner/requirements.txt new file mode 100644 index 00000000..0d2d4fc3 --- /dev/null +++ b/QR Code Scanner/requirements.txt @@ -0,0 +1,4 @@ +opencv-python +pyzbar +Pillow +tk diff --git a/README.md b/README.md index b22404fd..7e0f2397 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # Table of Contents -- [Table of Contents](#table-of-contents) -- [Python Scripts](#python-scripts) - - [Contributing](#contributing) - - [Adding a New Script](#adding-a-new-script) - - [List of Scripts in Repo](#list-of-scripts-in-repo) - - [Wall of Contributors](#wall-of-contributors) +- [Contributing](#contributing) + - [Adding a New Script](#adding-a-new-script) +- [List of Scripts in Repo](#list-of-scripts-in-repo) +- [Gitpod](#gitpod) +- [Wall of Contributors](#wall-of-contributors) + + +[![Join Our Discord](https://img.shields.io/badge/Discord-Join%20Server-blue?logo=discord&style=for-the-badge)](https://discord.com/invite/Yn9g6KuWyA) +[![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?logo=youtube&style=for-the-badge)](https://www.youtube.com/@dhanushnehru?sub_confirmation=1) +[![Subscribe to Newsletter](https://img.shields.io/badge/Newsletter-Subscribe-orange?style=for-the-badge)](https://dhanushn.substack.com/) # Python Scripts @@ -17,7 +21,7 @@ We encourage contributions from the community to make this repository even more _**Note: Please follow the maintainer of the repository for quick approval of the PR's via [Twitter](https://twitter.com/Dhanush_Nehru), [Instagram](https://www.instagram.com/dhanush_nehru/), [Youtube](https://www.youtube.com/@dhanushnehru?sub_confirmation=1), [Github](https://github.com/DhanushNehru)**_ -### Adding a New Script 👇 +### Adding a New Script **1. Create an issue:** Start by creating an issue in this repository. Describe the new script you'd like to contribute, its purpose, and any specific features it will provide. @@ -29,112 +33,139 @@ _**Note: Please follow the maintainer of the repository for quick approval of th **NOTE:** Remember to close your issues once your PR has been merged! They can be reopened if needed. -More information on contributing and the general code of conduct for discussion and feedback in this repo can be found here: [Contributions.md](https://github.com/DhanushNehru/Python-Scripts/blob/master/Contributions.md) +More information on contributing and the general code of conduct for discussion and feedback in this repo can be found here: [CONTRIBUTIONS.md](https://github.com/DhanushNehru/Python-Scripts/blob/main/CONTRIBUTIONS.md) ## List of Scripts in Repo -| Script | Link | Description | -| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| Arrange It | [Arrange It](https://github.com/DhanushNehru/Python-Scripts/tree/master/Arrange%20It) | A Python script that can automatically move files into corresponding folders based on their extensions. | -| Auto WiFi Check | [Auto WiFi Check](https://github.com/DhanushNehru/Python-Scripts/tree/master/Auto%20WiFi%20Check) | A Python script to monitor if the WiFi connection is active or not -| AutoCert | [AutoCert](https://github.com/DhanushNehru/Python-Scripts/tree/master/AutoCert) | A Python script to auto-generate e-certificates in bulk. | -| Automated Emails | [Automated Emails](https://github.com/DhanushNehru/Python-Scripts/tree/master/Automate%20Emails%20Daily) | A Python script to send out personalized emails by reading a CSV file. | -| Black Hat Python | [Black Hat Python](https://github.com/DhanushNehru/Python-Scripts/tree/master/Black%20Hat%20Python) | Source code from the book Black Hat Python | -| Blackjack | [Blackjack](https://github.com/DhanushNehru/Python-Scripts/tree/master/Blackjack) | A game of Blackjack - let's get a 21. | -| Chessboard | [Chessboard](https://github.com/DhanushNehru/Python-Scripts/tree/master/Chess%20Board) | Creates a chessboard using matplotlib. | -| Compound Interest Calculator | [Compound Interest Calculator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Calculate%20Compound%20Interest) | A Python script to calculate compound interest. | -| Countdown Timer | [Countdown Timer](https://github.com/DhanushNehru/Python-Scripts/tree/master/Countdown%20Timer) | Displays a message when the Input time elapses. | -| Convert Temperature | [Convert Temperature](https://github.com/DhanushNehru/Python-Scripts/tree/master/Convert%20Temperature) |A python script to convert temperature between Fahreheit, Celsius and Kelvin | -| Crop Images | [Crop Images](https://github.com/DhanushNehru/Python-Scripts/tree/master/Crop%20Images) | A Python script to crop a given image. | -| CSV to Excel | [CSV to Excel](https://github.com/DhanushNehru/Python-Scripts/tree/master/CSV%20to%20Excel) | A Python script to convert a CSV to an Excel file. | -| Currency Script | [Currency Script](https://github.com/DhanushNehru/Python-Scripts/tree/master/Currency%20Script) | A Python script to convert the currency of one country to that of another. | -| Digital Clock | [Digital Clock](https://github.com/DhanushNehru/Python-Scripts/tree/master/Digital%20Clock) | A Python script to preview a digital clock in the terminal. | -| Display Popup Window | [Display Popup Window](https://github.com/DhanushNehru/Python-Scripts/tree/master/Display%20Popup%20Window) | A Python script to preview a GUI interface to the user. | -| Duplicate Finder | [Duplicate Finder](https://github.com/DhanushNehru/Python-Scripts/tree/master/Duplicate%Fnder) | The script identifies duplicate files by MD5 hash and allows deletion or relocation. | -| Emoji | [Emoji](https://github.com/DhanushNehru/Python-Scripts/tree/master/Emoji) | The script generates a PDF with an emoji using a custom TrueType font. -| Emoji to PDF | [Emoji to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/master/Emoji%20To%20Pdf) | A Python Script to view Emoji in PDF. -| Expense Tracker | [Expense Tracker](https://github.com/DhanushNehru/Python-Scripts/tree/master/Expense%20Tracker) | A Python script which can track expenses. | -| Face Reaction | [Face Reaction](https://github.com/DhanushNehru/Python-Scripts/tree/master/Face%20Reaction) | A script which attempts to detect facial expressions. | -| Fake Profiles | [Fake Profiles](https://github.com/DhanushNehru/Python-Scripts/tree/master/Fake%20Profile) | Creates fake profiles. | -| File Encryption Decryption | [File Encryption Decryption](https://github.com/DhanushNehru/Python-Scripts/tree/master/File%20Encryption%20Decryption) | Encrypts and Decrypts files using AES Algorithms for Security purposes. | -| Font Art | [Font Art](https://github.com/DhanushNehru/Python-Scripts/tree/master/Font%20Art) | Displays a font art using Python. | -| Freelance Helper Program | [freelance-helper](https://github.com/DhanushNehru/Python-Scripts/tree/master/freelance-help-program) | Takes an Excel file with working hours and calculates the payment. | -| Get Hexcodes From Websites | [Get Hexcodes From Websites](https://github.com/DhanushNehru/Python-Scripts/tree/master/Get%20Hexcodes%20From%20Websites) | Generates a Python list containing Hexcodes from a website. | -| Hand_Volume | [Hand_Volume](https://github.com/DhanushNehru/Python-Scripts/tree/master/Hand%20Volume) | Detects and tracks hand movements to control volume. | -| Harvest Predictor | [Harvest Predictor](https://github.com/DhanushNehru/Python-Scripts/tree/master/Harvest%20Predictor) | Takes some necessary input parameters and predicts harvest according to it. | -| Html-to-images | [html-to-images](https://github.com/DhanushNehru/Python-Scripts/tree/master/HTML%20to%20Images) | Converts HTML documents to image files. | -| Image Capture | [Image Capture](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Capture) | Captures image from your webcam and saves it on your local device. | -| Image Compress | [Image Compress](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Compress) | Takes an image and compresses it. | -| Image Manipulation without libraries | [Image Manipulation without libraries](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Manipulation%20without%20libraries) | Manipulates images without using any external libraries. | -| Image Text | [Image Text](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Text) | Extracts text from the image. | -| Image Text to PDF | [Image Text to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Text%20to%20PDF) | Adds an image and text to a PDF. -| Image Watermarker | [Image Watermarker](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Watermarker) | Adds a watermark to an image. -| Image to ASCII | [Image to ASCII](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20to%20ASCII) | Converts an image into ASCII art. | -| Image to Gif | [Image to Gif](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20to%20GIF) | Generate gif from images. | -| IP Geolocator | [IP Geolocator](https://github.com/DhanushNehru/Python-Scripts/tree/master/IP%20Geolocator) | Uses an IP address to geolocate a location on Earth. | -| Jokes Generator | [Jokes generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Jokes%20Generator) | Generates jokes. | -| JSON to CSV 1 | [JSON to CSV 1](https://github.com/DhanushNehru/Python-Scripts/tree/master/JSON%20to%20CSV) | Converts JSON to CSV files. | -| JSON to CSV 2 | [JSON to CSV 2](https://github.com/DhanushNehru/Python-Scripts/tree/master/JSON%20to%20CSV%202) | Converts a JSON file to a CSV file. | -| JSON to CSV converter | [JSON to CSV converter](https://github.com/DhanushNehru/Python-Scripts/tree/master/Json%20to%20CSV%20Convertor) | Converts JSON file to CSV files. It can convert nested JSON files as well. A sample JSON is included for testing. | -| JSON to YAML converter | [JSON to YAML converter](https://github.com/DhanushNehru/Python-Scripts/tree/master/JSON%20to%20YAML) | Converts JSON file to YAML files. A sample JSON is included for testing. | -| Keylogger | [Keylogger](https://github.com/DhanushNehru/Python-Scripts/tree/master/Keylogger) | Keylogger that can track your keystrokes, clipboard text, take screenshots at regular intervals, and records audio. | -| Keyword - Retweeting | [Keyword - Retweeting](https://github.com/DhanushNehru/Python-Scripts/tree/master/Keyword%20Retweet%20Twitter%20Bot) | Find the latest tweets containing given keywords and then retweet them. | -| LinkedIn Bot | [LinkedIn Bot](https://github.com/DhanushNehru/Python-Scripts/tree/master/LinkedIn%20Bot) | Automates the process of searching for public profiles on LinkedIn and exporting the data to an Excel sheet. | -| Mail Sender | [Mail Sender](https://github.com/DhanushNehru/Python-Scripts/tree/master/Mail%20Sender) | Sends an email. | -| Merge Two Images | [Merge Two Images](https://github.com/DhanushNehru/Python-Scripts/tree/master/Merge%20Two%20Images) | Merges two images horizontally or vertically. | -| Mouse mover | [Mouse mover](https://github.com/DhanushNehru/Python-Scripts/tree/master/Mouse%20Mover) | Moves your mouse every 15 seconds. | -| No Screensaver | [No Screensaver](https://github.com/DhanushNehru/Python-Scripts/tree/master/No%20Screensaver) | Prevents screensaver from turning on. | -| OTP Verification | [OTP Verification](https://github.com/DhanushNehru/Python-Scripts/tree/master/OTP%20%20Verify) | An OTP Verification Checker. | -| Password Generator | [Password Generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Password%20Generator) | Generates a random password. | -| Password Manager | [Password Manager](https://github.com/nem5345/Python-Scripts/tree/master/Password%20Manager) | Generate and interact with a password manager. | -| PDF Merger | [PDF Merger](https://github.com/DhanushNehru/Python-Scripts/tree/master/PDF%20Merger) |Merges multiple PDF files into a single PDF, with options for output location and custom order.| -| PDF to Audio | [PDF to Audio](https://github.com/DhanushNehru/Python-Scripts/tree/master/PDF%20to%20Audio) | Converts PDF to audio. | -| PDF to Text | [PDF to text](https://github.com/DhanushNehru/Python-Scripts/tree/master/PDF%20to%20text) | Converts PDF to text. | -| Planet Simulation | [Planet Simulation](https://github.com/DhanushNehru/Python-Scripts/tree/master/Planet%20Simulation) | A simulation of several planets rotating around the sun. -| Playlist Exchange | [Playlist Exchange](https://github.com/DhanushNehru/Python-Scripts/tree/master/Playlist%20Exchange) | A Python script to exchange songs and playlists between Spotify and Python. -| PNG TO JPG CONVERTOR | [PNG-To-JPG](https://github.com/DhanushNehru/Python-Scripts/tree/master/PNG%20To%20JPG) | A PNG TO JPG IMAGE CONVERTOR. -| QR Code Generator | [QR Code Generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/QR%20Code%20Generator) | This is generate a QR code from the provided link | -| QR Code with logo | [QR code with Logo](https://github.com/DhanushNehru/Python-Scripts/tree/master/QR%20with%20Logo) | QR Code Customization Feature -| Random Color Generator | [Random Color Generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Random%20Color%20Generator) | A random color generator that will show you the color and values! | -| Remove Background | [Remove Background](https://github.com/DhanushNehru/Python-Scripts/tree/master/Remove%20Background) | Removes the background of images. | -| Rock Paper Scissor 1 | [Rock Paper Scissor 1](https://github.com/DhanushNehru/Python-Scripts/tree/master/Rock%20Paper%20Scissor%201) | A game of Rock Paper Scissors. -| Rock Paper Scissor 2 | [Rock Paper Scissor 2](https://github.com/DhanushNehru/Python-Scripts/tree/master/Rock%20Paper%20Scissor%202) | A new version game of Rock Paper Scissors. -| Run Then Notify | [Run Then Notify](https://github.com/DhanushNehru/Python-Scripts/tree/master/Run%20Then%20Notify) | Runs a slow command and emails you when it completes execution. | -| Selfie with Python | [Selfie with Python](https://github.com/DhanushNehru/Python-Scripts/tree/master/Selfie%20with%20Python) | Take your selfie with python . | -| Simple TCP Chat Server | [Simple TCP Chat Server](https://github.com/DhanushNehru/Python-Scripts/tree/master/TCP%20Chat%20Server) | Creates a local server on your LAN for receiving and sending messages! | -| Snake Water Gun | [Snake Water Gun](https://github.com/DhanushNehru/Python-Scripts/tree/master/Snake%20Water%20Gun) | A game similar to Rock Paper Scissors. | -| Sorting | [Sorting](https://github.com/DhanushNehru/Python-Scripts/tree/master/Sorting) | Algorithm for bubble sorting. | -| Star Pattern | [Star Pattern](https://github.com/DhanushNehru/Python-Scripts/tree/master/Star%20Pattern) | Creates a star pattern pyramid. | -| Take a break | [Take a break](https://github.com/DhanushNehru/Python-Scripts/tree/master/Take%20A%20Break) | Python code to take a break while working long hours. | -| Text Recognition | [Text Recognition](https://github.com/DhanushNehru/Python-Scripts/tree/Text-Recognition/Text%20Recognition) | A Image Text Recognition ML Model to extract text from Images | -| Text to Image | [Text to Image](https://github.com/DhanushNehru/Python-Scripts/tree/master/Text%20to%20Image) | A Python script that will take your text and convert it to a JPEG. | -| Tic Tac Toe 1 | [Tic Tac Toe 1](https://github.com/DhanushNehru/Python-Scripts/tree/master/Tic-Tac-Toe%201) | A game of Tic Tac Toe. | -| Tik Tac Toe 2 | [Tik Tac Toe 2](https://github.com/DhanushNehru/Python-Scripts/tree/master/Tic-Tac-Toe%202) | A game of Tik Tac Toe. | -| Turtle Art & Patterns | [Turtle Art](https://github.com/DhanushNehru/Python-Scripts/tree/master/Turtle%20Art) | Scripts to view turtle art also have prompt-based ones. | -| Turtle Graphics | [Turtle Graphics](https://github.com/DhanushNehru/Python-Scripts/tree/master/Turtle%20Graphics) | Code using turtle graphics. | -| Twitter Selenium Bot | [Twitter Selenium Bot](https://github.com/DhanushNehru/Python-Scripts/tree/master/Twitter%20Selenium%20Bot) | A bot that can interact with Twitter in a variety of ways. | -| Umbrella Reminder | [Umbrella Reminder](https://github.com/DhanushNehru/Python-Scripts/tree/master/Umbrella%20Reminder) | A reminder for umbrellas. | -| URL Shortener | [URL Shortener](https://github.com/DhanushNehru/Python-Scripts/tree/master/URL%20Shortener) | A URL shortener code compresses long URLs into shorter, more manageable links | -| Video Downloader | [Video Downloader](https://github.com/DhanushNehru/Python-Scripts/tree/master/Video%20Downloader) | Download Videos from youtube to your local system. | -| Video Watermarker | [Video Watermarker](https://github.com/DhanushNehru/Python-Scripts/tree/master/Video%20Watermarker) | Adds watermark to any video of your choice. | -| Virtual Painter | [Virtual Painter](https://github.com/DhanushNehru/Python-Scripts/tree/master/Virtual%20Painter) | Virtual painting application. | -| Wallpaper Changer | [Wallpaper Changer](https://github.com/DhanushNehru/Python-Scripts/tree/master/Wallpaper%20Changer) | Automatically changes home wallpaper, adding a random quote and stock tickers on it. | -| Weather GUI | [Weather GUI](https://github.com/DhanushNehru/Python-Scripts/tree/master/Weather%20GUI) | Displays information on the weather. | -| Website Blocker | [Website Blocker](https://github.com/DhanushNehru/Python-Scripts/tree/master/Website%20Blocker) | Downloads the website and loads it on your homepage in your local IP. | -| Website Cloner | [Website Cloner](https://github.com/DhanushNehru/Python-Scripts/tree/master/Website%20Cloner) | Clones any website and opens the site in your local IP. | -| Weight Converter | [Weight Converter](https://github.com/WatashiwaSid/Python-Scripts/tree/master/Weight%20Converter) | Simple GUI script to convert weight in different measurement units. | -| Wikipedia Data Extractor | [Wikipedia Data Extractor](https://github.com/DhanushNehru/Python-Scripts/tree/master/Wikipedia%20Data%20Extractor) | A simple Wikipedia data extractor script to get output in your IDE. | -| Word to PDF | [Word to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/master/Word%20to%20PDF%20converter) | A Python script to convert an MS Word file to a PDF file. | -| Youtube Downloader | [Youtube Downloader](https://github.com/DhanushNehru/Python-Scripts/tree/master/Youtube%20Downloader) | Downloads any video from [YouTube](https://youtube.com) in video or audio format! -| Pigeonhole Sort | [Algorithm](https://github.com/DhanushNehru/Python-Scripts/tree/master/PigeonHole) | the pigeonhole sort algorithm to sort your arrays efficiently! -| Youtube Playlist Info Scraper | [Youtube Playlist Info Scraper](https://github.com/DhanushNehru/Python-Scripts/tree/master/Youtube%20Playlist%20Info%20Scraper) | This python module retrieve information about a YouTube playlist in json format using playlist link. +| Script | Link | Description | +| ---------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Arrange It | [Arrange It](https://github.com/DhanushNehru/Python-Scripts/tree/main/Arrange%20It) | A Python script that can automatically move files into corresponding folders based on their extensions. | +| Auto WiFi Check | [Auto WiFi Check](https://github.com/DhanushNehru/Python-Scripts/tree/main/Auto%20WiFi%20Check) | A Python script to monitor if the WiFi connection is active or not | +| AutoCert | [AutoCert](https://github.com/DhanushNehru/Python-Scripts/tree/main/AutoCert) | A Python script to auto-generate e-certificates in bulk. | +| Autocomplete Notes App | [AutoCert](https://github.com/DhanushNehru/Python-Scripts/tree/main/Autocomplete%20Notes%20App) | A Python script to auto-generate e-certificates in bulk. | +| Automated Emails | [Automated Emails](https://github.com/DhanushNehru/Python-Scripts/tree/main/Automate%20Emails%20Daily) | A Python script to send out personalized emails by reading a CSV file. | +| Black Hat Python | [Black Hat Python](https://github.com/DhanushNehru/Python-Scripts/tree/main/Black%20Hat%20Python) | Source code from the book Black Hat Python | +| Blackjack | [Blackjack](https://github.com/DhanushNehru/Python-Scripts/tree/main/Blackjack) | A game of Blackjack - let's get a 21. | +| Chessboard | [Chessboard](https://github.com/DhanushNehru/Python-Scripts/tree/main/Chess%20Board) | Creates a chessboard using matplotlib. | +| Compound Interest Calculator | [Compound Interest Calculator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Calculate%20Compound%20Interest) | A Python script to calculate compound interest. | +| Convert Temperature | [Convert Temperature](https://github.com/DhanushNehru/Python-Scripts/tree/main/Convert%20Temperature) | A python script to convert temperature between Fahreheit, Celsius and Kelvin | +| Connect Four | [Connect Four](https://github.com/DhanushNehru/Python-Scripts/tree/main/Connect%20Four) | A Python script for the board game Connect Four, which can be played by 1-2 players | +| Countdown Timer | [Countdown Timer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Countdown%20Timer) | Displays a message when the Input time elapses. | +| Crop Images | [Crop Images](https://github.com/DhanushNehru/Python-Scripts/tree/main/Crop%20Images) | A Python script to crop a given image. | +| CSV to Excel | [CSV to Excel](https://github.com/DhanushNehru/Python-Scripts/tree/main/CSV%20to%20Excel) | A Python script to convert a CSV to an Excel file. | +| Currency Script | [Currency Script](https://github.com/DhanushNehru/Python-Scripts/tree/main/Currency%20Script) | A Python script to convert the currency of one country to that of another. | +| Digital Clock | [Digital Clock](https://github.com/DhanushNehru/Python-Scripts/tree/main/Digital%20Clock) | A Python script to preview a digital clock in the terminal. | +| Display Popup Window | [Display Popup Window](https://github.com/DhanushNehru/Python-Scripts/tree/main/Display%20Popup%20Window) | A Python script to preview a GUI interface to the user. | +| Distance Calculator | [Distance Calculator](https://github.com/Mathdallas-code/Python-Scripts/tree/main/Distance%20Calculator) | A Python script to calculate the distance between two points. +| Duplicate Finder | [Duplicate Finder](https://github.com/DhanushNehru/Python-Scripts/tree/main/Duplicate%Fnder) | The script identifies duplicate files by MD5 hash and allows deletion or relocation. | +| Emoji | [Emoji](https://github.com/DhanushNehru/Python-Scripts/tree/main/Emoji) | The script generates a PDF with an emoji using a custom TrueType font. | +| Emoji to PDF | [Emoji to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/main/Emoji%20To%20Pdf) | A Python Script to view Emoji in PDF. | +| Expense Tracker | [Expense Tracker](https://github.com/DhanushNehru/Python-Scripts/tree/main/Expense%20Tracker) | A Python script which can track expenses. | +| Face Reaction | [Face Reaction](https://github.com/DhanushNehru/Python-Scripts/tree/main/Face%20Reaction) | A script which attempts to detect facial expressions. | +| Fake Profiles | [Fake Profiles](https://github.com/DhanushNehru/Python-Scripts/tree/main/Fake%20Profile) | Creates fake profiles. | +| File Encryption Decryption | [File Encryption Decryption](https://github.com/DhanushNehru/Python-Scripts/tree/main/File%20Encryption%20Decryption) | Encrypts and Decrypts files using AES Algorithms for Security purposes. | +| File Search | [File_search](https://github.com/debojit11/Python-Scripts/tree/main/File_Search) | A python script that searches a specified folder for all files, regardless of file type, within its directory and subdirectories. | +| Font Art | [Font Art](https://github.com/DhanushNehru/Python-Scripts/tree/main/Font%20Art) | Displays a font art using Python. | +| File Organizer | [FileOrganizer](https://github.com/DhanushNehru/Python-Scripts/tree/main/FileOrganizer) | Organizes files into different folders according to their file type | +| File Renamer | [FileRenamer](https://github.com/DhanushNehru/Python-Scripts/tree/main/FileRenamer) | Bulk renames files with the same start/end | +| File Text Search | [FileTextSearch](https://github.com/DhanushNehru/Python-Scripts/tree/main/FileTextSearch) | Searches for a keyword/phrase accross different files | +| Freelance Helper Program | [freelance-helper](https://github.com/DhanushNehru/Python-Scripts/tree/main/freelance-help-program) | Takes an Excel file with working hours and calculates the payment. | +| Get Hexcodes From Websites | [Get Hexcodes From Websites](https://github.com/DhanushNehru/Python-Scripts/tree/main/Get%20Hexcodes%20From%20Websites) | Generates a Python list containing Hexcodes from a website. | +| Hand_Volume | [Hand_Volume](https://github.com/DhanushNehru/Python-Scripts/tree/main/Hand%20Volume) | Detects and tracks hand movements to control volume. | +| Hangman Game | [Hangman](https://github.com/DhanushNehru/Python-Scripts/tree/main/Hangman%20Game) | A classic word-guessing game where players guess letters to find the hidden word | +| Hardware Detector | [Hardware Detector](https://github.com/DhanushNehru/Python-Scripts/tree/main/Hardware%20Detector) | A Python script that detects and displays hardware specifications and resource usage, including CPU, RAM, disk space, and GPU information. | +| Harvest Predictor | [Harvest Predictor](https://github.com/DhanushNehru/Python-Scripts/tree/main/Harvest%20Predictor) | Takes some necessary input parameters and predicts harvest according to it. | +| Html-to-images | [html-to-images](https://github.com/DhanushNehru/Python-Scripts/tree/main/HTML%20to%20Images) | Converts HTML documents to image files. | +| Image Capture | [Image Capture](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Capture) | Captures image from your webcam and saves it on your local device. | +| Image Compress | [Image Compress](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Compress) | Takes an image and compresses it. | +| Image Manipulation without libraries | [Image Manipulation without libraries](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Manipulation%20without%20libraries) | Manipulates images without using any external libraries. | +| Image Text | [Image Text](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Text) | Extracts text from the image. | +| Image Text to PDF | [Image Text to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Text%20to%20PDF) | Adds an image and text to a PDF. | +| Image Uploader | [Image Uploader](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Uploader) | Uploads images to Imgur using a keyboard shortcut. | +| Image Watermarker | [Image Watermarker](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20Watermarker) | Adds a watermark to an image. | +| Image to ASCII | [Image to ASCII](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20to%20ASCII) | Converts an image into ASCII art. | +| Image to Gif | [Image to Gif](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20to%20GIF) | Generate gif from images. | +| Images to WebP Converter | [Images to WebP Converter](https://github.com/DhanushNehru/Python-Scripts/tree/main/Images%20to%20WebP%20Converter) | Converts images to WebP vie cmd or GUI | +| Interactive Dictionary | [Interactive Dictionary](https://github.com/DhanushNehru/Python-Scripts/tree/main/Image%20InteractiveDictionary) | finding out meanings of words | +| IP Geolocator | [IP Geolocator](https://github.com/DhanushNehru/Python-Scripts/tree/main/IP%20Geolocator) | Uses an IP address to geolocate a location on Earth. | +| Jokes Generator | [Jokes generator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Jokes%20Generator) | Generates jokes. | +| JSON to CSV 1 | [JSON to CSV 1](https://github.com/DhanushNehru/Python-Scripts/tree/main/JSON%20to%20CSV) | Converts JSON to CSV files. | +| JSON to CSV 2 | [JSON to CSV 2](https://github.com/DhanushNehru/Python-Scripts/tree/main/JSON%20to%20CSV%202) | Converts a JSON file to a CSV file. | +| JSON to CSV converter | [JSON to CSV converter](https://github.com/DhanushNehru/Python-Scripts/tree/main/Json%20to%20CSV%20Convertor) | Converts JSON file to CSV files. It can convert nested JSON files as well. A sample JSON is included for testing. | +| JSON to YAML converter | [JSON to YAML converter](https://github.com/DhanushNehru/Python-Scripts/tree/main/JSON%20to%20YAML) | Converts JSON file to YAML files. A sample JSON is included for testing. | +| Keylogger | [Keylogger](https://github.com/DhanushNehru/Python-Scripts/tree/main/Keylogger) | Keylogger that can track your keystrokes, clipboard text, take screenshots at regular intervals, and records audio. | +| Keyword - Retweeting | [Keyword - Retweeting](https://github.com/DhanushNehru/Python-Scripts/tree/main/Keyword%20Retweet%20Twitter%20Bot) | Find the latest tweets containing given keywords and then retweet them. | +| LinkedIn Bot | [LinkedIn Bot](https://github.com/DhanushNehru/Python-Scripts/tree/main/LinkedIn%20Bot) | Automates the process of searching for public profiles on LinkedIn and exporting the data to an Excel sheet. | +| Longitude & Latitude to conical coverter | [Longitude Latitude conical converter](master/Longitude%20Latitude%20conical%20converter) | Converts Longitude and Latitude to Lambert conformal conic projection. | +| Mail Sender | [Mail Sender](https://github.com/DhanushNehru/Python-Scripts/tree/main/Mail%20Sender) | Sends an email. | +| Merge Two Images | [Merge Two Images](https://github.com/DhanushNehru/Python-Scripts/tree/main/Merge%20Two%20Images) | Merges two images horizontally or vertically. | +| Mood based youtube song generator | [Mood based youtube song generator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Mood%20based%20youtube%20song%20generator) | This Python script fetches a random song from YouTube based on your mood input and opens it in your default web browser. | +| Mouse mover | [Mouse mover](https://github.com/DhanushNehru/Python-Scripts/tree/main/Mouse%20Mover) | Moves your mouse every 15 seconds. | +| Morse Code | [Mose Code](https://github.com/DhanushNehru/Python-Scripts/tree/main/Morse%20Code) | Encodes and decodes Morse code. | +| No Screensaver | [No Screensaver](https://github.com/DhanushNehru/Python-Scripts/tree/main/No%20Screensaver) | Prevents screensaver from turning on. | +| OTP Verification | [OTP Verification](https://github.com/DhanushNehru/Python-Scripts/tree/main/OTP%20%20Verify) | An OTP Verification Checker. | +| Password Generator | [Password Generator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Password%20Generator) | Generates a random password. | +| Password Manager | [Password Manager](https://github.com/nem5345/Python-Scripts/tree/main/Password%20Manager) | Generate and interact with a password manager. | +| Password Strength Checker | [Password Strength Checker](https://github.com/nem5345/Python-Scripts/tree/main/Password%20Strength%20Checker) | Evaluates how strong a given password is. | +| PDF Merger | [PDF Merger](https://github.com/DhanushNehru/Python-Scripts/tree/main/PDF%20Merger) | Merges multiple PDF files into a single PDF, with options for output location and custom order. | +| PDF to Audio | [PDF to Audio](https://github.com/DhanushNehru/Python-Scripts/tree/main/PDF%20to%20Audio) | Converts PDF to audio. | +| PDF to Text | [PDF to text](https://github.com/DhanushNehru/Python-Scripts/tree/main/PDF%20to%20text) | Converts PDF to text. | +| PDF merger and splitter | [PDF Merger and Splitter](https://github.com/AbhijitMotekar99/Python-Scripts/blob/main/PDF%20Merger%20and%20Splitter/PDF%20Merger%20and%20Splitter.py) | Create a tool that can merge multiple PDF files into one or split a single PDF into separate pages. | +| Pizza Order | [Pizza Order](https://github.com/DhanushNehru/Python-Scripts/tree/main/Pizza%20Order) | An algorithm designed to handle pizza orders from customers with accurate receipts and calculations. | +| Planet Simulation | [Planet Simulation](https://github.com/DhanushNehru/Python-Scripts/tree/main/Planet%20Simulation) | A simulation of several planets rotating around the sun. | +| Playlist Exchange | [Playlist Exchange](https://github.com/DhanushNehru/Python-Scripts/tree/main/Playlist%20Exchange) | A Python script to exchange songs and playlists between Spotify and Python. | +| Pigeonhole Sort | [Algorithm](https://github.com/DhanushNehru/Python-Scripts/tree/main/PigeonHole) | The pigeonhole sort algorithm to sort your arrays efficiently! | +| PNG TO JPG CONVERTOR | [PNG-To-JPG](https://github.com/DhanushNehru/Python-Scripts/tree/main/PNG%20To%20JPG) | A PNG TO JPG IMAGE CONVERTOR. | +| Pomodoro Timer | [Pomodoro Timer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Pomodoro%20Timer) | A Pomodoro timer | +| Python GUI Notepad | [Python GUI Notepad](https://github.com/DhanushNehru/Python-Scripts/blob/main/PDF%20Merger%20and%20Splitter/PDF%20Merger%20and%20Splitter.py) | A Python-based GUI Notepad with essential features like saving, opening, editing text files, basic formatting, and a simple user interface for quick note-taking. | +| QR Code Generator | [QR Code Generator](https://github.com/DhanushNehru/Python-Scripts/tree/main/QR%20Code%20Generator) | This is generate a QR code from the provided link | +| QR Code Scanner | [QR Code Scanner](https://github.com/DhanushNehru/Python-Scripts/tree/main/QR%20Code%20Scanner) | Helps in Sacanning the QR code in form of PNG or JPG just by running the python script. | +| QR Code with logo | [QR code with Logo](https://github.com/DhanushNehru/Python-Scripts/tree/main/QR%20with%20Logo) | QR Code Customization Feature | +| Random Color Generator | [Random Color Generator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Random%20Color%20Generator) | A random color generator that will show you the color and values! | +| Remove Background | [Remove Background](https://github.com/DhanushNehru/Python-Scripts/tree/main/Remove%20Background) | Removes the background of images. | +| Road-Lane-Detection | [Road-Lane-Detection](https://github.com/NotIncorecc/Python-Scripts/tree/main/Road-Lane-Detection) | Detects the lanes of the road | +| Rock Paper Scissor 1 | [Rock Paper Scissor 1](https://github.com/DhanushNehru/Python-Scripts/tree/main/Rock%20Paper%20Scissor%201) | A game of Rock Paper Scissors. | +| Rock Paper Scissor 2 | [Rock Paper Scissor 2](https://github.com/DhanushNehru/Python-Scripts/tree/main/Rock%20Paper%20Scissor%202) | A new version game of Rock Paper Scissors. | +| Run Then Notify | [Run Then Notify](https://github.com/DhanushNehru/Python-Scripts/tree/main/Run%20Then%20Notify) | Runs a slow command and emails you when it completes execution. | +| Selfie with Python | [Selfie with Python](https://github.com/DhanushNehru/Python-Scripts/tree/main/Selfie%20with%20Python) | Take your selfie with python . | +| Simple DDOS | [Simple DDOS](https://github.com/VanshajR/Python-Scripts/tree/main/Simple%20DDOS) | The code allows you to send multiple HTTP requests concurrently for a specified duration. | +| Simple TCP Chat Server | [Simple TCP Chat Server](https://github.com/DhanushNehru/Python-Scripts/tree/main/TCP%20Chat%20Server) | Creates a local server on your LAN for receiving and sending messages! | +| Smart Attendance System | [Smart Attendance System](https://github.com/DhanushNehru/Python-Scripts/tree/main/Smart%20Attendance%20System) | This OpenCV framework is for Smart Attendance by actively decoding a student's QR Code. | +| Snake Game | [Snake Game](https://github.com/DhanushNehru/Python-Scripts/tree/main/Snake%20Game) | Classic snake game using python. | +| Snake Water Gun | [Snake Water Gun](https://github.com/DhanushNehru/Python-Scripts/tree/main/Snake%20Water%20Gun) | A game similar to Rock Paper Scissors. | +| Sorting | [Sorting](https://github.com/DhanushNehru/Python-Scripts/tree/main/Sorting) | Algorithm for bubble sorting. | +| Star Pattern | [Star Pattern](https://github.com/DhanushNehru/Python-Scripts/tree/main/Star%20Pattern) | Creates a star pattern pyramid. | +| Subnetting Calculator | [Subnetting Calculator](https://github.com/DhanushNehru/Python-Scripts/tree/main/Subnetting%20Calculator) | Calculates network information based on a given IP address and subnet mask. | +| Take a break | [Take a break](https://github.com/DhanushNehru/Python-Scripts/tree/main/Take%20A%20Break) | Python code to take a break while working long hours. | +| Text Recognition | [Text Recognition](https://github.com/DhanushNehru/Python-Scripts/tree/Text-Recognition/Text%20Recognition) | A Image Text Recognition ML Model to extract text from Images | +| Text to Image | [Text to Image](https://github.com/DhanushNehru/Python-Scripts/tree/main/Text%20to%20Image) | A Python script that will take your text and convert it to a JPEG. | +| Tic Tac Toe 1 | [Tic Tac Toe 1](https://github.com/DhanushNehru/Python-Scripts/tree/main/Tic-Tac-Toe%201) | A game of Tic Tac Toe. | +| Tik Tac Toe 2 | [Tik Tac Toe 2](https://github.com/DhanushNehru/Python-Scripts/tree/main/Tic-Tac-Toe%202) | A game of Tik Tac Toe. | +| Turtle Art & Patterns | [Turtle Art](https://github.com/DhanushNehru/Python-Scripts/tree/main/Turtle%20Art) | Scripts to view turtle art also have prompt-based ones. | +| Turtle Graphics | [Turtle Graphics](https://github.com/DhanushNehru/Python-Scripts/tree/main/Turtle%20Graphics) | Code using turtle graphics. | +| Twitter Selenium Bot | [Twitter Selenium Bot](https://github.com/DhanushNehru/Python-Scripts/tree/main/Twitter%20Selenium%20Bot) | A bot that can interact with Twitter in a variety of ways. | +| Umbrella Reminder | [Umbrella Reminder](https://github.com/DhanushNehru/Python-Scripts/tree/main/Umbrella%20Reminder) | A reminder for umbrellas. | +| University Rankings | [University Rankings](https://github.com/DhanushNehru/Python-Scripts/tree/main/University%20Rankings) | Ranks Universities across the globes using the Country, Continent, and Captial | +| URL Shortener | [URL Shortener](https://github.com/DhanushNehru/Python-Scripts/tree/main/URL%20Shortener) | A URL shortener code compresses long URLs into shorter, more manageable links | +| Video Downloader | [Video Downloader](https://github.com/DhanushNehru/Python-Scripts/tree/main/Video%20Downloader) | Download Videos from youtube to your local system. | +| Video Watermarker | [Video Watermarker](https://github.com/DhanushNehru/Python-Scripts/tree/main/Video%20Watermarker) | Adds watermark to any video of your choice. | +| Virtual Painter | [Virtual Painter](https://github.com/DhanushNehru/Python-Scripts/tree/main/Virtual%20Painter) | Virtual painting application. | +| Wallpaper Changer | [Wallpaper Changer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Wallpaper%20Changer) | Automatically changes home wallpaper, adding a random quote and stock tickers on it. | +| Weather GUI | [Weather GUI](https://github.com/DhanushNehru/Python-Scripts/tree/main/Weather%20GUI) | Displays information on the weather. | +| Website Blocker | [Website Blocker](https://github.com/DhanushNehru/Python-Scripts/tree/main/Website%20Blocker) | Downloads the website and loads it on your homepage in your local IP. | +| Website Cloner | [Website Cloner](https://github.com/DhanushNehru/Python-Scripts/tree/main/Website%20Cloner) | Clones any website and opens the site in your local IP. | +| Web Scraper | [Web Scraper](https://github.com/DhanushNehru/Python-Scripts/tree/main/Web%20Scraper) | A Python script that scrapes blog titles from [Python.org](https://www.python.org/) and saves them to a file. | +| Weight Converter | [Weight Converter](https://github.com/WatashiwaSid/Python-Scripts/tree/main/Weight%20Converter) | Simple GUI script to convert weight in different measurement units. | +| Wikipedia Data Extractor | [Wikipedia Data Extractor](https://github.com/DhanushNehru/Python-Scripts/tree/main/Wikipedia%20Data%20Extractor) | A simple Wikipedia data extractor script to get output in your IDE. | +| Word to PDF | [Word to PDF](https://github.com/DhanushNehru/Python-Scripts/tree/main/Word%20to%20PDF%20converter) | A Python script to convert an MS Word file to a PDF file. | +| Youtube Downloader | [Youtube Downloader](https://github.com/DhanushNehru/Python-Scripts/tree/main/Youtube%20Downloader) | Downloads any video from [YouTube](https://youtube.com) in video or audio format! | +| Youtube Playlist Info Scraper | [Youtube Playlist Info Scraper](https://github.com/DhanushNehru/Python-Scripts/tree/main/Youtube%20Playlist%20Info%20Scraper) | This python module retrieve information about a YouTube playlist in json format using playlist link. | ## Gitpod Use the cloud-free development environment where you can directly start coding. -You can use Gitpod in the cloud [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/DhanushNehru/Python-Scripts/) - +You can use Gitpod in the cloud [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/DhanushNehru/Python-Scripts/) ## Wall of Contributors @@ -142,11 +173,8 @@ You can use Gitpod in the cloud [![Gitpod Ready-to-Code](https://img.shields.io +
+ If you liked this repository, support it by starring ⭐ Thank You for being here :) - -### Connect 👉 [**Twitter**](https://twitter.com/Dhanush_Nehru) **/** [**Instagram**](https://www.instagram.com/dhanush_nehru/) **/** [**Github**](https://github.com/DhanushNehru/) **/** [**Youtube**](https://www.youtube.com/@dhanushnehru?sub_confirmation=1) **/** [**Newsletter**](https://dhanushn.substack.com/) **/** [**Discord**](https://discord.com/invite/Yn9g6KuWyA) - - - diff --git a/Road-Lane-Detection/README.md b/Road-Lane-Detection/README.md new file mode 100644 index 00000000..57c3d012 --- /dev/null +++ b/Road-Lane-Detection/README.md @@ -0,0 +1,18 @@ +# Road Lane Detection + +This project is a Python program that uses OpenCV to detect lanes on roads. Unlike other lane detection programs, this one dynamically calculates the mask based on the color of the road, making it more adaptable to different environments. + +## Features + +- **Dynamic Mask Calculation**: Adjusts the mask according to the road color. +- **Lane Detection**: Identifies and highlights lanes on the road. + +## Requirements + +- Python 3.x +- OpenCV + +## Acknowledgements + +- OpenCV documentation +- Various online tutorials and resources diff --git a/Road-Lane-Detection/dik2_1.py b/Road-Lane-Detection/dik2_1.py new file mode 100644 index 00000000..f2406d8e --- /dev/null +++ b/Road-Lane-Detection/dik2_1.py @@ -0,0 +1,84 @@ +import cv2 +import numpy as np + +def canny_edge_detection(frame): + gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) + blur = cv2.GaussianBlur(gray, (5, 5), 0) + edges = cv2.Canny(blur, 50, 150) + return edges + +def detect_road_region(frame): + hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) + + lower_gray = np.array([0, 0, 50]) # Lower bound for gray + upper_gray = np.array([180, 50, 200]) # Upper bound for gray + + mask = cv2.inRange(hsv, lower_gray, upper_gray) + + contours, _ = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) + + if contours: + largest_contour = max(contours, key=cv2.contourArea) + + epsilon = 0.02 * cv2.arcLength(largest_contour, True) + polygon = cv2.approxPolyDP(largest_contour, epsilon, True) + + road_mask = np.zeros_like(mask) + if len(polygon) >= 3: + cv2.fillPoly(road_mask, [polygon], 255) + + return road_mask + return None + +def hough_transform(masked_edges): + lines = cv2.HoughLinesP(masked_edges, 2, np.pi / 180, 100, np.array([]), minLineLength=40, maxLineGap=5) + return lines + +def display_lines(frame, lines): + line_image = np.zeros_like(frame) + if lines is not None: + for line in lines: + x1, y1, x2, y2 = line.reshape(4) + cv2.line(line_image, (x1, y1), (x2, y2), (0, 255, 0), 10) + return line_image + +def combine_images(frame, line_image): + combined_image = cv2.addWeighted(frame, 0.8, line_image, 1, 1) + return combined_image + +def process_frame(frame): + edges = canny_edge_detection(frame) + + road_mask = detect_road_region(frame) + + if road_mask is not None: + masked_edges = cv2.bitwise_and(edges, edges, mask=road_mask) + else: + masked_edges = edges + + lines = hough_transform(masked_edges) + + line_image = display_lines(frame, lines) + + result = combine_images(frame, line_image) + + return result + +vds = ['lane5.mp4']#add more of your own videos here + +cap = cv2.VideoCapture('videos/'+vds[0]) +while(cap.isOpened()): + ret, frame = cap.read() + if not ret: + break + + result = process_frame(frame) + cv2.imshow('Lane Detection', result) + road_cont_mask = detect_road_region(frame) + cv2.imshow('Lane Detection2', road_cont_mask) + + if cv2.waitKey(1) & 0xFF == ord('q'): + break + +cap.release() +cv2.destroyAllWindows() \ No newline at end of file diff --git a/Road-Lane-Detection/requirements.txt b/Road-Lane-Detection/requirements.txt new file mode 100644 index 00000000..1db7aea1 --- /dev/null +++ b/Road-Lane-Detection/requirements.txt @@ -0,0 +1 @@ +opencv-python \ No newline at end of file diff --git a/Road-Lane-Detection/videos/lane5.mp4 b/Road-Lane-Detection/videos/lane5.mp4 new file mode 100644 index 00000000..b60d11ce Binary files /dev/null and b/Road-Lane-Detection/videos/lane5.mp4 differ diff --git a/Rock Paper Scissors - New Version b/Rock Paper Scissors - New Version deleted file mode 100644 index b7b3f030..00000000 --- a/Rock Paper Scissors - New Version +++ /dev/null @@ -1,50 +0,0 @@ -import random - -def get_user_choice(): - choices = ["rock", "paper", "scissors", "lizard", "spock"] - user_choice = input("Enter your choice (rock, paper, scissors, lizard, spock): ").lower() - while user_choice not in choices: - user_choice = input("Invalid choice. Please enter rock, paper, scissors, lizard, or spock: ").lower() - return user_choice - -def get_computer_choice(): - choices = ["rock", "paper", "scissors", "lizard", "spock"] - return random.choice(choices) - -def determine_winner(user_choice, computer_choice): - win_conditions = { - "scissors": ["paper", "lizard"], - "paper": ["rock", "spock"], - "rock": ["lizard", "scissors"], - "lizard": ["spock", "paper"], - "spock": ["scissors", "rock"] - } - - if user_choice == computer_choice: - return "tie" - elif computer_choice in win_conditions[user_choice]: - return "user" - else: - return "computer" - -def play_game(): - print("Welcome to Rock, Paper, Scissors, Lizard, Spock!") - - user_choice = get_user_choice() - computer_choice = get_computer_choice() - - print(f"You chose: {user_choice}") - print(f"Computer chose: {computer_choice}") - - winner = determine_winner(user_choice, computer_choice) - - if winner == "tie": - print("It's a tie! Let's play again.") - play_game() - elif winner == "user": - print("You win!") - else: - print("Computer wins!") - -if __name__ == "__main__": - play_game() diff --git a/Screenshot to Text/README.md b/Screenshot to Text/README.md new file mode 100644 index 00000000..692b8f64 --- /dev/null +++ b/Screenshot to Text/README.md @@ -0,0 +1,30 @@ +# OCR Text Extractor + +## Overview +**OCR Text Extractor** is a Python application that allows users to extract text from images using Optical Character Recognition (OCR) via the Tesseract engine. The application provides a simple and user-friendly graphical interface for uploading images, capturing full-screen screenshots, or pasting images from the clipboard to extract text. + +## Features +- **Select Image File**: Choose an image from your computer to extract text from. Supported formats include `.png`, `.jpg`, `.jpeg`, and `.bmp`. +- **Paste Image from Clipboard**: Take a partial screenshot (e.g., using Windows + Shift + S) and extract text from the image saved in the clipboard. +- **Capture Full Screen Screenshot**: Capture a screenshot of your entire screen and extract text from it. + +## Requirements +To run this application, you need to have the following installed: + +- Python 3.x +- The following Python packages: + - `pytesseract` (Download Tesseract OCR from https://github.com/UB-Mannheim/tesseract/wiki and Add to Environment Path) + - `Pillow` (Python Imaging Library, a fork of PIL) + - `Tkinter` (comes pre-installed with Python on most systems) + +### Installation of Required Packages +You can install the required packages using pip: + +```bash +pip install pytesseract Pillow +``` + +### How to Run +```bash +python main.py +``` diff --git a/Screenshot to Text/main.py b/Screenshot to Text/main.py new file mode 100644 index 00000000..450e24b3 --- /dev/null +++ b/Screenshot to Text/main.py @@ -0,0 +1,74 @@ +import pytesseract +from PIL import Image, ImageGrab +import tkinter as tk +from tkinter import filedialog, messagebox, Text, Scrollbar + +def extract_text_from_image(img): #Extracts Text from Image using Pytesseract + try: + text = pytesseract.image_to_string(img) + return text + except Exception as e: + print(e) + return None + +def select_image_file(): # Upload a Image file + img_path = filedialog.askopenfilename(title="Select Screenshot", filetypes=[("Image Files", "*.png *.jpg *.jpeg *.bmp")]) + if img_path: + img = Image.open(img_path) + display_extracted_text(img) + +def paste_image_from_clipboard(): # Take partial screenshot (Windows + shift + S) it will be saved in clipboard. + try: + img = ImageGrab.grabclipboard() + if isinstance(img, Image.Image): + display_extracted_text(img) + else: + messagebox.showwarning("Error", "No image found in the clipboard.") + except Exception as e: + messagebox.showerror("Error", f"Error accessing clipboard: {e}") + +def capture_screenshot(): # Takes entire screen screenshot + try: + img = ImageGrab.grab() + display_extracted_text(img) + except Exception as e: + messagebox.showerror("Error", f"Error capturing screenshot: {e}") + +def display_extracted_text(img): # Displaying extracted text from pytesseract + text = extract_text_from_image(img) + if text: + text_display.delete(1.0, tk.END) + text_display.insert(tk.END, text) + else: + messagebox.showwarning("Error", "No text could be extracted or an error occurred.") + +def main(): + global text_display + + root = tk.Tk() + root.title("Text Extractor with Python") + + text_frame = tk.Frame(root) + text_frame.pack(pady=10) + + scrollbar = Scrollbar(text_frame) + scrollbar.pack(side=tk.RIGHT, fill=tk.Y) + + text_display = Text(text_frame, wrap=tk.WORD, yscrollcommand=scrollbar.set, height=15, width=60) + text_display.pack() + + scrollbar.config(command=text_display.yview) + + btn_select_file = tk.Button(root, text="Select Image File", command=select_image_file, width=30) + btn_select_file.pack(pady=10) + + btn_paste_clipboard = tk.Button(root, text="Paste Image from Clipboard", command=paste_image_from_clipboard, width=30) + btn_paste_clipboard.pack(pady=10) + + btn_capture_screenshot = tk.Button(root, text="Capture Full Screen Screenshot", command=capture_screenshot, width=30) + btn_capture_screenshot.pack(pady=10) + + root.mainloop() + +if __name__ == "__main__": + main() diff --git a/Simple DDOS/README.md b/Simple DDOS/README.md new file mode 100644 index 00000000..9d9d2904 --- /dev/null +++ b/Simple DDOS/README.md @@ -0,0 +1,69 @@ +# Multithreaded HTTP Requests with Python + +This script performs multithreaded HTTP requests using Python's `requests` library and `ThreadPoolExecutor`. The code allows you to send multiple HTTP requests concurrently for a specified duration. + +## Features +- Sends concurrent HTTP requests to a specified URL. +- Supports multiple request methods (GET, POST, etc.). +- Allows customizing headers, cookies, data, and URL parameters. +- The number of threads and the duration of the requests can be controlled. +- Uses ThreadPoolExecutor to handle multithreading efficiently. + +## Requirements +- Python 3.x +- `requests` library + +To install the `requests` library, run: +```bash +pip install requests +``` + +## Usage + +### Function: `make_request` +This function sends a single HTTP request to a given URL with the specified parameters. +- **Arguments**: + - `url` (str): The URL to send the request to. + - `method` (str): The HTTP method to use (default: GET). + - `headers` (dict): Optional HTTP headers to include. + - `cookies` (dict): Optional cookies to include. + - `data` (dict): Optional data for POST requests. + - `params` (dict): Optional URL parameters. + +- **Example**: +make_request("https://example.com", method='POST', data={"key": "value"}) + +### Function: `start_requests` +This function sends multiple HTTP requests concurrently for a specified duration. +- **Arguments**: + - `url` (str): The URL to send the requests to. + - `method` (str): The HTTP method to use (default: GET). + - `headers` (dict): Optional HTTP headers to include. + - `cookies` (dict): Optional cookies to include. + - `data` (dict): Optional data for POST requests. + - `params` (dict): Optional URL parameters. + - `num_threads` (int): The number of threads to use (default: 5). + - `duration` (int): The duration in seconds to send requests (default: 10 seconds). + +- **Example**: +url = "https://example.com/api" +start_requests(url, method='GET', num_threads=5, duration=15) + +## How It Works +1. The `start_requests` function uses `ThreadPoolExecutor` to manage the specified number of threads. +2. Each thread sends an HTTP request to the given URL. +3. The process continues until the specified duration ends. +4. The `make_request` function handles sending the requests and printing the response status codes. + +## Example Usage +url = "https://example.com/api" +start_requests(url, num_threads=5, duration=15) # Sends requests for 15 seconds using 5 threads. + +## Customization +- You can modify the method, headers, cookies, data, or params in the function calls to fit your use case. +- For POST requests, pass data through the `data` argument. + +start_requests("https://example.com/post", method='POST', data={'key': 'value'}, num_threads=10, duration=20) + +## License +This project is licensed under the MIT License. diff --git a/Simple DDOS/ddos.py b/Simple DDOS/ddos.py new file mode 100644 index 00000000..9abf8f64 --- /dev/null +++ b/Simple DDOS/ddos.py @@ -0,0 +1,27 @@ +import requests +from concurrent.futures import ThreadPoolExecutor +import time + +def make_request(url, method='GET', headers=None, cookies=None, data=None, params=None): + try: + + response = requests.request(method, url, headers=headers, cookies=cookies, data=data, params=params) + print(f"Response code: {response.status_code}") + except requests.exceptions.RequestException as e: + print(f"Error occurred: {e}") + +def start_requests(url, method='GET', headers=None, cookies=None, data=None, params=None, num_threads=5, duration=10): + executor = ThreadPoolExecutor(max_workers=num_threads) + end_time = time.time() + duration # Time to stop the requests + + while time.time() < end_time: + for _ in range(num_threads): + executor.submit(make_request, url, method, headers, cookies, data, params) + + executor.shutdown(wait=True) + print("Requests completed.") + +# Usage example +url = "Sample URL" +start_requests(url, num_threads=5, duration=15) #time in seconds +#change methods as required \ No newline at end of file diff --git a/Smart Attendance System/.idea/.concept.txt b/Smart Attendance System/.idea/.concept.txt new file mode 100644 index 00000000..aed7c614 --- /dev/null +++ b/Smart Attendance System/.idea/.concept.txt @@ -0,0 +1,10 @@ +Now first we should have the students's data +We have name and roll number of the students stored in a data.csv +We will encode the each student's name(a string) into a qrcode + +In main.py + first we will read the data.csv and make a list of name and their rollnumber + By cv2 , If a student is present it will give his or her code to camera , we will + decode it and by decoding it we will get his or her name after that we will remove + his or her name from name list + Which names are left in list ,simple logic they are absent diff --git a/Smart Attendance System/README.md b/Smart Attendance System/README.md new file mode 100644 index 00000000..c7d6cc3f --- /dev/null +++ b/Smart Attendance System/README.md @@ -0,0 +1,53 @@ +### Prerequisites + +Before you begin, ensure you have met the following requirements: + +* [Git](https://git-scm.com/downloads "Download Git") must be installed on your operating system. + +### Installation + +1. Clone this repo. + +To run **Smart Attendance System**, run this command on your git bash: + +Linux and macOS: + +```bash +sudo git clone https://github.com/raj-mistry-01/Computer-Vision.git +``` + +Windows: + +```bash +git clone https://github.com/raj-mistry-01/Computer-Vision.git +``` + +2. Navigate to Smart Attendance Folder + +3. Install required python packages + +```bash +pip install -r requirements +``` + +## What Is It (You can also read it in .idea folder) +Now first we should have the students's data +We have name and roll number of the students stored in a data.csv +We will encode the each student's name(a string) into a qrcode + +In main.py + first we will read the data.csv and make a list of name and their rollnumber + By cv2 , If a student is present it will give his or her code to camera , we will + decode it and by decoding it we will get his or her name after that we will remove + his or her name from name list + Which names are left in list ,simple logic they are absent + + +## Avoid A Comman Mistake : +In ```main.py``` the path of csv should be according your ```system``` + +### A Question In Your Mind (I know) : +If one student has all qrcode than it can also presents his all friends , but soon this ```code``` is going to be integretad by ```Face Recognization``` + +## Languages Used : +![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) diff --git a/Smart Attendance System/code/main.py b/Smart Attendance System/code/main.py new file mode 100644 index 00000000..26b85ca6 --- /dev/null +++ b/Smart Attendance System/code/main.py @@ -0,0 +1,32 @@ +from pyzbar.pyzbar import decode +import cv2 +from PIL import Image +import csv + +cam = cv2.VideoCapture(0) + +students = [] +RollNumbers = [] +with open(r"path of csv","r") as file : + reader = csv.reader(file) + for row in reader : + students.append(row[1]) + RollNumbers.append(row[0]) + +while True : + _,frame = cam.read() + decodedframe = decode(frame) + try : + for qrcode in decodedframe : + name = decodedframe[0].data.decode() + if name in students : + RollNumbers.remove(RollNumbers[students.index(name)]) + students.remove(name) + except: + print("Error") + cv2.imshow("Attendace System",frame) + k = cv2.waitKey(100) & 0xff + if k==27: + break # press escape to close the loop +print(f"Absent Students Name : {students}.") +print(f"Absent Students Roll No : {RollNumbers}") diff --git a/Smart Attendance System/code/requirements.txt b/Smart Attendance System/code/requirements.txt new file mode 100644 index 00000000..e4e410a1 --- /dev/null +++ b/Smart Attendance System/code/requirements.txt @@ -0,0 +1,4 @@ +pyzbar == 0.1.9 +pillow == 10.2.0 +opencv-contrib-python == 4.9.0.80 +opencv-python == 4.9.0.80 diff --git a/Smart Attendance System/src/Anshul.jpg b/Smart Attendance System/src/Anshul.jpg new file mode 100644 index 00000000..777a26a0 Binary files /dev/null and b/Smart Attendance System/src/Anshul.jpg differ diff --git a/Smart Attendance System/src/Aryan.jpg b/Smart Attendance System/src/Aryan.jpg new file mode 100644 index 00000000..29fc1eb2 Binary files /dev/null and b/Smart Attendance System/src/Aryan.jpg differ diff --git a/Smart Attendance System/src/Ashish.jpg b/Smart Attendance System/src/Ashish.jpg new file mode 100644 index 00000000..30e276b0 Binary files /dev/null and b/Smart Attendance System/src/Ashish.jpg differ diff --git a/Smart Attendance System/src/Jainil.jpg b/Smart Attendance System/src/Jainil.jpg new file mode 100644 index 00000000..95c78e9d Binary files /dev/null and b/Smart Attendance System/src/Jainil.jpg differ diff --git a/Smart Attendance System/src/Parth.jpg b/Smart Attendance System/src/Parth.jpg new file mode 100644 index 00000000..3d64ebb7 Binary files /dev/null and b/Smart Attendance System/src/Parth.jpg differ diff --git a/Smart Attendance System/src/Sahil.jpg b/Smart Attendance System/src/Sahil.jpg new file mode 100644 index 00000000..c3c78cad Binary files /dev/null and b/Smart Attendance System/src/Sahil.jpg differ diff --git a/Smart Attendance System/src/csvExplain.txt b/Smart Attendance System/src/csvExplain.txt new file mode 100644 index 00000000..84d811af --- /dev/null +++ b/Smart Attendance System/src/csvExplain.txt @@ -0,0 +1,2 @@ +first column = Student's Roll Number +Second column = Student's Name diff --git a/Smart Attendance System/src/raj.jpg b/Smart Attendance System/src/raj.jpg new file mode 100644 index 00000000..aea9b425 Binary files /dev/null and b/Smart Attendance System/src/raj.jpg differ diff --git a/Snake Game/README.md b/Snake Game/README.md new file mode 100644 index 00000000..51592849 --- /dev/null +++ b/Snake Game/README.md @@ -0,0 +1,3 @@ +# Snake-Game + +![snake game demo](https://github.com/user-attachments/assets/a88cd856-a477-4f02-ac50-eb09a801cd8a) diff --git a/Snake Game/data.txt b/Snake Game/data.txt new file mode 100644 index 00000000..25bf17fc --- /dev/null +++ b/Snake Game/data.txt @@ -0,0 +1 @@ +18 \ No newline at end of file diff --git a/Snake Game/food.py b/Snake Game/food.py new file mode 100644 index 00000000..b014c00a --- /dev/null +++ b/Snake Game/food.py @@ -0,0 +1,18 @@ +from turtle import Turtle +import random + +class Food(Turtle): #It refers to dot as food + def __init__(self): + super().__init__() + self.shape("circle") + self.penup() + self.shapesize(stretch_len= 0.5, stretch_wid= 0.5) + self.color("blue") + self.speed("fastest") + self.refresh() + + def refresh(self): + random_x = random.randint(-280, 280) + random_y = random.randint(-280, 280) + self.goto(random_x, random_y) + diff --git a/Snake Game/main.py b/Snake Game/main.py new file mode 100644 index 00000000..5ad9c3cc --- /dev/null +++ b/Snake Game/main.py @@ -0,0 +1,46 @@ +from turtle import Screen + +from snake import Snake +from food import Food +from scoreboard import Scoreboard +import time + +screen = Screen() +screen.setup(width= 600, height= 600) +screen.bgcolor("black") +screen.title("Snake Game") +screen.tracer(0) + +snake = Snake() +food = Food() +scoreboard = Scoreboard() + +screen.listen() +screen.onkey(snake.up, "Up") +screen.onkey(snake.down,"Down") +screen.onkey(snake.left,"Left") +screen.onkey(snake.right,"Right") + +is_game_on = True +while is_game_on: + screen.update() + time.sleep(0.15) + snake.move() + #detect collision with the food + if snake.head.distance(food) < 15: + food.refresh() + snake.extend() + scoreboard.increase_score() + + #detect collision with the wall + if snake.head.xcor() > 280 or snake.head.xcor() < -280 or snake.head.ycor() > 280 or snake.head.ycor() < -280: + scoreboard.reset() + snake.reset() + + #detect collision with the tail + for segment in snake.segments[1:]: + if snake.head.distance(segment) < 10: + scoreboard.reset() + snake.reset() + +screen.exitonclick() \ No newline at end of file diff --git a/Snake Game/scoreboard.py b/Snake Game/scoreboard.py new file mode 100644 index 00000000..074fe43f --- /dev/null +++ b/Snake Game/scoreboard.py @@ -0,0 +1,31 @@ +from turtle import Turtle +ALIGNMENT = "center" +FONT = ("Courier", 25, "normal") +class Scoreboard(Turtle): + def __init__(self): + super().__init__() + self.score = 0 + with open("data.txt") as data: + self.highscore = int(data.read()) + self.color("white") + self.penup() + self.goto(0, 260) + self.hideturtle() + self.update_score() + + def update_score(self): + self.clear() + self.write(f"Score: {self.score} HighScore: {self.highscore}", align= ALIGNMENT, font= FONT) + + def reset(self): + if self.score > self.highscore: + self.highscore = self.score + with open("data.txt", "w") as data: + data.write(f"{self.highscore}") + self.score = 0 + self.update_score() + + def increase_score(self): + self.score += 1 + self.update_score() + diff --git a/Snake Game/snake.py b/Snake Game/snake.py new file mode 100644 index 00000000..8286e363 --- /dev/null +++ b/Snake Game/snake.py @@ -0,0 +1,54 @@ +from turtle import Turtle +STARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)] +MOVE_DISTANCE = 20 +UP = 90 +DOWN = 270 +RIGHT = 0 +LEFT = 180 + +class Snake: + def __init__(self): + self.segments = [] + self.create_snake() + self.head = self.segments[0] + + def create_snake(self): + for position in STARTING_POSITIONS: + self.add_segment(position) + + def reset(self): + for seg in self.segments: + seg.goto(1000, 1000) + self.segments.clear() + self.create_snake() + self.head = self.segments[0] + + def add_segment(self, position): + new_segment = Turtle("square") + new_segment.penup() + new_segment.color("white") + new_segment.goto(position) + self.segments.append(new_segment) + + def extend(self): + self.add_segment(self.segments[-1].position()) + + def move(self): + for seg_num in range(len(self.segments) - 1, 0, -1): + new_x = self.segments[seg_num - 1].xcor() + new_y = self.segments[seg_num - 1].ycor() + self.segments[seg_num].goto(new_x, new_y) + self.segments[0].forward(MOVE_DISTANCE) + + def up(self): + if self.head.heading() != DOWN: + self.head.setheading(UP) + def down(self): + if self.head.heading() != UP: + self.head.setheading(DOWN) + def left(self): + if self.head.heading() != RIGHT: + self.head.setheading(LEFT) + def right(self): + if self.head.heading() != LEFT: + self.head.setheading(RIGHT) \ No newline at end of file diff --git a/Subnetting Calculator/README.md b/Subnetting Calculator/README.md new file mode 100644 index 00000000..2fd34271 --- /dev/null +++ b/Subnetting Calculator/README.md @@ -0,0 +1,40 @@ +# Subnetting Calculator + +This Python script calculates network information based on a given IP address and subnet mask. + +## Features + +- Calculates network address and broadcast address +- Provides the range of IP addresses for the network +- Shows the usable host IP range +- Calculates the total number of hosts and usable hosts + +## Usage + +1. Ensure you have Python 3.x installed on your system. +2. Run the script: + ``` + python subnetting_calculator.py + ``` +3. Enter the IP address and subnet mask when prompted. + +## Example + +``` +Enter IP address: 192.168.1.1 +Enter subnet mask: 255.255.255.0 + +Network Information: +IP Address: 192.168.1.1 +Subnet Mask: 255.255.255.0 +Network Address: 192.168.1.0 +Broadcast Address: 192.168.1.255 +Range of IP addresses: 192.168.1.0 - 192.168.1.255 +Usable Host IP Range: 192.168.1.1 - 192.168.1.254 +Total Hosts: 256 +Usable Hosts: 254 +``` + +## Requirements + +This script uses the `ipaddress` module, which is part of the Python standard library. No additional installations are required. diff --git a/Subnetting Calculator/subnetting_calculator.py b/Subnetting Calculator/subnetting_calculator.py new file mode 100644 index 00000000..c9638fbf --- /dev/null +++ b/Subnetting Calculator/subnetting_calculator.py @@ -0,0 +1,46 @@ +import ipaddress + + +def calculate_network_info(ip_address, subnet_mask): + network = ipaddress.IPv4Network(f"{ip_address}/{subnet_mask}", strict=False) + + network_address = network.network_address + broadcast_address = network.broadcast_address + total_hosts = network.num_addresses + usable_hosts = max(total_hosts - 2, 0) + first_usable_host = network_address + 1 if usable_hosts > 0 else None + last_usable_host = broadcast_address - 1 if usable_hosts > 0 else None + + results = { + "IP Address": ip_address, + "Subnet Mask": subnet_mask, + "Network Address": str(network_address), + "Broadcast Address": str(broadcast_address), + "Range of IP addresses": f"{network_address} - {broadcast_address}", + "Usable Host IP Range": ( + f"{first_usable_host} - {last_usable_host}" if usable_hosts > 0 else "N/A" + ), + "Total Hosts": total_hosts, + "Usable Hosts": usable_hosts, + } + + return results + + +def main(): + try: + ip_address = input("Enter IP address: ") + subnet_mask = input("Enter subnet mask: ") + + info = calculate_network_info(ip_address, subnet_mask) + + print("\nNetwork Information:") + for key, value in info.items(): + print(f"{key}: {value}") + + except ValueError as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + main() diff --git a/University Rankings/README.md b/University Rankings/README.md new file mode 100644 index 00000000..d769243a --- /dev/null +++ b/University Rankings/README.md @@ -0,0 +1,10 @@ +# UniversityRankings + A program that I constructed for ranking universities based on two files provided by the user. One would contain the list of universities around the world ranked in order, and another file contains the various countries and its corresponding capital. In this instance, I used two files called capitals.csv and TopUni.csv. I chose to create this program by using one function, however, this program can be altered and constructed by using multiple functions. Since the files that we are using are comma separated values (csv), I chose to open them by importing and using pandas as pd. The output was displayed on an output.txt file to record my output in that file. Below are the following calculations that were made in the program. + + 1. The first part of the program details the total number of universities in the TopUni.csv file. + 2. The second part of the program displays all the available countries + 3. The third part of the program illustrates all the available continents + 4. The next part of the program identifies the international and national rankings that are associated with the selected country + 5. The following portion of the code calculates the average score, relative score, + 6. The next part determines the capital of the selected country + 7. The last part of the code outputs the universities name(s) that contain the capital diff --git a/University Rankings/output.txt b/University Rankings/output.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/University Rankings/output.txt @@ -0,0 +1 @@ + diff --git a/University Rankings/pyvenv.cfg b/University Rankings/pyvenv.cfg new file mode 100644 index 00000000..b83f8fb7 --- /dev/null +++ b/University Rankings/pyvenv.cfg @@ -0,0 +1,8 @@ +home = /Library/Frameworks/Python.framework/Versions/3.10 +implementation = CPython +version_info = 3.10.0.final.0 +virtualenv = 20.13.0 +include-system-site-packages = false +base-prefix = /Library/Frameworks/Python.framework/Versions/3.10 +base-exec-prefix = /Library/Frameworks/Python.framework/Versions/3.10 +base-executable = /usr/local/bin/python3.10 diff --git a/University Rankings/univRanking.py b/University Rankings/univRanking.py new file mode 100644 index 00000000..0608261c --- /dev/null +++ b/University Rankings/univRanking.py @@ -0,0 +1,192 @@ +import pandas as pd + +def getInformation(selectedCountry, rankingFileName, capitalsFileName): + # add selected country + # Total number of universities + # show countries + # show continents + # calculate average score (sum of all uni scores within the selected country) / (number of universities within the selected country) + # display the average score + # calculate the relative score (average score) / (The highest score within the continent where the university is selected) + + available_countries = 0 + counter = 0 + countries = "" + continents = "" + countries_lst = [] + continents_lst = [] + TopUni = pd.read_csv(rankingFileName) + Capitals = pd.read_csv(capitalsFileName) + country_counter = 0 + country_counter_rank = 1 + + file = open("output.txt", "w") # open output.txt file where output is stored + + for line in range(len(TopUni)): + counter += 1 + + file.write("Total number of Universities => {}\n" .format(counter)) # PART 1 TOTAL NUMBER OF UNIVERSITIES + + # LISTING ALL AVAILABLE COUNTRIES WITHIN THE FILE + for country in Capitals["Country Name"]: + if country not in countries_lst: + countries_lst.append(country) + available_countries += 1 + + for country in countries_lst: + if countries == "": + countries = countries + country + else: + countries = countries + ", " + country + + file.write("Available countries => {}\n" .format(countries)) # PART 2 AVAILABLE COUNTRIES + + # FINDING ALL AVAILABLE CONTINENTS WITHIN THE FILE + for continent in Capitals["Continent"]: + if continent not in continents_lst: + continents_lst.append(continent) + + for continent in continents_lst: + if continents == "": + continents = continents + continent + else: + continents = continents + ", " + continent + + file.write("Available Continents => {}\n" .format(continents)) # PART 3 AVAILABLE CONTINENTS + + # FINDING THE INTERNATIONAL RANK OF COUNTRIES ASSOCIATED WITH THE SELECTED COUNTRY + for country in TopUni["Country"]: + if country == selectedCountry: + file.write("At international rank => {} the university name is => {}\n" .format(country_counter_rank, TopUni["Institution name"][country_counter])) # PART 4 INTERNATIONAL RANK + country_counter += 1 + country_counter_rank += 1 + + country_counter = 0 + country_national_counter_rank = 1 + + for country in TopUni["Country"]: + if country == selectedCountry: + file.write("At national rank => {} the university name is => {}\n" .format(country_national_counter_rank, TopUni["Institution name"][country_counter])) # PART 5 NATIONAL RANK + country_national_counter_rank += 1 + country_counter += 1 + + number_of_universities = 0 + university_score = 0 + TopUni = pd.read_csv(rankingFileName) + counter = 0 + + for country in TopUni["Country"]: + if selectedCountry == country: + university_score += TopUni["Score"][counter] + number_of_universities += 1 + counter += 1 + + # THE AVERAGE SCORE CALCULATIONS + averageScore = university_score / number_of_universities + file.write("The average score => {}%\n" .format(round(averageScore, 1))) # PART 6 AVERAGE SCORE # PART 6 + + number_of_universities = 0 + university_score = 0 + TopUni = pd.read_csv(rankingFileName) + Capitals = pd.read_csv(capitalsFileName) + highestScore1 = 0 + highestScore2 = 0 + highestScore3 = 0 + highestScore4 = 0 + highestScore5 = 0 + counter1 = 0 + counter2 = 0 + counter3 = 0 + continent = "" + + # CALCULATING THE RELATIVE SCORE + for country in TopUni["Country"]: + if selectedCountry == country: + university_score += TopUni["Score"][counter1] + number_of_universities += 1 + counter1 += 1 + + averageScore = university_score / number_of_universities + + for country in Capitals["Country Name"]: + if selectedCountry == country: + continent = Capitals["Continent"][counter2] + counter2 += 1 + + for continentScore in TopUni["Score"]: + if TopUni["Country"][counter3] in ["Jordan", "Palestine", "China", "Israel", "Japan", "Singapore", "South Korea", "Taiwan"]: + if continentScore > highestScore1: + highestScore1 = continentScore + elif TopUni["Country"][counter3] in "Australia": + if continentScore > highestScore2: + highestScore2 = continentScore + elif TopUni["Country"][counter3] in ["Canada", "USA"]: + if continentScore > highestScore3: + highestScore3 = continentScore + elif TopUni["Country"][counter3] in ["Denmark", "France", "Germany", "Netherlands", "Norway", "Sweden", "Switzerland", "United Kingdom"]: + if continentScore > highestScore4: + highestScore4 = continentScore + elif TopUni["Country"][counter3] in ["Egypt"]: + if continentScore > highestScore5: + highestScore5 = continentScore + + counter3 += 1 + + # PART 7 RELATIVE SCORE + if selectedCountry in ["Jordan", "Palestine", "China", "Israel", "Japan", "Singapore", "South Korea", "Taiwan"]: + relativeScore = (averageScore / highestScore1) * 100 + file.write("The relative score to the top university in {} is => ({} / {}) x 100% = {}%\n" .format(continent, averageScore, highestScore1, round(relativeScore, 1))) + elif selectedCountry in "Australia": + relativeScore = (averageScore / highestScore2) * 100 + file.write("The relative score to the top university in {} is => ({} / {}) x 100% = {}%\n" .format(continent, averageScore, highestScore2, round(relativeScore, 1))) + elif selectedCountry in ["Canada", "USA"]: + relativeScore = (averageScore / highestScore3) * 100 + file.write("The relative score to the top university in {} is => ({} / {}) x 100% = {}%\n" .format(continent, averageScore, highestScore3, round(relativeScore, 1))) + elif selectedCountry in ["Denmark", "France", "Germany", "Netherlands", "Norway", "Sweden", "Switzerland", "United Kingdom"]: + relativeScore = (averageScore / highestScore4) * 100 + file.write("The relative score to the top university in {} is => ({} / {}) x 100% = {}%\n" .format(continent, averageScore, highestScore4, round(relativeScore, 1))) + elif selectedCountry in ["Egypt"]: + relativeScore = (averageScore / highestScore5) * 100 + file.write("The relative score to the top university in {} is => ({} / {}) x 100% = {}%\n" .format(continent, averageScore, highestScore5, round(relativeScore, 1))) + + # FINDING THE CAPITAL OF THE SELECTED COUNTRY + Capitals = pd.read_csv(capitalsFileName) + capital = "" + counter = 0 + + for cap in Capitals["Country Name"]: + if cap == selectedCountry: + capital = Capitals["Capital"][counter] + counter += 1 + + file.write("The capital is => {}\n" .format(capital)) # PART 8 CAPITAL OF SELECTED COUNTRY + + # FINDING THE UNIVERSITIES THAT HAVE THE NAME OF THE CAPITAL WITHIN IT + TopUni = pd.read_csv(rankingFileName) + Capitals = pd.read_csv(capitalsFileName) + capital = "" + counter1 = 0 + counter2 = 0 + number_counter = 1 + for cap in Capitals["Country Name"]: + if cap == selectedCountry: + capital = Capitals["Capital"][counter1] + counter1 += 1 + + file.write("The universities that contain the capital name => \n") # PART 9 CAPITAL NAME IN UNIVERSITY NAME + + for uni in TopUni["Country"]: + if (selectedCountry == uni) and (capital in TopUni["Institution name"][counter2]): + file.write("#" + str(number_counter) + " " + TopUni["Institution name"][counter2] + "\n") + number_counter += 1 + counter2 += 1 + + +def __main__(): + country = input("input the country you want to look at: ") + file1 = "TopUni.csv" + file2 = "capitals.csv" + getInformation(country, file1, file2) + + +__main__() diff --git a/Web Scraper/README.md b/Web Scraper/README.md new file mode 100644 index 00000000..5c796460 --- /dev/null +++ b/Web Scraper/README.md @@ -0,0 +1,8 @@ +In this script, we use the `requests` library to send a GET request to the Python.org blogs page. We then use the `BeautifulSoup` library to parse the HTML content of the page. + +We find all the blog titles on the page by searching for `h2` elements with the class `blog-title`. We then print each title found and save them to a file named `blog_titles.txt`. + +To run this script, first install the required libraries: + +```bash +pip install requests beautifulsoup4 diff --git a/Web Scraper/Web_Scraper.py b/Web Scraper/Web_Scraper.py new file mode 100644 index 00000000..f1f0d62b --- /dev/null +++ b/Web Scraper/Web_Scraper.py @@ -0,0 +1,30 @@ +import requests +from bs4 import BeautifulSoup + +# URL to scrape data from +URL = "https://www.python.org/blogs/" + +# Send a GET request to the URL +response = requests.get(URL) + +# Parse the webpage content using BeautifulSoup +soup = BeautifulSoup(response.content, "html.parser") + +# Find all the blog titles on the page +titles = soup.find_all('h2', class_='blog-title') + +# Print each title found +print("Python.org Blog Titles:\n") +for i, title in enumerate(titles, start=1): + print(f"{i}. {title.get_text(strip=True)}") + +# Save the titles to a file +with open("blog_titles.txt", "w") as file: + for title in titles: + file.write(title.get_text(strip=True) + "\n") + +print("\nBlog titles saved to 'blog_titles.txt'.") + + + + \ No newline at end of file diff --git a/Website Cloner/index.html b/Website Cloner/index.html index 26c2f4ee..357d9e74 100644 --- a/Website Cloner/index.html +++ b/Website Cloner/index.html @@ -1,40 +1,32 @@ - PROXY SERVER - - - - + PROXY SERVER + + + + -
-
-
-
-
- - - - - -
- -
- -
-
-
-
-
- - +
+
+
+
+
+ + + + + +
+
+ +
+
+
+
+
diff --git a/Website Cloner/server.py b/Website Cloner/server.py index 3816e4ba..446f8bc6 100644 --- a/Website Cloner/server.py +++ b/Website Cloner/server.py @@ -8,31 +8,52 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler): def do_GET(self): if self.path == "/": self.path = "index.html" - return http.server.SimpleHTTPRequestHandler.do_GET(self) + try: + return http.server.SimpleHTTPRequestHandler.do_GET(self) + except FileNotFoundError: + self.send_error(404, "File not found") + def do_POST(self): - form = cgi.FieldStorage( - fp=self.rfile, - headers=self.headers, - environ={ - 'REQUEST_METHOD': 'POST', - 'CONTENT_TYPE': self.headers['Content-Type'], - }) - url = form.getvalue('submitButton') - urlN = 'https://' + str(url) +'/' - isdir = os.path.isdir(url) - if not isdir: - kwargs = {'project_name': url} - save_webpage( - url=urlN, - project_folder='./', - **kwargs - ) - path = url + "/" + url + "/index.html" + content_length = int(self.headers.get('Content-Length', 0)) + post_data = self.rfile.read(content_length).decode("utf-8") + + # Parse the URL from the form submission + form = cgi.parse_qs(post_data) + url = form.get("submitButton", [""])[0] + + if not url: + self.send_error(400, "Bad Request: URL is missing") + return + + urlN = "https://" + url.strip("/") + project_folder = os.path.join('./cloned_sites', url.replace("https://", "").replace("http://", "")) + + if not os.path.isdir(project_folder): + os.makedirs(project_folder, exist_ok=True) + try: + save_webpage( + url=urlN, + project_folder=project_folder, + project_name=url.replace("https://", "").replace("http://", "") + ) + except Exception as e: + self.send_error(500, f"Error cloning website: {e}") + return + + path = os.path.join(project_folder, "index.html") + if not os.path.isfile(path): + self.send_error(404, "Cloned page not found") + return + self.send_response(301) - self.send_header('Location', path) + self.send_header("Location", "/" + path) self.end_headers() - return http.server.SimpleHTTPRequestHandler.do_GET(self) + PORT = 7000 -s = socketserver.TCPServer(("127.0.0.1", PORT), RequestHandler) -s.serve_forever() \ No newline at end of file +os.chdir(os.path.dirname(os.path.abspath(__file__))) + +with socketserver.TCPServer(("127.0.0.1", PORT), RequestHandler) as s: + s.allow_reuse_address = True + print(f"Server running on http://127.0.0.1:{PORT}") + s.serve_forever() diff --git a/import of music and video/Readme.md b/import of music and video/Readme.md index e528183b..fa87e429 100644 --- a/import of music and video/Readme.md +++ b/import of music and video/Readme.md @@ -12,8 +12,6 @@ Before you begin, ensure you have met the following requirements: ```bash pip install pygame - - ## Usage Clone or download this repository to your local machine. Open your terminal or command prompt and navigate to the project directory. @@ -50,7 +48,6 @@ Before you begin, ensure you have met the following requirements: ```bash pip install opencv-python - **Usage** Clone or download this repository to your local machine. Open your terminal or command prompt and navigate to the project directory. diff --git a/update_master_to_main.py b/update_master_to_main.py new file mode 100644 index 00000000..20f91fad --- /dev/null +++ b/update_master_to_main.py @@ -0,0 +1,25 @@ +import os + +def update_readme(): + if not os.path.exists('README.md'): + print("README.md not found") + return + + with open('README.md', 'r', encoding='utf-8') as f: + content = f.read() + + with open('README.md.backup', 'w', encoding='utf-8') as f: + f.write(content) + + updated = content.replace('/master/', '/main/') + updated = updated.replace('/blob/master/', '/blob/main/') + updated = updated.replace('/tree/master/', '/tree/main/') + + with open('README.md', 'w', encoding='utf-8') as f: + f.write(updated) + + changes = content.count('/master/') - updated.count('/master/') + print(f"Updated {changes} references") + +if __name__ == "__main__": + update_readme() \ No newline at end of file