Author: Vitosh

Python – A Beam Search in Graph

In our previous article, we explored the A* (A-Star) Algorithm. It is the gold standard for pathfinding as it is optimal – it always finds the shortest path. But in the real world (chess engines, LLM) it might be too

Tagged with: , , , , ,

Python – A Star Search in Graph

A* is probably my favourite graph search algorithm. Some 10+ years ago, I have implmented it with Excel and after that I have written a few more implementations. Just, not to repeat myself, I will not discuss it here. The reason

Tagged with: , , , , ,

Dijkstra’s Graph Algorithm with Python

In the previous articles, we have presented graphs with BFS and DFS. The BFS is actually good to find the path with the fewest nodes. But if the path with the fewest nodes is actually the most expensive, then we

Tagged with: , , , ,

Breadth-First Search (BFS) algorithm with Python

BFS, DFS, A-Star – these sound like magic spells from a Harry Potter book! And actually, these are magical (especially the A-Star) as far as they are well-defined algorithms, that explore a graph. In our previous article, we have explored

Depth-First Search (DFS) algorithm with Python

Yesterday (blogging every day now!) I have presented a visualization with Python, in which a simple and basic graph was displayed. Today, I have showed how to traverse it with DFS (Depth-First Search) with quite basic skills. Just for the

Tagged with: , , ,

Drawing a Graph with Python

Long time ago (somewhere in 2015) I have written an article about Dijkstra and the shortest path. In that article, I draw a graph on a notebook, just to illustrate what I was trying to traverse: Today, I was thinking

Tagged with: , , , ,

Python – The Minimax Algorithm: Achieving Perfect Strategy

The Minimax algorithm is a fundamental decision-making rule used in Artificial Intelligence (AI) for two-player, zero-sum games, such as Chess, Checkers, and, in our case, Tic-Tac-Toe. It works by exploring every possible future state of the game to find the

Tagged with: , ,

Haskell – Solving Simple Diophantine Equation with Functional Programming

Haskell is a statically typed, purely functional programming language known for its concise syntax and mathematical precision. It utilizes lazy evaluation, meaning it only calculates values when they are strictly needed, allowing for the creation of infinite data structures. This

Tagged with: , ,

Python – Sliding Tile Puzzle – DFS + IDA*

Sliding tile puzzle is something that is actually easy, if you are a fan of the Rubic Cube. And if you want to solve it with IDA* (iterative Deepening A*) and with Manhattan heuristic, this is the correct place. The

Tagged with: , , , , ,

Frog Leap Puzzle with Depth-First Search (DFS)

TL;DR: We solve the classic “frog leap” puzzle with Depth-First Search (DFS) by generating next boards around teh blank and trying jumps before steps. This trick finds the minimal soluton in exactly N^2+2N moves. The classic frog puzzle looks like

Tagged with: , , , , ,

XGBoost for beginners – from CSV to Trustworthy Model

This is what we do with in the YouTube video below: take a tiny CSV and explore it with plain words we train a strong model, using the XGBoost python library (eXtreme Gradient Boosting) pick a practical decision treshold and

Tagged with: , , ,

Correlation – explained with Python

When you plot two variables, you see data dots scattered across the plane. Their overall tilt and shape tell you how the variables move together. Correlation turns that visual impression into a single number you can report and compare. What

Tagged with: , , ,

Python – Learn Pandas with SQL Examples – Football Analytics Example

When working with data, you will often move between SQL databases and Pandas DataFrames. SQL is excellent for storing and retrieving data, while Pandas is ideal for analysis inside Python. In this article, we show how both can be used

Tagged with: , , , , ,

Docker Basics in Excel with VBA | Full CRUD Demo

After building a minimal FastAPI + SQLite CRUD application in Docker, I wanted to show how Excel can connect directly to it. With a few lines of VBA, we can turn Excel into a client that talks to the API.

Tagged with: , , , , ,

Docker + Python CRUD API + Excel VBA – All for beginners

If you are just starting with Docker and want a practical project, here is a fun one: let’s build a tiny CRUD app in Python, run it inside a Docker container, and then connect to it from Excel with VBA.

Tagged with: , , , , ,

Exploring SOAP Web Services – From Browser Console to Python

SOAP (Simple Object Access Protocol) might sound intimidating (or funny) but it is actually a straightforward way for systems to exchange structured messages using XML. In this article, I am introducing SOAP through YouTube video, where it is explored through

Tagged with: , , , , ,

Shortest route between points in a city – with Python and OpenStreetMap

After the article for introduction to Graphs in Python, I have decided to put the graph theory into practice and start looking for the shortest points between points in a city. Parts of the code are inspired from the book

Tagged with: , , , , ,

Introduction to Graphs in Python

Lately, I am reading the book Optimization Algorithms by Alaa Khamis and the chapter 3 – Blind Search Algorithms, has caught my attention. The chapter starts with explaining what graphs are how these are displayed in python and I have

Tagged with: , , , , , ,

Python – Solving 7 Queen Problem with Tabu Search

The n-queens problem is a classic puzzle that involves placing n chess queens on an n × n chessboard in such a way that no two queens threaten each other. In other words, no two queens should share the same

Tagged with: , , , ,

VBA – A* Search Algorithm with Excel

Ok, so some 10 years ago, I was having fun coding A* Search Algorithms in Excel in VitoshAcademy and this is what I had built back then: VBA – A* search algorithm with Excel – Really? VBA – A Search

Tagged with: , , , , ,

Python – Monte Carlo Simulation

Python can be used for various tasks. One of these is Monte Carlo simulation for future stock analysis. In the video below this is exactly what is happening. 🙂 Instead of explaining the video and its code (available also in

Tagged with: , , , ,

Python – Simple Stock Analysis with yfinance

Sometimes, the graphs of stocks are useful. Sometimes these are not. In general, do your own research, none of this is financial advice. And while doing that, if you want to analyze stocks with just a few lines of python,

Tagged with: , , , , , , , ,

Python – Reading Financial Data From Internet

Reading financial data from the internet is sometimes challenging. In this short article with two python snippets, I will show how to read it from Wikipedia and from and from API, delivering in JSON format: Reading the data from the

Tagged with: , , ,

Python – Data Wrangling with Excel and Pandas

Data wrangling with Excel and Pandas is actually quite useful tool in the belt of any Excel professional, financial professional, data analyst or a developer. Really, everyonecan benefit from the well defined libraries that ease people’s lifes. These are the

Tagged with: , , , , , , , , , ,

Automate Stock Analysis with Python and Yfinance: Generate Excel Reports

In this article, we will explore how to analyze stocks using Python and Excel. We will fetch historical data for three popular stocks—Realty Income (O), McDonald’s (MCD), and Johnson & Johnson (JNJ) — calculate returns, factor in dividends, and visualize

Tagged with: , , , , , ,

VBA – Automated Pivot Filtering

Pivot tables are one of the most powerful tools in Excel for summarizing and analyzing data. No doubt about it. However, sometimes you need to go beyond their built-in functionality. In this article, we will explore how to use VBA to

Tagged with: , , , , ,

Sine and Cosine – A friendly guide to the unit circle

Welcome to the world of sine and cosine! These two functions are the backbone of trigonometry, and they’re much simpler than they seem. In this article, we will explore the unit circle, the home of sine and cosine, and learn

Tagged with: , , ,

Trigonometric Functions – Sine

The sine function is one of the most fundamental concepts in mathematics, connecting geometry, trigonometry, and real-world applications. In its simplest form, sine is defined in a right triangle as the ratio of the length of the side opposite an

Tagged with: , , , ,

Rules of 114 and 144

The Rule of 114 is a quick way to estimate how long it will take to triple your money with compound interest.  The idea is simple: divide 114 by the annual interest rate (in %), and you will get an

Rule of 72

Ever heard of the Rule of 72? It’s a classic finance shortcut that tells you how many years it takes for an investment to double at a given interest rate—without reaching for a calculator! Pretty much, if you want to

Tagged with: , ,
Top