Kalyan Mishra

Kalyan Mishra

57 Articles Published

Articles by Kalyan Mishra

57 articles

Python - Prefix Tuple Records

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 325 Views

In this article, we will explore various methods to find tuple records that start with a specific prefix using Python. This is useful when working with datasets where you need to filter records based on string patterns. A tuple is an immutable sequence whose values cannot be changed once assigned. A prefix tuple record refers to tuples where the first element (typically a string) starts with a common prefix. Problem Statement Given a list of tuples and a prefix string, we need to find all tuples whose first element starts with that prefix ? records ...

Read More

Finding Prefix frequency in a string List using Python

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 512 Views

In this article, we will learn how to find the prefix frequency in a string list using Python. Finding prefix frequency helps in analyzing patterns and distribution of word usage in text data. We'll explore five different approaches, each with its own advantages for different use cases. Method 1: Using Simple for Loop The most straightforward approach uses a counter variable and iterates through each string ? def find_prefix_freq(strings, prefix): count = 0 for string in strings: if string.startswith(prefix): ...

Read More

Show Power - Function Distribution in Statistics using Python

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 291 Views

In this article, we will learn about the Power Function Distribution in statistics using Python. We will explore various methods to analyze and visualize this distribution, including generating random samples, calculating probability functions, and creating visual representations. What is Power Function Distribution? The Power Function Distribution is a continuous probability distribution commonly used to model data where smaller values are more frequent than larger ones. It's particularly useful for analyzing rare events, identifying outliers, and making predictions about extreme values. The distribution has the probability density function: PDF: f(x) = α * x^(α-1) for 0 ≤ x ...

Read More

Show Power Log-Normal Distribution in Statistics using Python

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 343 Views

In this article we will learn about Power Log-Normal Distribution, its applications and uses. We will analyze the distribution using different methods including PDF, CDF, and visualization techniques. Power Log-Normal Distribution Power Log-Normal Distribution is a variation of the log-normal distribution obtained by applying a power transformation. While power normal distribution modifies the normal distribution, power log-normal distribution modifies the log-normal distribution. Both distributions have power parameters that define their shape characteristics. Random Number Generation We can generate random numbers from the power log-normal distribution using the scipy.stats module ? from scipy.stats import powerlognorm ...

Read More

Popup Menu in wxPython

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 545 Views

In this article, we will explore wxPython and create a popup menu application. Popup menus are contextual GUI elements that appear when triggered, typically by right-clicking, providing users with relevant options and actions. wxPython is a powerful GUI toolkit for Python that provides native-looking applications across different platforms. We'll learn how to create and implement popup menus with interactive menu items. Installing Required Libraries First, install wxPython using pip ? pip install wxPython If the installation fails, try this alternative command for Linux ? pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/ wxPython ...

Read More

Python - Pairwise distances of n-dimensional Space Array

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 1K+ Views

Pairwise distance calculation is used in various domains including data analysis, machine learning, and image processing. We can calculate the pairwise distance between every pair of elements in each dataset. In this article, we will explore various methods to calculate pairwise distances in Python for arrays representing data in multiple dimensions. What is Pairwise Distance? Pairwise distance refers to calculating the distance between each pair of points in an n-dimensional space. You can choose different distance metrics according to the type of data and problem requirements. Common distance metrics include ? Euclidean distance − Measures ...

Read More

How to Pair Elements with Rear elements in Matrix Row Using Python?

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 287 Views

In some scenarios of programming, you might need to pair each element of a matrix row with the rear element (the element that appears immediately after it). This article explores various methods and examples to pair elements according to these conditions. What is a Matrix? Matrices are powerful data structures used to represent collections of elements organized in rows and columns. A matrix having n rows and m columns is called an n × m matrix. Method 1: Using Nested Loops This is a straightforward approach using nested loops to iterate over each row of the ...

Read More

Understanding Fusion Learning: The One Shot Federated Learning

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 311 Views

In this article, we will learn about Fusion Learning and explore how it works, its advantages, and key parameters. As technology advances, privacy concerns in machine learning have become paramount. Traditional centralized training approaches are vulnerable to privacy breaches, leading to the adoption of Federated Learning, which enables collaborative model training without sharing raw data. What is Federated Learning? Federated Learning is a decentralized machine learning approach where model training occurs locally on individual devices. After local training, each device shares only model updates with a centralized server, which aggregates these updates to train a global model. While ...

Read More

Python - Variable list slicing

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 766 Views

In this article we will learn about variable list slicing. List slicing is a powerful feature of Python that allows you to extract specific portions of any list quickly. Python provides various techniques and methods for slicing based on specific criteria or patterns. Consider this example ? numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 33, 34, 56, 43, 67] print("Original list:", numbers) print("Sliced from index 8 to end:", numbers[8:]) Original list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 33, 34, 56, 43, 67] Sliced from index ...

Read More

Python - Uncommon elements in Lists of List

Kalyan Mishra
Kalyan Mishra
Updated on 27-Mar-2026 882 Views

In this article, we will learn various methods to find uncommon elements in lists of lists — elements that exist in one list but not in the other. This is a common requirement in data analysis when comparing nested data structures. Understanding the Problem Consider two lists of lists where we want to find sublists that appear in one list but not the other ? list1 = [[1, 2], [3, 4], [5, 6]] list2 = [[3, 4], [5, 6], [7, 8]] # Expected output: [[1, 2], [7, 8]] # [1, 2] exists only in ...

Read More
Showing 1–10 of 57 articles
« Prev 1 2 3 4 5 6 Next »
Advertisements