Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Rohan Singh
Page 3 of 15
Action Chains in Selenium Python
Action chains in Selenium Python enable the execution of multiple browser actions together in sequence. Selenium is a popular open-source automation testing tool used to test web applications and automate browser actions. Action chains allow you to combine multiple actions like clicks, key presses, and mouse movements into a single automated workflow. What are Action Chains in Selenium Python? Action chains are a sequence of actions that are performed in a specific order on a web page to test for a specific outcome. These actions can include clicking elements, entering text, scrolling, dragging and dropping objects, and keyboard ...
Read MoreAccessor and Mutator Methods in Python
Accessor and mutator methods in Python are used to access and modify the private data of a class. In object-oriented programming, class data is encapsulated — meaning the object data is kept private and cannot be directly accessed from outside the object. These methods provide controlled access to private variables and are also known as getter and setter methods. Accessor Methods (Getters) An accessor method is used to retrieve object data. Private variables of an object can be accessed through accessor methods, which are public methods that return private member data. In Python, accessor methods are defined ...
Read MoreAccessing Data Along Multiple Dimensions Arrays in Python Numpy
NumPy is a Python library used for scientific and mathematical computations. NumPy provides functionality to work with one-dimensional arrays and multidimensional arrays. Multidimensional arrays consist of multiple rows and columns. In this article, we will explore how to access data along multiple dimensions in NumPy arrays. Creating Multidimensional Arrays To create a multidimensional array, we pass a list of lists to the numpy.array() method. Each inner list represents a row of the multidimensional array. Syntax numpy.array(nested_list) Example Let's create a 3×3 multidimensional array ? import numpy as np arr ...
Read MoreAccess meta data of various audio and video files using Python
We can access the metadata of audio and video files using specialized Python libraries. Metadata provides information about media files like format, resolution, file size, duration, and bit rate. By accessing this metadata, we can manage media more efficiently and extract useful information for analysis. Accessing Audio Metadata Python offers several libraries for audio metadata extraction. Here are the two most popular ones ? Using Mutagen Library Mutagen is an open-source Python module that handles audio metadata for almost all audio formats including MP3, MP4, OGG, and FLAC. It can both read and manipulate audio metadata. ...
Read MoreAccess Index of Last Element in pandas DataFrame in Python
To access the index of the last element in a pandas DataFrame, we can use the index attribute or the tail()
Read MoreAccess files of a devices in the same network using Python
When multiple devices are connected over the same network (LAN or WiFi), Python provides a simple way to share and access files between them. Python's built-in http.server module creates a lightweight web server that serves files from a chosen directory, making them accessible to other devices on the network. The http.server module creates a simple HTTP server that serves files from the current directory when requests are made to the server. This article explains the step-by-step process to share files across network-connected devices using Python. Step 1: Find the IP Address of the Device To access files ...
Read MoreAccess environment variable values in Python
Environment variables in Python are configuration values stored outside the code and are used at runtime by the application. These variables are present in the form of key-value pairs just like dictionaries in Python. These variables can be set, updated, or removed from the configuration file without changing the application code. Python provides many operating system functions to access environment variables without affecting the code of the application. In this article, we will learn the ways in which we can access environment variables in Python. Using the OS Module In order to interact with the operating system, Python ...
Read MoreA simple News app with Tkinter and Newsapi
Tkinter is a Python library that is used to create desktop applications for Windows and UNIX-based operating systems. Tkinter provides many widgets to build interactive applications with graphical user interfaces. Today there are vast sources of information available on the internet. News is constantly coming from global sources to local sources. Keeping track of the latest news is a daunting task. In this article, we will build a simple News app with Tkinter and NewsAPI. What is NewsAPI? NewsAPI is an Application Programming Interface (API) that provides access to news articles and breaking news across the world ...
Read More8-bit game using pygame
Pygame is an open-source Python library used for making games. It provides various functions and tools for creating games, sound processing, and graphics. Pygame is a cross-platform library that works on Windows, Linux, and macOS. What is an 8-bit Game? 8-bit games were very popular in the 1980s. These video games featured graphics and sound created using 8-bit technology — a limited color palette and sound range that fall within the 8-bit range. In this article, we will create an 8-bit style game using pygame with minimal graphics. Before creating an 8-bit game using pygame, we need ...
Read More7 Reasons Why You Should Learn Python in 2023
Python programming language was developed in 1991 and is an open source programming language. In recent years Python has gained immense popularity and has a huge developer support ecosystem which makes it easy to use and a versatile programming language. With its easy-to-understand syntax, it is one of the best beginner programming languages to start with. It is widely used in different technological fields like web development, game development, machine learning, artificial intelligence, and data analytics by businesses. In this article we will see why you should learn the Python programming language in 2023. Reasons Why You Should Learn ...
Read More