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 asyncio | |
import pytest | |
from alembic.command import upgrade as alembic_upgrade | |
from alembic.config import Config as AlembicConfig | |
from pytest_async_sqlalchemy import create_database, drop_database | |
@pytest.fixture(scope="session") | |
def event_loop(): |
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 collections import namedtuple | |
Days = namedtuple("Days", ("buy", "sell")) | |
def find_profit_days(n: int, prices: list[int]) -> Days: | |
min_price = prices[0] | |
max_profit = 0 | |
buy_day = 1 | |
sell_day = 1 |