The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Python’ Category

Kevlin Henney on “configuration is code” in his essay “Out of Control. An essay on paradigms, refactoring…”

Posted by jpluimers on 2025/07/31

For my link archive [Wayback/Archive] Out of Control. An essay on paradigms, refactoring… | by Kevlin Henney | Dec, 2020 | Medium.

Neither because Kevlin describes how to refactor a basic algorithm to convert Roman numerals into Hindu-Arabic numerals (in part by using the fact that an if statement can be considered a bounded case of a while loop), nor because he splits the resulting algorithm in coded data and coded statements, or because he mentions the [Wayback/Archive] Gilded Rose Kata but because well, you should just read it in full.

Remember though: Read the rest of this entry »

Posted in Configuration Management, Development, DevOps, Power User, Python, Scripting, Software Development | Leave a Comment »

Wakamai Fondue, the tool that answers the question “what can my font do?”

Posted by jpluimers on 2025/07/24

What Can my Font do - beta pageVery cool web site that I only discovered last year, with the clever name: [Wayback/Archive] Wakamai Fondue, the tool that answers the question “what can my font do?”

Drop a font!
Fonts aren’t uploaded,
they stay on your computer

Back then I used it to investigate some properties of SMuFL (Standard Music Font Layout) fonts as sometimes editing a PDF is easier than manually entering/transcribing it in MuseScore.

Of course you can use local font tools, but this is far easier for occasional use.

The beta can do even more at the risk of bumping into bugs: [Wayback/Archive] Wakamai Fondue, the tool that answers the question “what can my font do?”

Note the colour matching of the text around the circle with the fondue background image.

Oh: it is open source too, written mainly in JavaScript, CSS and a tiny bits of HTML and Python, based on Vue.js and npm, and available as parts in the repositories of [Wayback/Archive] Wakamai Fondue · GitHub:

Read the rest of this entry »

Posted in CSS, Development, Font, HTML, JavaScript/ECMAScript, npm, Python, Scripting, Software Development, Vue.js, Web Development | Leave a Comment »

unix – How come is this command returning “GET A LIFE!”? – Stack Overflow

Posted by jpluimers on 2025/06/11

Didn’t know nx had a scriptable RPN command-line calculator dc (for Desk Calculator) which does not seem to need white space characters in the input stream or input file.

It likely is a source for command-injection attacks given the question [Wayback/Archive] unix – How come is this command returning “GET A LIFE!”? – Stack Overflow, so I did a bit of digging and found this great platform:

Read the rest of this entry »

Posted in *nix, *nix-tools, Development, Power User, PowerShell, Python, Scripting, Software Development | Leave a Comment »

What is the Python 3 equivalent of “python -m SimpleHTTPServer” – Stack Overflow

Posted by jpluimers on 2025/05/29

Now that Python 2 has been dead for long enough (has it been unsupported for 5 years? yes it has: [Wayback/Archive] Status of Python Versions), it was finally time to change my alias for running a local web-server to serve files from a directory (:

So, from [Wayback/Archive] What is the Python 3 equivalent of “python -m SimpleHTTPServer” – Stack Overflow (thanks [Wayback/Archive] ryanbraganza, [Wayback/Archive] k.avinash and [Wayback/Archive] Petr Viktorin):

python -m http.server 8000, it will start the server on port 8000

Docs with the migration hints: [Wayback/Archive] 20.19. SimpleHTTPServer — Simple HTTP request handler — Python 2.7.18 documentation

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, Batch-Files, Development, Power User, Python, Scripting, Software Development | Leave a Comment »

GitHub – randomaccess3/googleURLParser: parser for Google search strings

Posted by jpluimers on 2025/05/01

Back when I observed the Google Search sei parameter which I hadn’t seen before yet, I bumped into [Wayback/Archive] GitHub – randomaccess3/googleURLParser: parser for Google search strings

It covers a truckload of parameters, including the sei one, which isn’t as new as I thought, as it was at least 2017 old: [Wayback/Archive] [Neat URL] Yet another Google parameter… · Issue #25 · Smile4ever/firefoxaddons · GitHub

Links referred from the parser tool for further reading:

Read the rest of this entry »

Posted in Development, Google, GoogleImageSearch, GoogleSearch, Perl, Power User, Python, Scripting, Software Development | Tagged: | Leave a Comment »

Ungendered writing – #awareness

Posted by jpluimers on 2025/03/14

Maybe the outcome of this research study is even more reason to promote awareness around ungendered writing.

In this world at large, inclusivity should be the norm and showing that in your writing should increase funding rates for science articles.

[Wayback/Archive] Ungendered writing: Writing styles are unlikely to account for gender differences in funding rates in the natural and technical sciences – ScienceDirect.

Read the rest of this entry »

Posted in Awareness, Development, Inclusion / inclusive society, Perl, Python, Scripting, Software Development | Leave a Comment »

Weather info in plain text or JSON

Posted by jpluimers on 2025/03/06

Two sites that can help you out getting weather info on the console:

wttr.in

wttr.in is developed by [Wayback/Archive] Igor Chubin (@igor_chubin) / X and looks at the request header to figure out what kind of output it sends.

It supports various output formats, so on my TODO list is to see how they do their mapping: always an opportunity to learn (it’s based on Python and Go so I am curious what libraries they use as well).

From the documentation:

wttr.in currently supports five output formats:

  • ANSI for the terminal;
  • Plain-text for the terminal and scripts;
  • HTML for the browser;
  • PNG for the graphical viewers;
  • JSON for scripts and APIs;
  • Prometheus metrics for scripts and APIs.

The ANSI and HTML formats are selected based on the User-Agent string.

There are more parameters in the documentation on the main page of the repository and through this command:

curl wttr.in/:help

The idea is derived from [Wayback/Archive] GitHub – schachmat/wego: weather app for the terminal.

Oh: Igor has more repositories at [Wayback/Archive] chubin (Igor Chubin) · GitHub (including [Wayback/Archive] GitHub – chubin/cheat.sh: the only cheat sheet you need which is hosted at [Wayback/Archive] cheat.sh; I thought I had blogged about that before, but found it only in a draft note mentioning that I got it via [WaybackSave/Archive] Nicolas Krassas on X: “The only cheat sheet you need cheat.sh)

7timer

A 7 timer JSON usage example is at [Wayback/Archive] Get Weather from 7Timer! · GitHub

It has documentation at

Output formats can be chosen from HTML, PNG, XML and JSON.

Via

[Wayback/Archive] Hacker Public Radio – hpr4266 :: What’s the weather?
Lee writes a script to check what the weather is like ~ The Technology Community Podcast

HPR is a great podcast series!

--jeroen

Posted in *nix, *nix-tools, ash/dash, bash, bash, Development, Go (golang), JavaScript/ECMAScript, JSON, Power User, Python, Scripting, Software Development, Web Development, XML/XSD | Leave a Comment »

Some interesting tweets by @isotopp and others on home power measurement and what to do to optimise energy usage at home

Posted by jpluimers on 2025/02/26

For my link archive (browse back and forth in the tweets: lots of useful tips):

[Wayback/Archive] Kris on Twitter: “@mausdompteur @HildebrandtRalf … Tasmota Support P1-mqtt in Python, für den oa Zuidwijk Slimme Lezer Diese Lösung setze ich ein.”

A few of his power usage pictures:

Read the rest of this entry »

Posted in Development, Hardware, IoT Internet of Things, LifeHacker, Network-and-equipment, Power User, Python, Scripting, Software Development | Leave a Comment »

How to send raw network packets in Python with tun/tap

Posted by jpluimers on 2025/02/20

For my link archive: [Wayback/Archive] How to send raw network packets in Python with tun/tap

I never really played around with tun and tap, so this is a nice opportunity to do so. I know they were the base for VPN on Linux, but just now I learned TUN/TAP are not available on nx, but also on Windows. Cool!

Via [Wayback/Archive] 🔎Julia Evans🔍 on Twitter: “how to send raw network packets in Python with tun/tap …”

--jeroen

Posted in *nix, *nix-tools, Development, Ethernet, Hardware, Linux, Network-and-equipment, Power User, Python, Scripting, Software Development | Leave a Comment »

Stable Diffusion – a Hugging Face Space by stabilityai

Posted by jpluimers on 2025/02/06

I’m anxious to see how some 2.5 years after the introduction, Stable Diffusion has evolved.

By then, you could run it either on-line at for instance [Wayback/Archive] Stable Diffusion – a Hugging Face Space by stabilityai:

Stable Diffusion DemoStable Diffusion is a state of the art text-to-image model that generates images from text.

or run it yourself if your GPU was powerful enough by using the base repository [Wayback/Archive] CompVis/stable-diffusion or one of the many forks: [Wayback/Archive] Forks · CompVis/stable-diffusion (back then some 1.4k!)

The original announcement was [Wayback/Archive] Stable Diffusion Public Release — Stability.Ai.

Read the rest of this entry »

Posted in AI and ML; Artificial Intelligence & Machine Learning, Development, Python, Scripting, Software Development | Tagged: | Leave a Comment »