Created
April 14, 2023 00:19
-
-
Save danielpyon/317401350b63ff239d6c22f46cca8a76 to your computer and use it in GitHub Desktop.
message of the day
This file contains 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 random | |
x=list(map(lambda x: x[:-4], os.listdir('/usr/share/cowsay/cows/'))) | |
cf=x[random.randint(0,len(x)-1)] | |
c='cowsay' if random.random() < 0.5 else 'cowthink' | |
os.system(f'fortune -a | {c} -f {cf}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment