Notes and tutorials about programming, web development, and AI.
Aug 31, 2025
NumPy broadcasting is a feature that allows you to perform operations between arrays of different shapes, it automatically "stretches" or "repeats" the smaller array to match the larger one's shape so the operation can work.
5 min read
Jun 20, 2025
Learn how to secure your FastAPI endpoints by implementing JWT-based authentication with user login and token validation.
10 min read
Jun 7, 2025
We can think of dependencies as helpers for our routes without cluttering up the main logic. Need to check if a user is logged in? Grab a database connection? Instead of cramming all of that into your route function, you offload it to a dependency—a separate function (or class) that handles one specific job.
5 min read
Aug 7, 2024
Question: I want to schedule a task to run once a day at 01:05 pm UTC in my FastAPI application. How can I achieve this?
3 min read
May 23, 2024
When building a FastAPI application, managing database schema changes can be a daunting task. As your application evolves, your database schema must adapt to accommodate new features, bug fixes, and changing requirements.
5 min read
May 9, 2024
A while ago I wrote a tutorial about how to use Celery with FastAPI to run asynchronous tasks. In this post, I will explain how to dockerize the application and simplify the deployment with Docker Compose.
5 min read
Feb 2, 2024
I recently received an email notifying me about the requirement for KYC verification on Trust Wallet. This is a textbook example of phishing email in the crypto industry.
3 min read
Jan 28, 2024
I have been working on my Podcast Player & Summarizer project and I need to build the component for summarizing a podcast. The main application is built with Next.js but I need the summarizer code to be in Python so I can integrate it to my Audio Transcriber API.
5 min read
Jan 28, 2024
When you have a long running Python function that you want to expose via an API endpoint, you might want to run the function asynchronously to avoid timeouts. Running a function asynchronously means it won't block the rest of your code.
5 min read
Jan 27, 2024
A while ago I was tasked with writing a function to determine whether a string is a palindrome or not in a coding test. A palindrome is a word, phrase, number, or sequence of characters that reads the same forward and backward
3 min read
Aug 21, 2023
Playfair cipher is a type of polygraphic cipher that uses 5x5 grid of letters to encrypt and decrypt messages. It was invented by Sir Charles Wheatstone but it is named after Lord Playfair who promoted its use.
6 min read
Aug 15, 2023
A permutation cipher is a type of encryption that rearranges the letters of a plaintext message according to a predetermined pattern. This pattern is called the "key". Unlike substitution ciphers, which replace characters with other characters, permutation ciphers maintain the original characters but change their order.
4 min read