dotfiles/config/nix/scripts/spongebob
Geoffrey Frogeye 1f61ceb395
nix: Migrate scripts
They're a bit slower to start :(.
Hopefully this is something that flakes will help with,
otherwise I'll find another way.
2023-11-26 21:04:58 +01:00

21 lines
376 B
Plaintext
Executable file

#!/usr/bin/env nix-shell
#! nix-shell -i python3 --pure
#! nix-shell -p python3
import random
import sys
# maj = True
for line in sys.stdin:
new_line = ""
for c in line:
maj = random.random() > 0.5
if maj:
nc = c.upper()
else:
nc = c.lower()
new_line += nc
# maj = not maj
print(new_line, end="")