Skip to content

Instantly share code, notes, and snippets.

View wo0dyn's full-sized avatar

Nicolas Dubois wo0dyn

View GitHub Profile
@wo0dyn
wo0dyn / earth_mars.py
Last active February 19, 2021 10:04 — forked from brunobord/earth_mars.py
What's the distance (in light-seconds and light-minutes) from Earth to Mars?
"""
Compute and display the Earth-Mars distance in light-seconds, light-minutes
and kilometers.
The easiest way is to install both ``skyfield`` & ``skyfield-data`` to compute
this:
$ pip install skyfield skyfield-data
You can also install `skyfield` only, but it'll force you to download the

In Computer Programming; 1 + 1 = …

class A(int):
    def __add__(self, value):
        return int(str(self) + str(value))
def shortenize(words: str):
"""
>>> shortenize("Causses et Vallée de la Dordogne")
"Cauvaldor"
"""
class Bee:
def __str__(self):
return "🐝"
class Dog:
def stepped_on(self, something):
...
if isinstance(something, Bee):
raise SystemExit("😱🥴")
@wo0dyn
wo0dyn / groom-this-issue.py
Last active February 15, 2024 02:40
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:",