I ran into this problem during a data migration when a colleague handed me a CSV full of product codes like “SKU-4829-A” and “ORD-1034-B” — and I needed to pull out just the numbers for validation. Manual extraction was not happening, so I wrote a small Python script to do it automatically. That script is what this article is about. This article covers two ways to extract digits from a Python string — using isdigit() and using regex. By the end, you’ll have a clear picture of when each approach makes sense, with working examples you can copy-paste into your…
Author: drweb
I ran into this problem when I had a list of user records with some missing fields, and I needed to extract only the valid ones before processing. Writing a loop felt verbose for something this simple. That’s when I reached for Python’s filter() function. The article covers how filter() works, its two required arguments, how to use it with lambda and named functions, what happens when you pass None as the predicate, and how it compares to list comprehensions. By the end, you’ll know exactly when to reach for filter() and how to avoid the most common mistakes. TLDR…
Scanner Integrations May 5, 2026 Precision Container Security with Docker and Black Duck The complexity of modern containerized applications often leaves developers drowning in a sea of “noise”—vulnerabilities that exist in the file system but pose zero actual risk to the application. The integration between Black Duck and Docker Hardened Images (DHI) provides a definitive answer to this challenge. By combining Docker’s secure-by-default foundations, using VEX (Vulnerability Exploitability eXchange)… Jessy McDermott and Dan Stelzer Read now
I needed to back up configuration files before rewriting them during a deployment script. The requirement was simple: duplicate a file before touching it, so the original stayed safe if anything went wrong. Python ships with several ways to copy files, and I kept reaching for the same one until I learned what the others were better at. This article covers every practical way to copy files in Python. You’ll learn the shutil functions for everyday use, the os and subprocess approaches for shell integration, and how to choose the right method for your specific scenario. TLDR shutil.copy() is the…
Apr 23, 2026 Trivy, KICS, and the shape of supply chain attacks so far in 2026 We caught a malicious image pushed to checkmarx/kics on Docker Hub, the image was quarantined, and we coordinated response with Socket and Checkmarx. This blog walks through what happened and why we believe open, fast collaboration is the key to responding to this new pattern of emerging supply chain attacks. Read now
Rocky Linux 10 is the latest stable, community-driven enterprise Linux distribution built as a downstream rebuild of Red Hat Enterprise Linux 10, released on June 11, 2025, and this guide walks you through a complete minimal server installation. Most sysadmins treat OS installation like a checkbox; they click through fast, accept defaults, and move on, but the problem is that those defaults are often not what you actually want, so you end up fixing things later that the installer decided for you. If you spend just 10 extra minutes during setup, especially on disk partitioning, hostname, and networking, you save…
I ran into this problem the hard way during a data pipeline project – I needed to duplicate a large NumPy array for processing, and my first attempt with the assignment operator left me with two variables pointing at the same memory. After that, I made sure I understood every way NumPy lets you copy arrays. This article covers all of them, with their tradeoffs. NumPy is the foundational library for numerical computing in Python. Copying arrays shows up everywhere – from machine learning feature engineering to image processing pipelines. This article walks through each copy method, when to use…
I ran into this problem when an e-commerce client asked why their best customers kept disappearing after month two. The obvious metrics told us nothing. What we needed was a way to watch user behavior unfold over time, which is exactly what cohort analysis does. This article covers cohort analysis from the ground up: what cohorts are, how to build them in Python, and how to read the retention heatmap that comes out the other end. TLDR Cohort analysis groups users by their first activity period and tracks retention over time The core metric is the cohort index — months…
It’s time for T-SQL Tuesday #198! T-SQL Tuesday is a monthly community blogging event started by Adam Machanic in 2009. Each month a host picks a topic, participants write about it on the second Tuesday of the month, and the host posts a recap with links to all the responses. If you haven’t participated before, I hope this is the month you give it a try.This month’s topic is change detection.Why change detection?I’ve been spending a lot of time lately with Fabric Mirroring for SQL Server 2025. One of the things that makes the SQL Server 2025 change feed interesting…
AI coding tools have advanced rapidly, but most are still designed around the individual developer. Their effectiveness depends heavily on a user’s ability to write understandable prompts, preserve architectural coherence across sessions, and identify areas that require additional work. This model works for some engineers, but it is far less dependable for a large organization’s development team, where software must align with defined standards, delivery processes and governance requirements. Today, AI development systems that reduce reliance on individual judgment are coming to market. They bring embedded structure, constraints, and verification directly into the platform. For organizations, customer-facing products and portals,…
