From 374feb3d0eadf1e476b828969376c4e01f2f28b0 Mon Sep 17 00:00:00 2001 From: Abbhiishek Date: Sun, 2 Oct 2022 21:18:06 +0530 Subject: [PATCH 1/2] Internet Speed and Details checker Script --- scripts/Internet Speed Checker/main.py | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/Internet Speed Checker/main.py diff --git a/scripts/Internet Speed Checker/main.py b/scripts/Internet Speed Checker/main.py new file mode 100644 index 0000000..c63d322 --- /dev/null +++ b/scripts/Internet Speed Checker/main.py @@ -0,0 +1,37 @@ +# Internet Speed Checker + +import speedtest +import time +import os + + +def main(): + + # Clear the screen + os.system('cls' if os.name == 'nt' else 'clear') + + # Print the title + print('Internet Speed Checker') + # Print the current time + print(time.strftime('%H:%M:%S')) + print("Connecting to server...") + + # Get the speed + s = speedtest.Speedtest() + s.get_best_server() + s.download() + s.upload() + results_dict = s.results.dict() + + # Print the results + print(f"Download: {results_dict['download'] / 1024 / 1024:.2f} Mbit/s") + print(f"Upload: {results_dict['upload'] / 1024 / 1024:.2f} Mbit/s") + print(f"Ping: {results_dict['ping']:.2f} ms") + print(f"ISP: {results_dict['client']['isp']}") + + # Wait 5 seconds + time.sleep(5) + + +if __name__ == "__main__": + main() From acf0e5555e70aef06bd0a6d3870f5d7f3bc55d6c Mon Sep 17 00:00:00 2001 From: Abbhiishek Date: Sun, 2 Oct 2022 21:24:28 +0530 Subject: [PATCH 2/2] Project Documentation --- scripts/Internet Speed Checker/Readme.md | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripts/Internet Speed Checker/Readme.md diff --git a/scripts/Internet Speed Checker/Readme.md b/scripts/Internet Speed Checker/Readme.md new file mode 100644 index 0000000..8c92e6c --- /dev/null +++ b/scripts/Internet Speed Checker/Readme.md @@ -0,0 +1,30 @@ +# Internet Speed Checker + +This script will check your internet speed and with Download and Upload speed , it will also check the ping of your internet connection with your Internet Service Provider. + + +## ```How to use``` + +1. Install the Speedtest Package using the following command: + + `pip install speedtest` + + Official Documentation: https://pypi.org/project/speedtest/ + +2. Run the script + +## ```Output``` + +The output will be like this: +``` +Internet Speed Checker +21:22:38 +Connecting to server... +Download: 1.74 Mbit/s +Upload: 22.80 Mbit/s +Ping: 101.68 ms +ISP: Alliance Broadband Services Pvt. +``` + +## Author +Name: [Abhishek Kushwaha](https://github.com/Abbhiishek) \ No newline at end of file