Random snippets of all sorts of code, mixed with a selection of help and advice.
Problematic type-hints
20 June 2026 @ 10:32 pm
Moving on from yesterdays post about this and further to the many issues resolved with the help of @furus, here is an updated example with the remaining few type-hint errors:
from typing import Any
from wsgiref import simple_server
from wsgiref.types import StartResponse
def my_func(attributes: None | dict[str, str] = None) -> None:
attributes = attributes if not None else {}
for name, value in attributes.items():
print(name, value)
class Response:
start_response: StartResponse
def __init__(self, start_response) -> None:
self.start_response = start_response
def serve_pre_compiled(self) -> str:
local_dict = {"obj_response": self}
exec("file", {}, local_dict)
return local_dict["__HTML__"]
class MyProcess:
status: str
obj_response: Response
def __init__(self, environ: dict[str, Any], start_response: StartResponse) -> None:
_ = environ
best data architecture to scale Python
20 June 2026 @ 9:55 pm
We want to keep our ETL transformations in Python, but we are starting to hit memory limits as our data grows.
What would be the best low-cost architecture to scale Python ETLs without rewriting everything in SQL?
Databricks is not an option because it is too expensive for our company. Our largest table has around 2 million rows.
Would using Amazon S3 and storing the data in Parquet format help reduce memory usage during ETL processing? If so, how would you recommend structuring the architecture?
Node.js login doesn't work. How to fix it? [closed]
20 June 2026 @ 8:05 pm
My database isn't working how it should. Everything works except the login function. Here are my HTML and server codes.
login.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diary.com - Login</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="header">
<p id="header-text">Diary.com</p>
</div>
<div id="main_entry">
<p id="text">Login</p>
<form action="http://localhost:3000/login" method="post">
<input id="username" name="username" type="text" maxlength="
Storage Spaces SSD (write cache) tier footprint not increasing during small/big random writes to HDD parity virtual disk
20 June 2026 @ 7:59 pm
I'm trying to build a Storage Spaces array on Windows 11 Pro for Workstations - 8 HDDs (dual parity) and 4 enterprise SAS SSDs intended as a write cache/fast tier.
I've tried two configurations:
1. Tiered pool — SSDs as Auto-Select with a separate SSD mirror tier + HDD parity tier
2. Non-tiered — SSDs set to Usage: Journal with -WriteCacheSize on the virtual disk
In both cases I can't confirm the SSDs are actually being used. I'm testing with small (64KB) random file writes and big files writes, and watching WriteCacheUsedSize and FootprintOnPool on the tiers, but values stay at 0 or don't change.
If I understand it correctly Enable-StorageBusCache and S2D features are Server-only and don't apply here.
Could anyone confirm: which configuration (tiered vs Journal or Both together) actually works for SSD caching on desktop Windows, and what's the correct way to verify its functioning?
Are there any mistakes in how I create it and/or
Apple DDM: App Reinstallation Triggered When Assets Change
20 June 2026 @ 7:16 pm
I am working with Apple DDM.
I have all declaration types configured, and they are working fine. However, I have one issue that is causing a major problem for users.
Scenario:
I install app "ABC".
Something changes, causing the asset configuration on the server to differ from what the device currently has.
The next time the device pulls assets, it detects that the server token is different. As a result, the app is removed and a confirmation dialog appears asking the user whether they want to install the app again.
This means that if I update 20 apps, all 20 apps could be removed and then require reinstallation, which creates a very poor user experience.
I could not find any "reinstall" policy or related behavior documented in Apple's DDM documentation.
Has anyone experienced a similar issue or found a way to handle this more gracefully? Any suggestion
Adding a custom column to messages in Thunderbird
20 June 2026 @ 3:47 pm
I want to add a custom numeric column to email messages in Thunderbird
I want the column to be available for me to see and change the value.
The value should be reset to blank or (-1) when messages move folders.
I'm able to attach a value to messages, but I have trouble displaying the value as a column.
The value does not come from the headers, and it should not be stored in the message headers.
How can I do this in modern Thunderbird?
Why are Z3 sexpr and string different?
20 June 2026 @ 2:05 pm
>>> conclusion
Implies(And(Not(Exists(z, R(z, e3))),
Not(Exists(z, R(z, e2)))),
And(Not(B(e3)), Not(B(e2))))
>>> conclusion.sexpr()
'(let ((a!1 (and (not (exists ((z Ent)) (R z e3)))\\n (not (exists ((z Ent)) (R z e2))))))\\n (=\> a!1 (and (not (B e3)) (not (B e2)))))'
As you can see, the string form (__str__) the variable conclusion starts with Implies, but the sexpr form starts with let.
Why are they different? When are the string form and sexpr form different?
I couldn't find any hints in the reference.
Not only me, but this presentation also notes the difference between Z3 sexpr and string, but
Best practices for SQL Beginner
20 June 2026 @ 1:55 pm
What are the best practices that saved you time when you started Data science / Data analysis for the first time?
I want to learn for the first time and don't know how to start and what are the first steps?
I have a small background in Excel only.
Why this Open3D compute_transformation produces a wrong matrix?
20 June 2026 @ 1:03 pm
This Python 3.12 script with Open3D 0.19.0 produces a wrong transformation matrix m:
import open3d as o3d, numpy as np
s = np.array([[50.7, 107.8, 2282.5], [0.7, 0.5, -0.4], [-0.0, -0.6, -0.7], [-0.6, 0.5, -0.4]], dtype='f4')
t = np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype='f4')
source = o3d.geometry.PointCloud()
target = o3d.geometry.PointCloud()
source.points = o3d.utility.Vector3dVector(s)
target.points = o3d.utility.Vector3dVector(t)
corres = o3d.utility.Vector2iVector(np.array([[0, 0], [1, 1], [2, 2], [3, 3]]))
tf = o3d.pipelines.registration.TransformationEstimationPointToPoint()
tf.with_scaling = True
m = tf.compute_transformation(source, target, corres)
output = source.transform(m)
print(np.asarray(output.points))
Instead of this expected output:
[[ 0. -0. -0.]
[ 1. -0. -0.]
[-0. 1. -0.]
[-0. -0. 1.]]
I'm getting:
[[-0.00039798 -0.00055862 -0.00041059]
[ 0.3336
Coloring of indent spaces in VSCode
20 June 2026 @ 9:20 am
I'd like to know how to turn off or control the vertical colored area indicating indent on each line.
I've attempted to determine this from the docs, but I don't have the terminology to find the answer.
An image may help:
This is in VSCode.
The indicators I want to control:

