sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| #!/bin/zsh | |
| dragonColour=11 | |
| textColour=2 | |
| upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
| secs=$((${upSeconds}%60)) | |
| mins=$((${upSeconds}/60%60)) | |
| hours=$((${upSeconds}/3600%24)) | |
| days=$((${upSeconds}/86400)) | |
| UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"` |
| def rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
| """Create a view of `array` which for every point gives the n-dimensional | |
| neighbourhood of size window. New dimensions are added at the end of | |
| `array` or after the corresponding original dimension. | |
| Parameters | |
| ---------- | |
| array : array_like | |
| Array to which the rolling window is applied. | |
| window : int or tuple |