Shashank Dharasurkar

Shashank Dharasurkar

5 Articles Published

Articles by Shashank Dharasurkar

5 articles

How To Add Color Breezing Effect Using Pygame?

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 27-Mar-2026 345 Views

Pygame is a popular Python library for 2D game development that provides comprehensive functions for graphics, sound, and input handling. One visually appealing effect you can create is a color breathing effect, where objects pulsate with changing colors and opacity, creating a dynamic "breathing" animation. What is a Color Breathing Effect? A breathing effect combines color manipulation with scaling to create objects that appear to "breathe" by: Gradually changing the object's transparency (alpha value) Scaling the object size up and down Using sine wave calculations for smooth transitions Complete Implementation Here's a complete ...

Read More

How to Add A Color Picker In Bokeh?

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 27-Mar-2026 343 Views

Bokeh is one of the most underrated Python visualization libraries and can be used for various applications, including data analysis, scientific visualization, interactive dashboards, etc. In this article, we will learn how to add a color picker widget in Bokeh. What's A Color Picker? A color picker is one of the many widgets present in Bokeh. It helps the user to specify an RGB color value. Widgets add interactions to the graphs, which can then help users to update plots or drive new computations without diving into code. Besides the color picker, Bokeh has many interesting widgets like ...

Read More

How to Access Index in Python's tuple for Loop?

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 27-Mar-2026 3K+ Views

When working with tuples in Python, you often need to access both the element and its index during iteration. Python provides two main approaches: the enumerate() function and the range() function with len(). What is a Tuple? A tuple is an immutable sequence of elements separated by commas. Once created, you cannot modify its elements ? fruits = ('apple', 'banana', 'orange') print(fruits) print(type(fruits)) ('apple', 'banana', 'orange') Using enumerate() The enumerate() function returns tuples containing the index and value of each element. This is the most Pythonic approach ? ...

Read More

How To Add Color Bar In Bokeh

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 29-Aug-2023 502 Views

In Python, Bokeh is one of the most powerful libraries for data visualization that goes beyond traditional plotting. It follows a unique "Grammar of Graphics" architecture that allows developers to build interactive visualizations by managing graphical elements together. A Bokeh plot brings your data to life with its seamless integration with Pandas, NumPy, and SciPy. What is a Color Bar? Color bar is a visualization tool where color is used to represent a continuous variable like a heatmap. The main objective of the color bar is to allow users to understand the ...

Read More

How To Access Different Rows Of A Multidimensional Numpy Array?

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 28-Mar-2023 2K+ Views

NumPy Multidimensional Arrays As the name suggests, Multidimensional Arrays are a technique that can be described as a way of defining and storing data in a format that has more than two dimensions (2D). Python allows the implementation of Multidimensional Arrays by nesting a list function inside another list function. Here are some examples on how we can create single and multidimensional arrays in Python using Numpy. Single Dimensional Array Example import numpy as np simple_arr = np.array([0, 1, 2, 3, 4]) print(simple_arr ) Output [0 1 2 3 4] Algorithm Import the NumPy library Use ...

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