From afb993393924e37c3a48564d476c9fbda6303144 Mon Sep 17 00:00:00 2001 From: Dhruv Bansal Date: Sun, 13 Jun 2021 18:15:34 +0530 Subject: [PATCH] speedtest using python --- README.md | 241 +++-------------------------------------------- TestMySpeed.py | 43 +++++++++ requirements.txt | 1 + 3 files changed, 57 insertions(+), 228 deletions(-) create mode 100644 TestMySpeed.py create mode 100644 requirements.txt diff --git a/README.md b/README.md index eaf44f5..ac3f92e 100644 --- a/README.md +++ b/README.md @@ -1,233 +1,18 @@ -# Awesome Python Scripts :sunglasses: PyPI [![HitCount](http://hits.dwyl.io/hastagAB/Awesome-Python-Scripts.svg)](http://hits.dwyl.io/hastagAB/Awesome-Python-Scripts) ![GitHub stars](https://img.shields.io/github/stars/hastagAB/Awesome-Python-Scripts?style=social) +##Test Your Internet Speed using Python -## What is this repo? -This repo is a compilation of some *awesome* Python scripts that automate some boring tasks or simply make our life easier...or both! +This is a simple but powerful and efficient python program. +You can test your internet bandwidth speed with this script i wrote using just a single command, you will also get a bunch of good options to choose from and the test will be performed with the help of speedtest-cli module in python. -:cookie: Cookies for all contributors as well~ +- Test Download Speed +- Test Upload Speed +- Test Server Pings +- Results in Mbps(Mega bits per second) -## What do we have: +####How to use -So far, the following projects have been integrated to this repo: +- Clone the repo or download the zip +- Navigate to the folder of the program in terminal/cmd. +- Install the dependencies using pip install -r requirements.txt +- Run the command python TestMySpeed.py -| Project Name | Contributors | -|--|--| -| [sudoku-solver](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/sudoku-solver) | [Rishabh Umrao](https://github.com/ayedaemon) | -|[File Encrypt Decrypt](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/file-encrypt-decrypt)|[Aditya Arakeri](https://github.com/adityaarakeri)| -| [Address locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Adress) | [Chris]() | -| [Automated emails](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/automated_email) | [Suvigya](https://github.com/SuvigyaJain1) | -|[AI chatbot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Artificial-intelligence_bot) |[umar abdullahi](https://github.com/umarbrowser) | -|[Asymmetric Encryption](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) | -|[Bitcoin price GUI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) | -|[Cryptocurrency Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) | -|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caeser_cipher) |[epi052](https://github.com/epi052) | -|[Checksum tool](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Checksum) |[Austin Ewens](https://github.com/aewens) | -|[Codechef autosubmitter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) | -|[Colored B&W Image Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Color_to_BW_Converter) |[Nitish Srivastava](https://github.com/nitish-iiitd) | -|[Contact 'Leads' Distribution](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Contact-Distribution) |[Tiago Cordeiro](https://github.com/tiagocordeiro) | -|[Cricket Matches web Scraper](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/CricBuzz_Score_Update) |[Divy Ranjan](https://github.com/divyranjan17) | -| [Crypt socket](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Crypt_Socket)|[Willian GL](https://github.com/williangl) | -|[Current City Weather](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Current_City_Weather) |[Jesse Bridge](https://github.com/jessebridge) | -|[Directory organizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Directory-organizer) | [Athul P](https://github.com/athulpn) | -|[DOH DIG](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/DOH-Dig/) | [Ryan](https://github.com/awsumco) | -|[English Theasaurus](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/English_Theasaurus/) | [Ansh Dhingra](https://github.com/anshdhinhgra47) | -|[Elasticsearch snapshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/elastic-snapshot) | [Joe Ryan](https://github.com/joeryan) | -|[Excel Files Merger](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)| -|[Excel to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Extended_ip_address_info](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)| -|[File explorer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/File-Explorer-Dialog-Box) | [Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)| -|[File Sharing Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)| -|[Flash card quizzer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) | -|[Frammed text generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/FramedText) | [jcdwalle](https://github.com/jcdwalle)| -|[git_automation](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/git_automation)| [loge1998](https://github.com/loge1998)| -|[Gmail Mailing Script](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/mailing) |[mayank-kapur](https://github.com/kapurm17) | -|[Handwrting DNN recognizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Handwriting_Recognizer) |[Chris]() | -|[HTML Table to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Image circle formatter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image-Circulator) |[Berk Gureken](https://github.com/bureken) | -|[Image To PDF](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/images2pdf)|[msaoudallah](https://github.com/msaoudallah)| -|[Instadp Web Scrapper](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/InstadpShower)|[Psychiquest](https://github.com/psychiquest)| -|[Keylogger](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Keylogger) |[Preet Mishra](https://github.com/preetmishra) | -|[Minecraft Server in background](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)| -|[Own IP locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Own_IP_Adress)|[Chris]()| -|[Port Scanner](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)| -|[Python Algebra Solver](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Algebra-Solver)|[Sengxay Xayachack](https://github.com/frankxayachack)| -|[Random name generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Names_Generator)| [Ayush Bhardwaj](https://github.com/hastagAB)| -|[Random Password Generators](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Password_Generator)| [Hafpaf](https://github.com/hafpaf) and [Renderer-RCT2](https://github.com/Renderer-RCT2)| -|[Server Ping](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Ping_Server)|[prince]()| -|[Signature photo to PNG converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/signature2png)|[Rodolfo Ferro](https://github.com/RodolfoFerro)| -|[Simple Webpage Parser](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SimpleWebpageParser)|[Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Slideshare downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Slideshare-Downloader)|[Chris Goes](https://github.com/GhostofGoes)| -|[SMS your location](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SmsYourLocation)|[prince]()| -|[Squid installer for Ubuntu](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()| -|[Subtitle downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)| -|[Top_News](Top_News)|[Attupatil](https://github.com/Attupatil)| -|[Take Screenshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)| -|[To Do Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/To-Do-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)| -|[Upload Files to S3](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Upload_files_to_s3)|[Jayram Nai](https://github.com/jramnai)| -|[Vinegère Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/vigenere_cipher)|[victoni](https://github.com/victoni)| -|[Web proxy](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Proxy-Request)|[Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)| -|[Website blocker](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Website-Blocker)|[Ayush Bhardwaj](https://github.com/hastagAB)| -|[Word generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Word-generator)|[TGLIDE](https://github.com/TGlide)| -|[Work log generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Work_Log_Generator)|[Maël Pedretti](https://github.com/73VW)| -|[Youtube video downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Youtube_Video_Downloader)|[Christopher He](https://github.com/hecris)| -|[Zabbix API](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zabbix_api)|[msg4sunny](https://github.com/msg4sunny)| -|[Zip password cracker](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zip_password_cracker)|[umar abdullahi](https://github.com/umarbrowser)| -|[RSA Algorithm](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/RSA_Algorithm)|[Chinmay Rane](https://github.com/Chinmayrane16) -|[CLI Calculator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/cli_calculator)|[Willian GL](https://github.com/williangl) | -|[Find PhoneNumber in String](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Find-PhoneNumber-in-String)|[Austin Zuniga](https://github.com/AustinZuniga)| -|[IMDB TV Series Info Extractor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/imdb_episode_ratings)|[Yash Raj Sarrof](https://github.com/yashYRS) | -|[PX to REM](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/PX-to-REM)|[Atthaphon Urairat](https://github.com/uatthaphon) | -|[Yoda-speak Translator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/speak_like_yoda)|[sonniki](https://github.com/sonniki) | -|[SSH Host adder](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SSH_Host_Adder)|[NinoDoko](https://github.com/NinoDoko)| -|[Wikipedia-Search](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Wikipedia-Search)|[Nissaar](https://github.com/Nissaar) | -|[Instagram Video Downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/insta_video_downloader)|[Shobhit Bhosure](https://github.com/shobhit99) | -|[Medium Article Downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/medium_article_downloader)|[coolsonu39](https://github.com/coolsonu39)| -|[Face Recognition](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/image_recognition)|[LOKESH KHURANA](https://github.com/theluvvkhurana)| -|[File Encrypt Decrypt](file-encrypt-decrypt)|[Aditya Arakeri](https://github.com/adityaarakeri)| -| [Address locator](Location_Of_Adress) | [Chris]() | -| [Automated emails](automated_email) | [Suvigya](https://github.com/SuvigyaJain1) | -|[AI chatbot](Artificial-intelligence_bot) |[umar abdullahi](https://github.com/umarbrowser) | -|[Asymmetric Encryption](asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) | -|[Bitcoin price GUI](Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) | -|[Cryptocurrency Converter](Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) | -|[Caesar Cipher](caeser_cipher) |[epi052](https://github.com/epi052) | -|[Checksum tool](Checksum) |[Austin Ewens](https://github.com/aewens) | -|[Codechef autosubmitter](Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) | -|[Colored B&W Image Converter](Color_to_BW_Converter) |[Nitish Srivastava](https://github.com/nitish-iiitd) | -|[Contact 'Leads' Distribution](Contact-Distribution) |[Tiago Cordeiro](https://github.com/tiagocordeiro) | -|[Cricket Matches web Scraper](CricBuzz_Score_Update) |[Divy Ranjan](https://github.com/divyranjan17) | -| [Crypt socket](Crypt_Socket)|[Willian GL](https://github.com/williangl) | -|[Current City Weather](Current_City_Weather) |[Jesse Bridge](https://github.com/jessebridge) | -|[Directory organizer](Directory-organizer) | [Athul P](https://github.com/athulpn) | -|[DOH DIG](DOH-Dig/) | [Ryan](https://github.com/awsumco) | -|[Excel Files Merger](Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)| -|[Excel to List](Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Extended_ip_address_info](extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)| -|[Fibonacci_Sequence_Generator](Fibonacci_Sequence_Generator) | [John Wesley Kommala](https://github.com/JohnWesleyK)| -|[File explorer](File-Explorer-Dialog-Box) | [Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)| -|[File Sharing Bot](File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)| -|[Flash card quizzer](Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) | -|[Frammed text generator](FramedText) | [jcdwalle](https://github.com/jcdwalle)| -|[Gmail Mailing Script](mailing) |[mayank-kapur](https://github.com/kapurm17) | -|[Handwrting DNN recognizer](Handwriting_Recognizer) |[Chris]() | -|[HTML Table to List](HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Image circle formatter](Image-Circulator) |[Berk Gureken](https://github.com/bureken) | -|[Image To PDF](images2pdf)|[msaoudallah](https://github.com/msaoudallah)| -|[Instadp Web Scrapper](InstadpShower)|[Psychiquest](https://github.com/psychiquest)| -|[Keylogger](Keylogger) |[Preet Mishra](https://github.com/preetmishra) | -|[Minecraft Server in background](Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)| -|[Own IP locator](Location_Of_Own_IP_Adress)|[Chris]()| -|[Port Scanner](Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)| -|[Python Algebra Solver](Algebra-Solver)|[Sengxay Xayachack](https://github.com/frankxayachack)| -|[Random name generator](Random_Names_Generator)| [Ayush Bhardwaj](https://github.com/hastagAB)| -|[Random Password Generators](Random_Password_Generator)| [Hafpaf](https://github.com/hafpaf) and [Renderer-RCT2](https://github.com/Renderer-RCT2)| -|[Server Ping](Ping_Server)|[prince]()| -|[Signature photo to PNG converter](signature2png)|[Rodolfo Ferro](https://github.com/RodolfoFerro)| -|[Simple Webpage Parser](SimpleWebpageParser)|[Nitish Srivastava](https://github.com/nitish-iiitd)| -|[Slideshare downloader](Slideshare-Downloader)|[Chris Goes](https://github.com/GhostofGoes)| -|[SMS your location](SmsYourLocation)|[prince]()| -|[Squid installer for Ubuntu](Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()| -|[Subtitle downloader](Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)| -|[Take Screenshot](Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)| -|[To Do Bot](To%20Do%20Bot) | [Darshan Patel](https://github.com/DarshanPatel11)| -|[Upload Files to S3](Upload_files_to_s3)|[Jayram Nai](https://github.com/jramnai)| -|[Vinegère Cipher](vigenere_cipher)|[victoni](https://github.com/victoni)| -|[Web proxy](Proxy-Request)|[Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)| -|[Website blocker](Website-Blocker)|[Ayush Bhardwaj](https://github.com/hastagAB)| -|[Word generator](Word-generator)|[TGLIDE](https://github.com/TGlide)| -|[Work log generator](Work_Log_Generator)|[Maël Pedretti](https://github.com/73VW)| -|[Youtube video downloader](Youtube_Video_Downloader)|[Christopher He](https://github.com/hecris)| -|[Zabbix API](zabbix_api)|[msg4sunny](https://github.com/msg4sunny)| -|[Zip password cracker](zip_password_cracker)|[umar abdullahi](https://github.com/umarbrowser)| -|[CLI Calculator](cli_calculator)|[Willian GL](https://github.com/williangl) | -|[Find PhoneNumber in String](Find-PhoneNumber-in-String)|[Austin Zuniga](https://github.com/AustinZuniga)| -|[IMDB TV Series Info Extractor](imdb_episode_ratings)|[Yash Raj Sarrof](https://github.com/yashYRS) | -|[Yoda-speak Translator](speak_like_yoda)|[sonniki](https://github.com/sonniki) | -|[Medium Article Downloader](medium_article_downloader)|[coolsonu39](https://github.com/coolsonu39)| -|[RSA Key Pair Generator](RSA-key-pairs) | [Aditya Parikh](https://github.com/obiwan69) | -|[Clean_up_photo](Clean_up_photo_directory)|[sritanmay001](https://github.com/sritanmy001)| -|[PyRecorder](PyRecorder)|[Rocky Jain](https://github.com/jainrocky)| -|[Pretty CSV](Pretty-CSV)|[Frizz925](https://github.com/Frizz925)| -|[File Organizer](File-Organizer)|[Ayush Bhardwaj](https://github.com/hastagAB)| -|[send_whatsapp_message](send_whatsapp_message)|[Mukesh Prasad](https://github.com/mukeshprasad)| -|[YTS Torrents](yts_torrents)|[Mayank Nader](https://github.com/makkoncept)| -|[COVID visualiser (real-time) ](covdi_visualiser)|[Tushar Gupta](https://github.com/tushar5526)| -|[Random_Email_Generator](Random_Email_Generator)|[Shubham Garg](https://github.com/shub-garg)| -|[WiFi Password Viewer](Wifi-Password)|[Sagar Patel](https://github.com/sagar627)| -|[Tambola_Ticket_Generator](Tambola_Ticket_Generator)|[Amandeep_Singh](https://github.com/Synster)| -| [Py_Cleaner](Py_Cleaner) | [Abhishek Dobliyal](https://github.com/Abhishek-Dobliyal) -|[Send messages to sqs in parallel](send_sqs_messages_in_parallel)|[Jinam Shah](https://github.com/jinamshah)| -|[Codeforces Checker](codeforcesChecker)|[Jinesh Parakh](https://github.com/jineshparakh)| -|[Github repo creator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Git_repo_creator)|[Harish Tiwari ](https://github.com/optimist2309) -|[Remove-Duplicate-Files](Remove-Duplicate-Files)|[Aayushi Varma](https://github.com/aayuv17) -|[PDF2text](PDF2text)|[QuangPH](https://github.com/quangph-1686a) -|[Image Watermarker (batch)](imageWatermarker)|[Remco Halman](https://github.com/remcohalman) -|[Folder Manager](Folder_Manager)|[Harsh Raj](https://github.com/DeadProgrammer0)| -|[IMDBQuerier](IMDBQuerier)|[Burak Bekci](https://github.com/Bekci) -|[URL shortener](url_shortener)|[Sam Ebison](https://github.com/ebsa491) -|[2048](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/2048)|[Krunal](https://github.com/gitkp11) -|[Spotify Downloader](spotify_downloader)|[Sagar Patel](https://github.com/sagar627)| -|[Download Page as PDF](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Download-page-as-pdf)|[Jeremias Gomes](https://github.com/j3r3mias) -|[JSON file to YAML convertor](https://github.com/saksham117/Awesome-Python-Scripts/tree/master/json-to-yaml)|[Saksham Basandrai](https://github.com/saksham117) -|[Independent RSA Communication Algorithm](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/RSA_Communication)|[Miguel Santos](https://github.com/wi6n3l) -|[GithubBot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/GithubBot)|[Abhilasha](https://github.com/Abhilasha06)| -|[Translate CLI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TranslateCLI)|[Rodrigo Oliveira](https://github.com/rodrigocam)| -|[Rock-Paper-Scissor Game](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Rock-Paper-Scissor)|[Punit Sakre](https://github.com/punitsakre23)| -|[Folder Locker and hider](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Folder%20Locker%20%26%20Hider)|[Prajjwal Pathak](https://github.com/pyguru123)| -|[Image Compressor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image_Compressor)|[Prathima Kadari](https://github.com/prathimacode-hub)| - - -## How to use : - -- Clone/Download the directory and navigate to each folder. Or... -- Simply navigate to the folder and download/copy the scripts! It's *that* simple and easy. -- Setup virtual environment for that scripts: - - `python -m venv env` - - `source env\bin\activate` - - `pip install -r requirements.txt` - -- Run the script :) - -Remember to star the repo if you love the scripts~ :wink: - -## Contribution Guidelines : - -### Steps required to follow before adding any script - -- Make a **separate folder** for your script. -- There shouldn't be any **spaces** between the names of the script. (Use underscore or dash Symbol) - - :x: Script One - - :heavy_check_mark: Script_One - - :heavy_check_mark: Script-One - -- The Folder should contain the followings - - - Main Python Script, - - Supporting files for the Script (If any) - - A separate `README.md` File with proper documentation. - - `requirements.txt` file for any required library. - - - How to create `requirements.txt` file - - `cd ` - - Activate your local virtual environment - - `source env\bin\activate` - - `pip freeze > requirements.txt` - -- Add your name & script in the [project's list](https://github.com/hastagAB/Awesome-Python-Scripts#what-do-we-have) above in the same format. [Compulsory] - -- Only One Commit per PR is Adviced. - -# If you like the project: -- Star the Repo - [Awesome Python Scripts](https://github.com/hastagAB/Awesome-Python-Scripts) -- Follow me on GitHub - [Ayush Bhardwaj](https://github.com/hastagAB) - -# Want to connect with me ? -- [LinkedIn](https://www.linkedin.com/in/hastagab/) -- [Twitter](https://twitter.com/HastagAB) -- [Facebook](https://www.facebook.com/SirHastagAB) -- [Instagram](https://www.instagram.com/sirhastagab/) - - - - - - -[![](https://img.shields.io/badge/Made%20With%20❤️%20By-HastagAB-red)](https://github.com/hastagAB) +(Note: You will need to have python 3 installed and if you are on a unix based OS (macOS, or linux) you may need to run the command using python3 TestMySpeed.py) \ No newline at end of file diff --git a/TestMySpeed.py b/TestMySpeed.py new file mode 100644 index 0000000..0ce8c13 --- /dev/null +++ b/TestMySpeed.py @@ -0,0 +1,43 @@ + +# the package used is speedtest-cli(it is the only package we need) +import speedtest +from time import sleep +speed=speedtest.Speedtest() + +option=int(input(''' +What do you want to know: +1) Download speed +2) Upload speed +3) Both Download and Upload +4) Ping +Your choice: ''')) + +if option<1 or option>4: + sleep(2) + print('You have entered wrong choice, please enter again with values from 1 to 4') +else: + sleep(1) + print() + print('Pls wait, test in progress...') + print() + down_speed=round(speed.download()/1000000,3) + up_speed=round(speed.upload()/1000000,3) + print('One more sec please...') + sleep(2.5) + print() + if option == 1: + print('Your Download speed is: ',down_speed,'Mbps') + elif option == 2: + print('Your Upload speed is: ',up_speed,'Mbps') + elif option == 3: + print('Your Download speed is: ',down_speed,'Mbps',end=" ") + print(',and your Upload speed is: ',up_speed,'Mbps') + + elif option == 4: + s=[] + speed.get_servers(s) + print(speed.results.ping,'ms') + else: + print('Sorry, something went wrong, pls try again...') + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5977a22 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +speedtest-cli \ No newline at end of file