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 json | |
import re | |
import time | |
from random import choice, random | |
from typing import TextIO, Callable, Sequence, Tuple, Optional | |
import click | |
NAME = DATE = str | |
SPAN_OFFSET = Tuple[int, 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
def maximal_fully_ordered_sublists(s: List[T]) -> List[List[T]]: | |
""" | |
Find maximum-length sequences of in-order items in a list. | |
Let s be a list of items over which there exists a total ordering defined by the < operator. | |
Let a fully-ordered sublist s' of s be s with elements removed so that the elements of s' are monotonically | |
increasing. | |
The maximal fully-ordered sublists of s are the set of fully-ordered sublists such that no sublist is contained in | |
another one. |
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
#!/usr/bin/env python | |
import shutil | |
from pathlib import Path | |
from typing import Iterable, Tuple, Optional | |
import click | |
from celery import Celery | |
from celery.utils.log import get_task_logger | |
from tqdm import tqdm |
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
$ pip install --no-build-isolation --editable ".[transformers,ray]" | |
Obtaining file:///Users/wmcneill/Documents/src/spaCy | |
Preparing wheel metadata ... done | |
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.8 in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/site-packages (from spacy==3.1.3) (3.0.8) | |
Requirement already satisfied: setuptools in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/site-packages (from spacy==3.1.3) (58.0.4) | |
Requirement already satisfied: typer<0.5.0,>=0.3.0 in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/site-packages (from spacy==3.1.3) (0.4.0) | |
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/site-packages (from spacy==3.1.3) (2.26.0) | |
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/site-packages (from spacy==3.1.3) (2.0.5) | |
Requirement already satisfied: packaging>=20.0 in /Users/wmcneill/opt/anaconda3/envs/spaCy/lib/python3.9/s |
OlderNewer