text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: int): v3 = len(v1.query(f'pred <= {v2}').query(f'true <= {v2}')) v4 = len(v1.query(f'true <= {v2}')) v5 = len(v1) v6 =...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> dict: v3 = {} for v4 in v2: if v4 in v1: v3[v4.replace('_', ' ')] = v1[v4] return v3 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = pd.DataFrame ``` ```python v1 = pd.Series ``` Input Types: v0, str, v0, v1, list, list Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: str, v5: v0, v6: v1, v7: list, v8: list): v3 = self.to_float(v3,...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: if self.handler is None: return None if self.bitbox02_device is None: self.pairing_dialog() return self.bitbox0...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Dict, int, float Output Type: Dict Dependencies: ```python def v0(v1: Dict, v2: List, v3: float) -> Tuple[bool, int]: v4 = v1['neck'] v5 = v1['nose'] for (v6, v7) in enumerate(v2): v8 = v7['neck'] v9 = v7['nose'] ...
Imports: ```python import os import typing ``` Type definitions: Input Types: dict, str Output Type: None Dependencies: ```python def v0(v1: str, v2: dict, v3: str) -> any: if v3 in v1: v4 = v1.split(v3) v5 = v2[v4[0]] v4.pop(0) for v6 in v4: try: v5 = v5...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if not v1: raise argparse.ArgumentTypeError("Cannot proceed with an empty value: '%s'" % v1) return v1 ```
Imports: ```python import inspect import typing ``` Type definitions: ```python v0 = Union[Callable[[T], R], Callable[[T], Awaitable[R]]] ``` ```python v1 = Union[Iterable[T], AsyncIterable[T]] ``` ```python v2 = TypeVar('T') ``` Input Types: Optional[v0], v1[v2] Output Type: AsyncIterator[v2] Dependencies: ```python a...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: tweepy.API, Exception, str Output Type: Any Dependencies: ```python def v0(): return datetime.now().strftime('%I:%M:%S %p %d/%m/%Y') ``` ```python def v1(v2, v3=False): v4 = '-------------\n' v2 = v2 + '\n' ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.dest_file = self.get_file_no_ext() + v1 self.dest_file_path = os.path.join(self.dest_path, self.dest_file) ```
Imports: ```python import numpy as np from scipy.stats import entropy import typing ``` Type definitions: Input Types: np.ndarray, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2=2) -> float: if np.isclose(np.sum(v1), 0): return 0 return entropy(v1,...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Iterable[Any], Iterable[float], Iterable[Optional[float]], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any, v2: Iterable[Any], v3: Iterable[float], v4: Iterable[Optional[float]], v5: Any=None) -> No...
Imports: ```python import typing ``` Type definitions: Input Types: argparse.Action, str, str, int, int, Any Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: argparse.Action, v2: str, v3: str, v4: int, v5: int, v6=()) -> List[str]: if v1.dest in self._arg_choices: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1, v2, v3): self.name = v1 self.frequent = v2 self.ancester = v3 self.nextLink = None self.children = {} def v4(self, v5): self.frequent += v5 def v6(self...
Imports: ```python import tensorflow as tf from tensorflow.python.keras.utils import tf_utils from tensorflow.python.keras import backend as K import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, tf.Tensor, tf.Tensor, tf.Tensor, Optional[tf.Tensor] Output Type: tf.Tensor Dependencies: ```python def v...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1) -> str: v2 = '' for v3 in range(len(v1) - 1): if v1[v3] != v1[v3 + 1]: v2 += v1[v3] return (v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: ty.Literal['visual', 'classes'], ty.Literal[True, False] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ty.Literal['visual', 'classes']='classes', v2: ty.Literal[True, False]=False, **v3: [str, ty.Any]): if ...
Imports: ```python import logging import pandas as pd import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: Path v3: str = None v4: Path = None v5: Path = None v6: pd.DataFrame = None v7: pd.DataFrame = None v8: dict = None def v9(self, v10): v11 = g...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], Optional[str], Optional[float] Output Type: 'Link3D' Dependencies: Function Name: v0 Function: ```python def v0(self, *, v1: Optional[str]=None, v2: Optional[str]=None, v3: Optional[float]=None) -> 'Link3D': if v1 is not None: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.stats.end_session(self.current_connection) self.current_connection = None ```
Imports: ```python import typing ``` Type definitions: Input Types: list[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[str]) -> None: v1.insert(0, 'Select device') self.camerasComboBox.changeWidgetSettings(v1) self.camerasComboBox.isEnabled = True ```
Imports: ```python import typing ``` Type definitions: Input Types: asdl.Constructor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: asdl.Constructor): self.ostream.write(v1.name) self._visitFields(v1.fields) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = 1 if len(v1) <= 1: return len(v1) else: for v3 in range(len(v1)): for v4 in range(len(v1) - 1, v3, -1)...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = inspect.getouterframes(inspect.currentframe()) return v1[1].function ```
Imports: ```python import re import datetime import typing ``` Type definitions: Input Types: str Output Type: datetime Dependencies: ```python def v0(v1: str) -> datetime: v2 = datetime.datetime.utcnow() if v1 == 'now': return v2 elif v1 == 'now/d': return datetime.datetime.combine(v2.date...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Iterator[int] Dependencies: ```python def v0(v1: int) -> int: return v1 // 3 - 2 ``` Function Name: v2 Function: ```python def v2(v3: int) -> Iterator[int]: v4 = v0(v3) while v4 > 0: yield v4 v4 = v0(v4) ``...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, ...] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, ...]: v2 = v1.split('.') if not all(map(str.isidentifier, v2)): raise ValueError(f'import path is invalid: {repr(v1)}')...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> float: if v1 > 0.0: self._save_update(v1) print('{:.2f} deposited'.format(v1 / 100)) return self._balance / 100 ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self: v0, v1: Cdef, v2: str, v3: Any, v4: Types) -> None: self._cdef = v1 self._name = v2 self._default = v3 self._types = v4 self._resolved_foreign = False self._foreign_cdef = N...
Imports: ```python import typing ``` Type definitions: Input Types: datetime Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: datetime): v2 = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] v3 = v2[int(v1.strftime('%w'))] return v1.strftime(f'Le %d/...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Callable, v2: Optional[ModuleType]=None, v3: Optional[str]=None, **v4): self.function = v1 self.plugin = v2 self.plugin_name = v3 self._specname = v4.get('specname') def __repr__(s...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: str, Union[str, datetime.datetime, None], Union['INFO', 'WARN', 'DEBUG'] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[str, datetime.datetime, None]=None, v3: Union['INFO', 'WARN'...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], List[str], Dataset, Dict[str, List[int]] Output Type: Dataset Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2: List[str], v3: Dataset, v4: Dict[str, List[int]]) -> Dataset: v3 = self._indexed_dataset(...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> List[str]: if len(v1) < 10: return [] v2 = defaultdict(int) for v3 in range(len(v1) - 9): ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, v2): if not v1 or should_ignore(v2): return v2 if not v1 % 3: return get_synonym(v2) elif not v1 % 7: return get_definition(v2) return v2 ``` Function Name...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, List[str]], Union[str, List[str]], str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, List[str]], v2: Union[str, List[str]], v3: str='cos_sim'): if v3 not in self.score_functions: ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: 'BlockManager' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> 'BlockManager': v2 = [] for v3 in self.blocks: if v3.dtype == bool: v2.append(v3) elif v3.is_obje...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Callable, Optional[Any], Any, bool, bool, Optional[int], Optional[Union[bool, Callable]], Optional[Any] Output Type: Union[Tuple[str, str], Tuple[str, None]] Dependencies: ```python def v0(v1, v2=None): v3 = get_arg_names(v1) v4...
Imports: ```python import numpy as np from scipy import optimize import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, float, float, float, float, float, float Output Type: Tuple[n...
Imports: ```python from enum import Enum import warnings import typing ``` Type definitions: Input Types: Any, Any, Any, Dict[type, Callable] Output Type: Any Dependencies: ```python def v0(v1, v2: Dict[type, Callable]=None): if v2 and type(v1) in v2: return v2[type(v1)](v1) if isinstance(v1, Enum): ...
Imports: ```python from subprocess import Popen, PIPE import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): with Popen(v1, shell=True, stdout=PIPE) as v2: return v2.stdout.read() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if v1.strip().casefold().startswith('https://'): return v1 for (v2, v3) in self._kusto_settings.items(): if v2.startswith(f'https:...
Imports: ```python from math import log import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, float Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: float) -> np.ndarray: v4 = list() for (v5, v6) in zip...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Dict[str, str], Dict[str, str], bool, bool, bool, Optional[str], List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: Dict[str, str]={}, v4: Dict[str, str]={}, v5: bool=False, v6:...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Dict[str, dict], Dict[str, dict] Output Type: Dict[str, dict] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, dict], v2: Dict[str, dict]) -> Dict[str, dict]: v3 = copy.deepcopy(v1) for (v4, v5) in v2.items...
Imports: ```python import typing ``` Type definitions: Input Types: JavaParserLabeled.PackageDeclarationContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: JavaParserLabeled.PackageDeclarationContext): if self.import_statement: self.rewriter.insertAfterToken(token...
Imports: ```python import itertools import typing ``` Type definitions: ```python v0 = Dict[Cell, Set[int]] ``` ```python v1 = Tuple[int, int] ``` Input Types: v0, int Output Type: Dict[v1, Set[int]] Dependencies: ```python def v2(v3, v4): return all((set(v3).issubset(set(el)) or set(v3).isdisjoint(set(el)) for v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1) -> int: if v1 in list: del list[v1] return 1 else: return 0 ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Dict[str:int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Dict[str:int]: v2 = dict() for v3 in os.listdir(v1): if os.path.isfile(v3): v4 = os.path.join(v1, v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> int: v2 = sorted(v1) v3 = 0 v4 = 0 for (v5, v6) in enumerate(v2): v7 = v6 - v2[v5 - 1] if v5 > 0 else v6 if v7 == 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any, v2=True): self.last = self.value self.value = v1 if v2: for v3 in self.listeners: v3.dirty = True ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._get_conn_params() v2 = 'snowflake://{user}:{password}@{account}.{region}/{database}/{schema}?warehouse={warehouse}&role={role}&authenticator...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, Any, list Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: str, v3, v4: list) -> dict: v5: dict = {'name': v2, 'image': v3, 'roles': v4} return await self._request('POST', params=v5, u...
Imports: ```python from heapq import heappop, heappush import typing ``` Type definitions: ```python class v0: def __init__(self): self._items: List[PriorityPoint] = [] self._index: Dict[Point, PriorityPoint] = {} self._counter = itertools.count() def v1(self) -> str: return se...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str] Output Type: str Dependencies: ```python def v0() -> Optional[str]: v1 = buildinfo.BuildInfo() v2 = v1.ImageID() v3 = v1.Release() v4 = stage.get_active_stage() v5 = [] if winpe.check_winpe(): v5.append('W...
Imports: ```python import typing ``` Type definitions: Input Types: tk.Widget Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tk.Widget, **v2): v1.pack(**v2) return self ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[int] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[int]) -> str: if v1 is None: return 'unknown from tip' return '%.1f MB from tip' % (v1 / 1000000) ```
Imports: ```python import math import typing ``` Type definitions: Input Types: Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> float: v3 = v1[0] v4 = v1[1] v5 = v2[0] v6 = v2[1] v7 = math.radians(v5) v8 = math.radians(v3) v9 = math.radians...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1, v2: str, v3: Optional[str]=None, v4: Optional[List[Any]]=None, v5=None, v6: Optional[int]=None, v7: bool=False): self.node_type: str = v2 'The node type (ie. line, page, cell etc)' self...
Imports: ```python import configparser import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1 = configparser.ConfigParser() v1.read('./oauth_settings.ini') v2 = v1['Google'] return int(v2['RedirectPort']) ```
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: int v2: dict ``` Input Types: list Output Type: List[v0] Dependencies: Function Name: v3 Function: ```python def v3(self, v4: list) -> List[v0]: v5: List[v0] = [] for v6 in v4: v5.extend(self.getIssueComm...
Imports: ```python import typing ``` Type definitions: Input Types: sqlalchemy.orm.Session, mlrun.api.utils.projects.follower.Member, mlrun.api.utils.projects.remotes.leader.Member Output Type: Any Dependencies: ```python def v0(v1: sqlalchemy.orm.Session, v2: mlrun.api.utils.projects.follower.Member, v3: mlrun.api.sc...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: Optional[str]=None, v3: int=1): self.limit_name: str = v1 self.tokens: int = v3 self.node_path: Optional[str] = v2 self.limit: Optional[Limit] = None def v4(self, v5: Limi...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> None: if not self.parse_name(): return if not self.import_object(): return v3 = self.get_sourcename() v4 = self._process...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, list Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame, v2: list) -> None: for v3 in v2: v4 = self.__prefix_to_remove + v3[0] v5 = self.__prefix_to_remove + v3[1] ...
Imports: ```python from keras.engine import data_adapter import typing ``` Type definitions: Input Types: tuple Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple) -> dict: (v2, v3, v4) = data_adapter.unpack_x_y_sample_weight(v1) v5 = self.preprocessing_x(v2) v6 =...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, *, v3: str=None): v3 = v3 if v3 is not None else self.vhost v4 = self.build_url('/bindings/{vhost}/e/{exchange}/q/{queue}', vhos...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[float, bool] ``` Input Types: float, bool Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: float, v3: bool) -> v0: v4 = v2 + 0.5 if not v3: raise AssertionError(v3) else: v5 = False ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not self.stopped: return v1 = self._client.add_callback(self._on_response) self.callback_id = v1.id ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4=str): v5 = os.environ.get(v3, v1.get(v2)) if v5: v1[v2] = v4(v5) ``` ```python def v6(): from glcontext import egl def v7(*v8, **v9): v0(v9, ...
Imports: ```python import typing ``` Type definitions: Input Types: aiohttp.ClientSession, typing.List[str], int Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: aiohttp.ClientSession, v2: typing.List[str], v3: int): async with v1.get('http://localhost:8080/task/get', headers=...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: if self._alert_timestamp[v1] is None: return False return self._timestamp - self._alert_timestamp[v1] > self._timeout ```
Imports: ```python import numbers import torch import numpy as np import typing ``` Type definitions: Input Types: Union[np.ndarray, torch.Tensor, Union[List[np.ndarray], List[torch.Tensor], List[numbers.Number], List[str], List[List[np.ndarray]], List[List[torch.Tensor]], List[List[numbers.Number]], List[List[str]]]]...
Imports: ```python import torch from torch import Tensor import torch.nn as nn import typing ``` Type definitions: Input Types: Set[Tuple[nn.Module, str]] Output Type: Tuple[List[nn.Parameter], List[Tuple[str, nn.Module, str]], List[Tuple[str, str, nn.Module, str, nn.Module, str]]] Dependencies: Function Name: v0 Fun...
Imports: ```python import typing ``` Type definitions: ```python v0 = Mapping[TypeVarLike, Sequence['Bound']] ``` Input Types: Sequence[v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: Sequence[v0]) -> v0: v3 = {} for v4 in v2: for (v5, v6) in v4.items(): v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: self.upgrader.zero_obs() v1 = self.fit_step() return v1['acc'] - self.last_eve.mean().item() * 0.15 ```
Imports: ```python import functools import os import sys import typing ``` Type definitions: ```python v0 = Callable[[str], str] ``` Input Types: Output Type: Iterator[v0] Dependencies: ```python def v1(v2: int) -> str: return '\x1b[{}m'.format(v2) ``` ```python def v3(v4: str, v5: int=0, v6: bool=False) -> str: ...
Imports: ```python from numbers import Number import typing ``` Type definitions: Input Types: Any Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Optional[str]: if isinstance(v1, str): return v1 or None elif isinstance(v1, Number): return str(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._error is None: return raise ConnectionError(self._error) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = typing.Optional[_T_SOCKADDR] ``` Input Types: bytes, v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: bytes, v3: v0=None): if not self.transport: self.log.error('no transport set on %r but tried to...
Imports: ```python import typing ``` Type definitions: Input Types: str, Dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict=None) -> None: if v2 is None: v2 = {} self._connection._send_message_to_server(self._guid, v1, v2) ```
Imports: ```python import numpy as np import pandas import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3 = pandas.read_csv(v1) v4 = v3['Velocity'].values v5 = np.arange(0, 3450, 50) v6 = [] for (...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): assert self.initial_lrs is not None, 'Please run .record_lrs(optimizer) first.' for (v2, v3) in zip(self.optimizer.param_groups, self.initial_...
Imports: ```python from shapely.geometry import Polygon from shapely.ops import cascaded_union import typing ``` Type definitions: Input Types: List Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List): v2 = [] for v3 in v1: if v3.is_initialized(): v2...
Imports: ```python from typing import Any, Iterable, Optional, Tuple, cast from .http import WS_CLOSED_MESSAGE, WS_CLOSING_MESSAGE, WS_KEY, WebSocketError, WebSocketReader, WebSocketWriter, WSCloseCode, WSMessage, WSMsgType as WSMsgType, ws_ext_gen, ws_ext_parse import typing ``` Type definitions: Input Types: Optiona...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3: str): if not v3 in self.scryfallJson[v1][v2]: raise KeyError("This tuple has no key '{}'".format(v3)) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: bool Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> Optional[str]: if not self.license_file and v1 and self.project.monorepo and (not self.license or self.license == self.p...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Tuple[float, pd.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Tuple[float, pd.DataFrame]: (v2, v3) = (0.0, v1) for v4 in self.executors: (v2, v3) = v4.execute(v3) v5 = v3 f...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: v2 = v1 while True: v3 = 0 while v2 > 0: v4 = v2 % 10 v3 += v4 * v4 v2 //= 10 ...
Imports: ```python import base64 import json import typing ``` Type definitions: Input Types: str, float Output Type: Any Dependencies: ```python def v0(v1: dict) -> Optional[TaskResult]: if not v1: return None if v1['error'] is not None: v1['error'] = deserialize_serializable(base64.b64decode(...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: int, list, list, list, list, list, float, float Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: list, v3: list, v4: list, v5: list, v6: list, v7: float, v8: float) -> pd.Data...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int], Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: List[int], v3=False) -> bool: if v3: v1.sort() v2.sort() if len(v1) != len(v2): print(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Dict[str, torch.LongTensor]], torch.Tensor, torch.LongTensor, Dict[str, Dict[str, torch.LongTensor]], torch.Tensor, Any Output Type: Dict[str, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Dict...
Imports: ```python import glob import os import re from urllib.parse import urlparse import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str) -> Tuple[str, str]: v2 = urlparse(v1) return (v2.netloc, v2.path.strip('/')) ``` ```python def v3(v4: str, v5:...
Imports: ```python import binascii import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: with open(v1, 'rb') as v2: return binascii.hexlify(v2.read(2)) == b'1f8b' ```
Imports: ```python import typing ``` Type definitions: Input Types: 'Strand' Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Strand') -> bool: for v2 in self.bound_domains(): for v3 in v1.bound_domains(): if v2.overlaps(v3): return True ...
Imports: ```python import json import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: str=''): v2 = self.cache_dir if v2 == '' else v2 self.lock.acquire() try: with open('{}/{}.json'.format(v2, self...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Tuple[dict, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> Tuple[dict, str]: v1['comments'][v1['id']] = {} v1['comments'][v1['id']]['id'] = v1['id'] v1['comments'][v1['id']]['parent_id'] = '...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: v1 = input('\nThe docs now need to be regenerated. Do you already have editing access to readme.com? [Y/n]: ') v2 = 'https://dash.readme.com/project/pant...
Imports: ```python import json from os import getcwd, path, remove import typing ``` Type definitions: Input Types: str Output Type: Dict[str, Tuple[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Dict[str, Tuple[str, str]]: v2 = dict() with open(v1, 'r') as v3: for v...