
This file contains hidden or 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 dataclasses import dataclass | |
from typing import get_type_hints | |
@dataclass | |
class SimpleTypeCheck: | |
def __post_init__(self): | |
for k, t in get_type_hints(type(self)).items(): | |
k_v = getattr(self, k) | |
if not isinstance(k_v, t): |
This file contains hidden or 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
[pytest] | |
addopts = -rsxXvv | |
redis_exec = /usr/local/bin/redis-server | |
dynamodb_dir = /usr/local/opt/dynamodb |
This file contains hidden or 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
Country | Code | |
---|---|---|
Afghanistan | AF | |
Albania | AL | |
Algeria | DZ | |
American | AS | |
Andorra | AD | |
Angola | AO | |
Anguilla | AI | |
Antigua | AG | |
Argentina | AR |
This file contains hidden or 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
Country | CC | |
---|---|---|
Afghanistan | AF | |
Albania | AL | |
Algeria | DZ | |
American Samoa | AS | |
Andorra | AD | |
Angola | AO | |
Anguilla | AI | |
Antigua and Barbuda | AG | |
Argentina | AR |
This file contains hidden or 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
CC | AOF | |
---|---|---|
AT | 14 | |
BE | 13 | |
CL | 14 | |
CZ | 15 | |
DK | 13 | |
EE | 13 | |
FI | 13 | |
FR | 15 | |
IT | 14 |
This file contains hidden or 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 sanic import Sanic | |
from sanic.response import json | |
from sanic.request import Request | |
from sanic_jwt_extended import JWT | |
import uuid | |
app = Sanic(__name__) |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ReDoc</title> | |
<!-- needed for adaptive design --> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- | |
ReDoc doesn't change outer page styles |
This file contains hidden or 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" | |
"net/http" | |
) | |
type Hello struct{} | |
func (h Hello) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
This file contains hidden or 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
@curry({"t", 12}) | |
def do_x(v, t): | |
... | |
match(func, arg1, arg2) >> { | |
str: do_x, | |
int: lambda x: print x, | |
InternalException: handle, | |
...: handle_default, | |
} |