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 Atharva Shah
Page 2 of 6
Flipkart Product Price Tracker using Python
Flipkart, one of India's biggest online retailers, offers a variety of products at competitive costs. However, manually monitoring pricing can be challenging due to Flipkart's rapid price fluctuations. This tutorial will teach you how to build a Python Flipkart product price tracker to monitor price changes automatically. Required Libraries To build a Flipkart product price tracker using Python, we need to install the following modules − requests − to fetch the webpage of the product BeautifulSoup − to parse the HTML content and extract product information re − to extract numerical values from price strings time ...
Read MoreFlight-price checker using Python and Selenium
Web scraping has been a useful technique for extracting data from websites for various purposes, including price checking for airline tickets. In this article, we will explore how to build a flight price checker using Selenium, a popular web automation tool. By leveraging Selenium's capabilities, we can automate the process of collecting and comparing prices for flights across different airlines, saving time and effort for users. Prerequisites and Setup Before we start building our flight price checker, we need to set up the required tools and dependencies. Installing Required Packages We'll use the modern approach with ...
Read MoreFlattening JSON objects in Python
JSON (JavaScript Object Notation) is a lightweight data interchange format extensively used in web applications for transmitting data between servers and clients. JSON data often comes in nested formats, which can be difficult to manipulate and analyze. Flattening JSON objects involves converting complex hierarchical JSON structures into simpler, flat key-value pairs. What is JSON Flattening? JSON flattening transforms nested objects into a single-level dictionary where nested keys are combined using a separator (commonly underscore). This process is essential when working with databases, data analysis, or when you need to convert complex JSON into tabular formats. Method 1: ...
Read MoreFlask project – Create a Joke App with PyJokes
Flask is an excellent choice for Python developers who want to build web applications. It is a lightweight web framework that is easy to use and understand. Using PyJokes, a Python package that provides a collection of programming jokes, we'll show you how to create an amusing and interactive joke app with Flask. Installation To get started with our Flask joke application, we need to install Flask and the pyjokes library ? pip install pyjokes flask Flask Basics A Flask application typically consists of routes, which are URLs that map to Python functions. ...
Read MoreFlask NEWS Application Using Newsapi
Python developers can create web applications using the lightweight Flask web framework. This article demonstrates building a news application using the News API, which gathers headlines and articles from various news sources. Installation and Setup First, install the required packages using pip ? pip install newsapi-python flask You'll also need to obtain a free API key from newsapi.org by creating an account. Basic Flask Syntax A Flask application consists of routes that map URLs to Python functions ? from flask import Flask app = Flask(__name__) @app.route('/') def home(): ...
Read MoreFinding the Quantile and Decile Ranks of a Pandas DataFrame column
Quantile and decile ranks are statistical measures that determine the position of an observation relative to other values in a dataset. Quantile ranks show the percentage of values below each observation, while decile ranks divide data into 10 equal groups. In this tutorial, we will explore how to calculate both using Pandas DataFrame columns. Understanding Quantile and Decile Ranks A quantile rank represents the proportion of values in the dataset that are less than or equal to a given value. For example, if a value has a quantile rank of 0.7, it means 70% of the data falls ...
Read MoreFinding the outlier points from Matplotlib
Outliers are data points that differ significantly from other observations in a dataset. Identifying and handling outliers is crucial in data analysis as they can skew statistical results. This article demonstrates how to detect outlier points using Matplotlib's visualization capabilities in Python. Installation and Setup Matplotlib is a popular Python library for creating static, animated, and interactive visualizations. Install it using pip ? pip install matplotlib Understanding Boxplots for Outlier Detection The most common method for visualizing outliers is using boxplots. Matplotlib's boxplot() function creates box-and-whisker plots that clearly show outliers as points ...
Read MoreFinding the largest file in a directory using Python
Finding the largest file in a directory is a common task for disk space management, analyzing file distributions, or automating cleanup operations. Python's os module provides several approaches to accomplish this efficiently. Algorithm Import the os module Define a function called find_largest_file that takes a directory as input Initialize variables largest_file to None and largest_size to 0 Use os.walk() to traverse the directory tree recursively For each file, get the file size using os.path.getsize() Compare file size to current largest and update if necessary Return the path of the largest file Method 1: Using a ...
Read MoreFinding Duplicate Files with Python
Duplicate files consume unnecessary storage space on our computers. Finding and removing them manually can be time-consuming, but we can automate this process with Python using file hashing techniques. Required Modules We'll use Python's built-in os and hashlib modules, so no additional packages need to be installed ? import os import hashlib How It Works The algorithm works by: Creating a hashfile() function that generates a unique SHA-1 hash for each file Storing hash values in a dictionary as we scan through files When the same hash appears twice, we've found ...
Read MoreFinding Difference between Images using PIL
In image processing, finding the difference between two images is a crucial step in various applications. It is essential to understand the difference between the two images, which can help us in detecting changes, identifying objects, and other related applications. In this tutorial, we will explore how to find the difference between two images using the Python Imaging Library (PIL). Installation To use PIL, we need to install it using the pip package manager − pip install pillow Basic Syntax To find the difference between two images using PIL, we can use the ...
Read More