Skip to content

Instantly share code, notes, and snippets.

@jnewbery
Last active February 10, 2025 16:01
Show Gist options
  • Save jnewbery/0de8fe3c2f1b21cd242e866bed14a384 to your computer and use it in GitHub Desktop.
Save jnewbery/0de8fe3c2f1b21cd242e866bed14a384 to your computer and use it in GitHub Desktop.
axle_dance.py
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "rich",
# ]
# ///
import time
import os
from rich.console import Console
from rich.text import Text
console = Console()
# Define the four frames of the axolotl animation with sparkly effects
frames = [
"""
[bold magenta]✨ AXLE ✨[/bold magenta]
(o~o)
<( )>
^^ ^^
""",
"""
[bold cyan]✨ AXLE ✨[/bold cyan]
(o~o)
<( )>
^^ ^^
""",
"""
[bold yellow]✨ AXLE ✨[/bold yellow]
(o~o)
<( )>
^^ ^^
""",
"""
[bold green]✨ AXLE ✨[/bold green]
(o~o)
<( )>
^^ ^^
""",
]
# Loop through the frames to create an animation effect
while True:
for frame in frames:
os.system("clear" if os.name == "posix" else "cls") # Clear the screen
console.print(Text.from_markup(frame))
time.sleep(0.3) # Delay between frames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment