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 functools import cache | |
from typing import TYPE_CHECKING, Optional | |
@cache | |
def delayed_import_once(): | |
global queue | |
import queue | |
if TYPE_CHECKING: |
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
""" | |
Gradient.ai client supporting asyncio, requests and encoder-optiomized mini-batching | |
""" | |
import asyncio | |
import logging | |
import os | |
from concurrent.futures import ThreadPoolExecutor | |
from typing import Any, Callable, Dict, List, Optional, Tuple |
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
"""MIT Licence, 2023, Michael Feil """ | |
import pandas as pd | |
import os | |
import requests | |
import math | |
import numpy as np | |
from typing import Callable | |
import time | |
CACHE_DIR = str(os.path.join(os.path.dirname(__file__), ".geocache")) |