Tag

#python

388 posts

Coding Interview Patterns — Crack the Coding Round

Coding Interview Patterns — Crack the Coding Round

There are thousands of coding-interview questions but only about eighteen…

Futures & Commodities Trading for Programmers

Futures & Commodities Trading for Programmers

This is the third course in the trading-for-programmers set, alongside Options…

Crypto Options & Algo Trading for Programmers

Crypto Options & Algo Trading for Programmers

If you have done the Options Trading for Programmers course, this is its wild…

Options Trading for Programmers — A Fundamentals Course

Options Trading for Programmers — A Fundamentals Course

Most options content online is either hand-wavy “buy this call and get rich…

Building an AI FAANG Interview Coach: Run the Code, Don't Let the LLM Grade It

Building an AI FAANG Interview Coach: Run the Code, Don't Let the LLM Grade It

Ask ChatGPT to “review this solution and tell me if I’d pass the interview” and…

Building an AI Astrology (Kundali) Chatbot: Let the LLM Talk, Let the Ephemeris Do the Math

Building an AI Astrology (Kundali) Chatbot: Let the LLM Talk, Let the Ephemeris Do the Math

Ask ChatGPT “where was Saturn when I was born, 2:30 pm on 15 August 1990 in New…

Execution Algorithms: VWAP & TWAP in Python

Execution Algorithms: VWAP & TWAP in Python

Every strategy so far produced signals — when to be long, short, or flat. But a…

Position Sizing & the Kelly Criterion in Python

Position Sizing & the Kelly Criterion in Python

Every strategy article so far asked ”what should I trade?” This one asks the…

Order-Book Imbalance: A Microstructure Signal (in Python)

Order-Book Imbalance: A Microstructure Signal (in Python)

The strategies so far used daily or minute bars. This last one goes down to the…

The Moving-Average Crossover, Backtested Honestly in Python

The Moving-Average Crossover, Backtested Honestly in Python

If algo trading has a “hello world,” it’s the moving-average crossover. Every…

Momentum & Trend Following in Python

Momentum & Trend Following in Python

Momentum is, along with value, one of the most robust and widely-documented…

Mean Reversion & Pairs Trading in Python

Mean Reversion & Pairs Trading in Python

The moving-average crossover bet on direction and lost. Here’s a strategy with a…

Market Making Basics: Spread Capture vs Inventory Risk (in Python)

Market Making Basics: Spread Capture vs Inventory Risk (in Python)

So far you’ve been a taker — crossing the spread to get filled. A market maker…

Market Data: Types & Where to Download It (Free and Paid)

Market Data: Types & Where to Download It (Free and Paid)

Data is the raw material of every strategy, and getting the right data is the…

Low-Latency Trading Systems & Algo Trading — From the Order Book to a Live Retail Algo

Low-Latency Trading Systems & Algo Trading — From the Order Book to a Live Retail Algo

Almost everything written about high-frequency trading is either breathless…

AI Agent Development — From First Loop to Production

AI Agent Development — From First Loop to Production

Every second LinkedIn post today is about AI agents. Most of them show a demo…

Learn Python — A Crash Course for Programmers

Learn Python — A Crash Course for Programmers

You already know how to program. You know loops, conditionals, functions, and…

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Every office lobby has the same problem: a visitor walks in, nobody’s at the…

Jenkins Pipeline with Jenkinsfile - How To Schedule Job on Cron and Not on Code Commit

Jenkins Pipeline with Jenkinsfile - How To Schedule Job on Cron and Not on Code Commit

Introduction In this post we will see following: How to schedule a job on cron…

How to Fetch Multiple Credentials and Expose them in Environment using Jenkinsfile pipeline

How to Fetch Multiple Credentials and Expose them in Environment using Jenkinsfile pipeline

Introduction In this post, we will see how to fetch multiple credentials and…

Jenkins Pipeline - How to run Automation on Different Environment (Dev/Stage/Prod), with Credentials

Jenkins Pipeline - How to run Automation on Different Environment (Dev/Stage/Prod), with Credentials

Introduction I have an automation script, that I want to run on different…

Jenkinsfile - How to Create UI Form Text fields, Drop-down and Run for Different Conditions

Jenkinsfile - How to Create UI Form Text fields, Drop-down and Run for Different Conditions

Introduction I had to write a CICD system for one of our project. I had to…

How to Git Clone Another Repository from Jenkin Pipeline in Jenkinsfile

How to Git Clone Another Repository from Jenkin Pipeline in Jenkinsfile

Introduction There are some cases, where I need another git repository while…

Python SMTP Email Code - How to Send HTML Email from Python Code with Authentication at SMTP Server

Python SMTP Email Code - How to Send HTML Email from Python Code with Authentication at SMTP Server

Introduction This post has the complete code to send email through smtp server…

Python SMTP Email Code - Sender Address Rejected - Not Owned By User

Python SMTP Email Code - Sender Address Rejected - Not Owned By User

Introduction In a normal email sending code from python, I’m getting following…

Nodejs with MongoDB - Number of Opened Connections Keep on Increasing with Mongoose Library

Nodejs with MongoDB - Number of Opened Connections Keep on Increasing with Mongoose Library

Introduction In one of my app, I was using to talk to . I have used some event…

Django Python - How to Build Docker Image and Run Web-service on Apache with Python 3.9

Django Python - How to Build Docker Image and Run Web-service on Apache with Python 3.9

Introduction So you have a Django project, and want to run it using docker image…

Python Build Quality Gates with Pylint and Unittest Coverage Thresholds

Python Build Quality Gates with Pylint and Unittest Coverage Thresholds

Introduction It is very important to introduce few process so that your code and…

A Jenkins Groovy Pipeline for Building Python Projects and Pushing to Artifactory

A Jenkins Groovy Pipeline for Building Python Projects and Pushing to Artifactory

Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…

Python - How to Implement Timed-Function which gets Timeout After Specified Max Timeout Value

Python - How to Implement Timed-Function which gets Timeout After Specified Max Timeout Value

Introduction We often require to execute in timed manner, i.e. to specify a max…

How to Solve Circular Import Error in Python

How to Solve Circular Import Error in Python

Introduction To give some context, I have two python files. (Both in same folder…

Python Code - How To Read CSV with Headers into an Array of Dictionary

Python Code - How To Read CSV with Headers into an Array of Dictionary

Introduction Lets assume we have a csv something similar to following: Python…

Python Code - How To Read CSV into an Array of Arrays

Python Code - How To Read CSV into an Array of Arrays

Introduction In last post, we saw How to read CSV with Headers into Dictionary…

Install Private Artifactory Modules Securely in a Python Docker Build

Install Private Artifactory Modules Securely in a Python Docker Build

Introduction I was having a private artifactory, and has my custom modules…

Dockerfile for building Python 3.9.2 and Openssl for FIPS

Dockerfile for building Python 3.9.2 and Openssl for FIPS

Introduction In previous posts, we saw how to build FIPS enabled Openssl, and…

Python - Some useful Pytest Commands

Python - Some useful Pytest Commands

Introduction In this post, we will explore some useful command line options for…

Python - How to apply patch to Python and Install Python via Pyenv

Python - How to apply patch to Python and Install Python via Pyenv

Introduction In this post, we will see how we can apply a patch to Python and…

How to Install Python from command line and Docker on Windows

How to Install Python from command line and Docker on Windows

Introduction We will see how we can install Python 3.7 on Windows without UI. i…

How to Install Python from command line and Docker on Linux

How to Install Python from command line and Docker on Linux

Introduction We will see how we can install Python from command line using pyenv…

How to Patch and Build Python 3.9.x for FIPS enabled Openssl

How to Patch and Build Python 3.9.x for FIPS enabled Openssl

Introduction In this post, we will see Python 3.9.x patch for FIPS enabled…

How to Patch and Build Python 3.7.9 for FIPS enabled Openssl

How to Patch and Build Python 3.7.9 for FIPS enabled Openssl

Introduction In this post, we will see Python 3.7.9 patch for FIPS enabled…

How to build FIPS enabled Openssl in docker

How to build FIPS enabled Openssl in docker

Introduction In this post, we will see how we can build FIPS enabled openssl in…

Python - How to read files in multiple ways

Python - How to read files in multiple ways

Read file all in one shot Above code read whole file at once, but if the files…

List and Download Azure Storage Blobs in Python Without the Azure SDK

List and Download Azure Storage Blobs in Python Without the Azure SDK

Introduction In this tutorial we will see, How to list and download storage…

List and Download Azure Storage Blobs in Python with the Official Azure SDK

List and Download Azure Storage Blobs in Python with the Official Azure SDK

Introduction In this tutorial we will see: How to instantiate different classes…

Implement a command line shell by using Command Dispatcher in Python

Implement a command line shell by using Command Dispatcher in Python

Lets implement a command shell by using a command dispatcher. The objective is…

Multithreading in Python, Lets clear the confusion between Multithreading and Multiprocessing

Multithreading in Python, Lets clear the confusion between Multithreading and Multiprocessing

So, you want to run your code in parallel so that your can process faster, or…

Implementation of Timeit function, Get performance numbers for a function

Implementation of Timeit function, Get performance numbers for a function

This is regarding the timeit implementation in python. The basic requirement…

Python 3 - Magical Methods and Tricks with extremely useful methods

Python 3 - Magical Methods and Tricks with extremely useful methods

This post will show some really awesome tricks in python. Get the power of a…

Python 3 - Fun with Python String

Python 3 - Fun with Python String

This post some useful tips of using strings, and some issues while dealing with…

Python 3 - Format String fun

Python 3 - Format String fun

This post is dedicated for cases where we intend to append a variable value in a…

Understanding and Solving pylint errors for Python 3

Understanding and Solving pylint errors for Python 3

Pylint is an excellent tool to have good quality code. This post is not about…

Python: How to generate string of arbitrary length of any alphabet characters

Python: How to generate string of arbitrary length of any alphabet characters

I was testing a bug where a field was limited to 255 characters only. I needed…

Python - Dont Use Static or Class variables with Self

Python - Dont Use Static or Class variables with Self

While doing code review of one of junior, I encountered following code: What…