Articles on Trending Technologies

Technical articles with clear explanations and examples

Conversions between color systems using Python (colorsys)

George John
George John
Updated on 25-Mar-2026 446 Views

The RGB color model uses red, green, and blue light to reproduce various colors. While RGB is widely used in electronic displays, Python's colorsys module provides functions to convert between RGB and other color systems like YIQ, HLS, and HSV. Alternative color representations include − YIQ: Luminance and Chrominance (used by composite video signals) HLS: Hue, Luminance, Saturation HSV: Hue, Saturation, Value In the YIQ model, Y values range from 0 to 1, while I and Q values may be positive or negative. In RGB, HLS, and HSV models, all values are between 0 and 1. ...

Read More

Read and write AIFF and AIFC files using Python (aifc)

Chandu yadav
Chandu yadav
Updated on 25-Mar-2026 979 Views

The aifc module in Python provides functionality for reading and writing AIFF (Audio Interchange File Format) and AIFF-C files. AIFF is a standard format for storing digital audio samples, while AIFF-C is an extended version that supports audio compression. Audio File Parameters Audio files contain several key parameters that describe the audio data ? Sampling rate (frame rate): Number of times per second the sound is sampled Number of channels: Indicates mono (1), stereo (2), or quadro (4) audio Frame: Consists of one sample per channel Sample size: Size in bytes of each sample ...

Read More

Socket Programming with Multi-threading in Python?

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

Socket programming with multi-threading allows a server to handle multiple clients simultaneously. While a basic socket server can only serve one client at a time, multi-threading creates separate threads for each client connection, enabling concurrent communication. Multithreading Concepts Multithreading is a core concept in modern programming languages, especially Python, due to its simple thread implementation. A thread is a sub-program within a program that executes independently while sharing the program's resources like memory. When multiple threads execute simultaneously within a single process, it's called multithreading. Python Threading Modules Python provides two modules for thread implementation − ...

Read More

Barrier Objects in Python

Samual Sam
Samual Sam
Updated on 25-Mar-2026 601 Views

A Barrier in Python is a synchronization primitive that allows multiple threads to wait at a common point until all required threads reach that point, then releases them all simultaneously. This is useful for coordinating parallel tasks that need to synchronize at specific checkpoints. Syntax To create a barrier object, use the threading.Barrier class ? threading.Barrier(parties, action=None, timeout=None) Parameters parties − Number of threads that must reach the barrier before they are all released action − Optional callable executed by one thread when all threads reach the barrier timeout − Default timeout ...

Read More

Python library PyTube to download youtube videos

karthikeya Boyini
karthikeya Boyini
Updated on 25-Mar-2026 628 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
Showing 7121–7130 of 61,303 articles
« Prev 1 711 712 713 714 715 6131 Next »
Advertisements