Found 26504 Articles for Server Side Programming

Find if there is a path between two vertices in a directed graph

Farhan Muhamed
Updated on 30-Jul-2025 15:31:43

1K+ Views

A directed graph is a graph where the edges specify a direction from one vertex to another. In this article, we will learn how to find a path between two vertices in a directed graph and implement C++ code to achieve this. To determine if there is a path between two vertices, there are two common algorithms we can use: BFS Algorithm to Find Path Between Two Vertices DFS Algorithm to Find Path Between Two Vertices First of all, let's understand what does it meant by having a ... Read More

Python Script to Automate Refreshing an Excel Spreadsheet

Prince Yadav
Updated on 25-Jul-2023 15:14:55

8K+ Views

Python and Excel are two powerful tools that, when combined, can unlock a world of automation possibilities. Python, with its versatile libraries and user−friendly syntax, allows us to write scripts to perform various tasks efficiently. On the other hand, Excel is a widely used spreadsheet program that provides a familiar interface for data analysis and manipulation. In this tutorial, we will explore how Python can be leveraged to automate the process of refreshing an Excel spreadsheet, saving us time and effort. Have you ever found yourself spending valuable time manually refreshing an Excel spreadsheet with updated data? It's a repetitive ... Read More

Introduction to Disjoint Set Data Structure or Union-Find Algorithm

Way2Class
Updated on 25-Jul-2023 15:09:36

2K+ Views

Disjoint set information structure, too known as the Union-Find algorithm, could be an essential concept in computer science that gives an effective way to solve issues related to apportioning and network. It is especially valuable in solving issues including sets of components and determining their connections. In this article, we are going to investigate the language structure, algorithm, and two distinctive approaches to executing the disjoint set information structure in C++. We will also provide fully executable code examples to illustrate these approaches. Syntax Before diving into the algorithm, let's familiarize ourselves with the syntax used in the following code ... Read More

Python Program to Split each Word According to given Percent

Prince Yadav
Updated on 25-Jul-2023 15:02:29

218 Views

Python is a popular programming language known for its simplicity and versatility. It is widely used in various industries, including web development, data science, and machine learning. One of the many advantages of Python is its ability to easily manipulate strings and text data. In this tutorial, we will explore how to split each word according to a given percentage in Python. Explanation of the Problem The problem we're trying to solve in this tutorial is splitting each word in a string into parts based on a given percentage value. This can be useful in many applications, such as data ... Read More

Processing Large Datasets with Python PySpark

Prince Yadav
Updated on 25-Jul-2023 14:49:06

2K+ Views

In this tutorial, we will explore the powerful combination of Python and PySpark for processing large datasets. PySpark is a Python library that provides an interface for Apache Spark, a fast and general−purpose cluster computing system. By leveraging PySpark, we can efficiently distribute and process data across a cluster of machines, enabling us to handle large−scale datasets with ease. In this article, we will dive into the fundamentals of PySpark and demonstrate how to perform various data processing tasks on large datasets. We will cover key concepts, such as RDDs (Resilient Distributed Datasets) and DataFrames, and showcase their practical applications ... Read More

Printing Lists as Tabular Data in Python

Prince Yadav
Updated on 25-Jul-2023 14:22:11

7K+ Views

Data manipulation and analysis are crucial aspects of programming, especially when dealing with large datasets. One of the challenges programmers often face is how to present data in a clear and organized format that facilitates comprehension and analysis. Python, being a versatile language, offers various techniques and libraries to print lists as tabular data, allowing for a visually appealing representation of information. Printing lists as tabular data involves arranging the data in rows and columns, resembling a table−like structure. This format makes comparing and understanding the relationships between different data points easier. Whether you are working on a data analysis ... Read More

Optimizing Code Performance and Memory Usage in Python

Prince Yadav
Updated on 25-Jul-2023 14:18:43

308 Views

In this tutorial, we will explore techniques for optimizing code performance and memory usage in Python. Python is a popular programming language known for its simplicity and readability, but it can sometimes suffer from slower execution speed and high memory consumption. To tackle these issues, we will discuss various strategies and best practices to improve the performance and memory efficiency of Python code. Now, let's delve into the details of how we can optimize our Python code for better performance and memory usage. Efficient Data Structures One way to optimize code performance and memory usage is by choosing appropriate data ... Read More

Natural Language Processing with Python and NLTK

Prince Yadav
Updated on 25-Jul-2023 13:46:28

759 Views

The field of artificial intelligence known as "natural language processing" (NLP) focuses on how computers interact with human language. It entails the creation of algorithms and models that allow computers to comprehend, interpret, and generate human language. The Natural Language Toolkit (NLTK) library and Python, a universal programming language, provide powerful tools and resources for NLP tasks. In this article, we will look at the fundamentals of NLP using Python and NLTK, and how they can be used for a variety of NLP applications. Understanding Natural Language Processing Natural language processing encompasses a wide range of diverse tasks, including question−answering, ... Read More

Make multiple directories based on a List using Python

Prince Yadav
Updated on 25-Jul-2023 13:42:36

662 Views

Python, with its simplicity and versatility, has become one of the most popular programming languages for various applications. Whether you're a seasoned developer or just starting your coding journey, Python offers a wide range of functionalities and libraries that make complex tasks manageable. In this article, we will explore a practical scenario where Python can come to our rescue by automating the process of creating multiple directories based on a list. By harnessing the power of Python's built−in modules and techniques, we can efficiently handle this task without manual intervention. In this tutorial, we will delve into the problem of ... Read More

Image Segmentation in OpenCV Python with Watershed Algorithm

Prince Yadav
Updated on 25-Jul-2023 13:29:25

2K+ Views

As passionate computer vision enthusiasts and Python programmers, we have always been captivated by the incredible capabilities of the OpenCV library. One technique that has particularly fascinated us is image segmentation, the process of dividing an image into distinct regions. This article will share our journey and insights on performing image segmentation using OpenCV Python with the Watershed algorithm. By leveraging the concept of water flow in a physical landscape, the Watershed algorithm has emerged as a powerful tool for accurately identifying boundaries and separating objects in an image. Together, we will dive into the step−by−step process, from preprocessing the ... Read More

Advertisements