Vishal Gupta

Vishal Gupta

6 Articles Published

Articles by Vishal Gupta

6 articles

Pie Syntax (@) in Python

Vishal Gupta
Vishal Gupta
Updated on 27-Mar-2026 421 Views

The @ symbol in Python is called decorator syntax and is used to modify the behavior of functions, methods, or classes. Decorators allow you to wrap another function or class with additional functionality without permanently modifying their code. Syntax @decorator_name def function_name(): # function body Using Function Decorators Basic Decorator Example A decorator function takes another function as an argument and extends its behavior − def my_decorator(func): def wrapper(): print("Before function execution") ...

Read More

Phrase extraction in String using Python

Vishal Gupta
Vishal Gupta
Updated on 27-Mar-2026 401 Views

Phrase extraction in Python is the process of identifying and extracting meaningful segments or phrases from text strings. This technique is commonly used in Natural Language Processing (NLP) applications for text analysis, information retrieval, and content summarization. Python provides several approaches to extract specific portions of text based on word positions or patterns. Let's explore two effective methods for phrase extraction. Using List Slicing and Enumerate This approach finds space positions in the string and extracts phrases based on these positions ? text = 'Website Tutorialspoint is best for reading Python and writing.' print("Original ...

Read More

Pendulum Module in Python

Vishal Gupta
Vishal Gupta
Updated on 27-Mar-2026 930 Views

The Pendulum Module is a powerful Python library for datetime manipulation and time zone management. It provides an intuitive API for handling dates, times, and timezone conversions more elegantly than Python's built-in datetime module. The Pendulum Module's main advantage is its ability to manage time zones easily. It can instantly convert between various time zones and handle dates and times from around the world. You can install this module using the following command ? pip install pendulum Key Methods in Pendulum Module The Pendulum module provides several essential methods for datetime operations ? ...

Read More

Show Pearson type-3 Distribution in Statistics using Python

Vishal Gupta
Vishal Gupta
Updated on 27-Mar-2026 589 Views

The Pearson Type-3 Distribution is a continuous probability distribution widely used in statistics, particularly for modeling skewed data. Three parameters determine its shape: shape, location, and scale. Python's SciPy library provides functions like pearson3.rvs() for generating random numbers and pearson3.pdf() for calculating probability density values. Parameters of Pearson Type-3 Distribution Shape parameter − Controls the skewness and kurtosis of the distribution. Positive values create right-skewed distributions, while negative values create left-skewed distributions. Location parameter − Shifts the distribution along the x-axis. This is the mean of the distribution when shape = 0. Scale parameter − Controls the ...

Read More

How to pass multiple arguments to a map function in Python?

Vishal Gupta
Vishal Gupta
Updated on 27-Mar-2026 2K+ Views

The map() function in Python applies a given function to each element of one or more iterables and returns an iterator. When working with multiple iterables, map() applies the function element-wise across all provided arguments. Syntax map(function, iterable1, iterable2, ...) The function must accept the same number of arguments as there are iterables provided. Using Multiple Arguments with Regular Function Example Let's create a program to add corresponding elements from two lists ? def add(a, b): return a + b # Create two lists list1 ...

Read More

path_curve_to_quadratic_bezier() function in Python Wand

Vishal Gupta
Vishal Gupta
Updated on 29-Sep-2023 439 Views

The bezier is an inbuilt drawing function in python. It is used to draw curves in python according to given points. The quadratic bezier is a Python function that draws a path through vertices( control points) for a quadratic bezier wind. A quadratic Bezier wind is a parametric wind that defines a path in 2- dimensional space. This wind is linked by a control point with two ending points. In a visualisation programme, you may construct and draw easily using this function. With the use of the time parameter, you may locate two control points and determine their locations. You ...

Read More
Showing 1–6 of 6 articles
« Prev 1 Next »
Advertisements