Skip to content

Instantly share code, notes, and snippets.

@wo0dyn
Last active February 15, 2024 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wo0dyn/493ab4b49dbcbbbea888aba2dbe3fa1a to your computer and use it in GitHub Desktop.
Save wo0dyn/493ab4b49dbcbbbea888aba2dbe3fa1a to your computer and use it in GitHub Desktop.
Snippet to generate a sentence with a random weight from the Fibonacci sequence (Linear)
import random
import rich
emojis = (
":nerd_face:",
":scream:",
":smile:",
":sunglasses:",
":thinking_face:",
":triumph:",
)
sentences = (
"After the deep [i]deep[/i] analysis we just did, I'd say this issue is a {points}.",
"Based on our thorough examination, I'd classify this as a {points}.",
"Based on the evidence, this is a {points}.",
"Considering all factors, this is undoubtedly a {points}.",
"From our analysis, it's clear that this is a {points}.",
"From what I can see, this falls under a {points}.",
"Given the description of the issue, I'd say it's a {points}.",
"I'd categorize this as a {points}, given the circumstances.",
"I'd define this as a {points}.",
"In my estimation, this is a {points}.",
"It's evident that this is a {points}.",
"Judging by the details provided, I'd say it's a {points}.",
"This definitely qualifies as a {points}.",
"This falls within the realm of a {points}.",
"This is nothing short of a {points}.",
"This issue can be labeled as a {points}.",
"This issue is a solid {points}!",
"This issue is a {points}.",
"This issue is an easy {points}.",
"This issue is definitely a {points}.",
"This problem is a {points}.",
"This problem is clearly a {points}.",
"This problem is quite a {points}.",
"This problem is undoubtedly a {points}.",
"This scenario appears to be a {points}.",
"This situation is a {points}, without a doubt.",
)
def get_points():
def fib(t1: int = 1, t2: int = 2, limit: int = 8):
while t1 <= limit:
yield t1
t1, t2 = t2, t1 + t2
return tuple(fib())
if __name__ == "__main__":
sentence, points, emoji = map(random.choice, (sentences, get_points(), emojis))
sentence = sentence.format(
points=f"[b]{points} point{'s'[:points^1]}[/b]",
)
rich.print(f"{sentence} {emoji}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment