ValarMorghulis.IO
open-menu closeme
Home
Tech
View
About
x bluesky github rss
  • 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
  • psql vs. mysql shell command cheatsheet

    calendar Dec 5, 2024 · 1 min read · msyql postgres  ·
    Share on: twitter facebook linkedin copy

    MySQL Postgres list databases SHOW DATABASES \l change to a database USE <db_name> \c <db_name> list tables SHOW TABLES \dt describe a table DESC <table_name> \d <table_name> show the create table sql SHOW CREATE TABLE <table_name> pg_dump -st <table_name> <db_name> explain a query EXPLAIN <sql_statement> EXPLAIN …


    Read More
  • Deploy next.js using pm2 cluster mode(and with docker)

    calendar Sep 3, 2024 · 2 min read · nextjs pm2 docker  ·
    Share on: twitter facebook linkedin copy

    We can simply start the Next.js application using next start. However, when facing higher traffic demands in practical use, how can we deploy Next.js using a multi-process approach? We can achieve this using the cluster mode of pm2. The cluster mode is a powerful way of scaling Node.js applications, allowing you to …


    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
  • Unix pipe to clipboard with WSL, and in UTF-8

    calendar Apr 17, 2024 · 2 min read · powershell wsl clipboard  ·
    Share on: twitter facebook linkedin copy

    WSL is good, it will be even better if we can pipe stdout directly into Windows host’s clipboard. Just like 1 ./myscript.sh | to-my-clipboard.sh Note that xclip requires X, so it is not an option. From WSL, we have direct access to Windows executables. The easiest method would be using clip.exe: 1 ./myscript.sh | …


    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
  • Analyze robots.txt with Python Standard Library

    calendar Sep 24, 2023 · 4 min read · python robots.txt bot  ·
    Share on: twitter facebook linkedin copy

    If haven't searched both "python" and "robots.txt" in the same input box, I would not ever know that Python Standard Library could parse robots.txt with urllib.robotparser. But the official document of urllib.robotparser doesn't go into detail. With the document, you could check whether a url can be fetch with a robot …


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

valarmorghulis.io

Programming / Thinking / Writing / Reading

Recent Posts

  • OpenClaw matrix plugin setup in docker
  • 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

Categories

SOFTWARE ENGINEERING 1 SOFTWARE INDUSTRY 1 TECHNIQUE 1

Tags

PYTHON 13 AI 6 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
AI6 ASYNCIO1 AWS1 BASH1 BOT1 CLIPBOARD1 COMIC1 DOCKER2 EXCEL1 FLASK1 HTTP1 LLM1 MARAIDB1 MCP1 MESOP1 MONGODB1 MSYQL1 MYSQL1 NEXTJS1 OPENCLAW1 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