I hereby claim:
- I am cwells on github.
- I am cliffwells (https://keybase.io/cliffwells) on keybase.
- I have a public key ASCNReFgwc-v0DTQ-_2gwf_br_YI8ZDQ9NxtqopyYHvfJAo
To claim this, I am signing this object:
| import json | |
| from typing import Any, TypedDict, Union, Callable, Optional | |
| from typeguard import CollectionCheckStrategy, check_type | |
| Serializer = Optional[Callable] | |
| def typed_object_factory(object_type: Any, serializer: Serializer=None): | |
| class TypedObject: |
| from typing import Any, TypedDict, Union | |
| from typeguard import CollectionCheckStrategy, check_type | |
| class TypedObject: | |
| def __init__(self, object_type: Any) -> None: | |
| self.object_type = object_type | |
| def validate(self, value: Any) -> Any: | |
| check_type( |
| #!/bin/env python | |
| import json | |
| import time | |
| from collections import ChainMap | |
| from functools import partial | |
| import click | |
| from taskgraph import TaskGraph |
I hereby claim:
To claim this, I am signing this object:
| def scale(x, a, b): | |
| # translate x from scale(a) -> scale(b) | |
| (a_min, a_max), (b_min, b_max) = a, b | |
| return ((b_max - b_min) * (x - a_min)) / (a_max - a_min) + b_min |
| #!/usr/bin/env python3 | |
| import dbus | |
| from dbus.mainloop.glib import DBusGMainLoop | |
| from gi.repository import GLib | |
| GEOCLUE = 'org.freedesktop.GeoClue2' | |
| DBUS_PROPERTIES = 'org.freedesktop.DBus.Properties' | |
| GCLUE_ACCURACY_LEVEL_COUNTRY = dbus.UInt32(1) |
| #!/usr/bin/env python3 | |
| SKYHOOK_SDK_KEY = '<your skyhook sdk key>' | |
| SKYHOOK_URL = 'https://global.skyhookwireless.com/wps2/location' | |
| UUID = '<generate using uuidgen>' | |
| import time | |
| import webbrowser | |
| import gi | |
| gi.require_version('NM', '1.0') |
| import functools | |
| def async_compat(func): | |
| @functools.wraps(func) | |
| def wrapper_decorator(*args, **kwargs): | |
| version = sys.version_info[0] + sys.version_info[1] / 10.0 | |
| if version >= 3.7: | |
| kwargs['is_async'] = kwargs.get('async', False) | |
| del kwargs['async'] | |
| return func(*args, **kwargs) |
| import collections | |
| def deep_fn_merge(fn, left, right): | |
| for k, v in right.iteritems(): | |
| if k in left and isinstance(left[k], dict) and isinstance(right[k], collections.Mapping): | |
| deep_fn_merge(fn, left[k], right[k]) | |
| else: | |
| left[k] = fn(left, right, k) | |
| def sum(left, right, key): |
| include("./strings.jl") | |
| filename, stride, highest = ARGS | |
| @time main(filename, parse(Int64, stride), parse(Int64, highest)) |