Skip to content

Instantly share code, notes, and snippets.

View mdbenito's full-sized avatar

Miguel de Benito Delgado mdbenito

View GitHub Profile
@mdbenito
mdbenito / simple_tests.py
Last active April 27, 2024 15:36
Testing the PR
import joblib
from pydvl.valuation.methods import *
from pydvl.valuation.samplers import AntitheticSampler
from pydvl.valuation.samplers import PermutationSampler
from pydvl.valuation.samplers.truncation import DeviationTruncation, RelativeTruncation
from pydvl.valuation.scorers.supervised import SupervisedScorer
from pydvl.valuation.stopping import HistoryDeviation, MaxUpdates
from pydvl.valuation.types import Sample
from pydvl.valuation.utility import DataUtilityLearning, ModelUtility
@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: