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
#!/usr/bin/env python3 | |
""" | |
see https://gist.github.com/samuelcolvin/3b662d40e28213fbcd046743cb7068d8 for details | |
""" | |
import os | |
import re | |
import sys | |
from importlib import import_module | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
from typing import Dict | |
from uuid import UUID | |
from pydantic import BaseModel, validator | |
from devtools import debug | |
NoneType = type(None) | |
json_types = {int, float, bool, NoneType} |
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
.PHONY: lint | |
lint: | |
python setup.py check -rms | |
flake8 watchgod/ tests/ | |
$(isort) --check-only | |
ifeq ($(shell python -c "import sys; print('{0.major}.{0.minor}'.format(sys.version_info))"),3.5) | |
@echo "black is not compatible with python3.5, not running" | |
else | |
$(black) --check | |
endif |
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
#!/usr/bin/env bash | |
port=${1:-5001} | |
while true; do | |
until $(curl -q -so /dev/null http://localhost:$port/logs -I && true); do | |
printf . | |
sleep 0.1 | |
done | |
curl -q -s http://localhost:$port/logs | |
for i in `seq 1 10`; do |
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 functools import partial | |
from typing import Any, Callable | |
StrCallable = Callable[[str], str] | |
def rabbit_hole_repeat(v: str) -> str: | |
return v * 2 | |
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
#!/usr/bin/env python3 | |
""" | |
pull from and pushing to other people's pull requests | |
(might require an auth key for private repos) | |
""" | |
import os | |
import re | |
import sys | |
import requests |
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 | |
from datetime import datetime | |
from pathlib import Path | |
from typing import List | |
from pydantic import BaseModel, PositiveInt, compiled, constr, version, validate_model | |
from pydantic.validators import _VALIDATORS, IfConfig | |
print(f'pydantic {version.VERSION}, compiled: {compiled}') |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"client_name": "GpQyYhDKoE\u00cejT\u00cfE'gnpPWGixFXkDbNJrUfH\u00e4JXRkZFmx+fEQfp\"zxMY\"Zkk-DXHj\u00a6avj\u00c2HMNrYs\u00ca lWMfTJjUOG)VUMHHnNVEREl&Hop\u00b9wq\u00e8PsDh\u00d0f-rcnO\u00c7hmAOfWb(tjWUHiTbnlLYjp,v\u00d4", | |
"client_phone": null, | |
"contractor": "227", | |
"grecaptcha_response": "YK\u00cbW$RkgocsI#jqgI'KtiJWH\u00feYYT\n\txlsKgoGbzYk/cSAgPCOLIG*FmWAF\u00ab+ZJy/RJrzGdKkuUbZmPM\u00f4\u00e0FenRSYh\u00f7HZYV\u00cffAYSb\u00f5\u00beC\u00a0XpA\u00c3ibsfOEiTyzB#BY\nXLfbeE'TMcOFgPTApNPdcGq+QVn\u00f4WiSlBICODTjOZYONIy$\u00e1NJimPl\u00c1Z\u00f7Xd'DLRlS\u00e3TGXG\u00cchbDeHrEuqxWdKBZ\u00b6Xu/GkpKIdRN'CUPGIW$\u00f1hnKGbKLdO\u00f6cWYUPOJWzitbWoH#ZqiNEcXR\u00cfqghnw\u00c6VoJiqHryohEJIoWQnOtNT(EFSUg\tteuJ.TciRh%ehZ+bq\u00f2fx\"qkCUwDVpRhx KWG\u00e3Nnbs\u00f3lK(eSm\u00c6\u00f3oGXCG#yP\u00d0\u00bbpwpVFUY\tDt\u00a6xy(t*\u00e1KnkZ)VFtnllGioTwoJ\nalmPCeVSVGfNg jJVOdIwDxJ.mym'K\u00c8fquJlTlFfsKbu)OveSxthu)BsP,gFHmpQf/pDPxOdVtXttRgGAHCiSaYyuFVd\u00c9ONXhkv\u00ceNqNO*'-hFdAXMFDwNykBzeEbyPuV$UInUpcGWSPeXaj |