Steps to start Flask project with python 3

Categories: Python

I will try to keep this post as short as possible because if you are a developer reading this article, it should not be too hard for you to figure out what I am doing. Preliminary steps: Install the below tools. python3virtualenvpip3 Create a virtual environment for your project. Virtual environment will ensure your project […]

DFS – Depth-First search algorithm

Categories: Algorithms

Depth–first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. Python Implementation

BFS – Breadth-first search algorithm

Categories: Algorithms

BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph by exploring all the neighbour nodes (nodes which are directly connected to source node). You must then move towards the next-level neighbour nodes. Basically traversing the tree or graph layer by layer. Pseudocode […]

Find all the prime factors of a number

Categories: Algorithms

The main algorithm in the above program is the is_prime method. We should be able to check if a number is prime or not in the fastest way possible.

Inversion of control and Dependency Injection

Categories: Design Principles, Java

Heard about this when I started my career as a software engineer. Never understood it, even when I did, it wouldn’t stick for long in my head until I used it extensively in the spring framework. Inversion of control is a Design principle which lets you achieve decoupling of modules/responsibilities while Dependency injection is a […]

The Scale Cube

Categories: Microservices

Any software we start building, we start at 0, where there are no splits. We have a single application. X-Axis scaling Horizontal Duplication and Cloning of services and data X-axis scaling consists of running multiple copies of an application behind a load balancer. If there are N copies then each copy handles 1/N of the […]

What is a Cost function?

Categories: Uncategorized

A function we minimize to make our prediction close to the target values. in linear regression, we want to find an equation of line which is a close approximation of our training dataset, we we use sum of squared errors as the cost function and attempt to minimize that.