Python Articles

Page 118 of 855

How to Get the list of Running Processes using Python?

Asif Rahaman
Asif Rahaman
Updated on 27-Mar-2026 9K+ Views

The operating system runs with hundreds of tasks/processes at a single time. As a Python developer, this is important because often while dealing with programs that consume huge amounts of memory, we may want to delete some unimportant tasks. This article will explore how to get the running process list using Python. Using psutil Module The psutil module is a powerful cross−platform library for system monitoring and process management in Python. It provides a convenient and consistent API to access system−related information, such as CPU usage, memory utilization, disk usage, network statistics, etc. Being cross−platform, the same code ...

Read More

Locating multiple elements in Selenium Python

Siva Sai
Siva Sai
Updated on 27-Mar-2026 640 Views

Selenium is a powerful web automation tool that allows you to control web browsers programmatically. One of its key features is the ability to locate and interact with multiple elements on a webpage simultaneously. This tutorial covers how to find multiple elements using Selenium with Python. Setting Up Selenium First, install Selenium using pip and set up the WebDriver ? pip install selenium You'll also need to download a browser driver (like ChromeDriver for Chrome) and ensure it's in your system PATH or specify its location in your code. Modern Element Location Methods ...

Read More

Loan Eligibility Prediction using Machine Learning Models in Python

Siva Sai
Siva Sai
Updated on 27-Mar-2026 1K+ Views

Predicting loan eligibility is a crucial part of the banking and finance sector. It is used by financial institutions, especially banks, to determine whether to approve a loan application. A number of variables are taken into consideration, including the applicant's income, credit history, loan amount, education, and employment situation. In this article, we will demonstrate how to predict loan eligibility using Python and its machine learning modules. We'll introduce some machine learning models, going over their fundamental ideas and demonstrating how they can be used to generate predictions. Understanding the Problem Predicting whether a loan will be ...

Read More

Loan Calculator using PyQt5 in Python

Siva Sai
Siva Sai
Updated on 27-Mar-2026 466 Views

Welcome to this comprehensive guide on building a Loan Calculator using PyQt5 in Python. PyQt5's powerful GUI capabilities allow us to create an intuitive interface for loan calculations with input validation and real-time results. Introduction to PyQt5 PyQt5 is a cross-platform toolkit for creating desktop applications in Python. It provides Python bindings for Qt libraries, combining Python's simplicity with Qt's robust GUI components. PyQt5 is widely used for developing professional desktop applications. Loan Calculator Overview A loan calculator computes monthly payments and total repayment amounts based on loan principal, interest rate, and term. By providing a ...

Read More

How to Get the Last N characters of a String in Python

Asif Rahaman
Asif Rahaman
Updated on 27-Mar-2026 5K+ Views

Getting the last N characters from a string is a common task in Python programming. This is useful for file extensions, data validation, text processing, and many other applications. Python provides several approaches to extract the last N characters efficiently. Using String Slicing (Recommended) String slicing is the most Pythonic and efficient method to get the last N characters. It uses negative indexing where -n: starts from the nth character from the end. Example def get_last_n_characters(text, n): return text[-n:] text = "Hello, world!" n = 5 result = get_last_n_characters(text, n) ...

Read More

Loan Approval Prediction using Machine Learning

Siva Sai
Siva Sai
Updated on 27-Mar-2026 1K+ Views

Traditional industries are quickly embracing contemporary technologies to improve their operations in the age of digital transformation. Among these, the financial industry stands out for using cutting-edge approaches like machine learning (ML) for tasks like predicting loan acceptance. This article provides a comprehensive guide on how to predict loan approval using machine learning with practical Python examples. Introduction to Loan Approval Prediction Loan approval prediction uses machine learning algorithms to determine whether a loan application should be approved or rejected based on applicant information. This is a binary classification problem where the output is either "approved" or "denied". ...

Read More

How to Get the First Element in List of Tuples in Python?

Asif Rahaman
Asif Rahaman
Updated on 27-Mar-2026 2K+ Views

When working with a list of tuples in Python, extracting the first element from each tuple is a common task. Python provides several approaches including loops, list comprehension, map() function, unpacking, and the zip() method. Using For Loop A simple loop iterates through each tuple and accesses the first element using index [0] − def get_first_element_using_loop(tuples_list): first_elements = [] for item in tuples_list: first_elements.append(item[0]) return first_elements fruits = [ ('Apple', 5, ...

Read More

Get the List of Files in a Directory Sorted by Size Using Python.

Asif Rahaman
Asif Rahaman
Updated on 27-Mar-2026 771 Views

Getting a list of files in a directory sorted by size is a common task in Python file operations. Python provides several approaches using the os module, glob module, and sorting techniques like lambda functions and the operator module. Using os.listdir() with Operator Module The os module provides functions to interact with the operating system, while the operator module offers built-in operators for cleaner code ? import os import operator # Create sample files for demonstration os.makedirs('files', exist_ok=True) with open('files/small.txt', 'w') as f: f.write('Small file') with open('files/medium.txt', 'w') as f: ...

Read More

Load Text in Tensorflow

Siva Sai
Siva Sai
Updated on 27-Mar-2026 416 Views

TensorFlow is a powerful open-source framework developed by Google that excels at handling various types of data, including text. Loading and processing text data efficiently is crucial for natural language processing tasks like sentiment analysis, text classification, and language translation. Understanding Text Data in TensorFlow Text data is unstructured and requires special handling before it can be used in machine learning models. TensorFlow provides the tf.data API with specialized classes like TextLineDataset to streamline text data loading and preprocessing operations. Installing TensorFlow Before working with text data, ensure TensorFlow is installed ? pip install ...

Read More

Load Testing Using LOCUST

Siva Sai
Siva Sai
Updated on 27-Mar-2026 2K+ Views

Load testing is essential for evaluating application performance under real-world conditions. Locust is a powerful, open-source Python tool that allows you to simulate thousands of concurrent users and define user behavior using Python code. This guide will walk you through load testing fundamentals with practical Locust examples. What is Locust? Locust is a distributed, scalable load testing framework that helps engineers understand how many concurrent users their system can handle. Its key advantage is using Python code to describe user behavior, making it extremely flexible and customizable for complex testing scenarios. Installing Locust Before installing Locust, ...

Read More
Showing 1171–1180 of 8,546 articles
« Prev 1 116 117 118 119 120 855 Next »
Advertisements