yield conn is used in Python’s context manager pattern with the @contextmanager decorator. It’s a special way to manage resources (like database connections) automatically. How it works in your code: In database.py: In main.py: Execution Flow: Why use yield? ✅ Benefits: Feature With yield Without yield Auto-close connection ✅ Yes ❌ Manual Exception safety ✅ […]
Django Overview What is Django? Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. It follows the MTV (Model-Template-View) pattern (similar to MVC). Key Features: Philosophy: “The web framework for perfectionists with deadlines” Django vs Flask Feature Django Flask Type Full-stack framework Micro-framework Philosophy “Batteries included” Minimalist, flexible […]
Create virtual environment Start API app
Object-Oriented Programming is a programming paradigm that organizes code into objects, which combine data (attributes) and behavior (methods). Python supports four main OOP principles: 1. Encapsulation Bundling data and methods that operate on that data within a single unit (class), and restricting direct access to some components. 2. Inheritance Creating new classes based on existing […]
There is no excerpt because this is a protected post.
Amazon ECS vs EKS Both are container orchestration services on AWS, but they use different technologies. Amazon ECS (Elastic Container Service) What is it? Key Features: Best For: Amazon EKS (Elastic Kubernetes Service) What is it? Key Features: Best For: Quick Comparison: Feature ECS EKS Technology AWS proprietary Open-source Kubernetes Complexity Simpler More complex Portability […]
In looker, to change the column name, change it in the dashboard, instead of the query side. For Synapse data, always add “set nocount on; ” in initiate query.
YAML (YAML Ain’t Markup Language) is a human-friendly data serialization standard, commonly used for configuration files and data exchange between languages with different data structures. Here’s a breakdown of its file structure: 1. Basic Structure A YAML file is composed of key-value pairs, lists, and nesting (indentation is critical): 2. Indentation Nesting is indicated by […]
Prompt used in copilot. “I need to quickly understand this entire codebase as if I were the original developer. Please help me with the following: Please provide a learning roadmap prioritizing what I should understand first to become productive quickly.
Basic Git Commands Setup & Configuration Creating & Cloning Repositories Basic Workflow Branching & Merging Remote Repositories Viewing History Undoing Changes Stashing Other Useful Commands These commands cover the vast majority of day-to-day Git operations!