macOS Live Text has a very good quality/speed tradeoff.
Compared to Tesseract, it has much higher quality and is up to 3x as fast.
| import enum | |
| class EnumWithDisplayName(enum.Enum): | |
| def __new__(cls, value, name=None): | |
| if not hasattr(cls, "_value_to_display_name"): | |
| cls._value_to_display_name = {} | |
| cls._display_name_to_value = {} | |
| if name is not None: | |
| if value in cls._value_to_display_name: |
| AWS_REGION=fr-par mc alias set src https://s3.fr-par.scw.cloud <key> <secret> | |
| AWS_REGION=fsn1 mc alias set dst https://fsn1.your-objectstorage.com <key> <secret> | |
| MINIO_REGION=fsn1 AWS_REGION=fr-par mc mirror src/<src-bucket> dst/<dst-bucket> |
| AWS_REGION=fr-par mc alias set src https://s3.fr-par.scw.cloud <key> <secret> | |
| AWS_REGION=fsn1 mc alias set dst https://fsn1.your-objectstorage.com <key> <secret> | |
| MINIO_REGION=fsn1 AWS_REGION=fr-par mc mirror src/<src-bucket> dst/<dst-bucket> |
macOS Live Text has a very good quality/speed tradeoff.
Compared to Tesseract, it has much higher quality and is up to 3x as fast.
| raise ValidationError.from_exception_data( | |
| "test", | |
| [ | |
| InitErrorDetails( type='value_error', loc=(field_name,), input=None, ctx={"error": "my message"}) | |
| ] | |
| ) |
| import json | |
| import sqlite3 | |
| repodata = json.load(open("497deca9.json")) | |
| COLS = 'filename, build, build_number, depends, license, license_family, md5, name, sha256, size, subdir, timestamp, version'.split(', ') | |
| db = sqlite3.connect("497deca9.sqlite") | |
| db.execute("create table repodata ({}, primary key (filename))".format(','.join(COLS))) |
| import concurrent.futures.thread as _thread_impl | |
| import threading | |
| import time | |
| import weakref | |
| from concurrent.futures import Future | |
| class WorkStealThreadPoolExecutor(_thread_impl.ThreadPoolExecutor): | |
| """A ThreadPoolExecutor that supports work stealing. |
.ttf files)git clone https://github.com/tesseract-ocr/tesstrain/git clone https://github.com/tesseract-ocr/langdata_lstmcd src
python -m tesstrain \
--langdata_dir /path/to/langdata_lstm \
--linedata_only \
| def app(env, start_response): | |
| start_response('200 ok', []) | |
| return 'hello\n' |