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 __future__ import annotations | |
from dataclasses import dataclass, replace | |
from typing import Callable, Generic, Literal, Optional, TypeVar, Union, cast | |
Player = Union[Literal['X'], Literal['O']] | |
Piece = Union[Player, Literal[' ']] | |
@dataclass |
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 re | |
import json | |
import contextlib | |
from itertools import chain | |
from urllib.request import urlopen | |
from urllib.parse import urlparse | |
from datetime import datetime | |
import pandas | |
import matplotlib.pyplot as plt |
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 pandas as pd | |
import operator as op | |
from functools import partial | |
from datetime import datetime | |
def eval(node, df): | |
if not isinstance(node, tuple | str): | |
return node | |
if isinstance(node, str): |
OlderNewer