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
server { | |
listen 80; | |
location /api/docs/ { | |
root /usr/share/nginx/html; | |
try_files $uri $uri/redoc.html; | |
} | |
location /api/ { | |
proxy_pass http://host.docker.internal:8000/api/; | |
proxy_set_header Host $host; | |
} |
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
version: '3.3' | |
services: | |
frontend: | |
build: | |
context: ../frontend | |
dockerfile: Dockerfile | |
volumes: |
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
server { | |
server_name simpletodo.webhop.me; | |
location /api/ { | |
proxy_pass http://127.0.0.1:8000; | |
} | |
location /admin/ { | |
proxy_pass http://127.0.0.1:8000; | |
} | |
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
# B. Комбинации | |
# https://contest.yandex.ru/contest/24734/problems/B/ | |
# Ввод: "23" Вывод: "ad ae af bd be bf cd ce cf" | |
# Технически решение верное, но предполагалось решать через рекурсию. | |
from itertools import product | |
buttons = { | |
2: 'abc', | |
3: 'def', | |
4: 'ghi', |
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
""" | |
Задача № 1. | |
A. Ближайший ноль | |
№ Посылки в Яндекс Контесте: 88140410 | |
""" | |
def distance_to_zero(amount: int, array: list) -> tuple[list, list]: | |
"""Подсчет расстояний до нуля.""" | |
left_dist = [0] * amount |
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
""" | |
Задача № 1. | |
A. Ближайший ноль | |
№ Посылки в Яндекс Контесте: # TODO: Вставить номер. | |
""" | |
import random | |
import time | |
def indexes_of_zeros(enumerated_array): |
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
# Задача: | |
# Не все любят математику, а кто-то даже считает её настоящим злом во плоти, хотя от неё никуда не деться. К | |
# примеру, Python изначально разрабатывался только для решения математических задач, поэтому давайте используем его, | |
# чтобы найти корни квадратного уравнения. | |
# | |
# Формат ввода | |
# Вводится 3 вещественных числа a, b, c — коэффициенты уравнения вида: | |
# ax^2+bx+c=0 | |
# | |
# |