Skip to content

Instantly share code, notes, and snippets.

View michaelfeil's full-sized avatar

Michael Feil michaelfeil

View GitHub Profile
@michaelfeil
michaelfeil / gradient_embedding.py
Created September 24, 2023 09:18
Gradient.ai client supporting asyncio, requests and encoder-optiomized mini-batching
"""
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
@michaelfeil
michaelfeil / pd_opentopodata.py
Last active April 23, 2023 10:02
Pandas + OpenTopoData.org
"""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"))