Skip to content

Instantly share code, notes, and snippets.

@mdbenito
mdbenito / debug_list_struct_json.py
Last active September 18, 2025 13:27
kuzu STRUCT(...)[] bug
import itertools
import logging
import shutil
import tempfile
from pathlib import Path
import kuzu
logging.basicConfig(format="%(message)s", level=logging.DEBUG)
logger = logging.getLogger(__name__)
@mdbenito
mdbenito / batched.py
Created September 17, 2023 15:49
Batched iterators
from typing import Type, Callable, Iterable, List, TypeVar, Generator, cast
import pytest
T = TypeVar('T')
def class_wraps(original_cls: Type) -> Callable[[Type], Type]:
""" A decorator to update the wrapped class's docstring with that of the
original class (plus that of the wrapped class).
@mdbenito
mdbenito / float-api-v3-openapi.yaml
Last active April 22, 2022 09:18
An (incomplete) OpenApi spec for float.com's v3 API
openapi: 3.0.0
info:
version: '3.0'
title: Float API
description: This API allows 3rd party integration of your Float data.
security:
- bearerAuth: []
paths:
/accounts: