This file contains 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
plugin: openapi | |
specFile: deepchecks-openapi-spec.json |
This file contains 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
import signal | |
import contextlib | |
import os | |
from threading import Thread | |
from time import sleep | |
from datetime import datetime | |
class CustomInterrupt(Exception): | |
SIG = 63 |
This file contains 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 __future__ import annotations | |
import shutil | |
import sys | |
from pathlib import Path | |
from typing import Union | |
import pytest | |
SourceFileTree = dict[str, Union[str, Path, "SourceFileTree"]] |
This file contains 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 inspect import signature | |
from contextvars import ContextVar | |
from typing import Callable | |
from unittest.mock import sentinel | |
SENTINEL = sentinel.UNSET | |
ctx: ContextVar[dict] = ContextVar('extends_ctx') | |
ctx.set({}) | |
This file contains 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 pathlib import Path | |
from csv import DictReader | |
from collections import defaultdict | |
class DupelessDict(dict): | |
"""Duplicate entries may not pass silently.""" | |
def __setitem__(self, key, value): | |
if key in self: | |
raise ValueError(f"Duplicate {key=} encountered.") |
This file contains 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
nested_representation = { | |
5: { | |
"0-100": { | |
12: { | |
"new": 0.123, | |
"old": 0.321, | |
}, | |
24: { | |
"new": 0.1234, | |
"old": 0.4321, |
This file contains 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 collections import defaultdict | |
from os import path | |
def split_off_duplicate_individuals(mapping): | |
current = {} | |
dupes = {} | |
seen = set() | |
for group, (idv_a, idv_b) in mapping.items(): | |
if idv_a not in seen and idv_b not in seen: |
This file contains 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
import numpy as np | |
def plot(scenario: Scenario): | |
print(scenario.data) | |
class Scenario: | |
def __init__( | |
self, | |
some_modifier=2 | |
data=None |
This file contains 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 collections import defaultdict | |
import importlib.metadata | |
from typing import Any | |
from pprint import pp | |
from packaging.requirements import Requirement | |
from packaging.markers import Op, Value, Variable | |
def group_deps_by_extra(pkg: str) -> dict[str, list[str]]: |
NewerOlder