ValarMorghulis.IO
open-menu closeme
Home
Tech
View
About
x bluesky github rss
  • Python dependencies states managed via uv(illustrated)

    calendar Nov 10, 2025 · 1 min read · python uv  ·
    Share on: twitter facebook linkedin copy

    Several dependency management file types are available in the Python ecosystem—requirements.txt, uv.lock, pyproject.toml, etc. With uv, we can handle most of them. Here is a transition graph showing how to move from one state to another using uv commands. Note: "libs in env" refers to installed dependencies in a …


    Read More
  • Call MCP Server(stdio) directly in the shell

    calendar May 19, 2025 · 3 min read · MCP ai python  ·
    Share on: twitter facebook linkedin copy

    stdio is one of the transport mechanisms MCP(Model Context Protocol) natively supports. Actually stdio is the only transport mechanism Claude Desktop supports currently(as in May, 2025). This article will show you how to call a MCP server in the shell, without mcp dev or any third party tools, only with echo > or …


    Read More
  • Measuring the CPU and Memory Usage for Python subprocess

    calendar May 14, 2025 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    The article talks about a method for measuring the resources used by a process invoked by subprocess.run or subprocess.Popen. We can use psutil to get realtime usage data of a process. Using psutil may not provide accurate resource measurements for short-lived processes, as it samples usage at intervals and can miss …


    Read More
  • Python version of Rust Result Sum Type

    calendar Jan 19, 2025 · 1 min read · python sum type rust  ·
    Share on: twitter facebook linkedin copy

    I try to implement a Python version of the Result<T, E> sum type in rust which can be used with match/case pattern matching. The pattern matching with sub-patterns like case Err(e) could be implemented in Python with the match_args dunder attribute. This is how Result[T, E], OK() and Err() defined: 1import typing 2 …


    Read More
  • Run wasm built with wasm-pack with pythonmonkey

    calendar Jan 3, 2025 · 2 min read · python wasm rust  ·
    Share on: twitter facebook linkedin copy

    I have been trying to run wasm code built with wasm-pack with pythonmonkey, a Mozilla SpiderMonkey JavaScript engine embedded into the Python Runtime. Consider a lib.rs as follow: 1use wasm_bindgen::prelude::*; 2 3#[wasm_bindgen] 4pub fn add(a: i32, b: i32) -> i32 { 5 return a + b; 6} With wasm-pack, we can build the …


    Read More
  • Combine mesop with natural abilities of flask

    calendar Dec 23, 2024 · 2 min read · python flask mesop  ·
    Share on: twitter facebook linkedin copy

    mesop is popular with AI apps, since is can be used to build web apps with Python without frontend works. mesop is developed upon the popular frontend framework flask. How about combine the natural abilities of flask while developing with mesop? Let do a little research. Access flask request instance(including headers, …


    Read More
  • Create a partial model definition of a pydantic model

    calendar Dec 9, 2024 · 1 min read · python pydantic  ·
    Share on: twitter facebook linkedin copy

    Sometimes I want to create a partial model definition of a pydantic model. For example, if I want to expose a database model from API, some of the fields I would like to keep in secret, or I just want to expose very few fields in a summary API. I don't want to write model definition twice. I would like to write …


    Read More
  • Use python -m http.server in SSL

    calendar Sep 2, 2024 · 4 min read · python http ssl  ·
    Share on: twitter facebook linkedin copy

    python -m http.server is a very convenient command line tool to start an ad-hoc static web server. This tool is very useful when you want to develop small web applications or serve static files. But it does not support SSL. A lot of modern web applications as well as browser features require a secured connection. So I …


    Read More
  • The contextvars and the chain of asyncio tasks in Python

    calendar Aug 10, 2024 · 5 min read · python asyncio  ·
    Share on: twitter facebook linkedin copy

    In Python, the contextvars is somehow like thread local, but mostly for coroutines. But will the context itself be kept consistent in a chain of asyncio tasks? Let's find out. contextvars Let's have a rough review of the contextvars in Python. The contextvars module provides a way to maintain a context across a chain …


    Read More
  • Several tips for better working with Python in Excel

    calendar Oct 10, 2023 · 4 min read · python excel  ·
    Share on: twitter facebook linkedin copy

    After enrolled for Python in Excel preview, now I can type =py( in any Excel cell to write some Python code. Python in Excel doesn't have detailed documents, only Get Started tutorials, like link 1, link 2, or articles talking about topics like pandas, matplotlib, seaborn, etc., it may confuse you when you want to do …


    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

valarmorghulis.io

Programming / Thinking / Writing / Reading

Recent Posts

  • AI Glasses and the eye doctor
  • GEO is Not the Next Generation of SEO
  • Python dependencies states managed via uv(illustrated)
  • Deploy models on SGLang with CPU only
  • Run MiniCPM4 with CPU only
  • Call MCP Server(stdio) directly in the shell
  • Measuring the CPU and Memory Usage for Python subprocess
  • tac -- the ignored reverse of cat

Categories

SOFTWARE ENGINEERING 1 SOFTWARE INDUSTRY 1 TECHNIQUE 1

Tags

PYTHON 13 AI 5 DOCKER 2 RUST 2 ASYNCIO 1 AWS 1 BASH 1 BOT 1 CLIPBOARD 1 COMIC 1 EXCEL 1 FLASK 1 HTTP 1 LLM 1
All Tags
AI5 ASYNCIO1 AWS1 BASH1 BOT1 CLIPBOARD1 COMIC1 DOCKER2 EXCEL1 FLASK1 HTTP1 LLM1 MARAIDB1 MCP1 MESOP1 MONGODB1 MSYQL1 MYSQL1 NEXTJS1 PM21 POSTGRES1 POWERSHELL1 PYDANTIC1 PYTHON13 ROBOTS.TXT1 RUST2 SSL1 SUM TYPE1 UV1 WASM1 WSL1
[A~Z][0~9]
valarmorghulis.io

Copyright 2016-  VALARMORGHULIS.IO . All Rights Reserved

to-top
Advertisement