├── AI Painter ├── ColorPicker.py └── VirtualPaint.py ├── Among_Us ├── README.md └── amongus.py ├── Automate WhatsApp Messages with Python Instantly! ├── README.md └── message.py ├── Automated sorting of directory files ├── automated_folder_sort.py └── readme.md ├── CODE_OF_CONDUCT.md ├── Fidget Spinner ├── main.py └── readme.md ├── Image-steganograpy ├── Readme.md └── lsb-script.py ├── LICENSE ├── Live Weather Updates ├── README.md └── Weather.py ├── Notepad using Python ├── README.MD └── notepad-using-python.py ├── Phone number info using Python ├── README.MD └── phone-info.py ├── Python Turtle Programming ├── Olympic Logo ├── README.md ├── Rainbow Renzene └── Star Print │ ├── README.md │ └── star.py ├── README.md ├── Random Wikipedia Article Generator ├── README.md └── wiki.py ├── Saved Wifi Passwords Extractor ├── README.md └── saved_wifi_passwords_extractor.py ├── Tic Tac Toe └── TicTacToe.py ├── Typing Test Game ├── README.md ├── TypingTest.py └── words.py ├── Whatsapp Bomber ├── Readme.md └── main.py ├── Youtube Video Downloader ├── README.md └── Youtube Video Download.py ├── Zomato_EDA.ipynb ├── alarm clock using python ├── Readme.md ├── alarm-clock-output.jpg └── main.py ├── gmeet-attendance-taker ├── Gmeet-data.ipynb ├── README.md ├── chromedriver ├── geckodriver └── gmeet.py └── stroke-pred-end-to-end ├── app.py ├── healthcare-dataset-stroke-data.csv ├── model_pickle.pkl ├── static └── images │ └── a.jpg └── templates ├── a.jpg ├── b.jpg ├── c.jpg ├── index.html └── stroke.html /AI Painter/ColorPicker.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | frameWidth = 640 5 | frameHeight = 480 6 | cap = cv2.VideoCapture(1) 7 | cap.set(3, frameWidth) 8 | cap.set(4, frameHeight) 9 | 10 | 11 | def empty(a): 12 | pass 13 | 14 | 15 | cv2.namedWindow("HSV") 16 | cv2.resizeWindow("HSV", 640, 240) 17 | cv2.createTrackbar("HUE Min", "HSV", 0, 179, empty) 18 | cv2.createTrackbar("HUE Max", "HSV", 179, 179, empty) 19 | cv2.createTrackbar("SAT Min", "HSV", 0, 255, empty) 20 | cv2.createTrackbar("SAT Max", "HSV", 255, 255, empty) 21 | cv2.createTrackbar("VALUE Min", "HSV", 0, 255, empty) 22 | cv2.createTrackbar("VALUE Max", "HSV", 255, 255, empty) 23 | 24 | while True: 25 | 26 | success, img = cap.read() 27 | imgHsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) 28 | 29 | h_min = cv2.getTrackbarPos("HUE Min", "HSV") 30 | h_max = cv2.getTrackbarPos("HUE Max", "HSV") 31 | s_min = cv2.getTrackbarPos("SAT Min", "HSV") 32 | s_max = cv2.getTrackbarPos("SAT Max", "HSV") 33 | v_min = cv2.getTrackbarPos("VALUE Min", "HSV") 34 | v_max = cv2.getTrackbarPos("VALUE Max", "HSV") 35 | print(h_min) 36 | 37 | lower = np.array([h_min, s_min, v_min]) 38 | upper = np.array([h_max, s_max, v_max]) 39 | mask = cv2.inRange(imgHsv, lower, upper) 40 | result = cv2.bitwise_and(img, img, mask=mask) 41 | 42 | mask = cv2.cvtColor(mask, cv2.COLOR_GRAY2BGR) 43 | hStack = np.hstack([img, mask, result]) 44 | cv2.imshow('Horizontal Stacking', hStack) 45 | if cv2.waitKey(1) & 0xFF == ord('q'): 46 | break 47 | 48 | cap.release() 49 | cv2.destroyAllWindows() -------------------------------------------------------------------------------- /AI Painter/VirtualPaint.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | frameWidth = 640 4 | frameHeight = 480 5 | cap = cv2.VideoCapture(1) 6 | cap.set(3, frameWidth) 7 | cap.set(4, frameHeight) 8 | cap.set(10,150) 9 | 10 | myColors = [[5,107,0,19,255,255], 11 | [133,56,0,159,156,255], 12 | [57,76,0,100,255,255], 13 | [90,48,0,118,255,255]] 14 | myColorValues = [[51,153,255], ## BGR 15 | [255,0,255], 16 | [0,255,0], 17 | [255,0,0]] 18 | 19 | myPoints = [] ## [x , y , colorId ] 20 | 21 | def findColor(img,myColors,myColorValues): 22 | imgHSV = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) 23 | count = 0 24 | newPoints=[] 25 | for color in myColors: 26 | lower = np.array(color[0:3]) 27 | upper = np.array(color[3:6]) 28 | mask = cv2.inRange(imgHSV,lower,upper) 29 | x,y=getContours(mask) 30 | cv2.circle(imgResult,(x,y),15,myColorValues[count],cv2.FILLED) 31 | if x!=0 and y!=0: 32 | newPoints.append([x,y,count]) 33 | count +=1 34 | #cv2.imshow(str(color[0]),mask) 35 | return newPoints 36 | 37 | def getContours(img): 38 | contours,hierarchy = cv2.findContours(img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE) 39 | x,y,w,h = 0,0,0,0 40 | for cnt in contours: 41 | area = cv2.contourArea(cnt) 42 | if area>500: 43 | #cv2.drawContours(imgResult, cnt, -1, (255, 0, 0), 3) 44 | peri = cv2.arcLength(cnt,True) 45 | approx = cv2.approxPolyDP(cnt,0.02*peri,True) 46 | x, y, w, h = cv2.boundingRect(approx) 47 | return x+w//2,y 48 | 49 | def drawOnCanvas(myPoints,myColorValues): 50 | for point in myPoints: 51 | cv2.circle(imgResult, (point[0], point[1]), 10, myColorValues[point[2]], cv2.FILLED) 52 | 53 | 54 | while True: 55 | success, img = cap.read() 56 | imgResult = img.copy() 57 | newPoints = findColor(img, myColors,myColorValues) 58 | if len(newPoints)!=0: 59 | for newP in newPoints: 60 | myPoints.append(newP) 61 | if len(myPoints)!=0: 62 | drawOnCanvas(myPoints,myColorValues) 63 | 64 | 65 | cv2.imshow("Result", imgResult) 66 | if cv2.waitKey(1) & 0xFF == ord('q'): 67 | break -------------------------------------------------------------------------------- /Among_Us/README.md: -------------------------------------------------------------------------------- 1 | # Draw Among Us 2 | 3 | ### What is Among Us?
4 | #### Among Us is an online multiplayer social deduction game developed and published by American game studio Innersloth. It was released on iOS and Android devices in June 2018 and on Windows in November 2018, featuring cross-platform play between these platforms.
5 | 6 | ![image](https://user-images.githubusercontent.com/61057666/135706294-c9eb850d-d90d-4249-8e62-4d1fb4193968.png) 7 | 8 | # Little Demo for README.MD 9 | -------------------------------------------------------------------------------- /Among_Us/amongus.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | 3 | BODY_COLOR = 'red' 4 | BODY_SHADOW = '' 5 | GLASS_COLOR = '#9acedc' 6 | GLASS_SHADOW = '' 7 | 8 | s = turtle.getscreen() 9 | t = turtle.Turtle() 10 | 11 | # it can move forward backward left right 12 | 13 | 14 | def body(): 15 | """ draws the body """ 16 | t.pensize(20) 17 | # t.speed(15) 18 | 19 | t.fillcolor(BODY_COLOR) 20 | t.begin_fill() 21 | 22 | # right side 23 | t.right(90) 24 | t.forward(50) 25 | t.right(180) 26 | t.circle(40, -180) 27 | t.right(180) 28 | t.forward(200) 29 | 30 | # head curve 31 | t.right(180) 32 | t.circle(100, -180) 33 | 34 | # left side 35 | t.backward(20) 36 | t.left(15) 37 | t.circle(500, -20) 38 | t.backward(20) 39 | 40 | # t.backward(200) 41 | t.circle(40, -180) 42 | # t.right(90) 43 | t.left(7) 44 | t.backward(50) 45 | 46 | # hip 47 | t.up() 48 | t.left(90) 49 | t.forward(10) 50 | t.right(90) 51 | t.down() 52 | # t.right(180) 53 | #t.circle(25, -180) 54 | t.right(240) 55 | t.circle(50, -70) 56 | 57 | t.end_fill() 58 | 59 | 60 | def glass(): 61 | t.up() 62 | # t.right(180) 63 | t.right(230) 64 | t.forward(100) 65 | t.left(90) 66 | t.forward(20) 67 | t.right(90) 68 | 69 | t.down() 70 | t.fillcolor(GLASS_COLOR) 71 | t.begin_fill() 72 | 73 | t.right(150) 74 | t.circle(90, -55) 75 | 76 | t.right(180) 77 | t.forward(1) 78 | t.right(180) 79 | t.circle(10, -65) 80 | t.right(180) 81 | t.forward(110) 82 | t.right(180) 83 | 84 | # t.right(180) 85 | t.circle(50, -190) 86 | t.right(170) 87 | t.forward(80) 88 | 89 | t.right(180) 90 | t.circle(45, -30) 91 | 92 | t.end_fill() 93 | 94 | 95 | def backpack(): 96 | t.up() 97 | t.right(60) 98 | t.forward(100) 99 | t.right(90) 100 | t.forward(75) 101 | 102 | t.fillcolor(BODY_COLOR) 103 | t.begin_fill() 104 | 105 | t.down() 106 | t.forward(30) 107 | t.right(255) 108 | 109 | t.circle(300, -30) 110 | t.right(260) 111 | t.forward(30) 112 | 113 | t.end_fill() 114 | 115 | 116 | body() 117 | glass() 118 | backpack() 119 | 120 | t.screen.exitonclick() 121 | -------------------------------------------------------------------------------- /Automate WhatsApp Messages with Python Instantly!/README.md: -------------------------------------------------------------------------------- 1 | ### 1.Create a new project in code editor 2 | 3 | After installation, create a new project in code editor, give it the desired name. The most crucial part is choosing Python as a file type.
4 | 5 | ### 2. Install pywhatkit 6 | 7 | open a terminal in the code editor window and paste the following code
8 | `pip install pywhatkit` 9 | 10 | ## Some Features of pywhatkit 11 | * Sending Message to a WhatsApp Group or Contact 12 | * Sending Image to a WhatsApp Group or Contact 13 | * Converting an Image to ASCII Art 14 | * Converting a String to Handwriting 15 | * Playing YouTube Videos 16 | * Sending Mails with HTML Code 17 | 18 | 19 | ### 3. Type in the following code 20 | 21 | ![image](https://user-images.githubusercontent.com/61057666/147883823-389ceb2b-cd92-4af1-9358-057b82034123.png) 22 | 23 | 24 | Run the code, and you will find a message saying something like this:
25 | `In 50 seconds, web.WhatsApp.com will open, and after 20 seconds, a message will be delivered by Whatsapp.` 26 | 27 | WhatsApp's web version will open and send a message to the given number at the specified time.
28 | 29 |
30 | 31 | For any doubt contact me here: -
32 | [](https://www.instagram.com/lets__code/) [](https://github.com/avinash201199)[](https://www.linkedin.com/in/avinash-singh-071b79175/) 33 |
(Check My Github profile for more cool stuff !)
34 | -------------------------------------------------------------------------------- /Automate WhatsApp Messages with Python Instantly!/message.py: -------------------------------------------------------------------------------- 1 | #import the downloaded library in python 2 | import pywhatkit 3 | #pywhatkit.sendwhatmsg():Runs a function from the imported library 4 | pywhatkit.sendwhatmsg("+9185000000", "avinash",23,5) 5 | 6 | #syntax: pywhatkit.sendwhatmsg("reciver no. with country code", 7 | # message, hours, minutes) 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Automated sorting of directory files/automated_folder_sort.py: -------------------------------------------------------------------------------- 1 | #Execute - python downloads-watchdog.py "/your/downloads/folder" 2 | 3 | import os 4 | import time 5 | import sysfrom watchdog.observers 6 | import Observer 7 | from watchdog.events import FileSystemEventHandler 8 | folder_to_monitor = sys.argv[1] 9 | file_folder_mapping = { 10 | '.png':'images', 11 | '.jpg':'images', 12 | '.jpeg':'images', 13 | '.gif':'images', 14 | '.pdf':'pdfs', 15 | '.mp4':'videos', 16 | '.mp3':'audio', 17 | '.zip':'bundles' 18 | } 19 | class DownloadedFileHandler(FileSystemEventHandler): 20 | def on_created(self, event): 21 | if any(event.src_path.endswith(x) for x in file_folder_mapping): 22 | parent = os.path.join(os.path.dirname(os.path.abspath(event.src_path)), file_folder_mapping.get(f".{event.src_path.split('.')[-1]}")) 23 | if not os.path.exists(parent): 24 | os.makedirs(parent) 25 | os.rename(event.src_path, os.path.join(parent, os.path.basename(event.src_path)))event_handler = DownloadedFileHandler() 26 | observer = Observer() 27 | observer.schedule(event_handler, folder_to_monitor, recursive=True) 28 | print("Monitoring started") 29 | observer.start() 30 | try: 31 | while True: 32 | time.sleep(10)except KeyboardInterrupt: 33 | observer.stop() 34 | observer.join() 35 | -------------------------------------------------------------------------------- /Automated sorting of directory files/readme.md: -------------------------------------------------------------------------------- 1 | Project- Python libraries based hack of sorting contents of a folder in anautomated way without manual intervention. 2 | 3 | Execution command - python automated_folder_sort.py "/your/downloads/folder" 4 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | avinash201199@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /Fidget Spinner/main.py: -------------------------------------------------------------------------------- 1 | from turtle import * 2 | state = {'turn': 0} 3 | 4 | 5 | def spinner(): 6 | clear() 7 | angle = state['turn']/10 8 | right(angle) 9 | forward(100) 10 | dot(120, 'red') 11 | back(100) 12 | right(120) 13 | forward(100) 14 | dot(120, 'green') 15 | back(100) 16 | right(120) 17 | forward(100) 18 | dot(120, 'blue') 19 | back(100) 20 | right(120) 21 | update() 22 | 23 | 24 | def animate(): 25 | if state['turn'] > 0: 26 | state['turn'] -= 1 27 | 28 | spinner() 29 | ontimer(animate, 20) 30 | 31 | 32 | def flick(): 33 | state['turn'] += 10 34 | 35 | 36 | setup(420, 420, 370, 0) 37 | hideturtle() 38 | tracer(False) 39 | width(20) 40 | onkey(flick, 'space') 41 | listen() 42 | animate() 43 | done() 44 | -------------------------------------------------------------------------------- /Fidget Spinner/readme.md: -------------------------------------------------------------------------------- 1 | # FIDGET SPINNER 2 | ![image](https://user-images.githubusercontent.com/73645295/136187301-5044171c-a884-4a8d-ba06-b8bd96ef0a63.png) 3 | ### The logic of the game is that the turns will keep increasing as you press the space bar, and it will reduce its speed and stop at a point where you stop pressing the space bar. 4 | -------------------------------------------------------------------------------- /Image-steganograpy/Readme.md: -------------------------------------------------------------------------------- 1 | ### Stegano 2 | 3 | `pip3 install stegano ` 4 | 5 | **Using This Script You can Hide a text inside a png or jpeg image with a help of python stegano module** 6 | ## Begginer Friendly Script Simple and Short 7 | 8 | **Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity. Consequently, functions provided by Stegano only hide messages, without encryption. Steganography is often used with cryptography.** 9 | **Use This For fun and Learning Purpose** 10 | -------------------------------------------------------------------------------- /Image-steganograpy/lsb-script.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | from stegano import lsbset 3 | 4 | from stegano.lsbset import generators 5 | 6 | flag="The secret is hacktoberfest is awesome!" 7 | 8 | lets=lsbset.hide("./image.png",flag,generators.eratosthenes()) 9 | #the secret hided steg.png has been created successfully 10 | lets.save("steg.png") 11 | 12 | 13 | 14 | #To Decrypty 15 | 16 | f=open("steg.png","rb") 17 | 18 | lsbset.reveal(f,generators.eratosthenes()) 19 | 20 | 'The secret is hacktoberfest is awesome!' 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Avinash Singh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Live Weather Updates/README.md: -------------------------------------------------------------------------------- 1 | LIVE WEATHER UPDATES 2 | 3 | A simple Python script to show the live update for Weather information. 4 | 5 | ![Capture](https://user-images.githubusercontent.com/87525399/137435924-912822ad-a610-4000-9def-2f3feaa82f06.JPG) 6 | 7 | ![Capture1](https://user-images.githubusercontent.com/87525399/137435937-761fdaa0-e21f-491c-a580-6e7d124f2c54.JPG) 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Live Weather Updates/Weather.py: -------------------------------------------------------------------------------- 1 | from bs4 import BeautifulSoup 2 | import requests 3 | headers = { 4 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'} 5 | 6 | 7 | def weather(city): 8 | city = city.replace(" ", "+") 9 | res = requests.get( 10 | f'https://www.google.com/search?q={city}&oq={city}&aqs=chrome.0.35i39l2j0l4j46j69i60.6128j1j7&sourceid=chrome&ie=UTF-8', headers=headers) 11 | print("Searching...\n") 12 | soup = BeautifulSoup(res.text, 'html.parser') 13 | location = soup.select('#wob_loc')[0].getText().strip() 14 | time = soup.select('#wob_dts')[0].getText().strip() 15 | info = soup.select('#wob_dc')[0].getText().strip() 16 | weather = soup.select('#wob_tm')[0].getText().strip() 17 | print(location) 18 | print(time) 19 | print(info) 20 | print(weather+"°C") 21 | 22 | 23 | city = input("Enter the Name of City -> ") 24 | city = city+" weather" 25 | weather(city) 26 | print("Have a Nice Day:)") 27 | 28 | -------------------------------------------------------------------------------- /Notepad using Python/README.MD: -------------------------------------------------------------------------------- 1 | # Notepad using Python's tkinter 2 | 3 | > Made a Notepad like application using [tkinter](https://docs.python.org/3/library/tk.html) 4 | 5 | # Features 6 | 7 | 1. Can do following functionalities: 8 | 1. Type the text 9 | 2. Save the file as .txt only (you may change it to any file type, check below how to do it) 10 | 2. Different look of dark theme. 11 | 3. No module to install. tkinter is already installed with Python. 12 | 13 | :warning: Never put the output tkinter screen in full screen mode. 14 | 15 | ⚛️ Recommended IDE is PyCharm Community. 16 | 17 | # How to change savefileextension 18 | 19 | *Simple steps:* 20 | 1. Go to the code in line 15. 21 | 2. Change the code, replace the value of `defaultextension` from `.txt` to `*,*`. 22 | 3. Save the code & rerun. 23 | 24 | # Author: 25 | 26 | [Nitin Kumar](https://github.com/nitinkumar30/) 27 | -------------------------------------------------------------------------------- /Notepad using Python/notepad-using-python.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | from tkinter import filedialog, messagebox 3 | 4 | # imported all modules 5 | 6 | root = Tk() 7 | root.geometry("520x600") 8 | root.title("Nitin's Notepad") 9 | 10 | 11 | # --------------------------------------------------- 12 | # define methods for button functionality 13 | 14 | def save_file(): 15 | open_file = filedialog.asksaveasfile(mode='w', defaultextension=".txt") # change defaultextension's value to '*.*' 16 | if open_file is None: 17 | return 18 | text = str(entry.get(1.0, END)) 19 | open_file.write(text) 20 | open_file.close() 21 | 22 | 23 | def clear(): 24 | messagebox.showinfo("Cleared", "Cleared all contents !") 25 | entry.delete(1.0, END) 26 | 27 | 28 | def open_file(): 29 | file = filedialog.askopenfile(mode='r', filetype=[('text files', '*.txt')]) 30 | if file is not None: 31 | content = file.read() 32 | entry.insert(INSERT, content) 33 | 34 | 35 | # -------------------------------------------- 36 | 37 | # Buttons & Textbox placement 38 | 39 | b1 = Button(root, text="Save File", command=save_file) 40 | b1.place(x=10, y=10) 41 | 42 | b2 = Button(root, text="Clear", command=clear) 43 | b2.place(x=70, y=10) 44 | 45 | b3 = Button(root, text="Open File", command=open_file) 46 | b3.place(x=120, y=10) 47 | 48 | entry = Text(root, height=60, width=70, wrap=WORD, bg="black", fg="yellow", selectbackground="blue", 49 | font="Courier 15", insertbackground="violet") 50 | entry.place(x=10, y=50) 51 | 52 | root.mainloop() 53 | -------------------------------------------------------------------------------- /Phone number info using Python/README.MD: -------------------------------------------------------------------------------- 1 | # Phone information using Python's phonenumbers 2 | 3 | > Made a Phone number information finder using [phonenumbers](https://pypi.org/project/phonenumbers/) 4 | 5 | # Features 6 | 7 | 1. Can tell following information about a number: 8 | 1. Country Code 9 | 2. National number 10 | 3. Whether number is valid or not 11 | 4. Carrier name(Service Provider) 12 | 5. Timezone of the number 13 | 6. Geo-location 14 | 15 | 16 | :warning: Some warning for smooth functioning: 17 | - This script is for taking out info about any phone number 18 | - Be sure to have country code or else it'll take 44(Canada) as Country Code 19 | - Also, carrier name may not be able to fetch due to some restrictions 20 | 21 | 22 | ## Author: 23 | 24 | [Nitin Kumar](https://github/com/nitinkumar30/) 25 | -------------------------------------------------------------------------------- /Phone number info using Python/phone-info.py: -------------------------------------------------------------------------------- 1 | import phonenumbers 2 | from phonenumbers import geocoder 3 | from phonenumbers import carrier 4 | from phonenumbers import timezone 5 | 6 | # print("This script is for taking out info about any phone number 7 | # print("Be sure to have country code or else it'll take 44(Canada) as Country Code 8 | # Also carrier name may not be able to fetch due to some restrictions 9 | 10 | number = input("Enter the phone number with country code: ") 11 | 12 | my_number = phonenumbers.parse(number, "GB") 13 | print(my_number) 14 | print("Number is Valid: ", phonenumbers.is_valid_number(my_number)) 15 | print("Carrier name of number:", carrier.name_for_number(my_number, "en")) 16 | print("Timezone of the number:", timezone.time_zones_for_number(my_number)) 17 | print("Geo-location of the number:", geocoder.description_for_number(my_number, 'en')) 18 | -------------------------------------------------------------------------------- /Python Turtle Programming/Olympic Logo: -------------------------------------------------------------------------------- 1 | import turtle 2 | t = turtle.Turtle() 3 | t.pensize(6) 4 | t.goto(0,0) 5 | 6 | firstcolors=['blue', 'black', 'red'] 7 | for i in range(3): 8 | t.penup() 9 | t.pencolor(firstcolors[i]) 10 | t.goto(i*130,0) 11 | t.pendown() 12 | t.circle(60) 13 | secondcolors=['','yellow','', 'green'] 14 | for i in range(1,4): 15 | t.penup() 16 | t.pencolor(secondcolors[i]) 17 | t.goto(i*65, -66) 18 | t.pendown() 19 | t.circle(60) 20 | -------------------------------------------------------------------------------- /Python Turtle Programming/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Python Turtle Programming/Rainbow Renzene: -------------------------------------------------------------------------------- 1 | import turtle 2 | colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow'] 3 | t = turtle.Pen() 4 | turtle.bgcolor('black') 5 | for x in range(360): 6 | t.pencolor(colors[x%6]) 7 | t.width(x/100 + 1) 8 | t.forward(x) 9 | t.left(59) 10 | -------------------------------------------------------------------------------- /Python Turtle Programming/Star Print/README.md: -------------------------------------------------------------------------------- 1 | ![image](https://user-images.githubusercontent.com/61057666/147729218-67982849-ebed-4ba3-bea8-79ba1968bf82.png) 2 | -------------------------------------------------------------------------------- /Python Turtle Programming/Star Print/star.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | import colorsys 3 | 4 | t=turtle.Turtle() 5 | s=turtle.Screen() 6 | s.bgcolor('black') 7 | t.speed(0) 8 | n=150 9 | h=0 10 | t.left(180) 11 | for i in range(360): 12 | c=colorsys.hsv_to_rgb(h,1,0.8) 13 | h+=1/n 14 | t.color(c) 15 | t.left(144) 16 | t.forward(i*5) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Are you excited to contribute to Python Projects 😍 2 | 3 | 4 | 5 | ### How to contribute 😎
6 | 7 | ❌ Note : don't make pull request unless you are assigned with the issue.
8 | ❌ Note : while making pull request add issue number with # (for example #78) 9 | 10 | * Star this repository. 11 | * Select the project on which you want to work or you can add your own project. 12 | * Create an issue with description on which project you want to work and wait for approval. 13 | * Then fork this repository. 14 | * In forked repository add your changes. 15 | * Then make pull request with issue number. 16 | * Wait for review. 17 | 18 | ## Note - If you are adding your project ! 19 | 20 | * Create separate folder for your project. 21 | * Then add your files wiht README.MD 22 | * In README.MD describe about the project and the process to contribute in your project. 23 | * For example see [this](https://github.com/avinash201199/Python-projects-/tree/main/Among_Us) 24 | * Then make pull request and wait for review. 25 | 26 | You can also contribute to this repository by improving documention or any mistakes/errors.
27 | 28 | For any doubt contact and follow me here: -
29 | [](https://www.instagram.com/lets__code/) [](https://github.com/avinash201199)[](https://www.linkedin.com/in/avinash-singh-071b79175/) 30 |
(Must Check My Github for more cool stuff !)
31 |

THANK YOU FOR YOUR CONTRIBUTIONS. 💫

32 | -------------------------------------------------------------------------------- /Random Wikipedia Article Generator/README.md: -------------------------------------------------------------------------------- 1 | ## Random Wikipedia Article Generator 2 | 3 | This python acript uses Beautiful Soup wo generate a random Wikipedia article and then if the user likes that article will open it in the web browser. 4 | Otherwise the program will continue to run and generate random articles. For this program I used this to generate a random article from wikipedia. 5 | This link generates a random article everytime it is clicked. So after parsing this link the same link cannot be used twice for openning after getting the user's choice, 6 | so the link had to be stored before showing the title. So I had to use a while true loop encompasing all of it. Then simply the openning of the url based on the user's choice 7 | is left to the last if-else part.
8 | -------------------------------------------------------------------------------- /Random Wikipedia Article Generator/wiki.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from bs4 import BeautifulSoup 3 | import webbrowser 4 | 5 | 6 | while True: 7 | a = "https://en.wikipedia.org/wiki/Special:Random" 8 | u = requests.get(a) 9 | soup = BeautifulSoup(u.content, 'html.parser') 10 | title = soup.find(class_ = "firstHeading").text 11 | print(title + "\nDo You want to view it? (Y/N)") 12 | ans = str(input("")) 13 | if (ans.lower() == "y"): 14 | url = 'https://en.wikipedia.org/wiki/%s' %title 15 | webbrowser.open(url) 16 | break 17 | elif (ans.lower() == "n"): 18 | print("ok\nTrying again!") 19 | continue 20 | else: 21 | print("Wrong Choice!!!") 22 | break 23 | -------------------------------------------------------------------------------- /Saved Wifi Passwords Extractor/README.md: -------------------------------------------------------------------------------- 1 | # Saved Wifi Passwords Extractor 2 | 3 | Usually while connecting with the wifi we have to enter some password to access the network, but we are not directly able to see the password we have entered earlier i.e password of saved network. In this article, we will see how we can get all the saved WiFi name and passwords using Python, in order to do this we will use subprocess module of python. 4 | Wi-Fi is a wireless networking technology that allows devices such as computers (laptops and desktops), mobile devices (smartphones and wearables), and other equipment (printers and video cameras) to interface with the Internet. 5 | The subprocess module present in Python(both 2.x and 3.x) is used to run new applications or programs through Python code by creating new processes. It also helps to obtain the input/output/error pipes as well as the exit codes of various commands. 6 | 7 | 8 | ## Steps for Implementation : 9 | 1. Import the subprocess module 10 | 2. Get the metadata of the wlan(wifi) with the help of check_output method 11 | 3. Decode the metadata and split the meta data according to the line 12 | 4. From the decoded metadata get the names of the saved wlan networks 13 | 5. Now for each name again get the metadata of wlan according to the name 14 | 6. Start try and catch block and inside the try block, decode and split this metadata and get the password of the given wifi name 15 | 7. Print the password and the wifi name and print blank if there is no password 16 | 8. In except block if process error occurred print encoding error occurred 17 | -------------------------------------------------------------------------------- /Saved Wifi Passwords Extractor/saved_wifi_passwords_extractor.py: -------------------------------------------------------------------------------- 1 | # importing subprocess 2 | import subprocess 3 | 4 | # getting meta data 5 | meta_data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']) 6 | 7 | # decoding meta data 8 | data = meta_data.decode('utf-8', errors ="backslashreplace") 9 | 10 | # splitting data by line by line 11 | data = data.split('\n') 12 | 13 | # creating a list of profiles 14 | profiles = [] 15 | 16 | # traverse the data 17 | for i in data: 18 | 19 | # find "All User Profile" in each item 20 | if "All User Profile" in i : 21 | 22 | # if found 23 | # split the item 24 | i = i.split(":") 25 | 26 | # item at index 1 will be the wifi name 27 | i = i[1] 28 | 29 | # formatting the name 30 | # first and last character is use less 31 | i = i[1:-1] 32 | 33 | # appending the wifi name in the list 34 | profiles.append(i) 35 | 36 | 37 | # printing heading 38 | print("{:<30}| {:<}".format("Wi-Fi Name", "Password")) 39 | print("----------------------------------------------") 40 | 41 | # traversing the profiles 42 | for i in profiles: 43 | 44 | # try catch block begins 45 | # try block 46 | try: 47 | # getting meta data with password using wifi name 48 | results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key = clear']) 49 | 50 | # decoding and splitting data line by line 51 | results = results.decode('utf-8', errors ="backslashreplace") 52 | results = results.split('\n') 53 | 54 | # finding password from the result list 55 | results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b] 56 | 57 | # if there is password it will print the pass word 58 | try: 59 | print("{:<30}| {:<}".format(i, results[0])) 60 | 61 | # else it will print blank in front of pass word 62 | except IndexError: 63 | print("{:<30}| {:<}".format(i, "")) 64 | 65 | 66 | 67 | # called when this process get failed 68 | except subprocess.CalledProcessError: 69 | print("Encoding Error Occured") 70 | -------------------------------------------------------------------------------- /Tic Tac Toe/TicTacToe.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | 4 | board = [' ',' ',' ',' ',' ',' ',' ',' ',' ',' '] 5 | player = 1 6 | 7 | ########win Flags########## 8 | Win = 1 9 | Draw = -1 10 | Running = 0 11 | Stop = 1 12 | ########################### 13 | Game = Running 14 | Mark = 'X' 15 | 16 | #This Function Draws Game Board 17 | def DrawBoard(): 18 | print(" %c | %c | %c " % (board[1],board[2],board[3])) 19 | print("___|___|___") 20 | print(" %c | %c | %c " % (board[4],board[5],board[6])) 21 | print("___|___|___") 22 | print(" %c | %c | %c " % (board[7],board[8],board[9])) 23 | print(" | | ") 24 | 25 | #This Function Checks position is empty or not 26 | def CheckPosition(x): 27 | if(board[x] == ' '): 28 | return True 29 | else: 30 | return False 31 | 32 | #This Function Checks player has won or not 33 | def CheckWin(): 34 | global Game 35 | #Horizontal winning condition 36 | if(board[1] == board[2] and board[2] == board[3] and board[1] != ' '): 37 | Game = Win 38 | elif(board[4] == board[5] and board[5] == board[6] and board[4] != ' '): 39 | Game = Win 40 | elif(board[7] == board[8] and board[8] == board[9] and board[7] != ' '): 41 | Game = Win 42 | #Vertical Winning Condition 43 | elif(board[1] == board[4] and board[4] == board[7] and board[1] != ' '): 44 | Game = Win 45 | elif(board[2] == board[5] and board[5] == board[8] and board[2] != ' '): 46 | Game = Win 47 | elif(board[3] == board[6] and board[6] == board[9] and board[3] != ' '): 48 | Game=Win 49 | #Diagonal Winning Condition 50 | elif(board[1] == board[5] and board[5] == board[9] and board[5] != ' '): 51 | Game = Win 52 | elif(board[3] == board[5] and board[5] == board[7] and board[5] != ' '): 53 | Game=Win 54 | #Match Tie or Draw Condition 55 | elif(board[1]!=' ' and board[2]!=' ' and board[3]!=' ' and board[4]!=' ' and board[5]!=' ' and board[6]!=' ' and board[7]!=' ' and board[8]!=' ' and board[9]!=' '): 56 | Game=Draw 57 | else: 58 | Game=Running 59 | 60 | print("Tic-Tac-Toe Game Designed By Sourabh Somani") 61 | print("Player 1 [X] --- Player 2 [O]\n") 62 | print() 63 | print() 64 | print("Please Wait...") 65 | time.sleep(3) 66 | while(Game == Running): 67 | os.system('cls') 68 | DrawBoard() 69 | if(player % 2 != 0): 70 | print("Player 1's chance") 71 | Mark = 'X' 72 | else: 73 | print("Player 2's chance") 74 | Mark = 'O' 75 | choice = int(input("Enter the position between [1-9] where you want to mark : ")) 76 | if(CheckPosition(choice)): 77 | board[choice] = Mark 78 | player+=1 79 | CheckWin() 80 | 81 | os.system('cls') 82 | DrawBoard() 83 | if(Game==Draw): 84 | print("Game Draw") 85 | elif(Game==Win): 86 | player-=1 87 | if(player%2!=0): 88 | print("Player 1 Won") 89 | else: 90 | print("Player 2 Won") 91 | -------------------------------------------------------------------------------- /Typing Test Game/README.md: -------------------------------------------------------------------------------- 1 | ### Typing Test Python Project 2 | Typing test is very useful as it helps in improving your typing speed and accuracy. This Python project will help you to develop your own typing test by following the procedures mentioned below.
3 | 4 | ### About Typing Test Project 5 | In this project, we will develop a typing test that will help in improving your speed and accuracy. The user will be given 60 seconds and the user has to write as many words as possible that are displayed on the screen within the given time frame. After completion of time the final score will be displayed to the user along with the number of wrong words entered.
6 | 7 | ### Python Typing Test Project 8 | The objective of the project is to develop our own typing test with the help of tkinter.
9 | 10 | ### Project Prerequisites 11 | To begin the project you should install pygame on your PC. This project requires the knowledge of functions in python and pygame.
12 | 13 | Credit - [Data Flair](https://data-flair.training/blogs/python-typing-test/) 14 | -------------------------------------------------------------------------------- /Typing Test Game/TypingTest.py: -------------------------------------------------------------------------------- 1 | from words import words 2 | from tkinter import * 3 | import random 4 | from tkinter import messagebox 5 | 6 | Mainscreen= Tk() 7 | Mainscreen.geometry('800x600') 8 | Mainscreen.title('Typing Test') 9 | Mainscreen.config(bg="#076BF6") 10 | 11 | score=0 12 | missed=0 13 | time=60 14 | count1=0 15 | movingwords='' 16 | 17 | def movingtext(): 18 | global count1,movingwords 19 | floatingtext='Typing Test' 20 | if count1>= len(floatingtext): 21 | count1 =0 22 | movingwords ='' 23 | movingwords += floatingtext[count1] 24 | count1 +=1 25 | fontlabel.configure(text=movingwords) 26 | fontlabel.after(150,movingtext) 27 | 28 | 29 | def giventime(): 30 | global time,score,missed 31 | if time>11: 32 | pass 33 | else: 34 | timercount.configure(fg='red') 35 | if time>0: 36 | time -=1 37 | timercount.configure(text=time) 38 | timercount.after(1000,giventime) 39 | else: 40 | gameinstruction.configure(text='Hit = {} | Miss = {} | Total Score = {}' 41 | .format(score,missed,score-missed)) 42 | rr= messagebox.askretrycancel('Notification','Do you want to play again?') 43 | if rr==True: 44 | score=0 45 | missed=0 46 | time=60 47 | timercount.configure(text=time) 48 | labelforward.configure(text=words[0]) 49 | scorelabelcount.configure(text=score) 50 | wordentry.delete(0, END) 51 | 52 | def game(event): 53 | global score, missed 54 | if time==60: 55 | giventime() 56 | gameinstruction.configure(text='') 57 | startlabel.configure(text='') 58 | if wordentry.get()== labelforward['text']: 59 | score +=1 60 | scorelabelcount.configure(text=score) 61 | else: 62 | missed +=1 63 | random.shuffle(words) 64 | labelforward.configure(text=words[0]) 65 | wordentry.delete(0,END) 66 | 67 | fontlabel=Label(Mainscreen,text='',font=('arial',25, 68 | 'italic bold'),fg='purple',width=40) 69 | fontlabel.place(x=10,y=10) 70 | movingtext() 71 | 72 | startlabel=Label(Mainscreen,text='Start Typing',font=('arial',30, 73 | 'italic bold'),bg='black',fg='white') 74 | startlabel.place(x=275,y=50) 75 | 76 | random.shuffle(words) 77 | labelforward=Label(Mainscreen,text=words[0],font=('arial',45, 78 | 'italic bold'),fg='green') 79 | labelforward.place(x=250,y=240) 80 | 81 | 82 | scorelabel=Label(Mainscreen,text='Your Score:',font=('arial',25, 83 | 'italic bold'),fg='red') 84 | scorelabel.place(x=10,y=100) 85 | 86 | scorelabelcount=Label(Mainscreen,text=score,font=('arial',25, 87 | 'italic bold'),fg='blue') 88 | scorelabelcount.place(x=150,y=180) 89 | 90 | 91 | 92 | labelfortimer=Label(Mainscreen,text='Time Left:',font=('arial',25, 93 | 'italic bold'),fg='red') 94 | labelfortimer.place(x=600,y=100) 95 | 96 | timercount=Label(Mainscreen,text=time,font=('arial',25, 97 | 'italic bold'),fg='blue') 98 | timercount.place(x=600,y=180) 99 | 100 | 101 | 102 | gameinstruction= Label(Mainscreen,text='Hit enter button after typing the word', 103 | font=('arial',25,'italic bold'),fg='grey') 104 | gameinstruction.place(x=150,y=500) 105 | 106 | wordentry= Entry(Mainscreen,font=('arial',25,'italic bold'),bd=10,justify='center') 107 | wordentry.place(x=250,y=330) 108 | wordentry.focus_set() 109 | 110 | Mainscreen.bind('',game) 111 | mainloop() 112 | -------------------------------------------------------------------------------- /Typing Test Game/words.py: -------------------------------------------------------------------------------- 1 | words=['ability','able','about','above','accept','according','account','across', 2 | 'act','action','activity','actually','add','address','administration', 3 | 'admit','adult','affect','after','again','against','age','agency', 4 | 'agent','ago','agree','agreement','ahead','air','all','allow','almost','alone', 5 | 'along','already','also','although','always','American','among','amount', 6 | 'analysis','and','animal','another','answer','any','anyone','anything','appear', 7 | 'apply','approach','area','argue','arm','around','arrive','art','article', 8 | 'artist','as','ask','assume','at','attack','attention','attorney','audience', 9 | 'author','authority','available','avoid','away','baby','back','bad','bag','ball', 10 | 'bank','bar','base','be','beat','beautiful','because','become','bed','before', 11 | 'begin','behavior','behind','believe','benefit','best','better','between', 12 | 'beyond','big','bill','billion','bit','black','blood','blue','board','body', 13 | 'book','born','both','box','boy','break','bring','brother','budget','build', 14 | 'building','business','but','buy','by','call','camera','campaign','can','cancer', 15 | 'candidate','capital','car','card','care','career','carry','case','catch', 16 | 'cause','cell','center','central','century','certain','certainly','chair', 17 | 'challenge','chance','change','character','charge','check','child','choice', 18 | 'choose','church','citizen','city','civil','claim','class','clear','clearly', 19 | 'close','coach','cold','collection','college','color','come','commercial', 20 | 'common','community','company','compare','computer','concern','condition', 21 | 'conference','Congress','consider','consumer','contain','continue','control', 22 | 'cost','could','country','couple','course','court','cover','create','crime', 23 | 'cultural','culture','cup','current','customer','cut', 24 | 'dark','data','daughter','day','dead','deal','death','debate','decade','decide', 25 | 'decision','deep','defense','degree','Democrat','democratic','describe','design', 26 | 'despite','detail','determine','develop','development','die','difference', 27 | 'different','difficult','dinner','direction','director','discover','discuss', 28 | 'discussion','disease','do','doctor','dog','door','down','draw','dream','drive', 29 | 'drop','drug','during', 30 | 'each','early','east','easy','eat','economic','economy','edge','education', 31 | 'effect','effort','eight','either','election','else','employee','end','energy', 32 | 'enjoy','enough','enter','entire','environment','environmental','especially', 33 | 'establish','even','evening','event','ever','every','everybody','everyone', 34 | 'everything','evidence','exactly','example','executive','exist','expect', 35 | 'experience','expert','explain','eye', 36 | 'face','fact','factor','fail','fall','family','far','fast','father','fear', 37 | 'federal','feel','feeling','few','field','fight','figure','fill','film','final', 38 | 'finally','financial','find','fine','finger','finish','fire','firm','first', 39 | 'fish','five','floor','fly','focus','follow','food','foot','for','force', 40 | 'foreign','forget','form','former','forward','four','free','friend', 41 | 'from','front','full','fund','future', 42 | 'game','garden','gas','general','generation','get','girl','give','glass','go', 43 | 'goal','good','government','great','green','ground','group','grow','growth', 44 | 'guess','gun','guy', 45 | 'hair','half','hand','hang','happen','happy','hard','have','he','head','health', 46 | 'hear','heart','heat','heavy','help','her','here','herself','high','him', 47 | 'himself','his','history','hit','hold','home','hope','hospital','hot','hotel', 48 | 'hour','house','how','however','huge','human','hundred','husband', 49 | 'idea','identify','if','image','imagine','impact','important','improve','in', 50 | 'include','including','increase','indeed','indicate','individual','industry', 51 | 'information','inside','instead','institution','interest','interesting', 52 | 'international','interview','into','investment','involve','issue', 53 | 'it','item','its','itself','job','join','just','keep','key','kid','kill','kind', 54 | 'kitchen','know','knowledge','land','language','large','last','late','later', 55 | 'laugh','law','lawyer','lay','lead','leader','learn','least','leave','left', 56 | 'leg','legal','less','let','letter','level','lie','life','light','like','likely', 57 | 'line','list','listen','little','live','local','long','look','lose','loss', 58 | 'lot','love','low', 59 | 'machine','magazine','main','maintain','major','majority','make','man','manage', 60 | 'management','manager','many','market','marriage','material','matter','may', 61 | 'maybe','me','mean','measure','media','medical','meet','meeting','member', 62 | 'memory','mention','message','method','middle','might','military','million', 63 | 'mind','minute','miss','mission','model','modern','moment','money','month', 64 | 'more','morning','most','mother','mouth','move','movement','movie','much','music', 65 | 'must','myself','name', 66 | 'nation','national','natural','nature','near','nearly','necessary','need', 67 | 'network','never','new','news','newspaper','next','nice','night','no','none', 68 | 'nor','north','not','note','nothing','notice','now','number', 69 | 'occur','off','offer','office','officer','official','often', 70 | 'oil','old','on','once','one','only','onto','open','operation','opportunity', 71 | 'option','or','order','organization','other','our','out','outside','over', 72 | 'own','owner','page','pain','Painting','paper','parent', 73 | 'part','participant','particular','particularly','partner','party', 74 | 'pass','past','patient','pattern','pay','peace','people','per','perform', 75 | 'performance','perhaps','period','person','personal','phone','political', 76 | 'politics','poor','popular','population','position','positive','possible', 77 | 'power','quite','race','radio', 78 | 'raise','range','rate','rather','reach','read','ready','real','reality','realize', 79 | 'really','reason','receive','recent','recently','recognize','record','red', 80 | 'reduce','reflect','region','relate','relationship','religious','remain', 81 | 'remember','remove','report','represent','Republican','require','research', 82 | 'resource','respond','response','responsibility','run','safe','same','save', 83 | 'say','scene','school','science','scientist','score','sea','season','seat', 84 | 'second','section','security','see','seek','seem','sell','send','senior','sense', 85 | 'series','serious','serve','service', 86 | 'set','seven','several','shake','share','she','shoot','short','shot','should', 87 | 'shoulder','show','side','sign','significant','similar','simple','simply','since', 88 | 'sing','single','sister','sit','site','situation','six','size','skill','skin', 89 | 'small','smile', 90 | 'so','social','society','soldier','some','somebody','someone','something', 91 | 'sometimes','speech','spend','sport','spring','staff','stage','stand','standard', 92 | 'star','start','state','statement','station','stay','step','still','stock', 93 | 'stop','store','story','strategy','street','strong','structure','student','study', 94 | 'stuff','style','subject','success','successful','such','suddenly','suffer', 95 | 'suggest','summer','support','sure','surface','system','table','take','talk', 96 | 'task','tax','teach','teacher','team','technology','television','tell','ten', 97 | 'tend','term','test','than','thank','thing','think','third','this','those', 98 | 'though','thought','thousand','threat','three','through','throughout','throw', 99 | 'thus','time','to','today','together','tonight','too','top','total','tough', 100 | 'toward','town','trade','traditional','training','travel','treat','treatment', 101 | 'tree','trial','trip','trouble','true','truth','try','turn','TV','two','type', 102 | 'under','understand','unit','until','up','upon','us','use','usually','value', 103 | 'various','very','victim','view','violence','visit','voice','vote','wait', 104 | 'weapon','wear','week','weight','well','west','western','what','whatever', 105 | 'when','where','whether','whose','why','wide','wife','will','win','wind', 106 | 'window','wish','with','within','without','woman','wonder','word','work', 107 | 'worker','world','worry','would','write','writer','wrong','yard', 108 | 'yeah','year','yes','yet','you','young','your','yourself'] 109 | 110 | -------------------------------------------------------------------------------- /Whatsapp Bomber/Readme.md: -------------------------------------------------------------------------------- 1 | # WhatsApp Bomber 2 | 3 | ### What this will do?
4 | #### It's an automated scripted that will send N number of messages in WhatsApp to a contact that we input in the beginning. We just need to run and scan the QR code and, the remaining all will be done by this >< 5 | -------------------------------------------------------------------------------- /Whatsapp Bomber/main.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | from selenium.webdriver.support.ui import WebDriverWait 3 | from selenium.webdriver.support import expected_conditions as EC 4 | from selenium.webdriver.common.by import By 5 | 6 | driver = webdriver.Chrome() 7 | driver.get("https://web.whatsapp.com/") 8 | wait = WebDriverWait(driver, 60, 0) 9 | 10 | name = input("Enter the name of contact or group you want to text: ") 11 | text = input("Enter the text you want to send: ") 12 | n = int(input("Enter the number of times you want the text to be sent: ")) 13 | input( 14 | "Make sure you have scanned the QR code of whatsapp web. After that, press any key" 15 | ) 16 | 17 | xarg = '//span[@title = "{}"]'.format(name) 18 | user = wait.until(EC.presence_of_element_located((By.XPATH, xarg))) 19 | user.click() 20 | 21 | inp_xpath = '//*[@id="main"]/footer/div[1]/div/div[1]/div[2]/div[1]/div/div[2]' 22 | input_box = wait.until(EC.presence_of_element_located((By.XPATH, inp_xpath))) 23 | 24 | for i in range(n): 25 | input_box.send_keys(text) 26 | butn = "_4sWnG" 27 | button = wait.until(EC.presence_of_element_located((By.CLASS_NAME, butn))) 28 | button.click() 29 | if i % 10 == 0: 30 | print(i) 31 | -------------------------------------------------------------------------------- /Youtube Video Downloader/README.md: -------------------------------------------------------------------------------- 1 |

YOUTUBE VIDEO DOWNLOADER

2 | 3 | A Python Program to download youtube videos directly to your device made using python 4 | 5 | ![Capture](https://user-images.githubusercontent.com/87525399/137484445-c6479016-988e-47d6-848d-1d426da51c3d.JPG) 6 | ![Capture1](https://user-images.githubusercontent.com/87525399/137484453-82f5dcae-d01f-4b4b-90e5-9c59db58c463.JPG) 7 | ![Capture2](https://user-images.githubusercontent.com/87525399/137484460-c0c9adc6-34e0-4675-8cd1-9aa1a827a08d.JPG) 8 | -------------------------------------------------------------------------------- /Youtube Video Downloader/Youtube Video Download.py: -------------------------------------------------------------------------------- 1 | # Importing necessary packages 2 | import tkinter as tk 3 | from tkinter import * 4 | from pytube import YouTube 5 | from tkinter import messagebox, filedialog 6 | 7 | 8 | # Defining CreateWidgets() function 9 | # to create necessary tkinter widgets 10 | def Widgets(): 11 | 12 | head_label = Label(root, text="YouTube Video Downloader Using Tkinter", 13 | padx=15, 14 | pady=15, 15 | font="SegoeUI 14", 16 | bg="palegreen1", 17 | fg="red") 18 | head_label.grid(row=1, 19 | column=1, 20 | pady=10, 21 | padx=5, 22 | columnspan=3) 23 | 24 | link_label = Label(root, 25 | text="YouTube link :", 26 | bg="salmon", 27 | pady=5, 28 | padx=5) 29 | link_label.grid(row=2, 30 | column=0, 31 | pady=5, 32 | padx=5) 33 | 34 | root.linkText = Entry(root, 35 | width=35, 36 | textvariable=video_Link, 37 | font="Arial 14") 38 | root.linkText.grid(row=2, 39 | column=1, 40 | pady=5, 41 | padx=5, 42 | columnspan=2) 43 | 44 | 45 | destination_label = Label(root, 46 | text="Destination :", 47 | bg="salmon", 48 | pady=5, 49 | padx=9) 50 | destination_label.grid(row=3, 51 | column=0, 52 | pady=5, 53 | padx=5) 54 | 55 | 56 | root.destinationText = Entry(root, 57 | width=27, 58 | textvariable=download_Path, 59 | font="Arial 14") 60 | root.destinationText.grid(row=3, 61 | column=1, 62 | pady=5, 63 | padx=5) 64 | 65 | 66 | browse_B = Button(root, 67 | text="Browse", 68 | command=Browse, 69 | width=10, 70 | bg="bisque", 71 | relief=GROOVE) 72 | browse_B.grid(row=3, 73 | column=2, 74 | pady=1, 75 | padx=1) 76 | 77 | Download_B = Button(root, 78 | text="Download Video", 79 | command=Download, 80 | width=20, 81 | bg="thistle1", 82 | pady=10, 83 | padx=15, 84 | relief=GROOVE, 85 | font="Georgia, 13") 86 | Download_B.grid(row=4, 87 | column=1, 88 | pady=20, 89 | padx=20) 90 | 91 | 92 | # Defining Browse() to select a 93 | # destination folder to save the video 94 | 95 | def Browse(): 96 | # Presenting user with a pop-up for 97 | # directory selection. initialdir 98 | # argument is optional Retrieving the 99 | # user-input destination directory and 100 | # storing it in downloadDirectory 101 | download_Directory = filedialog.askdirectory( 102 | initialdir="YOUR DIRECTORY PATH", title="Save Video") 103 | 104 | # Displaying the directory in the directory 105 | # textbox 106 | download_Path.set(download_Directory) 107 | 108 | # Defining Download() to download the video 109 | 110 | 111 | def Download(): 112 | 113 | # getting user-input Youtube Link 114 | Youtube_link = video_Link.get() 115 | 116 | # select the optimal location for 117 | # saving file's 118 | download_Folder = download_Path.get() 119 | 120 | # Creating object of YouTube() 121 | getVideo = YouTube(Youtube_link) 122 | 123 | # Getting all the available streams of the 124 | # youtube video and selecting the first 125 | # from the 126 | videoStream = getVideo.streams.first() 127 | 128 | # Downloading the video to destination 129 | # directory 130 | videoStream.download(download_Folder) 131 | 132 | # Displaying the message 133 | messagebox.showinfo("SUCCESSFULLY", 134 | "DOWNLOADED AND SAVED IN\n" 135 | + download_Folder) 136 | 137 | 138 | # Creating object of tk class 139 | root = tk.Tk() 140 | 141 | # Setting the title, background color 142 | # and size of the tkinter window and 143 | # disabling the resizing property 144 | root.geometry("520x280") 145 | root.resizable(False, False) 146 | root.title("YouTube Video Downloader") 147 | root.config(background="PaleGreen1") 148 | 149 | # Creating the tkinter Variables 150 | video_Link = StringVar() 151 | download_Path = StringVar() 152 | 153 | # Calling the Widgets() function 154 | Widgets() 155 | 156 | # Defining infinite loop to run 157 | # application 158 | root.mainloop() 159 | 160 | -------------------------------------------------------------------------------- /alarm clock using python/Readme.md: -------------------------------------------------------------------------------- 1 | # created by Rutvik Gondaliya 2 | 3 | ## alarm-clock-python-code 4 | 5 | 6 | ### Create an Alarm Clock in Python with GUI 7 | There is no other way to learn something than to implement it practically. So we are here with another interesting project on python. 8 | 9 | This time, you will learn how to create a simple alarm clock with python and Tkinter. 10 | 11 | Python alarm clock is a gui application, which can be used on a computer to set an alarm. Although it’s a simple project for beginners, but it’s interesting to implement various functionalities. 12 | 13 | ### Prerequisites 14 | The prerequisites are: basic concepts of Python and Tkinter 15 | 16 | To install the libraries, you can use pip installer from the cmd/Terminal: 17 | 18 | ---> pip install tkinter 19 | 20 | 21 | ### Functions Used 22 | 1. Setalarm: It sets an alarm by calling alarmClock method by passing the alarm time as argument(if the user has entered a correct and non-empty time). 23 | 24 | 2. alarmclock: This is the most important method because it performs the following tasks: 25 | 26 | a. It stores the current time in time_now in specified format (“%H:%M:%S”) 27 | 28 | b. It also checks if current time matches the alarm time. As soon as time matches it displays a wake-up message and plays the alarm song using pygame and mixer. And if doesn’t match the time_now it continues step b after sleeping for one second. 29 | 30 | ### Variables Used: 31 | 1. root: the main GUI window. 32 | 33 | 2. Hrs, Mins, Secs: They are tkinter string variables that store the hour’s, minute’s and second’s value entered by the user before setting an alarm. 34 | 35 | 3. Greet: It is a label to display the message” Take a short nap!”. 36 | 37 | 4. We also have hrbtn, minbtn , secbtn to take respective values from the user. 38 | 39 | ### Python Alarm Clock Project Output 40 | 41 | 42 | -------------------------------------------------------------------------------- /alarm clock using python/alarm-clock-output.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/alarm clock using python/alarm-clock-output.jpg -------------------------------------------------------------------------------- /alarm clock using python/main.py: -------------------------------------------------------------------------------- 1 | from time import strftime 2 | from tkinter import * 3 | import time 4 | import datetime 5 | from pygame import mixer 6 | 7 | root = Tk() 8 | root.title('TechVidvan Alarm-Clock') 9 | 10 | def setalarm(): 11 | alarmtime=f"{hrs.get()}:{mins.get()}:{secs.get()}" 12 | print(alarmtime) 13 | if(alarmtime!="::"): 14 | alarmclock(alarmtime) 15 | 16 | def alarmclock(alarmtime): 17 | while True: 18 | time.sleep(1) 19 | time_now=datetime.datetime.now().strftime("%H:%M:%S") 20 | print(time_now) 21 | if time_now==alarmtime: 22 | Wakeup=Label(root, font = ('arial', 20, 'bold'), 23 | text="Wake up!Wake up!Wake up",bg="DodgerBlue2",fg="white").grid(row=6,columnspan=3) 24 | print("wake up!") 25 | mixer.init() 26 | mixer.music.load(r'C:\Users\BOSS\Desktop\MyPlaylist\WakeUP.mp3') 27 | mixer.music.play() 28 | break 29 | 30 | 31 | hrs=StringVar() 32 | mins=StringVar() 33 | secs=StringVar() 34 | 35 | greet=Label(root, font = ('arial', 20, 'bold'), 36 | text="Take a short nap!").grid(row=1,columnspan=3) 37 | 38 | hrbtn=Entry(root,textvariable=hrs,width=5,font =('arial', 20, 'bold')) 39 | hrbtn.grid(row=2,column=1) 40 | 41 | minbtn=Entry(root,textvariable=mins, 42 | width=5,font = ('arial', 20, 'bold')).grid(row=2,column=2) 43 | 44 | secbtn=Entry(root,textvariable=secs, 45 | width=5,font = ('arial', 20, 'bold')).grid(row=2,column=3) 46 | 47 | setbtn=Button(root,text="set alarm",command=setalarm,bg="DodgerBlue2", 48 | fg="white",font = ('arial', 20, 'bold')).grid(row=4,columnspan=3) 49 | 50 | timeleft = Label(root,font=('arial', 20, 'bold')) 51 | timeleft.grid() 52 | 53 | mainloop() -------------------------------------------------------------------------------- /gmeet-attendance-taker/Gmeet-data.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 11, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "output_type": "error", 10 | "ename": "TypeError", 11 | "evalue": "open_gmeet() takes 1 positional argument but 3 were given", 12 | "traceback": [ 13 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 14 | "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", 15 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpassword\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"enter password here\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mpresent_students\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mopen_gmeet\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"fpiomhswez\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0memail\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mpassword\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpresent_students\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 16 | "\u001b[0;31mTypeError\u001b[0m: open_gmeet() takes 1 positional argument but 3 were given" 17 | ] 18 | } 19 | ], 20 | "source": [ 21 | "import pandas as pd\n", 22 | "from gmeet import open_gmeet\n", 23 | "\n", 24 | "email = \"enter email here\"\n", 25 | "password = \"enter password here\"\n", 26 | "\n", 27 | "present_students = open_gmeet(\"fpiomhswez\",email,password)\n", 28 | "\n", 29 | "print(present_students)\n", 30 | " \n" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 7, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "total_students = list(set(['SWAPNIL SHINDE , 12A', 'A Srinivas', 'A Srinivas', 'ABHAY KUMAR SINGH , 12A', 'ABHIJIT P , 12A','ADITYA ANAND , 12A','ANKIT KUMAR , 12A','', 'ABHIRAJ KISHORE DAS , 12A', 'ABHISHEKH YADAV , 12A', 'AMRITA NAIR , 12A', 'ANKIT KUMAR SANKHUA , 12A', 'ANSHRIT SINGH , 12A', 'ARUNIM ATUL CHANDOLA , 12A', 'DEVLINA SARKAR , 12A', 'GIRIK KHULLAR , 12A', 'GODWIN GEORGE , 12A', 'IDHANT SINGH , 12A', 'ISHITA ROY , 12A', 'KUNAL ARYA , 12A', 'MD NAUSHAD , 12A', 'MOINAK HALDAR , 12A', 'NARAYAN N , 12A', 'NIHARIKA T , 12A', 'PRAKASH SINGH , 12A', 'PRIYANKA PRAHARAJ , 12A', 'RAKSHIT THAKUR , 12A', 'RITIKA MALLURU , 12A', 'SAGAR SHARMA , 12A', 'SATISH , 12A', 'SOWMYA P , 12A', 'SUNNY SHARMA , 12A','VIPIN KUMAR , 12A']))" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": 8, 45 | "metadata": { 46 | "scrolled": true 47 | }, 48 | "outputs": [ 49 | { 50 | "output_type": "error", 51 | "ename": "NameError", 52 | "evalue": "name 'present_students' is not defined", 53 | "traceback": [ 54 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 55 | "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", 56 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mpresent\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSeries\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpresent_students\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mpresent\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 57 | "\u001b[0;31mNameError\u001b[0m: name 'present_students' is not defined" 58 | ] 59 | } 60 | ], 61 | "source": [ 62 | "import pandas as pd\n", 63 | "present = pd.Series(list(present_students))\n", 64 | "present" 65 | ] 66 | }, 67 | { 68 | "cell_type": "code", 69 | "execution_count": 7, 70 | "metadata": {}, 71 | "outputs": [], 72 | "source": [ 73 | "answer = []\n", 74 | "\n", 75 | "for student in present:\n", 76 | " for t_student in total_students:\n", 77 | " if student in t_student:\n", 78 | " answer.append(\"{}: P\".format(student))\n", 79 | " " 80 | ] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": 5, 85 | "metadata": {}, 86 | "outputs": [ 87 | { 88 | "ename": "NameError", 89 | "evalue": "name 'pd' is not defined", 90 | "output_type": "error", 91 | "traceback": [ 92 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 93 | "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", 94 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0md\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSeries\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0manswer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"attendence.csv\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 95 | "\u001b[0;31mNameError\u001b[0m: name 'pd' is not defined" 96 | ] 97 | } 98 | ], 99 | "source": [ 100 | "d = pd.Series(answer)\n", 101 | "d.to_csv(\"attendence.csv\")\n", 102 | "d" 103 | ] 104 | }, 105 | { 106 | "cell_type": "code", 107 | "execution_count": 4, 108 | "metadata": {}, 109 | "outputs": [ 110 | { 111 | "ename": "NameError", 112 | "evalue": "name 'd' is not defined", 113 | "output_type": "error", 114 | "traceback": [ 115 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", 116 | "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", 117 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m40\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 10\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", 118 | "\u001b[0;31mNameError\u001b[0m: name 'd' is not defined" 119 | ] 120 | } 121 | ], 122 | "source": [ 123 | "# data visvalisation\n", 124 | "import matplotlib as plt \n", 125 | "import random \n", 126 | "\n", 127 | "temp = []\n", 128 | "for i in range(30):\n", 129 | " time.append(random.randint(5,40))\n", 130 | "\n", 131 | "time = pd.\n" 132 | ] 133 | }, 134 | { 135 | "cell_type": "code", 136 | "execution_count": 16, 137 | "metadata": {}, 138 | "outputs": [ 139 | { 140 | "data": { 141 | "text/html": [ 142 | "
\n", 143 | "\n", 156 | "\n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | " \n", 216 | " \n", 217 | " \n", 218 | " \n", 219 | " \n", 220 | " \n", 221 | " \n", 222 | " \n", 223 | " \n", 224 | " \n", 225 | " \n", 226 | " \n", 227 | " \n", 228 | " \n", 229 | " \n", 230 | " \n", 231 | " \n", 232 | " \n", 233 | " \n", 234 | " \n", 235 | " \n", 236 | " \n", 237 | " \n", 238 | " \n", 239 | " \n", 240 | " \n", 241 | " \n", 242 | " \n", 243 | " \n", 244 | " \n", 245 | " \n", 246 | " \n", 247 | " \n", 248 | " \n", 249 | " \n", 250 | " \n", 251 | " \n", 252 | " \n", 253 | " \n", 254 | " \n", 255 | " \n", 256 | " \n", 257 | " \n", 258 | " \n", 259 | " \n", 260 | " \n", 261 | " \n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | "
Unnamed: 00
00SWAPNIL SHINDE , 12A: P
11ABHAY KUMAR SINGH , 12A: P
22ABHIJIT P , 12A: P
33ABHIRAJ KISHORE DAS , 12A: P
44ABHISHEKH YADAV , 12A: P
55ADITYA ANAND , 12A: P
66AMRITA NAIR , 12A: P
77ANKIT KUMAR , 12A: P
88ANKIT KUMAR SANKHUA , 12A: P
99ANSHRIT SINGH , 12A: P
1010ARUNIM ATUL CHANDOLA , 12A: P
1111Asha Latha: A
1212DEVLINA SARKAR , 12A: P
1313GIRIK KHULLAR , 12A: P
1414GODWIN GEORGE , 12A: P
1515IDHANT SINGH , 12A: P
1616ISHITA ROY , 12A: P
1717KUNAL ARYA , 12A: P
1818MANAS ASHWIN , 12A: A
1919MD NAUSHAD , 12A: P
2020MOINAK HALDAR , 12A: P
2121NARAYAN N , 12A: P
2222PRAKASH SINGH , 12A: P
2323PRIYANKA PRAHARAJ , 12A: P
2424RAKSHIT THAKUR , 12A: P
2525RITIKA MALLURU , 12A: P
2626SATISH , 12A: P
2727SOWMYA P , 12A: P
2828SUNNY SHARMA , 12A: P
2929SWAPNIL SHINDE , 12A: P
3030VIPIN KUMAR , 12A: P
\n", 322 | "
" 323 | ], 324 | "text/plain": [ 325 | " Unnamed: 0 0\n", 326 | "0 0 SWAPNIL SHINDE , 12A: P\n", 327 | "1 1 ABHAY KUMAR SINGH , 12A: P\n", 328 | "2 2 ABHIJIT P , 12A: P\n", 329 | "3 3 ABHIRAJ KISHORE DAS , 12A: P\n", 330 | "4 4 ABHISHEKH YADAV , 12A: P\n", 331 | "5 5 ADITYA ANAND , 12A: P\n", 332 | "6 6 AMRITA NAIR , 12A: P\n", 333 | "7 7 ANKIT KUMAR , 12A: P\n", 334 | "8 8 ANKIT KUMAR SANKHUA , 12A: P\n", 335 | "9 9 ANSHRIT SINGH , 12A: P\n", 336 | "10 10 ARUNIM ATUL CHANDOLA , 12A: P\n", 337 | "11 11 Asha Latha: A\n", 338 | "12 12 DEVLINA SARKAR , 12A: P\n", 339 | "13 13 GIRIK KHULLAR , 12A: P\n", 340 | "14 14 GODWIN GEORGE , 12A: P\n", 341 | "15 15 IDHANT SINGH , 12A: P\n", 342 | "16 16 ISHITA ROY , 12A: P\n", 343 | "17 17 KUNAL ARYA , 12A: P\n", 344 | "18 18 MANAS ASHWIN , 12A: A\n", 345 | "19 19 MD NAUSHAD , 12A: P\n", 346 | "20 20 MOINAK HALDAR , 12A: P\n", 347 | "21 21 NARAYAN N , 12A: P\n", 348 | "22 22 PRAKASH SINGH , 12A: P\n", 349 | "23 23 PRIYANKA PRAHARAJ , 12A: P\n", 350 | "24 24 RAKSHIT THAKUR , 12A: P\n", 351 | "25 25 RITIKA MALLURU , 12A: P\n", 352 | "26 26 SATISH , 12A: P\n", 353 | "27 27 SOWMYA P , 12A: P\n", 354 | "28 28 SUNNY SHARMA , 12A: P\n", 355 | "29 29 SWAPNIL SHINDE , 12A: P\n", 356 | "30 30 VIPIN KUMAR , 12A: P" 357 | ] 358 | }, 359 | "execution_count": 16, 360 | "metadata": {}, 361 | "output_type": "execute_result" 362 | } 363 | ], 364 | "source": [ 365 | "at = pd.read_csv('attendence.csv')\n", 366 | "at" 367 | ] 368 | }, 369 | { 370 | "cell_type": "code", 371 | "execution_count": null, 372 | "metadata": {}, 373 | "outputs": [], 374 | "source": [] 375 | } 376 | ], 377 | "metadata": { 378 | "kernelspec": { 379 | "name": "python385jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6", 380 | "display_name": "Python 3.8.5 64-bit" 381 | }, 382 | "language_info": { 383 | "codemirror_mode": { 384 | "name": "ipython", 385 | "version": 3 386 | }, 387 | "file_extension": ".py", 388 | "mimetype": "text/x-python", 389 | "name": "python", 390 | "nbconvert_exporter": "python", 391 | "pygments_lexer": "ipython3", 392 | "version": "3.8.5" 393 | }, 394 | "metadata": { 395 | "interpreter": { 396 | "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" 397 | } 398 | } 399 | }, 400 | "nbformat": 4, 401 | "nbformat_minor": 4 402 | } -------------------------------------------------------------------------------- /gmeet-attendance-taker/README.md: -------------------------------------------------------------------------------- 1 | 2 | # GMEET Attendence Take 3 | ``` 4 | **Gmeet Attendence Taker** is a selenium bot which uses chrome driver or gekodriver to open the meet class going and scrape out all the names present in the class 5 | and then automatically store it in a csv file marking student **present** or **absent**. 6 | ``` 7 | 8 | ## How to use it 9 | ``` 10 | i creaded this module in jupyter notebook (you can change however you like) 11 | there is a gmeet.py file which has a function which returns list of all students. 12 | This module is not completed and not optimize 13 | ``` 14 | 15 | - open gmeet-data.ipynb file using jupyter 16 | - enter google username, password and meet code(not link) in the respective variables 17 | - run the cells 18 | -------------------------------------------------------------------------------- /gmeet-attendance-taker/chromedriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/gmeet-attendance-taker/chromedriver -------------------------------------------------------------------------------- /gmeet-attendance-taker/geckodriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/gmeet-attendance-taker/geckodriver -------------------------------------------------------------------------------- /gmeet-attendance-taker/gmeet.py: -------------------------------------------------------------------------------- 1 | #written by: swapnil 2 | #aps code competition 3 | # position : 1 4 | 5 | def open_gmeet(gmeet_code,email,password): 6 | 7 | from selenium import webdriver 8 | from selenium.webdriver.common.keys import Keys 9 | from selenium.webdriver.chrome.options import Options 10 | from selenium.webdriver.common.by import By 11 | from selenium.webdriver.support.ui import WebDriverWait 12 | from selenium.webdriver.support import expected_conditions as EC 13 | import time 14 | 15 | 16 | opt = Options() 17 | opt.add_argument("--disable-infobars") 18 | opt.add_argument("--window-size=1200,900") 19 | opt.add_argument("user-agent='User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36'") 20 | 21 | # browser will not ask for permissions 22 | 23 | opt.add_experimental_option("prefs", { \ 24 | "profile.default_content_setting_values.media_stream_mic": 2, 25 | "profile.default_content_setting_values.media_stream_camera": 3, 26 | "profile.default_content_setting_values.geolocation": 2, 27 | "profile.default_content_setting_values.notifications": 2 28 | }) 29 | 30 | 31 | 32 | #path to chrome driver 33 | 34 | 35 | PATH = "/home/swapnil/Desktop/sele/chromedriver" 36 | 37 | driver = webdriver.Chrome(PATH,chrome_options=opt) 38 | 39 | 40 | driver.get('https://accounts.google.com/o/oauth2/auth/identifier?client_id=717762328687-iludtf96g1hinl76e4lc1b9a82g457nn.apps.googleusercontent.com&scope=profile%20email&redirect_uri=https%3A%2F%2Fstackauth.com%2Fauth%2Foauth2%2Fgoogle&state=%7B%22sid%22%3A1%2C%22st%22%3A%2259%3A3%3Abbc%2C16%3A8761f44b2df242a2%2C10%3A1605194839%2C16%3Aa5c0f97ced3a97a0%2Cd6e1862c7d914c10f6439ba9b16cdacfc72fa9b10b30b7638c85ccda496f2a69%22%2C%22cdl%22%3Anull%2C%22cid%22%3A%22717762328687-iludtf96g1hinl76e4lc1b9a82g457nn.apps.googleusercontent.com%22%2C%22k%22%3A%22Google%22%2C%22ses%22%3A%22568af41449fc46548320092241478f27%22%7D&response_type=code&flowName=GeneralOAuthFlow') 41 | code = str(gmeet_code) 42 | 43 | 44 | #entering email 45 | email_login = driver.find_element_by_xpath('//*[@id="identifierId"]') 46 | email_login.send_keys(email) 47 | email_login.send_keys(Keys.RETURN) 48 | 49 | #sleeping to load the page 50 | 51 | time.sleep(3) 52 | 53 | #entering password 54 | pass_login = driver.find_element_by_xpath('//*[@id="password"]/div[1]/div/div[1]/input') 55 | pass_login.send_keys(password) 56 | pass_login.send_keys(Keys.RETURN) 57 | time.sleep(3) 58 | 59 | # getting gmeet 60 | 61 | driver.get("https://meet.google.com/{}".format(code)) 62 | time.sleep(8) 63 | webdriver.ActionChains(driver).send_keys(Keys.ESCAPE).perform() 64 | time.sleep(6) 65 | 66 | 67 | #childrens\ 68 | 69 | # driver.find_element_by_xpath('/html/body/div[1]/c-wiz/div[1]/div/div[7]/div[3]/div[6]/div[3]/div/div[2]/div[1]/span/span/div/div/span[1]/svg').click() 70 | 71 | students = [] 72 | names = WebDriverWait(driver,50).until(EC.presence_of_all_elements_located((By.CLASS_NAME,"ZjFb7c"))) 73 | 74 | for name in names: 75 | # print(name.text) 76 | students.append(name.text) 77 | 78 | return students 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /stroke-pred-end-to-end/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask,render_template,request 2 | import pickle 3 | from sklearn.preprocessing import StandardScaler 4 | sc=StandardScaler() 5 | model=pickle.load(open('model_pickle.pkl','rb')) 6 | 7 | app=Flask(__name__) 8 | 9 | 10 | @app.route('/analysis') 11 | def analysis(): 12 | return render_template('stroke.html') 13 | 14 | @app.route('/',methods=['GET','POST']) 15 | def home(): 16 | if request.method == 'POST': 17 | gender=request.form['gender'] 18 | age=int(request.form['age']) 19 | hypertension=int(request.form['hypertension']) 20 | disease=request.form['disease'] 21 | married=request.form['married'] 22 | work=request.form['work'] 23 | residence=request.form['residence'] 24 | glucose=float(request.form['glucose']) 25 | bmi=float(request.form['bmi']) 26 | smoking=request.form['smoking'] 27 | 28 | if (gender=="Male"): 29 | gender_male=1 30 | gender_other=0 31 | elif(gender=="Female"): 32 | gender_male=0 33 | gender_other=1 34 | else: 35 | gender_male=0 36 | gender_other=0 37 | 38 | if (married=='Yes'): 39 | married_yes=1 40 | else: 41 | married_yes=0 42 | 43 | if (work=="Self-employed"): 44 | work_type_Never_worked=0 45 | work_type_Private=0 46 | work_type_Self_employed=1 47 | work_type_children=0 48 | elif(work=='Private'): 49 | work_type_Never_worked=0 50 | work_type_Private=1 51 | work_type_Self_employed=0 52 | work_type_children=0 53 | elif(work=='children'): 54 | work_type_Never_worked=0 55 | work_type_Private=0 56 | work_type_Self_employed=0 57 | work_type_children=1 58 | elif(work=='Never_worked'): 59 | work_type_Never_worked=1 60 | work_type_Private=0 61 | work_type_Self_employed=0 62 | work_type_children=0 63 | else: 64 | work_type_Never_worked=0 65 | work_type_Private=0 66 | work_type_Self_employed=0 67 | work_type_children=0 68 | 69 | if(residence=='Urban'): 70 | Residence_type_urban=1 71 | else: 72 | Residence_type_urban=0 73 | 74 | if(smoking=='formerly smoked'): 75 | smoking_status_formerly_smoked=1 76 | smoking_status_never_smoked=0 77 | smoking_status_smokes=0 78 | elif(smoking=='smokes'): 79 | smoking_status_formerly_smoked=0 80 | smoking_status_never_smoked=0 81 | smoking_status_smokes=1 82 | elif(smoking=='never smoked'): 83 | smoking_status_formerly_smoked=0 84 | smoking_status_never_smoked=1 85 | smoking_status_smokes=0 86 | else: 87 | smoking_status_formerly_smoked=0 88 | smoking_status_never_smoked=0 89 | smoking_status_smokes=0 90 | 91 | feature=sc.fit_transform([[age,hypertension,disease,glucose,bmi,gender_male,gender_other,married_yes,work_type_Never_worked,work_type_Private,work_type_children,work_type_Self_employed,Residence_type_urban,smoking_status_formerly_smoked,smoking_status_never_smoked,smoking_status_smokes]]) 92 | prediction=model.predict(feature) 93 | print(prediction) 94 | 95 | return render_template('index.html',prediction_text="prediction is: {}".format(prediction)) 96 | 97 | 98 | else: 99 | return render_template('index.html') 100 | 101 | 102 | if __name__ == '__main__': 103 | app.run(debug=True) -------------------------------------------------------------------------------- /stroke-pred-end-to-end/model_pickle.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/stroke-pred-end-to-end/model_pickle.pkl -------------------------------------------------------------------------------- /stroke-pred-end-to-end/static/images/a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/stroke-pred-end-to-end/static/images/a.jpg -------------------------------------------------------------------------------- /stroke-pred-end-to-end/templates/a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/stroke-pred-end-to-end/templates/a.jpg -------------------------------------------------------------------------------- /stroke-pred-end-to-end/templates/b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/stroke-pred-end-to-end/templates/b.jpg -------------------------------------------------------------------------------- /stroke-pred-end-to-end/templates/c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avinash201199/Python-projects-/f054f9bb9606cf840d00b334f30ef52d2c41d44e/stroke-pred-end-to-end/templates/c.jpg -------------------------------------------------------------------------------- /stroke-pred-end-to-end/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | Hello, world! 14 | 19 | 20 | 21 | 22 | 47 | 90 | 91 |
92 |
93 |
94 |

Know wether any patient have stroke or not

95 |

A stroke occurs when a blood vessel in the brain ruptures and bleeds, or when 96 | there’s a blockage in the blood supply to the brain. The rupture or blockage prevents blood and 97 | oxygen 98 | from reaching the brain’s tissues.

99 |

{{prediction_text}}

100 |
101 |
102 |
103 | 104 | 105 |
106 |
107 | 109 | 114 |
115 | 116 |
117 | 118 | 124 |
125 |
126 | 128 | 133 |
134 |
135 | 137 | 142 |
143 |
144 | 145 | 154 |
155 |
156 | 158 | 163 |
164 |
165 | 166 | 167 |
168 |
169 | 170 | 171 |
172 |
173 | 175 | 181 |
182 | 183 | 184 |
185 |
186 | 187 | 188 | 189 | 190 | 193 | 194 | 195 | 199 | 200 | 201 | --------------------------------------------------------------------------------