I hereby claim:
- I am anatoly-scherbakov on github.
- I am homo_yetiensis (https://keybase.io/homo_yetiensis) on keybase.
- I have a public key ASBsAsof7Lc8L9y_3XGt8gxpA9Z8iSepWgQOu0fhav-jTQo
To claim this, I am signing this object:
#!/bin/env python3 | |
import json | |
from pyparsing import ( | |
ParserElement, Literal, Group, restOfLine, | |
ZeroOrMore, LineEnd, CharsNotIn | |
) | |
TEXT = """UNRAR 5.71 freeware Copyright (c) 1993-2019 Alexander Roshal |
I hereby claim:
To claim this, I am signing this object:
import dataclasses | |
@dataclasses.dataclass(frozen=True) | |
class AgeError(Exception): | |
name: str | |
age: int | |
def __str__(self): | |
return f'{self.name}, your age {self.age} is below minimum. Go play.' |
# Source: | |
# https://github.com/wemake-services/wemake-python-styleguide/blob/master/setup.cfg | |
# All configuration for plugins and other utils is defined here. | |
# Read more about `setup.cfg`: | |
# https://docs.python.org/3/distutils/configfile.html | |
# === Linter configuration === | |
# You can reuse this configuration in your own projects. |
insert | |
$jedi isa order, has name "Jedi"; | |
$sith isa order, has name "Sith"; | |
# Okay, let's start with some Jedi masters we know of. | |
$obi-wan isa human, has name "Obi-Wan Kenobi", has gender "male"; | |
$obi-wan-is-jedi (member: $obi-wan, member-of: $jedi) isa membership; | |
# What do we know about Anakin? |
import itertools | |
import functools | |
from typing import Iterator | |
import datetime | |
from dateutil.relativedelta import relativedelta | |
def month_range( | |
start: datetime.date, |
import dataclasses | |
from datetime import datetime | |
from typing import Optional, Dict, Iterable | |
@dataclasses.dataclass(frozen=True) | |
class Memento: | |
original_url: str | |
time: datetime | |
archived_headers_cid: str |
#!/usr/bin/env bash | |
get_concurrency="aws lambda get-function-concurrency --function-name {} | jq -r '\"{.},\( .ReservedConcurrentExecutions )\"'" | |
tmpfile=$(tempfile) || exit | |
aws lambda list-functions \ | |
| jq -r '.Functions[] .FunctionName' \ | |
| parallel "$get_concurrency" > ${tmpfile} |
from typing import Generic, TypeVar | |
from pydantic import ValidationError | |
from pydantic.fields import ModelField | |
T = TypeVar('T') | |
class CommaSeparatedList(Generic[T]): | |
"""Parse and validate a list of comma separated values.""" |
""" | |
Test JSON-LD expand operation in PyLD. | |
Supplementary code for https://github.com/digitalbazaar/pyld/issues/143 | |
""" | |
import json | |
from pyld import jsonld |