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/env bash | |
set -e | |
# USAGE: | |
# COPY .devcontainer/ /app/.devcontainer/ | |
# ARG VSCODE_VERSION=2ccd690cbff1569e4a83d7c43d45101f817401dc | |
# RUN bash .devcontainer/preinstall-vscode-extensions.sh $VSCODE_VERSION /app/.devcontainer/devcontainer.json | |
# | |
# Preinstall vscode server extensions. | |
# Uses vscode of provided version (git commit hash) to download extensions inside container |
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 Optional, Any, Callable | |
from django.http import HttpRequest, HttpResponse, HttpResponseNotAllowed | |
View = Callable[..., HttpResponse] | |
def view_dispatch( | |
*, |
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 flask import Flask, jsonify | |
from pydi.context import BeanContext | |
from services import * | |
if __name__ == '__main__': | |
ctx = BeanContext() | |
ctx.scan(globals()) | |
ctx.init() |
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 Set | |
# Библиотека pyyaml (https://pyyaml.org/wiki/PyYAMLDocumentation) | |
import yaml | |
class IllegalServicesDependenciesError(RuntimeError): | |
pass | |
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
char_to_dig = { | |
'0': 0, | |
'1': 1, | |
'2': 2, | |
'3': 3, | |
'4': 4, | |
'5': 5, | |
'6': 6, | |
'7': 7, | |
'8': 8, |