diff --git a/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.ipynb b/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.ipynb new file mode 100644 index 00000000..330648af --- /dev/null +++ b/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.ipynb @@ -0,0 +1,59 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "CheckInternetSpeedUsingPython.ipynb", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "KTDP2Do4sigP" + }, + "source": [ + "#Internet Speed Test using Python\n", + "To calculate the speed of internet connection using Python, we have to install a Python library known as **speedtest**.\n", + ">To install this Python library on your system, you can use the pip command on your terminal or the command prompt mentioned below:\n", + "\n", + ">`pip install speedtest-cli`\n", + "\n", + "The Code below demostrates how we can perform an internet speed test using Python." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "cYL8hfzYsg1-" + }, + "source": [ + "!pip install speedtest-cli" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "2Z45CH2FtR73" + }, + "source": [ + "import speedtest\n", + "wifi = speedtest.Speedtest()\n", + "print(\"Wifi Download Speed is \", wifi.download())\n", + "print(\"Wifi Upload Speed is \", wifi.upload())" + ], + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.py b/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.py new file mode 100644 index 00000000..090051f4 --- /dev/null +++ b/Python/Utility/Check Internet Speed Using Python/CheckInternetSpeedUsingPython.py @@ -0,0 +1,4 @@ +import speedtest +wifi = speedtest.Speedtest() +print("Wifi Download Speed is ", wifi.download()) +print("Wifi Upload Speed is ", wifi.upload()) \ No newline at end of file diff --git a/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.ipynb b/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.ipynb new file mode 100644 index 00000000..f0204836 --- /dev/null +++ b/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.ipynb @@ -0,0 +1,97 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "PhoneNumberDetailsUsingPython.ipynb", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "dI17RPaEmJRo" + }, + "source": [ + "#Phone Number Details using Python\n", + "To get the details of any number, we can use an amazing Python module known as **phonenumbers** . This module is created by [David Drysdale](https://www.linkedin.com/in/david-drysdale-1578771/) and you can use it to get the details of any phone number from anywhere in the world.\n", + "\n", + ">To install this Python module on your system, you can use the pip command on your terminal or the command prompt mentioned below:\n", + "\n", + ">`pip install phonenumbers`\n", + "\n", + "There are a lot of details you can find about a number using this Python module. The code below demonstrate how you can find some of the basic details about a phone number with the help of Python." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "CmWqnK0gnjIG", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "60ea5ca9-82de-4472-f2d7-b6f93125fa99" + }, + "source": [ + "!pip install phonenumbers" + ], + "execution_count": 2, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Collecting phonenumbers\n", + " Downloading phonenumbers-8.12.33-py2.py3-none-any.whl (2.6 MB)\n", + "\u001b[K |████████████████████████████████| 2.6 MB 5.1 MB/s \n", + "\u001b[?25hInstalling collected packages: phonenumbers\n", + "Successfully installed phonenumbers-8.12.33\n" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "esV9KSv4mD0I", + "outputId": "6a27b4f4-343c-4dd9-9701-081e45c88611" + }, + "source": [ + "import phonenumbers as ph\n", + "from phonenumbers import carrier\n", + "from phonenumbers import geocoder\n", + "from phonenumbers import timezone\n", + "\n", + "number = input(\"Enter Phone Number: \") \n", + "number = ph.parse(number)\n", + "print(\"Time Zone: \",timezone.time_zones_for_number(number))\n", + "print(\"Carrier Name: \",carrier.name_for_number(number, \"en\"))\n", + "print(\"Location: \",geocoder.description_for_number(number, \"en\"))" + ], + "execution_count": 4, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Enter Phone Number: +911234567890\n", + "Time Zone: ('Asia/Calcutta',)\n", + "Carrier Name: \n", + "Location: Baghpat/Baraut, Uttar Pradesh\n" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.py b/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.py new file mode 100644 index 00000000..52feead3 --- /dev/null +++ b/Python/Utility/Phone number Details using Python/PhoneNumberDetailsUsingPython.py @@ -0,0 +1,10 @@ +import phonenumbers as ph +from phonenumbers import carrier +from phonenumbers import geocoder +from phonenumbers import timezone + +number = input("Enter Phone Number: ") +number = ph.parse(number) +print("Time Zone: ",timezone.time_zones_for_number(number)) +print("Carrier Name: ",carrier.name_for_number(number, "en")) +print("Location: ",geocoder.description_for_number(number, "en")) \ No newline at end of file diff --git a/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.ipynb b/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.ipynb new file mode 100644 index 00000000..9af44a1d --- /dev/null +++ b/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.ipynb @@ -0,0 +1,50 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "ShutdownComputerUsingPython.ipynb", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "dfhfm9WVuuch" + }, + "source": [ + "#Shutdown Computer using Python\n", + "To shutdown the system using Python programming language, one must have some knowledge of the OS module in Python. It comes preinstalled in the Python standard library, so you don’t need to write a pip command to install it. \n", + "\n", + "###OS Module Use\n", + ">From reading or writing a file to shut down your system using Python, the OS module can be used in any task that depends on your system’s operating system.\n", + "\n", + "###To shutdown the computer with Python, be sure to ***save and close all running files*** except the code editor where you wrote the Python program to shutdown th system. \n", + "\n", + "The Code below Demostrates how to shutdown the computer using Python." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "XIVKb2_Lt4gW" + }, + "source": [ + "import os\n", + "def shutdown_PC():\n", + " os.system(\"shutdown /s /t 1\")\n", + "shutdown_PC()" + ], + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.py b/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.py new file mode 100644 index 00000000..3855f4ac --- /dev/null +++ b/Python/Utility/Shutdown Computer Using Python/ShutdownComputerUsingPython.py @@ -0,0 +1,4 @@ +import os +def shutdown_PC(): + os.system("shutdown /s /t 1") +shutdown_PC() \ No newline at end of file diff --git a/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.ipynb b/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.ipynb new file mode 100644 index 00000000..8c4284f6 --- /dev/null +++ b/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.ipynb @@ -0,0 +1,63 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "TextToHandwritingUsingPython.ipynb", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "Rf6jsJqDzSbb" + }, + "source": [ + "#Text to Handwriting using Python\n", + "To convert text to handwriting, there is a library known as **PyWhatKit** in Python. It provides a lot of useful features, one can explore them [here](https://pypi.org/project/pywhatkit/).\n", + "\n", + ">To Install PyWhatKit, Run the following command in Terminal or Command prompt:\n", + ">`pip install pywhatkit`\n", + "\n", + "In the code below, I first imported the pywhatkit and OpenCV libraries in Python. Here pywhatkit is used to convert text to handwritten text and OpenCV is used to visualize the image in which we are writing handwritten text." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "KmKR8Qr0wqaO" + }, + "source": [ + "!pip install pywhatkit" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "HtrQdmOl0p52" + }, + "source": [ + "import pywhatkit as kit\n", + "import cv2\n", + "\n", + "kit.text_to_handwriting(\"Hello, Welcome to Text to Handwriting Program.\", save_to=\"handwriting.png\")\n", + "img = cv2.imread(\"handwriting.png\")\n", + "cv2.imshow(\"Text to Handwriting\", img)\n", + "cv2.waitKey(0)\n", + "cv2.destroyAllWindows()" + ], + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.py b/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.py new file mode 100644 index 00000000..170f3bef --- /dev/null +++ b/Python/Utility/Text to Handwriting using Python/TextToHandwritingUsingPython.py @@ -0,0 +1,8 @@ +import pywhatkit as kit +import cv2 + +kit.text_to_handwriting("Hello, Welcome to Text to Handwriting Program.", save_to="handwriting.png") +img = cv2.imread("handwriting.png") +cv2.imshow("Text to Handwriting", img) +cv2.waitKey(0) +cv2.destroyAllWindows() \ No newline at end of file