Server Side Programming Articles

Page 604 of 2109

Convolutions using Python?

Jennifer Nicholas
Jennifer Nicholas
Updated on 25-Mar-2026 389 Views

Convolution is a fundamental mathematical operation used in image processing and deep learning. It combines two functions to produce a third function, essentially merging information from an input image with a kernel (filter) to extract specific features like edges, textures, or patterns. What is Convolution? In image processing, convolution involves sliding a small matrix called a kernel over an input image. At each position, we multiply corresponding elements and sum the results to produce a single output value. This process helps detect features and transform images. Input Image ...

Read More

Readability Index in Python(NLP)?

Nitya Raut
Nitya Raut
Updated on 25-Mar-2026 1K+ Views

A readability index is a numeric value that indicates how difficult (or easy) it is to read and understand a text. In Natural Language Processing (NLP), readability analysis helps determine the complexity level of written content, making it essential for educational materials, technical documentation, and content optimization. Readability describes the ease with which a document can be read. There exist many different tests to calculate readability, each designed for specific languages and use cases. These tests are considered predictions of reading ease and provide valuable insights for content creators and educators. Common Readability Tests Different readability tests ...

Read More

Data visualization with different Charts in Python?

Jennifer Nicholas
Jennifer Nicholas
Updated on 25-Mar-2026 453 Views

Python provides various easy-to-use libraries for data visualization that work efficiently with both small and large datasets. This tutorial demonstrates how to create different types of charts using the same dataset to analyze population data from multiple perspectives. Popular Python Visualization Libraries The most commonly used Python libraries for data visualizations are: Matplotlib − The foundational plotting library Pandas − Built-in plotting capabilities for DataFrames Plotly − Interactive web-based visualizations Seaborn − Statistical plotting with beautiful defaults Sample Dataset We will ...

Read More

Encode and decode binhex4 files using Python (binhex)

Nishtha Thakur
Nishtha Thakur
Updated on 25-Mar-2026 703 Views

The binhex module encodes and decodes files in binhex4 format, which was used to represent Macintosh files in ASCII format for transmission over text-based protocols. This module handles only the data fork of files. Functions The binhex module provides two main functions: binhex.binhex(input, output): Converts a binary file to binhex4 format. The input parameter is the filename to encode, and output can be either a filename or a file-like object with write() and close() methods. binhex.hexbin(input, output): Decodes a binhex4 file back to binary format. The input can be a filename or file-like object, and output ...

Read More

Python Context Variables

Smita Kapse
Smita Kapse
Updated on 25-Mar-2026 1K+ Views

Context variables can have different values depending on their context. Unlike Thread-Local Storage where each execution thread may have a different value for a variable, a context variable may have several contexts in one execution thread. This is useful for keeping track of variables in concurrent asynchronous tasks. The ContextVar class is used to declare and work with Context Variables. Creating a Context Variable You can create a context variable with an optional default value ? import contextvars name = contextvars.ContextVar("name", default="Hello") print(f"Variable name: {name.name}") print(f"Default value: {name.get()}") Variable name: name ...

Read More

Generate and parse Mac OS X .plist files using Python (plistlib)

Smita Kapse
Smita Kapse
Updated on 25-Mar-2026 2K+ Views

Files with .plist extension are used by macOS applications to store application properties. The plistlib module provides an interface to read and write these property list files in Python. The plist file format serializes basic object types like dictionaries, lists, numbers, and strings. Usually, the top-level object is a dictionary. Values can be strings, integers, floats, booleans, tuples, lists, and dictionaries (but only with string keys). Main Functions Function Description load() Read a plist file from a readable binary file object dump() Write value to a plist file via writable binary ...

Read More

Inspect live objects in Python

Nishtha Thakur
Nishtha Thakur
Updated on 25-Mar-2026 812 Views

The inspect module in Python provides powerful functions to examine live objects such as modules, classes, methods, functions, and code objects. These functions perform type checking, retrieve source code, inspect classes and functions, and examine the interpreter stack. Key Functions getmembers() − Returns all members of an object in a list of name-value pairs sorted by name. Optional predicate parameter filters results. getmodulename() − Returns the module name from a file path, excluding enclosing package names. Example Module Let's create a sample module to demonstrate inspect functionality ? # inspect_example.py '''This is module ...

Read More

Configuration file parser in Python (configparser)

Anvi Jain
Anvi Jain
Updated on 25-Mar-2026 15K+ Views

The configparser module from Python's standard library provides functionality for reading and writing configuration files as used by Microsoft Windows OS. Such files usually have .INI extension. The INI file consists of sections, each led by a [section] header. Between square brackets, we can put the section's name. Section is followed by key/value entries separated by = or : character. It may include comments, prefixed by # or ; symbol. A sample INI file is shown below − [Settings] # Set detailed log for additional debugging info DetailedLog=1 RunStatus=1 StatusPort=6090 StatusRefresh=10 Archive=1 # Sets the location of ...

Read More

Essential Python Tips And Tricks For Programmers?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 325 Views

Python offers numerous shortcuts and tricks that can make your code more concise and efficient. These techniques are particularly useful in competitive programming and professional development where clean, optimized code matters. Finding Largest and Smallest Elements with heapq Getting n Largest Elements The heapq module provides efficient functions to find the largest elements without sorting the entire list − import heapq marks = [91, 67, 34, 56, 78, 99, 87, 23, 78, 66] print("Marks =", marks) print("2 Largest =", heapq.nlargest(2, marks)) Marks = [91, 67, 34, 56, 78, 99, 87, 23, ...

Read More

Reading images using Python?

Nitya Raut
Nitya Raut
Updated on 25-Mar-2026 8K+ Views

Reading images is a fundamental task in computer vision and image processing. Python offers several powerful libraries for this purpose, with OpenCV and PIL (Pillow) being the most popular choices. This tutorial covers both approaches for reading, displaying, and saving images. Installing Required Libraries First, install the necessary packages using pip − $ pip install opencv-python $ pip install numpy $ pip install Pillow Reading Images Using OpenCV OpenCV (Open Source Computer Vision) is a comprehensive library for computer vision tasks. It provides over 2, 500 optimized algorithms for image processing, machine learning, ...

Read More
Showing 6031–6040 of 21,090 articles
« Prev 1 602 603 604 605 606 2109 Next »
Advertisements