Useful if you need to have some sort of child process stop handling something on received termination signal, rather than when the service is shutting down
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 json | |
import os | |
from typing import Any, Dict, KeysView, cast | |
class Settings: | |
def __init__(self, data: Dict) -> None: | |
self._data = data | |
def __str__(self) -> str: |
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
https://www.destroyallsoftware.com/talks/boundaries |
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
package main | |
import ( | |
"fmt" | |
"strings" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/service/dynamodb" | |
"github.com/fatih/structs" | |
) |
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
from __future__ import annotations | |
from contextvars import ContextVar | |
from typing import Callable, Generic, Type, TypeVar, Union | |
_CONTEXT: ContextVar[dict] = ContextVar("custom_context") | |
T = TypeVar("T") | |
class Descriptor(Generic[T]): |
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
from __future__ import annotations | |
import re | |
from decimal import ROUND_HALF_UP, Decimal, InvalidOperation # noqa | |
from typing import Any, Tuple, Type, Union | |
class Number(Decimal): | |
def __new__(cls: Type[Number], value: Union[int, str, float, Decimal] = "0") -> Number: | |
if isinstance(value, float): |
I hereby claim:
- I am justcallmelarry on github.
- I am justcallmelarry (https://keybase.io/justcallmelarry) on keybase.
- I have a public key whose fingerprint is B741 9D23 2D28 D669 F127 6859 C45D 49C8 687A B67C
To claim this, I am signing this object:
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
# HYGIEN | |
badrumsstuffs | |
handduk | |
tvättpåse | |
sol-mousse | |
huvudvärkstabletter | |
resorb | |
glasögon | |
linser |
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
(´⊙ω⊙`) | |
( ͡° ͜ʖ ͡°) | |
ᕦ(ò_óˇ)ᕤ | |
^_^ | |
^ ^ | |
^ - ^ | |
^^ | |
(^^) | |
(^ ^) | |
(^.^) |