This file contains hidden or 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 | |
import functools | |
import os | |
import re | |
import sys | |
import time | |
from collections.abc import Sized | |
from typing import Any, Callable, ClassVar, Generic, Iterable, Iterator, TextIO, TypeVar, cast |
This file contains hidden or 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, cast | |
import torch | |
class MAB(torch.nn.Module): | |
def __init__( | |
self, | |
input_dim: int, | |
num_heads: int, |
This file contains hidden or 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 | |
import os | |
import shutil | |
import subprocess | |
class Selector: | |
SUPPORTED_SELECTOR_COMMANDS = {"fzf", "peco"} | |
ENVKEY_SELECTOR_COMMAND = "SELECTOR_COMMAND" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 TypeVar | |
import numpy | |
from sklearn.base import BaseEstimator, ClusterMixin | |
from sklearn.cluster import KMeans | |
Self = TypeVar("Self", bound="HierarchicalKmeans") | |
class HierarchicalKmeans(BaseEstimator, ClusterMixin): |
This file contains hidden or 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 dataclasses | |
import datetime | |
import re | |
import socket | |
import socketserver | |
import time | |
class config: | |
SOCKET_TIMEOUT = 10 |
This file contains hidden or 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 time | |
from collections.abc import Iterable, Iterator | |
from multiprocessing import Process, Queue | |
from types import TracebackType | |
from typing import Generic, Type, TypeVar | |
T = TypeVar("T") | |
class NumberIterator: |
This file contains hidden or 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 functools | |
import itertools | |
import sys | |
import threading | |
import time | |
from collections.abc import Callable, Iterable | |
from concurrent.futures import ThreadPoolExecutor | |
from typing import Any, TextIO, TypeVar | |
T = TypeVar("T") |
This file contains hidden or 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 abc | |
import functools | |
from os import PathLike | |
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Union | |
import fugashi | |
import minato | |
class Token(NamedTuple): |
This file contains hidden or 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 Generic, Hashable, Iterable, Mapping, Optional, Sequence, TypeVar | |
import numpy | |
from sklearn.base import TransformerMixin | |
T_Token = TypeVar("T_Token", bound=Hashable) | |
Self = TypeVar("Self", bound="SwemVectorizer") | |
class SwemVectorizer(Generic[T_Token], TransformerMixin): # type: ignore[misc] |