Niharika Aitam

Niharika Aitam

133 Articles Published

Articles by Niharika Aitam

Page 9 of 14

How to check if an object is iterable in Python?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 1K+ Views

Iterable object is the object that can be iterated through all its elements using a loop or an iterable function. The lists, string, dictionary, tuples etc. are all known as iterable objects. There are different ways to check if an object is iterable or not in the Python language. Let’s see them one by one. Using a loop In python, we have two looping techniques, one is using the ‘for’ loop and the other is using the ‘while’ loop. Using any one of these two loops, we can check whether the given object is iterable or not. Example In ...

Read More

How to check if an application is open in Python?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 6K+ Views

A program under execution is known as process. A process can be applications running on the current operating system or, applications related to the Operating system. If an application is related to operating system, firstly it will create a process to execute itself. The other applications rely on operating system services for execution. Most of the applications are OS services and the background applications that maintain the operating system, software and Hardware. We have different ways in python to check whether if an application is open or not. Let’s see them one by one in detail. Using ...

Read More

How to check the file size?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 624 Views

Files are used to store certain data based on user requirement. A file can contain any type of information suchas audio, text, images, video or program. Depending on the data present in a file, the size of a file varies. The size of a file is measured in bits or bytes. A bit is the smallest unit of information which is typically represented by a single value: either 0 or 1. Bytes are used to measure the amount of data in a file and the bytes are denoted by 8 bits. There are several ways to check the file ...

Read More

How to check Django version?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 1K+ Views

Django is a free, open source web framework which is written in python and works with the python language. It follows the Model view controller(MVC) architectural pattern. This is manly used to develop the web applications in an easy and faster way with minimal fuss. The key features of the Django framework are as follows. It provides Object – relational mapper (ORM) for database management. It helps in URL routing and handling of HTTP requests and responses. Provides the templating engines to generate the HTML pages. It has built-in user authentication and administration Django supports the third party modules ...

Read More

How to check any script is running in linux using Python?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 4K+ Views

The psutil module in Python helps us to retrieve information about the processes that are currently running in our local system. What is a script? AScript is a set of instructions that are written in programming language and executed in the computer. We can perform a variety of simple to complex repetitive tasks within less time. In Linux, the scripts are often executed through the command line using the shell interpreters like Bash or python. These scripts can also be scheduled to run at a particular times using the cron or systemd. Installing psutil module To work with ...

Read More

How to change ticks label sizes using Python’s Bokeh

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 264 Views

Bokeh is one of the data visualization libraries available in python, which allows the users to create the interactive plots, data applications, dashboards in web browsers. The Bokeh provides us varieties of plots and charts such as scatter plot, line plot, bar charts and area charts etc. and also more specialized heat maps and geographic maps. This is an Open source library with the active developer community. Creating Plots using Bokeh in Python The Bokeh library provides two main interfaces for creating the plot, one is low level interface which is used to develop the plots from the individual components ...

Read More

How to change the PyGame icon?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 2K+ Views

While building video games, we often try to setup an image or logo for that developed game. Python provides a function in pygame named, set_icon(), which sets the icon as desired. Pygame is a set of modules that allows us to develop the games and multimedia applications. This is built in top of the SDL(Simple Direct Media Layer) library which has low access to the audio keyboard, mouse, joystick and graphics hardware through OpenGL and Direct3D. Syntax Following is the syntax for setting the icon for the game - pygame_icon = pygame.image_load(“image_name”) pygame.display.set_icon(pygame_icon) Where, pygame_icon is the name ...

Read More

How to change the position of legend in Pygal?

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 236 Views

Pygal is abbreviated as Python Data Visualization Library, which is designed to create the interactive charts and graphs. This is library is built with the advanced features than the SVG(Scalar Vector Graphics) format, to work with the high quality graphics that can be easily embedded into the web pages and applications. Pygal is abbreviated as Python Data Visualization Library, which is designed to create the interactive charts and graphs. This is library is built with the advanced features than the SVG(Scalar Vector Graphics) format, to work with the high quality graphics that can be easily embedded into the web pages ...

Read More

Convert a NumPy array to an image

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 10K+ Views

The array created using the Numpy library can be converted into an image using the PIL or opencv libraries in python programming language. Let’s see about each library one by one. Python Image Library PIL is abbreviated as Python Image Library, which is an image processing libraries in python. It is a light weight and easy to use library to perform the image processing tasks like reading, writing, resizing and cropping the images. This library performs all the basic image processing tasks but don’t have any advanced features required for computer vision applications. We have a function in ...

Read More

Convert a NumPy array into a csv file

Niharika Aitam
Niharika Aitam
Updated on 09-Aug-2023 1K+ Views

The Numpy is the library in the python programming language which is abbreviated as Numerical Python. It is used to do the mathematical, scientific and statistical calculations within less time. The output of the numpy functions will be an array. An array created by the numpy functions can be stored in the CSV file using a function namely, savetxt(). Numpy array into a .csv file CSV is abbreviated as Comma Separated Values. This is the file format most widely used in the Data Science. This stores the data in a tabular format where the column holds the data fields and ...

Read More
Showing 81–90 of 133 articles
« Prev 1 7 8 9 10 11 14 Next »
Advertisements