class A(int):
def __add__(self, value):
return int(str(self) + str(value))
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 random | |
import rich | |
emojis = ( | |
":nerd_face:", | |
":scream:", | |
":smile:", | |
":sunglasses:", | |
":thinking_face:", |
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
class Bee: | |
def __str__(self): | |
return "🐝" | |
class Dog: | |
def stepped_on(self, something): | |
... | |
if isinstance(something, Bee): | |
raise SystemExit("😱🥴") |
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 shortenize(words: str): | |
""" | |
>>> shortenize("Causses et Vallée de la Dordogne") | |
"Cauvaldor" | |
""" |
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
""" | |
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 |
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
// go on you labels pages and paste this script in your console | |
var labels = []; | |
[].slice.call(document.querySelectorAll(".label-link")) | |
.forEach(function(element) { | |
labels.push({ | |
name: element.textContent.trim(), | |
// using style.backgroundColor might returns "rgb(...)" | |
bgcolor: element.getAttribute("style") | |
.replace("background-color:", "") | |
.replace(/color:.*/,"") |
I hereby claim:
- I am wo0dyn on github.
- I am wo0dyn (https://keybase.io/wo0dyn) on keybase.
- I have a public key whose fingerprint is 8801 6947 1D6E D70D 1C3C 9DE5 3F33 D53B 1F8D CF50
To claim this, I am signing this object:
Source: article from The Guardian
from itertools import permutations
Find a 9 letter string of characters that contains only letters from
acdegilmnoprstuw
such that the hash(the_string) is
910897038977002
NewerOlder