Category: Uncategorized
-
Docker EP 11 – Docker Networking & Docker Volumes
Alex is tasked with creating a new microservices-based web application for a growing e-commerce platform. The application needs to handle everything from user authentication to inventory management, and you decide to use Docker to containerize the different services. Here are the services code with their dockerfile, Auth Service (auth-service) This service handles user authentication, Dockerfile:…
-
Docker EP – 10: Let’s Dockerize a Flask Application
Let’s develop a simple flask application, 2. Create a virtual environment (optional but recommended): 3. Install Flask 4. Create a simple Flask app: In the flask-docker-app directory, create a file named app.py with the following content, 5. Test the Flask app: Run the Flask application to ensure it’s working. Visit http://127.0.0.1:5000/ in your browser. You…
-
Selection Sort
The selection sort algorithm sorts an array by iteratively finding the minimum (for ascending order) / maximum (for descending order) element from the unsorted part and putting it at the beginning of the array. The algorithm will be considering two subarrays in a given array. In every iteration of selection sort, the minimum element (considering…
-
Binary Insertion Sort
Introduction Binary insertion sort is a sorting algorithm similar to insertion sort, but instead of using linear search to find the position where the element should be inserted, we use binary search. Thus, we reduce the number of comparisons for inserting one element from O(N) (Time complexity in Insertion Sort) to O(log N). Best of…
-
Maya : 5mb Storage on browser
Maya, a developer working on a new website, was frustrated with slow load times caused by using cookies to store user data. One night, she discovered the Web Storage API, specifically Local Storage, which allowed her to store data directly in the browser without needing constant communication with the server. She starts to explore, The…