Proxy command that tees

Advertisements For a PowerShell feature request (whether this is a good idea or not), I tried to create a prototype using a proxy command named Write-Table based on the Format-Table cmdlet that directly writes to the host and depending on the PassThru switch should pass the current input object: function Write-Table { [CmdletBinding(HelpUri=’https://go.microsoft.com/fwlink/?LinkID=2096703′)] param( [switch]… Read More Proxy command that tees

How do I `tee` output to multiple piped commands with zsh on macOS?

Advertisements I am using the tmutil status command to give me the current TimeMachine backup status. It gives an output of the sort % tmutil status Backup session status: { BackupPhase = Copying; ClientID = "com.apple.backupd"; DateOfStateChange = "2022-11-21 11:23:03 +0000"; DestinationID = "89E08126-7132-4D14-80B4-EFD45E8C5BFC"; FirstBackup = 1; Progress = { Percent = "0.1640944884974286"; TimeRemaining =… Read More How do I `tee` output to multiple piped commands with zsh on macOS?

Make a parabola steeper at both sides while keeping both ends

Advertisements I’m having a parabola with both axes being from 0 to 1 as follows: The parabola is created and normalized with the following code: import matplotlib.pyplot as plt import numpy as np # normalize array def min_max_scale_array(arr): arr = np.array(arr) return (arr – arr.min())/(arr.max()-arr.min()) x = np.linspace(-50,50,100) y = x**2 x = min_max_scale_array(x) y… Read More Make a parabola steeper at both sides while keeping both ends