Created
February 9, 2022 03:43
-
-
Save JosephTLyons/931f8e26f7c70d8fece5628687726b15 to your computer and use it in GitHub Desktop.
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
def get_color_for_text(text): | |
colors = [ | |
"black", | |
"blue", | |
"green", | |
"orange", | |
"red", | |
"silver", | |
"white", | |
"yellow", | |
] | |
return colors[hash(text) % len(colors)] | |
variable_names = [ | |
"is_even", | |
"is_outlier", | |
"job", | |
"process_variable", | |
"threshold", | |
] | |
for variable_name in variable_names: | |
print(f"{variable_name}: {get_color_for_text(variable_name)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment