How to Create a Docker MCP Server in Python
Documenting what I’ve learned creating a Dockerized MCP Server in Python 👍 In this article I give the links and show the syntax to build the server inside a Docker image ready for you to provide to users of Claude, Cursor and all clients capable of using an MCP server. Create Model Context Protocol (MCP) […]
Understanding Token Usage in Conversation History with LLMs
Question: Where is this held? As tokens in the LLM? (Maintains a conversation history list with message roles and content) Answer: The conversation history is held in memory as a Python list variable, not as tokens in the LLM. In the code, you can see this implementation: This is a regular Python list that contains […]
Understanding Merkle Trees in Python: A Step-by-Step Guide
In cryptography and computer science, a hash tree or Merkle tree is a tree in which every “leaf” node is labelled with the cryptographic hash of a data block, and every node that is not a leaf (called a branch, inner node, or inode) is labelled with the cryptographic hash of the labels of its […]
Querying a database directly with natural language
No SQL, no hunting through Stack Overflow for the syntax you forgot—just type in what you want, and let the LLM handle your query. We’ll use LangChain to hook up to a MySQL database with ChatGPT doing the heavy lifting. Here’s the setup: I’ve got a MySQL database full of employee data—names, hire dates, that […]
Stellar Cheatsheet
For more info check : https://developers.stellar.org/docs/build/guides/cli/contract-lifecycle Calling (invoking) a contract : py-stellar-base is a Python library for communicating with a Stellar Horizon server and Soroban-RPC server. It is used for building Stellar apps on Python. It supports Python 3.8+ as well as PyPy 3.8+.It provides: a networking layer API for Horizon endpoints. a networking layer […]
FastEmbed & Qdrant for Image classification
Introduction FastEmbed is a lightweight and fast Python library designed for generating high-quality text embeddings. FastEmbed supports a variety of popular text models and is continuously expanding to include more. At its core, FastEmbed utilizes the Flag Embedding model from the MTEB leaderboard, offering distinct “query” and “passage” prefixes for input text. This feature makes […]
Comparing Rust and Python for Asynchronous and Multithreaded Operations – Qdrant vector database
Introduction In this guide, we will compare Rust and Python for asynchronous and multithreaded operations, particularly focusing on uploading data to a Qdrant vector search engine. We will evaluate how using Arc in Rust and AsyncQdrantClient in Python impacts performance. Imagine you get approached by a company to speed up their code and you improve […]
Compare pre-trained Sentence Transformer models
To begin with, when learning about ML/AI you may just use the model specified in the tutorial you’re doing, but later on you’ll want to research, test, and evaluate different models based on size, performance and write your code to suit. Let’s compare output using 2 different models that I used in a recent project […]