This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ZINIT_HOME="/home/username/.local/share/zinit/zinit.git" | |
zinit_remove() { | |
local target_dir | |
case "$1" in | |
-s|--snippets) | |
target_dir="${ZINIT_HOME:s/zinit\.git/snippets}" | |
;; | |
-p|--plugins) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local GH_RAW_URL='https://raw.githubusercontent.com' | |
install_completion(){ zinit for as'completion' nocompile id-as"$1" is-snippet "$GH_RAW_URL/$2"; } | |
local GHG_RAW_URL='https://gist.githubusercontent.com' | |
install_gist_snippet() { | |
local url="$2" | |
if [[ $url != $GHG_RAW_URL* ]]; then | |
url="$GHG_RAW_URL/$url" | |
fi | |
if [[ $url != *raw ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Tom Hale, 2016. MIT Licence. | |
# Print out 256 colours, with each number printed in its corresponding colour | |
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 | |
set -eu # Fail on errors or undeclared variables | |
printable_colours=256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*Shanghai Composite Index*) | |
data1 = FinancialData[ | |
"^000001", {{2019, 12, 1}, {2021, 3, 22}, "Week"}]; | |
data2 = FinancialData[ | |
"^000001", {{2021, 3, 23}, {2022, 3, 5}, "Week"}]; | |
data3 = FinancialData[ | |
"^000001", {{2022, 3, 6}, {2022, 12, 4}, "Week"}]; | |
data4 = FinancialData[ | |
"^000001", {{2022, 12, 5}, {2023, 11, 1}, "Week"}]; | |
dataset = {data1, data2, data3, data4}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import asyncio | |
import aiohttp | |
import argparse | |
from tqdm import tqdm | |
async def download_video(session, url, file_path): | |
if os.path.exists(file_path): | |
print(f"[!] Skipping: {file_path} (already downloaded)") | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Configuration | |
SCRIPT_NAME="./evil-process" | |
LOG_FILE="./process_monitor.log" | |
CHECK_INTERVAL=5 | |
# Target users to monitor | |
TARGET_USERS=("root" "admin") |
OlderNewer