Articles on Trending Technologies

Technical articles with clear explanations and examples

Python library PyTube to download youtube videos

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 621 Views

YouTube is the world's most popular video sharing platform. Sometimes you want to download videos for offline viewing, but most YouTube downloader apps have restrictions or cost money. Instead, you can create your own Python program using the PyTube library to download YouTube videos easily. PyTube is a lightweight, dependency-free Python library that allows you to download videos and audio from YouTube. Since it's not a standard library, you need to install it first ? Installation pip install pytube Collecting pytube Downloading pytube-15.0.0-py3-none-any.whl Installing collected packages: pytube Successfully installed pytube-15.0.0 ...

Read More

Keyed-Hashing for Message Authentication in python

Samual Sam
Samual Sam
Updated on 25-Mar-2026 1K+ Views

Keyed-Hashing for Message Authentication (HMAC) provides secure message authentication using cryptographic hash functions combined with a secret key. Python's hmac module implements this mechanism to ensure data integrity and authenticity during transmission or storage. The basic concept involves generating a cryptographic hash from the actual data combined with a shared secret key. The recipient can verify the message authenticity by recalculating the hash using the same secret key. Syntax hmac.new(key, msg=None, digestmod=None) Parameters: key − The shared secret key (bytes object) msg − The message to hash (optional, can be added later) ...

Read More

Website Blocker Using Python

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 2K+ Views

Website blockers are commonly used in corporate environments to restrict access to social media and entertainment sites during work hours. Instead of relying on third-party applications, we can create our own custom website blocker using Python's built-in libraries. Prerequisites Python 3.x installed Basic knowledge of Python Administrator privileges (required to modify system files) How It Works Every operating system has a hosts file that maps hostnames to IP addresses. By redirecting blocked websites to the local loopback address (127.0.0.1), we can prevent access to specific sites during designated hours. ...

Read More

Design a Keylogger in Python

Samual Sam
Samual Sam
Updated on 25-Mar-2026 4K+ Views

A keylogger is a program that monitors and records keystrokes. These keystrokes are stored in a log file, potentially capturing sensitive information like usernames and passwords. Here we'll develop a simple keylogger using Python's pynput module. Disclaimer: This tutorial is for educational purposes only. Use keyloggers responsibly and only on systems you own or have explicit permission to monitor. Installing Required Module The pynput module is not part of Python's standard library, so we need to install it ? pip install pynput To verify the installation, import the module in your Python shell ...

Read More

Develop Notepad using Tkinter in python

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 3K+ Views

Tkinter is a standard GUI library in Python that enables developers to create desktop applications. In this tutorial, we'll build a fully functional notepad text editor with file operations, editing features, and menu functionality using Tkinter. Prerequisites Python installed (3.x recommended) Tkinter module (comes pre-installed with Python) Note: Tkinter is included as a standard library with Python 3.x installations. Notepad Menu Structure Our notepad will contain four main menu categories with their respective sub-items: File Menu: New, Open, Save, ...

Read More

MD5 hash encoding using Python?

Samual Sam
Samual Sam
Updated on 25-Mar-2026 5K+ Views

Data security is a major concern for all IT companies. Multiple hashing techniques are available to protect and verify our data integrity. One of the most commonly used hashing algorithms is MD5, which we can easily implement in Python. What is Hash? A hash function takes a variable-length sequence of bytes as input and converts it to a fixed-length sequence. Getting your original data back from the hash is computationally difficult. For example, if x is your input and f is the hashing function, then calculating f(x) is quick and easy, but trying to obtain x again is ...

Read More

Print Colors of terminal in Python

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 850 Views

In the terminal, if you want to make text appear in colored mode, there are numerous ways in Python programming to achieve it. Python offers several modules and built-in methods to add colors to terminal output. Using the termcolor Module The termcolor module provides ANSI color formatting for terminal output. It's one of the most popular libraries for adding colors to text. Installation First, install the termcolor module using pip − pip install termcolor Basic Usage Here's how to use termcolor to print colored text − import sys from ...

Read More

Replacing strings with numbers in Python for Data Analysis

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 978 Views

In data analysis, converting categorical strings to numerical values is essential for machine learning algorithms and statistical analysis. Python provides several methods to map string values to integers efficiently. Consider this sample dataset with stock recommendations ? Company Industry Recommendation HDFC Bank Finance Hold Apollo Healthcare Buy Hero Automobile Underperform Yes Bank Finance Hold M&M Automobile Underperform Fortis Healthcare Buy We need to convert the Recommendation column to numerical values: Buy=1, Hold=2, Underperform=3. Method 1: Using ...

Read More

Pattern matching in Python with Regex

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 7K+ Views

Regular expressions (regex) are a powerful tool for pattern matching and string manipulation in Python. The re module provides comprehensive regex functionality for finding, matching, and replacing text patterns. What is Regular Expression? A regular expression is a sequence of characters that defines a search pattern. In Python, the re module handles string parsing and pattern matching. Regular expressions can answer questions like ? Is this string a valid URL? Which users in /etc/passwd are in a given group? What is the date and ...

Read More

Why is python best suited for Competitive Coding

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 337 Views

Competitive programming involves solving algorithmic problems efficiently using appropriate data structures within time constraints. Programmers must not only solve problems correctly but also optimize for time and space complexity. Here's an example of a typical competitive programming problem ? Given a string s of length n with only lowercase letters, calculate the number of ways to remove exactly one substring so that all remaining characters are equal. You must remove at least one character. While any programming language can solve such problems, Python offers unique advantages for competitive coding. Development Speed Python significantly ...

Read More
Showing 1–10 of 61,304 articles
« Prev 1 2 3 4 5 6131 Next »
Advertisements