Few Python scripts which might be helpful in your day-to-day life.
This script prompts the user to enter a directory path and then displays all the files in that directory in descending order of their size.
pip install os
pip install termcolor
The script displays your public ip address.
pip install requests
The script gathers system information and network interface details using the platform, socket, and netifaces libraries. It displays:
OS details like Python version, distribution, OS name, architecture, platform, kernel, and more. Interface details including interface name, IPv4 address, and MAC address for each network interface, distinguishing between Windows and other systems.
pip3 install distro netifaces
The script displays the geolocation of the provided public ip address.
pip install requests
The script displays the geolocation of the provided public ip address. The script utilises a free
API to get the geolocation.
pip install requests
This script displays the public ip address of the provided website.
pip install socket
This shell script will prompt you for the start and end line numbers. If you press Enter
without entering any value, it will add "#"
to every line. If you enter values for the start and end lines, it will add "#" only to the specified range of lines.
./add_hash.sh fileName