RSSAmplifier

Blog

serhii.net

Recent content on serhii.net

serhii.netRSS feed ↗766 posts

Latest posts

NestedText as YAML alternative

NestedText — Structured Data for Humans — NestedText 3.8 documentation Like YAML but easier and less confusing. See their comparison with other formats . Has only strings as data type, the consumer does its own validation, which makes the syntax simple. Brilliant. (Also no need to quote, or escape, or deal with the Norway problem 1 .) Katheryn McDaniel : position : president address : > 138 Almond…

Title case actual APA rules

Title case capitalization Main surprise: lowercase only minor words that are three letters or fewer in a title or heading (except the first word in a title or subtitle or the first word after a colon, em dash, or end punctuation in a heading): short conjunctions (e.g., “and,” “as,” “but,” “for,” “if,” “nor,” “or,” “so,” “yet”) articles (“a,” “an,” “the”) short prepositions (e.g., “as,” “at,” “by,”…

LLM (semi) structured training and inference

Document AI / IE / Unstructured Getting things out of documents Benchmarks [2607.29677] ExtractBench: A Benchmark for Schema-Guided Enterprise Document Extraction 1 , which is basically “ given a document and a user-defined schema, the agent faithfully follows the schema to produce the correct output with source evidence as grounding metadata ” and this is evaluated. Really cool,…

Exclude directories when building UV packages

My package was 156mb because my tests/ were 120mb. Uv uses hatchling Building and publishing a package | uv Build configuration - Hatch Feature request: Add ability to exclude certain file/directory patterns from uv build output · Issue #7938 · astral-sh/uv TL;DR add this to pyproject.toml [tool.hatch.build.targets.sdist] exclude = [ "tests/" ] Before/after: # before -rw-r--r-- 1 sh sh 156M Jul 13…

Profiling startup import time of Python programs

How to speed up Python application startup time - DEV Community This tells you the time for imports: PYTHONPROFILEIMPORTTIME = True uv run my_program.py

UI pattern click to copy name, shift-click to copy hex

Colors - Core concepts - Tailwind CSS Click to copy the OKLCH value or shift+click to copy the nearest hex value. Oh that’s cool I could use that. The only reason I found it was because https://quasar.dev/style/color-palette/#color-list didn’t give clean access to the hex values so I kept looking :)

Huey is a simple queue for Python

coleifer/huey: a little task queue for python Simplest example: huey/examples/mini/mini.py at master · coleifer/huey Reference: Huey’s API — huey 3.0.1 documentation Mini-Huey ( Huey Extensions — huey 3.0.1 documentation ) is a mini version that requires no separate consumer process or persistence Consuming Tasks — huey 3.0.1 documentation has info about the consumer

Kubectl get info about resource with templates and yaml

I wanted the metadata.annotation pod-requests, viewable in node config -> YAML on the Rancher webgui. Came up w/ this: kubectl get node node-name -o template --template = '{{ index .metadata.annotations "management.cattle.io/pod-requests" }}' # | jq '.["nvidia.com/gpu"]' It refused to allow me to use - and / inside the name ( k get node nodename -o template…

Prefix my custom CLI commands with a comma and fish function descriptions

I think I’ve read about this years ago somewhere, just thought of it For all my (fish) CLI aliases a , is an OK prefix to use, it even supports completion. alias ,isodate = 'date +%F' No idea about any downsides yet, will play with this for a week or so. function ,blist -d "search and show bitwarden credentials" command bw list items --search " $argv " | jq '.[].login | [.username,…

bttf for CLI time parsing and interesting help pattern

BurntSushi/bttf: A command line tool for datetime arithmetic, parsing, formatting and more. I use wolframalpha for most of my casual date ops etc. but the project is cool and I may need it. But the most interesting bit is the documentation. Quoting README: I may ship arbitrary and capricious breaking changes at this point. You have been warned. […] And it doesn’t give a hoot about…

Як виміряти товщину свердла

Вимірювати найтовщий його діаметр штангенциркулем!

Merge and rearrange pages from multiple PDF

Tiny neat app that shows pages from all PDFs and allows you to rearrange the order, does one thing and does it wonderfully! pdfarranger/pdfarranger: Small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface.

FNP-2026 at LREC paper notes

FNP – FNP 2026 FNP 2026 proceedings PDF. When Tables Go Crazy: Evaluating Multimodal Models on French Financial Documents Links [2602.10384] When Tables Go Crazy: Evaluating Multimodal Models on French Financial Documents Github contains both dataset and scripts! Benchmark French visual finance docs, includes evaluation on multiple VLMs Chart checkboxes graphs and weird edge cases specifically…

Test post title

Inside post h1 One two three 4 Some content h2 that becomes an h1 Some content h3 One two three 4 Some content h4 One two three 4 Some content h5 One two three 4 Some content h6 One two three 4 Some content List item 1 list item withsublists sublist item 1 thrid level list two back to sublist

Prodigy NLP annotation tool

Prodigy · An annotation tool for AI, Machine Learning & NLP First seen in Anshu Kiran Sharma - PhD Student Computer Science, Natural Language Processing ’s “Once upon a kernel” @ LREC 2026

Borda count

Borda count - Wikipedia is a way to fairly rank, rating = number of candidates below them in ranking Originally for voting Used in IR to aggregate ratings and benchmarking models on tasks w/ different metrics First seen in [2510.20508] Assessing the Political Fairness of Multilingual LLMs: A Case Study based on a 21-way Multiparallel EuroParl Dataset BLEU variants not comparable across language…

LREC2026 notes

Day 1 O4 Assessing the Political Fairness of Multilingual LLMs: A Case Study Based on a 21-Way Multiparallel EuroParl Dataset Links: * Arxiv - LREC'26 | Schedule - Github Takeaways: BLEU variants not comparable across language pairs Borda count - Wikipedia is a way to fairly rank, rating = number of candidates below them in ranking Originally for voting Used in IR to aggregate ratings and…

Convert enum to dict in python

python - How to make a dict from an enum? - Stack Overflow # Source - https://stackoverflow.com/a/60451617 # Posted by Chris Doyle # Retrieved 2026-04-09, License - CC BY-SA 4.0 from enum import Enum class Shake (Enum): VANILLA = "vanilla" CHOCOLATE = "choc" COOKIES = "cookie" MINT = "mint" dct = {i . name: i . value for i in Shake} print(dct)

xh notes

ducaale/xh: Friendly and fast tool for sending HTTP requests o Shorthand # from README xh http://localhost:3000/users # resolves to http://localhost:3000/users xh localhost:3000/users # resolves to http://localhost:3000/users xh :3000/users # resolves to http://localhost:3000/users xh :/users # resolves to http://localhost:80/users xh example.com # resolves to http://example.com xh ://example.com…

Спочатку немає часу приїжджати, а потім немає до кого

Дві важливі для мене людини, одного покоління і дуже різні за характером. З початку війни я точно знав, що не побачу їх живими, і був настільки готовим до їх смерті, наскільки це можливо. Легко побачити когось востаннє, не знаючи про це; потім не бачитись декілька років, періодично говорити по телефону, помічаючи зміни. Дізнатися про їх смерть. Не виконати прадавні, важливі ритуали, не проститись…

NiceGUI notes

NiceGUI is freaking awesome. Resources NiceGUI Documentation that leads to nicegui/examples at main · zauberzeug/nicegui and is the most useful examples I’ve seen in any python project ever. There’s a FAQs · zauberzeug/nicegui Wiki that I found far too late Has bits about performance, long-running functions etc. Useful examples search_as_you_type for updating a table based on Misc…

German Buchstabierung spelling alphabet

@ : Adresszeichen oder At-Zeichen , “umgangssprachliche Bezeichnungen sind Affenschwanz, Affenohr, Affenschaukel oder Klammeraffe ” There’s an official one I don’t like but seems to be the default one for everyone: (Both screenshots from Gemini that I haven’t checked elsewhere.)

Translating pattern with LLMs

I know enough German to judge but not enough to write grammatically myself, and this is a pattern I don’t want to forget. This is SO MUCH BETTER than anything else I’ve used for this! For very short snippets it’s golden

LaTeX paper checklist

For the main file, see: 240116-1701 LaTeX best practices Camera-ready checklist Enable reviewing mode in Overleaf Change package options [review / final] etc. Authors emails, names, order correct? Acknowledgements present and uncommented? Anonimity: uncensor names+URIs Are acknowledgements, references, appendices, limitations a) allowed, b) part of page limit? COMPRESSION: reconsider all hacks if…

Tiny PRF demo program

I wrote this debugging some metrics, bad code but I don’t want it to die. Shows formulas for Precision/Recall/F-Score based on number of TP TN FP FN. Depends only on rich, runnable w/ uv through 250128-2149 Using uv as shebang line . Usage: uv run prftset.py tp tn fp fn # /// script # dependencies = [ # "rich", # "pdbpp", # ви цього варті # ] # /// from rich import print from rich.layout…

Killing Kubernetes pods without breaking stuff Rancher

To force-kill pods w/o breaking k8s: kubectl delete pod <> --now Ty KM ( https://github.com/kkmarv ) for the following, quoting verbatim: The expected behaviour of kubectl delete heavily depends on its arguments. There are 4 possible but wrongly documented options. I&rsquo;ve tried to compile different sources into this list: kubectl delete pod <> will first send a SIGTERM, then a SIGKILL after X…

Passing complex CLI params to Pydantic settings

Settings Management - Pydantic Validation is nice but doesn&rsquo;t cover everything. Passing None through CLI Settings Management - Pydantic Validation None by default b/c cli_avoid_json is the default,[] it will default to &ldquo;null&rdquo; if cli_avoid_json is False , and &ldquo;None&rdquo; if cli_avoid_json is True . Fun fact, works inside complex nested JSON flags as well. Passing complex…

Pydantic dumping model in json mode with serializable objects

TL;DR pydanticmodel.model_dump(mode=>"json") Serialization - Pydantic Validation To dump a Pydantic model to a jsonable dict (that later might be part of another dict that will be dumped to disc through json.dump[s](..) ): settings . model_dump() >>> { 'ds_pred_path' : PosixPath( '/home/sh/whatever' )} # json.dump... json . dumps(settings . model_dump()) >>> TypeError : Object of type PosixPath is…

JQ notes

Shorthand object contsuction I kept googling for the syntax but could never find it again. // long: ' { user: .user, title: .titles } ' // shorthand when key name matches original key name (user==.user) ' { user, title } ' // mix ' { user, title_name: .title } ' From the man page: You can use this to select particular fields of an object: if the input is an object with &ldquo;user&rdquo;,…

Simple test to see if VLLM supports structured output

curl 127.0.0.1:8000/v1/chat/completions -s \ -H "Content-Type: application/json" \ -d '{ "model": "/data_pvc2/cache/models--CohereLabs--c4ai-command-r-08-2024/snapshots/96b61ca90ba9a25548d3d4bf68e1938b13506852/", "messages": [ { "role": "user", "content": "Generate a short analysis in the given JSON schema." } ], "response_format": { "type": "json_schema", "json_schema": { "name":…

shredding entire directory recursively

security - How do I recursively shred an entire directory tree? - Unix & Linux Stack Exchange : find <directory_name> -depth -type f -exec shred -v -n 1 -z -u {} \;

CORAL BBK complex criteria

(Will paste to README) Refs: https://chatgpt.com/g/g-p-679a6a16e67881918d7c8e2847ca3888-sh/project Stats: ❯ jq '.documents[].annotations[] | select(.tag == "coupon_variable_leverage_factor") | .annotation_text' *.json -C | sort | uniq -c | sort -n ZINS / Coupons Three kinds of coupons Kupon : interest paid over each Zinsperiode Should be structurally simple and not generate negative cash flows .…

Annotation guidelines

Indico conference-event-etc. management system

TIL: Indico - Home , allegedly used by ScaDs and CERN, open sourcer The effortless open-source tool for event organisation, archival and collaboration Looks really really nice and professional

More label studio annotation templates notes

Resources Label Studio Enterprise — Data Labeling & Annotation Tool Interactive Demo I always look for it , it shows things like scrollable fields, columns, the building blocks basically. Especially the advanced config templates. Template bits Adding sample data to template (Shown somewhere in examples d but I always have to look for it) < Header value = "xxx" /> <!-- { "data": { "index": 4, } }…

Rclone for syncing files to cloud storage

TIL, mentioned by HC&BB: Rclone &ldquo;is a command-line program to manage files on cloud storage&rdquo;. S3, dropbox, onedrive, [next|own]cloud, sftp, synology, and ~70 more storage backends i&rsquo;ve never heard about. Previously-ish: 250121-1602 Kubernetes copying files with rsync and kubectl without ssh access

Speedtest websites, incl fast.com

Previously: 231018-1924 Speedtest-cli and friends TIL about: Fast.com (to netflix&rsquo;s servers) speed.cloudflare.com with many details I especially like fast.com, I&rsquo;ll remember the URI forever.

Setting up label-studio with a local directory

Refs: Adding a local folder as storage backend: Label Studio Documentation — Cloud and External Storage Integration Input .json tasks format: Label Studio Documentation — Import Data into Label Studio The steps are: Create a local directory that will contain the files. Let&rsquo;s assume /home/sh/w/t/labelstudiodata Create a subfolder there to keep your images, e.g. pics , making the full path…

Fish loop to warn you when command stops or starts failing

Just came up with this: while test not ( git push ) ; echo done ; sleep 1; end; zenity --info works test reacts when command returns a non-zero exit value you can remove not the above shows a popup when it&rsquo;s over EDIT : failed, when git push stopped returning 128, the loop continued :)

Nu shell

[Tried it, realized that it&rsquo;ll replace 80% of my use-cases of jupyter / jq etc., and improve viewing of random csv/json files as well! (Previously: 250902-1905 Jless as less for jq json data and csvlens ) Parentheses are used for grouping: $somelist | where ($it in (open somefile.json)) | length Config in ~/.config/nushell/config.nu , editable by config nu , for now: $env .config.edit_mode =…

OCR-D

FAQ - OCR-D OCR-D is a project that integrates a wide variety of solutions for the full gamut of possible OCR workflow steps.

OlmOCR for pdf-png-xxx to text

allenai/olmocr: Toolkit for linearizing PDFs for LLM datasets/training Online demo: https://olmocr.allenai.org/ can be exposed through eg vllm really cool results on messy docs

OpenAI API notes

Tokenizing curl -X 'POST' \ 'http://localhost:8001/tokenize' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "model": "mistralai/Mistral-Small-24B-Instruct-2501", "prompt": "my prompt", "add_special_tokens": true, "additionalProp1": {} }'

ee

clear mapping/terminology e.g. in eval output at the end &ldquo;a: ours, b: theirs&rdquo; -> will also help us to later switch them places without getting confused ours -> generated, theirs -> gold, human-> ?? any single terminology is OK as long as it&rsquo;s consistent gold object properties in the same file as well maybe? same as generated/gold text currently there, to show what is actually…

jupyter notebook jupyterlab extensions with uv

Using uv with Jupyter | uv Creating jupyterlab environments w/ uv # Create a new uv environment uv init --name bbk-presentation --bare # Add ipykernel uv add --dev ipykernel # Install the kernel in jupyterlab uv run ipython kernel install --user --env VIRTUAL_ENV $( pwd ) /.venv --name = bbk-paper # Add whatever you need to the environment uv add pandas seaborn # Support "%pip" magic **and…

Letter to apt

Ми були на перегляді, дуже сподобалась, готові взять хоть щас Вона мітерін, але поручителем буде дочка Марія чи чоловік Сергій, якщо треба Ми 5+10 років в Німеччині, doktoranden, всі документи можемо дати ми будемо платити Kaution — готові хоч сьогодні повна Документи Rentenbescheid вона в україні,їй 70, можна копію українського пенсіонного Mietschuldenfreiheit чи можемо ми сво готові на все про…

PDB decorator function

def pdb_debug ( main_func, ): # pylint: disable=missing-function-docstring, broad-exception-caught """Run a function, optionally drop to pdb on exception""" def wrapper (): import pdb import sys import traceback try : main_func() except Exception as e: # PDB is actually read from .env if PDB: _, _, tb = sys . exc_info() traceback . print_exc() pdb . post_mortem(tb) else : raise e return wrapper A…

expose eval thoughts

Misc Having a single ID might help, instead of &ldquo;expose index 0 of type Kompakt&rdquo; — to easily filter and find matches Or just doing it all in one text style and target group then we can uniquely identify by existing id then we can have the human reference text as well then we take less time evaluating Template do we need the confidence and severity fields? We won&rsquo;t evaluate it…

status of running copy move cp mv rsync operations with progress

apt install progress : Xfennec/progress: Linux tool to show progress for cp, mv, dd, &hellip; (formerly known as cv) progress -w gives status of running copy/mv operations (for when you don&rsquo;t rsync -aP )

Downloading stuff from HF hub through huggingface cli

Command Line Interface (CLI) pip install -U "huggingface_hub[cli]" #either of hf auth login hf auth login --token $HF_TOKEN # models hf download adept/fuyu-8b --cache-dir ./path/to/cache // TODO — vllm — will it be VLLM_CACHE_ROOT or HF_HOME ? Also: Troubleshooting - vLLM — they literally recommend getting it first via hf cli and passing the full path