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
#!/bin/bash | |
# License: GPLv2 | |
# set -o xtrace | |
if [[ -t 0 ]]; then | |
echo no stdin | |
exit 1 | |
elif [[ ! -f $(which fzf 2> /dev/null) ]]; then |
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 collections import defaultdict | |
class _attrdict(defaultdict): | |
__getattr__ = defaultdict.__getitem__ | |
__setattr__ = defaultdict.__setitem__ | |
def update(self, other): | |
super().update( | |
(k, v) for k, v in other.items() if not issubclass(type(v), dict) |
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 typing import Type | |
from pydantic import confloat, conint | |
""" | |
**kwargs for conint / confloat | |
strict: bool = False, | |
gt: float = None, | |
ge: float = None, |
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 datetime import datetime, time | |
import pytest | |
from hypothesis import given, assume, strategies as st | |
from hypothesis import settings, Verbosity | |
_cities = [f"city{i}" for i in range(4)] | |
_dt = st.shared( | |
st.datetimes( |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some text
Some text refering to another heading
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 logging | |
import dask | |
logger = logging.getLogger(__name__) | |
@dask.delayed | |
def times(arg, mult): | |
logger.info(f"Multiplying: {arg} * {mult}") | |
return arg * mult |
NewerOlder