dotfiles/scripts/spongebob

21 lines
376 B
Plaintext
Raw Normal View History

#!/usr/bin/env nix-shell
#! nix-shell -i python3 --pure
#! nix-shell -p python3
2020-06-28 11:23:02 +02:00
import random
2023-11-23 22:59:09 +01:00
import sys
2020-06-28 11:23:02 +02:00
# 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="")