
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
Found 10476 Articles for Python

2K+ Views
Tuples are immutable data types in Python that can hold heterogeneous data types. List, on the other hand, are multiple data types that can hold heterogeneous data. In this article, we will explore various methods to retrieve the first element from a list of tuples using function−based components. We will explore several methods like loops, list comprehension, zip method, etc. Using Loop Method Loops are common statements in almost any Programming language. We can use the loop statement along with the indexing property of the iterable objects of Python to access the first elements of the iterable objects. ... Read More

2K+ Views
Python, an incredibly flexible programming language, has a variety of libraries that can handle diverse tasks. Tkinter emerges as Python's default package when it comes to creating a graphical user interface (GUI). Similar to this, the Python Imaging Library (PIL) is frequently used for image processing. In order to properly explain how to load images in Tkinter using PIL, this guide combines the two and includes real-world examples. Introduction to Tkinter and PIL Let's quickly explain Tkinter and PIL before moving on to the main subject. The default GUI toolkit for Python is called Tkinter. It is easy to use ... Read More

245 Views
Python is known for its strong libraries that can handle nearly any task, and image processing is no different. For this purpose, a popular choice is Mahotas, a computer vision and image processing library. This article explores how to load images using Python's Mahotas, providing you with practical examples. Introduction to Mahotas Mahotas is a sophisticated library that contains numerous methods for image processing and computer vision. With a strong focus on speed and productivity, Mahotas enables you use over 100 features, including color space conversions, filtering, morphology, feature extraction, and more. This guide focuses on one of the most ... Read More

1K+ Views
With the rising significance of data analysis in various domains, Python has become the go-to language due to its vast array of libraries designed to deal with data. One such library is Pandas, a powerful tool that provides flexible data structures for data manipulation and analysis. This article provides an in-depth guide to loading an Excel spreadsheet as a Pandas DataFrame, complete with examples. Introduction to Pandas Pandas is a Python package that stands out for its ability to work efficiently with data. It provides two classes – the DataFrame and the Series – which are incredibly flexible and can ... Read More

517 Views
Every machine learning project depends on data, and PyTorch, the well-known open-source machine learning toolkit created by Facebook, is no exception. This manual seeks to streamline the data loading procedure into PyTorch and get you up and running as soon as possible. The DataLoader, Dataset, and Transform classes of PyTorch will be the main topics of this article. To help you understand these core PyTorch ideas and streamline your machine learning applications, we'll go over some real-world examples. PyTorch Data Loading: A Brief Overview For importing and preparing data, PyTorch offers a powerful and adaptable toolbox. The three key elements ... Read More

2K+ Views
Directories are special kind of nodes in the computer system that contains other nested folders, files, etc. To list down the directories, we need special libraries or modules of Python like os module, glob module, etc. They also provide us the methods to access the size of the directory. The size of the directory is the space occupied by the directory in the computer ROM. In this article, we will explore how to get the list of files in a directory along with the size. Using OS Module The Python os module is a powerful tool that allows developers to ... Read More

633 Views
Directory contains special nodes in computer paths that hold information about other nested paths but do not contain any information. Since they contain files and other directories, they have some size. Sorting by size means ordering the directories in terms of the space occupied by the directories in the disks. In this article, we will explore several methods, like using the os module, glob module, etc. sorted, lambda functions, etc., to perform the same. Using the OS and Operator Modules The os module Python provides a way to interact with the operating System. It offers various functions for operating ... Read More

329 Views
A well-known open-source framework called TensorFlow, created by Google, has established itself as a crucial resource in the field of deep learning and machine learning. It has strong and incredibly diverse data processing abilities, especially when working with text data. This article provides a thorough explanation of how to import text data into TensorFlow along with useful examples. Introduction to TensorFlow Data flow graphs are used to calculate numbers using the potent library TensorFlow. High-dimensional arrays (tensors) can be operated on using these graphs in order to conduct intricate mathematical operations. TensorFlow has been essential in improving artificial intelligence (AI) ... Read More

2K+ Views
Any application's performance must be evaluated and improved through load testing. We utilise it to assess whether our application can survive the demands of actual use. Locust is a potent tool in every developer's toolbox for efficient load testing. With this free, open-source Python programme, you can simulate millions of concurrent users and describe user behaviour using Python code. This article will serve as your comprehensive, example-filled guide to load testing using Locust. What is Locust? A distributed, scalable, and user-friendly load testing tool is called locust. Simulating traffic patterns aids engineers in understanding how many concurrent users a system ... Read More

796 Views
Dealing with time is one of the most important aspects of any day−to−day activity. In this article, we will discuss how to get month from year and weekday using Python. We will utilize Python's two most popular libraries, namely calendar, and datetime, to deal with the months, year, s, etc. Both libraries provide several in−built methods to deal with time. We do not need to exclusively care for challenging tasks like leap year if we deal with such libraries. Using The Calendar Library The calendar library in Python provides useful functions and classes working with the calendar and the ... Read More