def year_week(history: History) -> float: week = history.get_datetime().isocalendar()[1] ratio = week - history.get_datetime(-1).isocalendar()[1] return 1 + ratio / 5
def week_day(history: History) -> float: day = history.get_datetime().weekday() ratios = [20, 20, 15, 5, 0, -20, -30] return 1 + ratios[day] / 100
def effect2(history: History) -> float: week = history.get_datetime().isocalendar()[1] ratio = week / 52 return history.get_event(1) * (1 + ratio / 20)
def effect1(history: History) -> float: day = history.get_datetime().weekday() # [Sun, Mon, Tue, Wed, Thu, Fri, Sat] ratios = [20, 20, 15, 10, 0, -30, -50] return history.get_event(1) * (1 + ratios[day] / 100)
def func2(history: History) -> float: return history.get_datetime(1).isocalendar()[1]
def func1(history: History) -> float: return history.get_datetime().weekday()