Highlighting Low Values in Excel with Python and openpyxl

When working with usage statistics or analytics data in Excel, you often need to visually identify entries that fall below a certain threshold. Instead of manually scanning through hundreds of rows, Python can automate this process efficiently. This guide demonstrates how to programmatical highlight cells containing values less than 100 in red ...

Posted on Mon, 11 May 2026 05:14:32 +0000 by edspace

Practical Bash Scripts for Linux System Administration and Automation

CPU Utilization Threshold Alert Monitor processor load and trigger a notification when usage exceeds a defined limit. This implementation calculates active CPU time by subtracting the idle percentage reported by top. #!/usr/bin/env bash ALERT_LIMIT=75 CURRENT_LOAD=$(top -bn1 | awk '/^%Cpu/ {print 100 - $8}') if awk "BEGIN {exit !($CURR ...

Posted on Sun, 10 May 2026 20:45:50 +0000 by Courbois

Automating Interactive Terminal Sessions with Expect on Linux

The expect utility is a specialized automation framework designed to handle interactive command-line programs. Originally developed as an extension of the Tcl scripting language, it operates by interfacing with a pseudo-terminal (pty) to simulate human keystrokes and parse terminal output. This makes it indispensable for automating tasks like r ...

Posted on Sun, 10 May 2026 03:29:20 +0000 by MCP

Processing Word Documents in Python Using python-docx

Working with Word documents in Python requires specialized libraries to handle the .docx file format. The python-docx package provides comprehensive functionality for document manipulation. Library Installation Install the package using pip: pip install python-docx Basic Document Reading Extract text content from a Word document with this impl ...

Posted on Sat, 09 May 2026 05:02:22 +0000 by osram

Bash Automation and Scripting Fundamentals

Executing Shell Programs Scripts are invoked by specifying the interpreter or making them executable. The standard approach involves passing arguments directly to the program. #!/bin/bash ./automation_runner.sh --verbose flag-one Quoting and Substitution Mechanics Proper handling of strings prevents unexpected parsing errors. Backticks: Legac ...

Posted on Sat, 09 May 2026 05:00:09 +0000 by dzekic

Automating 12306 Train Ticket Queries: A Comparative Study of HTTP Scraping and Selenium Automation

Automating 12306 Train Ticket Queries: A Comparative Study of HTTP Scraping and Selenium Automation Automating routine tasks on web platforms often requires choosing between lightweight API interaction and robust browser automation. This article details two Python implementations for querying train availability on the 12306 railway system. The ...

Posted on Fri, 08 May 2026 15:57:37 +0000 by maxelcat

Real-Time File Synchronization Using inotifywait and rsync

Real-Time Directory Synchronization In production environments, maintaining consistent file states across multiple servers is critical. A common requirement involves continuously mirroring changes from a primary directory—such as an NFS export—to a designated path on a backup server. Core Synchronization Approach Two widely adopted methods enab ...

Posted on Fri, 08 May 2026 00:23:39 +0000 by hazel999

Retrieving Virtual Machine Device Information from ESXi Hosts Using Python

from pyVim.connect import SmartConnect from pyVmomi import vim import ssl import json def collect_vm_hardware(vm_obj): hardware_list = [] try: if vm_obj.config and hasattr(vm_obj.config.hardware, 'device'): for hw in vm_obj.config.hardware.device: if hasattr(hw.deviceInfo, 'label'): ...

Posted on Thu, 07 May 2026 10:21:46 +0000 by orange08

Python unittest Framework Fundamentals and Practical Usage

Core Components of unittest The unittest module is Python’s built-in unit testing framework, inspired by JUnit. It revolevs around four foundational abstractions: Test Case: A subclass of unittest.TestCase. Each method prefixed with test_ represents a individual test. The class may define setUp() and tearDown() for per-test setup and cleanup, ...

Posted on Thu, 07 May 2026 05:26:07 +0000 by fansa