Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
6 posts · #python
Clear filters·8 min read

Teaching CodeT5 to read renamed Python: a deobfuscator experiment
I fine-tuned CodeT5 to undo variable renaming in Python. The first run promised 23 hours on CPU, and my own obfuscator turned out to break the syntax it was meant to preserve.
In short
- My obfuscator replaced every word that was not on a 13-item keyword list, so in, not, as and None became variables and the "obfuscated" input was often not valid Python.
- The same training job looked like a 23 hour 41 minute job on CPU (5,625 steps at 15.19 s/it) and a roughly 30 minute job on the GPU (1,405 steps at 1.17 s/it).
- The evaluation log has 740 scored examples with mean BLEU 0.250, ROUGE-1 0.344 and ROUGE-L 0.309. Only 51 of them reach ROUGE-L 0.5.
#python#machine-learning#codet5#code-analysis
·10 min read

Desktop Grid: a click-through desktop overlay in Python and Qt
I wanted labeled zones drawn on my Windows desktop that never block a click. Qt swallowed input, so I toggled one window style on a 60 ms poll. I also built a feature in 10 commits and reverted it.
In short
- The overlay is a translucent Qt window across the virtual screen, pinned just above the wallpaper, and clicks pass through because a 60 ms poll toggles the WSEXTRANSPARENT window style.
- Desktop icons are read and moved by sending list-view messages to explorer.exe and exchanging data through memory allocated inside that process.
- Icon layouts are saved per display setup, keyed like 2560x1440@1, and restored a moment after the resolution changes.
#python#pyside6#windows#ctypes
·7 min read

DomainHunter: checking domains via RDAP, WHOIS and DNS
Most 'is it free?' tools guess and show a $2 teaser that renews at $44. I built a CLI that asks the registries directly and ranks names by what they cost over several years.
In short
- Availability is never assumed: RDAP first, then WHOIS on port 43, then DNS over HTTPS, and anything unresolved is unknown, not free.
- A 404 from rdap.org only means "free" if the bootstrap actually redirected to a registry host.
- Prices are ranked by register-then-renew total, so a $2.57 .store that renews at $43.77 stops looking cheap.
#Python#RDAP#WHOIS#CLI
·10 min read

DiskDesk: a Windows desktop on any drive, built with Python and COM
A second Windows desktop on any drive, built by calling the shell instead of imitating it. The hard parts: context menus that came up empty, and an updater that must never ask a question.
In short
- Wherever Windows already has an API, DiskDesk calls it: context menus, thumbnails, file operations and the clipboard all go through the shell.
- Real context menus need IContextMenu2 and IContextMenu3, which pywin32 does not expose, so shellmenu.py calls raw vtable slots through ctypes and forwards menu messages from a hidden window.
- The folder menu and the real desktop's own entries are merged, and folder-scoped verbs come only from the DiskDesk folder so Paste never hits the real Desktop.
#python#windows#qt#com
·10 min read

Renode Starter Templates: Deploy Node and Python Apps With No Setup
Six public starters for the Renode hosting platform, built around one contract: SERVER_PORT, a start script that works alone, pinned runtimes and secrets kept out of git.
In short
- The contract has four rules: bind 0.0.0.0 on SERVERPORT, expose a no-argument start command, pin the runtime, keep secrets out of git.
- The Next.js start script runs next build first, because the panel only runs npm run start and next start fails without a build.
- A missing bot token stops the process with a clear message, so the console explains the failure in the first second.
#renode#hosting#nodejs#python
·10 min read

Building a Windows memory scanner in Python with ctypes and NumPy
Unfair is a Windows memory scanner in one Python file. The hard parts were not the Win32 calls: they were narrowing 5,827 candidates to one, guarding a tool that can write to any process, and shipping it as an elevated exe.
In short
- One scan proves little: searching for 100 returns thousands of addresses, and two or three rescans after the value changes usually leave a handful.
- Only committed, unguarded, writable private or image regions are read, which shrinks the work a lot compared with the whole address space.
- Unknown-value scans snapshot every eligible region and filter with NumPy, at the cost of up to hundreds of MB, then fall back to a cheap address list under two million survivors.
#python#ctypes#windows#numpy