k-Nearest Neighbors (k-NN) classifier – Supervised Learning

What is k-Nearest Neighbors (k-NN)? k-Nearest Neighbors (k-NN) is one of the simplest and most intuitive supervised learning algorithms. It’s used for classification (predicting categories) and regression (predicting continuous values). The idea: Store all training data. To predict a new point, look at its k closest neighbors (using distance, usually Euclidean). For classification: take a […]
Git Commands Quick Reference

1. Create From existing dataWhen starting a new project locally: From an existing repositoryWhen collaborating on an existing project: 2. Show 3. Revert Difference between git reset –hard and git revert HEAD: git reset –hard permanently discards changes (use with caution). git revert HEAD safely undoes a commit by adding a new one (preferred in […]
Managing Multiple GitHub Accounts on macOS: Configuring Git for Seamless Switching

To configure multiple GitHub accounts on macOS Terminal and ensure you’re using the correct account for each repository, you can set up SSH keys and configure your Git repositories. Here’s how to do it: 1. Create SSH keys for each GitHub account First, create separate SSH keys for each of your GitHub accounts: 2. Add […]
Locators in Selenium

Understanding the DOM The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects – essentially, it’s a tree-like structure of elements. When we use CSS or XPath selectors, we’re […]
Portfolio Projects

1. Stock Price Prediction with GenAI Insights Use generative AI to predict stock prices, integrating market sentiment and realtime economic indicators. Tools: OpenAI API, LangChain, LlamaIndex, Prophet, Darts, Hugging Face, PyTorch Lightning, Pandas, Plotly, yFinance Hints: Combine traditional financial indicators with generative models for nuanced sentiment analysis and predictive insights. Utilize backtesting and continuous validation […]
Automating File Uploads Using Selenium WebDriver

File uploads present a unique challenge in web automation because they often involve interacting with the operating system’s file explorer. We need to bridge the gap between the browser and the system’s file selection dialog. 🚀 1. Understanding File Uploads in Web Applications There are two main ways file uploads work in web applications: Type […]
Testing a Paginated REST API

Paginated APIs are a common architectural pattern for handling large datasets. They break down responses into smaller, manageable chunks, improving performance and user experience. However, testing these APIs requires a strategic approach to ensure – ✅ All pages return the correct data✅ The pagination logic works correctly (e.g., next, previous links)✅ The API adheres to performance […]
Handling Dynamic Elements in Web Automation Testing

Modern web applications heavily rely on JavaScript for dynamic content loading. Elements might not be immediately available when the page loads, causing automation tests to fail if they interact with elements before they appear. To handle this, waiting strategies are essential. In this blog, we will cover:✅ Why waiting for elements is necessary✅ Different types […]
Integrating Pytest into a CI/CD Pipeline

Automating tests using Pytest in a CI/CD pipeline ensures that every code change is validated before deployment. By integrating Pytest into CI/CD, you can:✅ Detect bugs early✅ Maintain software stability✅ Enforce quality control automatically In this guide, we’ll explore:1️⃣ Setting up Pytest in a CI/CD pipeline2️⃣ Running tests in GitHub Actions, GitLab CI/CD, and Jenkins3️⃣ […]
API Versioning Strategies: Ensuring Compatibility in Evolving APIs

APIs evolve over time as businesses introduce new features, optimize performance, or fix bugs. However, changes to an API can break existing clients, leading to service disruptions. API versioning allows API providers to introduce changes without breaking existing consumers by offering multiple versions of an API. In this blog, we’ll explore:✅ What API versioning is […]