Skip to content

Instantly share code, notes, and snippets.

@pkubik
Created September 9, 2024 22:30
Show Gist options
  • Save pkubik/901e8e4922ad942cc805ddc7dc71ec4a to your computer and use it in GitHub Desktop.
Save pkubik/901e8e4922ad942cc805ddc7dc71ec4a to your computer and use it in GitHub Desktop.
Fake Nihao
import numpy as np
from pathlib import Path
names = [
str(p).replace("/", "-").replace("\\", "-").replace("C:-", "").lower().strip("-")
for p in Path("/mnt/c/Windows").glob("*/*")
if len(str(p)) < 40
]
for name in names:
priority = "🌶" * np.random.randint(1, 5)
print(f"{priority: >8} {name: <40} Running")
"""
python3 nihao.py | fzf --header " Priority Name State"
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment