Found 27154 Articles for Server Side Programming

ProcessPoolExecutor Class in Python

Niharika Aitam
Updated on 19-Oct-2023 14:07:03

69 Views

The ProcessPoolExecutor class in python is part of the concurrent.futures module, is a high level interface for asynchronously executing functions using the processes and threads. The ProcessPoolExecutor allows us to execute the multiple functions in parallel using the multiple processes, which is particularly useful to CPU bound tasks that benefit in the parallelization process. Multiprocessing and Multithreading Before going to see about the ProcessPoolExecutor class we have to know about the Multiprocessing and Multithreading. Multiprocessing and Multithreading are the techniques used to achieve the parallelism process and they are different in the way they manage and create concurrent tasks. Multiprocessing ... Read More

Private Methods in Python

Niharika Aitam
Updated on 19-Oct-2023 14:04:56

823 Views

In Python, we can define the private method by prefixing the single underscore to the method name and like the other programming languages we cannot prevent accessing the private method outside the class in python. Simply we can say the private method is used only internally for the defined class. What is private method and public method? A private method is the method that should be called only inside the defined class whereas the Public method is defined within the class, can be called on an instance of the defined class. Now let’s define the private method and see ... Read More

Priority Queue using Queue and Heapdict module in Python

Niharika Aitam
Updated on 19-Oct-2023 11:45:08

157 Views

The priority Queue is the abstract data type which is similar to the queue or stack, in which each element is attached with a priority. Here the priority determines the order of the elements to be dequeued from the queue and the higher priority elements are dequeued before the elements with the lower priority. The priority queues will be implemented using different data structures such as heaps, arrays or balanced trees. The most commonly used implementation is the heap, which is the binary tree based data structure having the value of each node greater than or equal to the values ... Read More

Golang program to implement a Trie data structure

Akhil Sharma
Updated on 18-Oct-2023 16:00:19

337 Views

A trie is a data structure like tree that is used to store and search a dynamic set of strings. It is useful while working with the data where keys share common prefix like dictionary words. Trie is different from the other retrieval data structures owing to its efficient string manipulation and retrieval properties. In this article we will learn to implement Trie data structure in Go programming language. Explanation The Trie, also known as a retrieval tree is a type of tree data structure that is commonly used for storing and managing collections of strings. It offers access, to ... Read More

Go Language Program to Implement Floyd's Triangle

Akhil Sharma
Updated on 18-Oct-2023 15:58:27

77 Views

Floyd's Triangle is a right-angled triangular pattern of numbers, named after the renowned American computer scientist Robert W. Floyd. Using sequences of natural integers starting at 1 and increasing by 1 in each row, we build this triangle. In this article, we are going to implement Floyd's Triangle in go, implementation here means we are going to create floyd's triangle and then print it. Explanation Floyd's Triangle, much like Pascal's Triangle, is a triangular arrangement of the natural numbers with a right angle. There is progression of numbers from left to right across the table, starting at 1 in each ... Read More

Go Language Program to Convert Decimal to Roman Numerals

Akhil Sharma
Updated on 18-Oct-2023 15:55:07

203 Views

Roman numerals are an ancient numerical system that has found its way into modern applications like clock faces, book chapters, and movie credits. In this article, we are going to Convert Decimal to Roman Numerals. We will look at two different examples, in the first example we will use the recursive approach and in the second example we are going to use the iterative approach. Explanation Roman numerals have been one of the languages to express the marvel of Mathematics. Clock faces, book chapters, and movie credits are just some of the current uses for the old Roman number system. ... Read More

Show Normal Inverse Gaussian Distribution in Statistics using Python

Nikitasha Shrivastava
Updated on 18-Oct-2023 15:43:03

140 Views

In this article we will be discussing the Normal inverse Gaussian distribution and also discuss how to implement and show this distribution using Python. Understanding the Problem The Normal Inverse Gaussian distribution in statistics is the probability distribution which can be used in various fields like finance, risk management and statistical analysis. So we will discuss the logic behind this distribution to implement in Python. Logic for The Above Problem The normal-inverse Gaussian distribution (NIG), a continuous probability distribution, is characterized as the normal variance-mean mixture with the inverse Gaussian distribution as the mixing density. To plot and show the ... Read More

Show Normal Distribution in Statistics using Python

Nikitasha Shrivastava
Updated on 18-Oct-2023 15:42:20

130 Views

In the problem statement we are required to show the normal distribution using Python and its libraries. In the tutorial we will discuss what is normal distribution and how it can be plotted using Python. What is Normal Distribution in Statistics? In the statistics, Normal Distribution is a popular probability distribution. It frequently serves as a model for naturally occurring occurrences and it has a bell-shaped curve as its different feature. It is also known as Gaussian distribution. We can create random data points that fit the normal distribution using a random function in Python to display the ND. Following ... Read More

Go Language Program to Convert Fahrenheit to Celsius

Akhil Sharma
Updated on 18-Oct-2023 15:53:36

133 Views

Temperature conversions are crucial in many scientific expeditions, Fahrenheit is a scale of temperature and celsius is also a temperature scale, but sometimes we need to convert fahrenheit to celsius for medical settings, travels, and more. In this article, we are going to explore conversion of Fahrenheit temperature to corresponding Celsius in Go programming language. Explanation The basic idea can be distilled into the given formula. Here, °C represents value in Celsius and °F represents value in Fahrenheit. °C = (°F - 32) * 5/9 This is the formula used to convert fahrenheit to celsius. Syntax ... Read More

Go Language Program to Find the Nth Fibonacci Number

Akhil Sharma
Updated on 18-Oct-2023 15:51:04

149 Views

Fibonacci numbers have a unique position in mathematics, computer science and even nature for its particular mathematical qualities. Each number in this series represents the addition of the 2 previous ones, starting at 0 and 1. In this article, we are going to explore an approach to find the Nth Fibonacci number to go efficiently. We will explain two examples in the first example we used the recursive approach as it is easy to implement and fast for moderate values of n, but may be slow for large inputs. In the second example we are going to use the ... Read More

Advertisements