Llama3.2 local LLM query
1. gossipsub 2. mdns (Multicast DNS) 3. noise 4. swarm::{NetworkBehaviour, SwarmEvent} 5. tcp 6. yamux Summary Table Name Type Purpose gossipsub PubSub Message propagation in P2P networks. mdns Discovery Finds peers in local networks. noise Encryption Secure communication between peers. NetworkBehaviour, SwarmEvent Core API Defines P2P behavior and handles events. tcp Transport Reliable peer communication. […]
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) […]
Building Dynamic MCP Resources with Templates (Python)
Let’s extend our MCP server’s capabilities using resource templates – one of the most powerful features of the Model Context Protocol (MCP) ecosystem. What Are Resource Templates? Resource templates allow you to define dynamic resources using URI patterns. Unlike static resources with fixed URIs, templates let you create resources whose URIs and content can be […]
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 […]
MCP – Model Context Protocol
This article covers using the MCP Python SDK and using the Model Context Protocol Inspector It’s new, but it’s likely to be around a long time, due to it being a protocol – not a framework! What actually is MCP? How can I develop with it? https://github.com/modelcontextprotocol/python-sdk credit : https://github.com/modelcontextprotocol/python-sdk To run as a server […]
Code from code: Automating Bitcoin Price Fetching with OpenAI and Python
In this tutorial, we’ll demonstrate how to generate and execute a Python script dynamically using OpenAI’s API. The script will fetch the latest Bitcoin price from the Gemini API and display the result. This approach leverages AI to automate script creation, reducing manual effort and enhancing efficiency. Prerequisites To follow along, ensure you have: Step […]
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 […]
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 […]