Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Server Side Programming Articles - Page 208 of 2650
23K+ Views
The Numpy array can be saved to a text file using various methods like the savetxt() method, save() method, and dataframe.to_csv() function. Numpy is a Python library that is used to do the numerical computation, manipulate arrays, etc. In this article, we will discuss the methods that can be used to save a numpy array to a text file. Method 1: Using the numpy.savetxt() function The numpy.savetxt() function simply saves the numpy array to a text file. The function takes two arguments - the file name in which the numpy array is to be saved and the array itself. ... Read More
6K+ Views
Ngrok is a tool that is used to create a secure tunnel between your local machine and the internet. It is used to test the web application and allows developers to expose their local web server to the internet without having to deploy it to a remote server. Python Flask allows you to create web applications locally but we might want to showcase it to the world by running it online. In this article, we will use the Ngrok tool to run the web application online without hosting it on any server. The Steps to Run Python Flask App Online ... Read More
12K+ Views
The subprocess module can be used to run multiple Python files in a folder one after another. Running multiple files one after another is required in various situations like when processing large data sets or performing complex analysis. In this article, we will discuss the steps involved in running multiple Python files in a folder sequentially with examples. Method 1: Using the subprocess() method Steps for creating and running multiple Python files sequentially Step 1: Create multiple Python files to run We need to have three Python files in a folder to run them sequentially. So the first step ... Read More
655 Views
The round() function of the Numpy library is used to round array elements to the given number of decimals. Numpy is a Python library that is used to perform mathematical operations, manipulation, and creation of arrays, etc. In this article, we will use the round() function to round array elements to the given number of decimals. Method 1: using round() function Syntax of round() function numpy.round(arr, decimals=0, out=None) Here, arr is the input array to be rounded, decimal is the number of decimal places the elements of the array are to be rounded. By default, the decimal value is ... Read More
265 Views
Pygal is a Python library that is used to create interactive, customizable charts and graphs. We can rotate the x-axis label using the x_label_rotation attribute in the Pygal module. The rotation of the x-axis label makes the chart easier to read and comprehend. In this article, we will discuss how to rotate the x-label using Pygal with an example. Algorithm A general algorithm for rotating the x label using pygal is given below − Import the Pygal module. Create a chart object (e.g., Bar, Line, Pie, etc.). Add data to the chart using the add method. Set the x-axis ... Read More
2K+ Views
We can Rotate and scale an image in Pygame using pygame.transform.rotate and pygame.transform.scale function respectively of the Pygame module. The Function is used to rotate an image by a given angle in Degrees. The function takes two parameters - the image to rotate and the angle of rotation. In this article, we will use the pygame.transform.rotate and pygame.transform.scale function to rotate and scale the image respectively. Rotate an image in Pygame Algorithm Rotating an Image in Pygame − Import the pygame library. Initialize Pygame by calling pygame.init(). Set the screen size using pygame.display.set_mode(). Load the image to rotate ... Read More
8K+ Views
Python provides various in-built methods to retrieve an entire row or column of an array. We can use the Slice notation method, Numpy Library, list comprehension, and for loop to retrieve the entire row or column of an array. In this article, we will explore all the methods with examples to retrieve the row or column of an array. Method 1: Using Slice Notation Using slice notation we extract a subset of elements from an array. We use the “:” notation to specify the start and end index of the subset. To retrieve an entire row or column we ... Read More
3K+ Views
We can reshape the Pandas series using ways like Transpose, reshape method, and melt function. A Pandas Series is a one-dimensional labeled array that can hold data of any type (integer, float, string, etc.). It is similar to a NumPy array but has an index associated with each element that can be used to access individual values. Reshaping refers to changing the shape or structure of the Pandas series for using the data in various ways. Algorithm The general algorithm to Reshape Pandas Series using different methods is as follows − Create a Pandas Series with some data. ... Read More
2K+ Views
Resampling a Numpy array representing an image is the process of changing the size of the array while maintaining the quality of the image. We can resample an array using interpolation, decimation, and upsampling techniques in Python. We can use the ndimage.zoom() function for Scipy library in Python to resample a Numpy array representing an image. In this article, we will understand how to resample a Numpy array representing an image using the Scipy module in Python. Interpolation Interpolation is a technique used to estimate values between existing data points. In Numpy we have several interpolation methods like liner, ... Read More
722 Views
Exploring the whereabouts of the International Space Station (ISS) and witnessing its real−time movements can be an exhilarating experience. The following article aims to showcase how Python can be utilized to track the ISS, utilizing the ISS API provided by Open Notify and visualizing its location on an interactive world map with the aid of the `folium` library. Installing the Required Libraries Before we embark on our ISS tracking journey, it is necessary to install a couple of libraries: `requests`, which facilitates API calls, and `folium`, which empowers the creation of captivating interactive maps. pip install requests ... Read More