Found 27104 Articles for Server Side Programming

How to Convert a list of Dictionaries into Pyspark DataFrame?

Prince Yadav
Updated on 21-Jul-2023 19:39:27

3K+ Views

Python has become one of the most popular programming languages in the world, renowned for its simplicity, versatility, and vast ecosystem of libraries and frameworks. Alongside Python, there is PySpark, a powerful tool for big data processing that harnesses the distributed computing capabilities of Apache Spark. By combining the ease of Python with the scalability of Spark, developers can tackle large−scale data analysis and processing tasks efficiently. In this tutorial, we will explore the process of converting a list of dictionaries into a PySpark DataFrame, a fundamental data structure that enables efficient data manipulation and analysis in PySpark. In the ... Read More

Heap Sort for decreasing order using min heap

Divya Sahni
Updated on 25-Jul-2023 12:44:09

595 Views

Heap Sort − Heap sort is a comparison-based algorithm that used binary tree data structures to sort a list of numbers in increasing or decreasing order. It heap sorts to create a heap data structure where the root is the smallest element and then removes the root and again sorting gives the second smallest number in the list at the root position. Min Heap − Min heap is a data structure where the parent node is always smaller than the child node, thus root node is the smallest element among all. Problem Statement Given an array of integers. Sort them ... Read More

Golomb sequence

Divya Sahni
Updated on 25-Jul-2023 12:38:15

412 Views

Golomb Sequence − The Golomb Sequence is a non-decreasing sequence of integers where the value of the nth term is the number of times the integer n appeared in the sequence. Some terms of Golomb sequence are, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, … Here as we can see, the 5th term is 3 and 5 also appears 3 times in the sequence. The 6th term is 4 and 6 also appears 4 times in ... Read More

Place_forget() method using Tkinter in Python

Priya Mishra
Updated on 24-Jul-2023 21:26:47

737 Views

Tkinter, a popular GUI toolkit for Python, offers a plethora of tools to design intuitive and interactive interfaces, among these, the Place_forget() method stands out as a powerful tool for dynamic GUI layout manipulation. This method enables developers to effortlessly hide or remove widgets from a Tkinter window, providing a seamless user experience. In this article, we will delve into the details of the Place_forget() method, exploring its syntax, applications, and practical implementation techniques to help you leverage its full potential in your Python GUI projects. What is Place_forget() method? The Place_forget() method is a function provided by the ... Read More

Front and Back Search in unsorted array

Divya Sahni
Updated on 25-Jul-2023 12:35:32

182 Views

Unsorted Array − An array is a data structure consisting of a collection of elements of the same type. An unsorted array is such a structure where the order of elements is random, i.e. on insertion, the element is added to the last irrespective of the order of previous elements and searching in such an array is not helped by any search algorithm because of lack of a pattern of the positioning of elements. Searching − Searching in an array means finding a particular element in the array which can be either returning the position of a desired element or ... Read More

Pipx - Python CLI package tool

Priya Mishra
Updated on 24-Jul-2023 21:24:50

266 Views

Managing and isolating these packages can sometimes be a challenging task, especially when dealing with command-line tools, so hre comes Pipx, a powerful Python CLI package tool that simplifies package installation and management, offering a streamlined experience for developers and users alike. With Pipx, you can effortlessly install, upgrade, and uninstall Python command-line tools in separate virtual environments, ensuring clean dependencies and avoiding conflicts. In this article, we will explore the features and benefits of Pipx, empowering you to maximize your Python development workflow. Features of Pipx Pipx is a Python CLI package tool that comes equipped with an ... Read More

Pipenv - Python Package Management Tool

Priya Mishra
Updated on 24-Jul-2023 21:22:12

140 Views

Pipenv is an advanced tool for managing Python packages, Pipenv is specifically created to cater to the needs of Python developers. Its main objective is to make the management of dependencies and virtual environments in Python projects a hassle-free experience. With Pipenv, developers can easily create and manage customized environments for their projects, handle package installations and updates effortlessly, and ensure consistent resolution of dependencies. This article provides an overview of Pipenv's key features and demonstrates how it can enhance the development workflow for Python programmers. What is Pipenv? Pipenv is a cutting-edge tool created specifically for Python developers, ... Read More

Find n-th Fortunate Number

Divya Sahni
Updated on 25-Jul-2023 12:32:59

109 Views

Fortunate Numbers − It is the smallest integer m > 1 such that, for a given positive integer n, pn# + m is a prime number, where pn# is the product of the first n prime numbers. For example, for calculating the third fortunate number, first calculate the product of the first 3 prime numbers (2, 3, 5) i.e. 30. Upon adding 2 we get 32 which is an even number, adding 3 gives 33 which is a multiple of 3. One would similarly rule out integers up to 6. Adding 7 gives, 37 which is a prime number. Thus, ... Read More

Pie chart in pygal

Priya Mishra
Updated on 24-Jul-2023 21:10:57

218 Views

The Pygal library provides a powerful and intuitive way to create visually appealing pie charts in Python. Pie charts are a popular choice for displaying data distribution, and Pygal makes it easy to generate interactive SVG charts with customizable settings. With Pygal's user-friendly interface, we can easily define data, customize colors, titles, labels, legends, and more. Whether we're visualizing sales figures, survey results, or any other categorical data, Pygal's pie charts offer an effective and visually appealing solution. This article explores the creation of pie charts using Pygal, showcasing its versatility and flexibility in presenting data insights. How to ... Read More

Perform addition and subtraction using CherryPy

Priya Mishra
Updated on 24-Jul-2023 21:06:50

89 Views

CherryPy, a versatile Python web framework, offers a convenient and efficient way to perform addition and subtraction operations. In this article, we delve into the process of utilizing CherryPy to carry out basic arithmetic calculations within a web application. By leveraging CherryPy's lightweight and intuitive features, developers can effortlessly implement addition and subtraction functionalities, making mathematical operations seamless and easily accessible to users. How to perform addition and subtraction using CherryPy? Below are the steps that we will follow to perform addition and subtraction using CherryPy − We import the CherryPy module, which allows us to create a web ... Read More

Advertisements