text
stringlengths
190
325k
Imports: ```python import numpy as np from matplotlib.artist import Artist from matplotlib.axes import Axes from matplotlib.figure import Figure from matplotlib.gridspec import GridSpec from matplotlib.lines import Line2D import typing ``` Type definitions: Input Types: int Output Type: List[Axes] Dependencies: Funct...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: Image, v2: int=16384) -> Iterator[tuple[int, str]]: v3 = len(v1) v4 = createZ80Fetcher(v1, 0, v3) for (v5, v6) in disassemble(z80, v4, v2): assert v2 <= v5 < v2 + v3 if ...
Imports: ```python import matplotlib import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: ad.AnnData, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ad.AnnData, v2=None): v3 = v1.X v4 = v1.obsm['cell_type'] if v2 is None: plt.figure(...
Imports: ```python import re import typing ``` Type definitions: Input Types: pd.DataFrame, bool, Optional[List[str]], Optional[Dict[str, str]], bool Output Type: Tuple[Dict[str, str], Dict[str, str]] Dependencies: ```python def v0(v1: pd.DataFrame, v2: bool, v3: Optional[Dict[str, str]]=None, v4: bool=False) -> Dict[...
Imports: ```python import typing ``` Type definitions: ```python class v0(Enum): v1 = 'model' v2 = 'dataset' ``` Input Types: v0, bool Output Type: List[str] Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0, v5: bool=False) -> List[str]: v6 = self._get_store_for_object(v4) v7 = [...
Imports: ```python import hashlib import typing ``` Type definitions: Input Types: str, int, float, float, int, str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: str, *, v2: int=4, v3: float=60, v4: float=100, v5: int=2, v6: str='Nnfj302b3inr') -> float: v7 = hashlib.sha3_256((...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: ```python def v0(v1: int, v2: int, v3: list): (v3[v1], v3[v2]) = (v3[v2], v3[v1]) ``` Function Name: v4 Function: ```python def v4(v5: list) -> list: v6 = False v7 = 0 while not v6: v6 = Tru...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): assert isinstance(v1, int) assert 0 <= v1 < len(self.vertices) v2 = [] for (v3, v4) in enumerate(self.triangles): if v1 in v4: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str, Dict[str, Any], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Dict[str, Any], v3: Any): v4 = [] for v5 in range(len(v2['{}_input'.format(v1)])): v6 = {} v6...
Imports: ```python import typing ``` Type definitions: Input Types: Any, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: list): v3 = [] for v4 in v2: v3.append(list(v1.classes)[int(v4)]) v5 = [] for v6 in v1: (v7, v8) = v6 if v8 in v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[bytes, bytes] Dependencies: Function Name: v0 Function: ```python def v0() -> Tuple[bytes, bytes]: try: return next(self.iterator) except StopIteration: raise StopAsyncIteration ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Tuple[str, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> Tuple[str, float]: v2[v2 < -1] = -1 + 1e-06 v3 = np.power(np.log1p(v1) - np...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.ArgumentParser Dependencies: Function Name: v0 Function: ```python def v0() -> argparse.ArgumentParser: v1 = argparse.ArgumentParser(description='Formats all python files since master with black through pant...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray) -> np.ndarray: if not isinstance(v1, np.ndarray): raise TypeError('Input must be array.') elif len(v1) == 0: raise ValueError(...
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = re.match('Response: Success! Block ([0-9a-f]+)\\.\\.\\. created and added.', v1.strip()) if v2 is None: raise UnexpectedProposeOutputFormatError(v1) r...
Imports: ```python import typing ``` Type definitions: Input Types: List[int or float] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int or float]) -> List[int]: if len(v1) == 0: return [] v2 = [] v2.append(int(v1[0])) v2.append(int(v1[1])) for ...
Imports: ```python import torch from torch.utils.data import Dataset as TorchDataset import typing ``` Type definitions: Input Types: int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> np.ndarray: v2 = self._x[v1] if not torch.is_tensor(v2): v2 = t...
Imports: ```python import os import tensorflow as tf import typing ``` Type definitions: Input Types: str Output Type: Dict[int, Dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Dict[int, Dict[str, Any]]: v2 = tf.io.gfile.glob(os.path.join(v1, 'events.out.tfevents.*')) v3...
Imports: ```python import os, sys import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: if os.name == 'nt': return os.environ.get('AppData', '') return os.environ.get('XDG_DATA_HOME', '') ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, str, int Output Type: Any Dependencies: ```python def v0(v1: str, v2: str) -> list: v3 = _get_teams_df() v4 = v3.loc[v3[v2] == v1] return v4.values.flatten().tolist() ``` ```python def v5(): return pd.DataFrame...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, List[str], List[str], str, List[str] Output Type: pd.DataFrame Dependencies: ```python def v0(v1: pd.DataFrame, v2: str, v3: str, v4: bool=False) -> pd.DataFrame: v5 = v1.copy() v6 = 1 if v4...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): v3 = v1 + '[SEP]' + v2 v4 = self.get_embedding(v3) return v4 ```
Imports: ```python import os import typing ``` Type definitions: Input Types: Any Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> List[str]: v2 = [f for v3 in os.listdir(v1) if os.path.isdir(os.path.join(v1, v3)) and (v3.startswith('data') and len(v3) > 4 and v3[4:].isnume...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Iterable[int], Iterable[int], int, bool Output Type: tf.keras.models.Model Dependencies: ```python def v0(v1): v2 = tf.keras.layers.Input(shape=input_shape) v3 = down_stack(v2) v4 = v3[-1] v3 = reversed(v3[:-1])...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: 'DotenvLexer' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> 'DotenvLexer': self.reset() self._lexer.input(v1) return self ```
Imports: ```python import typing ``` Type definitions: Input Types: str, dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: dict, **v3) -> dict: v4 = self.checked_post(v1, json=v2, **v3) return self._extract_response_json(v1, v4) ```
Imports: ```python import torch import torch.nn as nn from torch.utils.data import Dataset from torch.utils.data.dataloader import DataLoader from torch.optim import lr_scheduler, Adam import typing ``` Type definitions: Input Types: Output Type: DataLoader Dependencies: Function Name: v0 Function: ```python def v0(...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=Console.RESET): self.col = v1 self.c = ' ' self.bChanged = True ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: if self.context_config['use_per_run_defaults']: return v2 = self._context_hash() if self._fixed_plugin_cache is None: ...
Imports: ```python from operator import itemgetter import typing ``` Type definitions: ```python v0 = collections.namedtuple('Candidate', ['text', 'idx', 'length', 'count']) ``` Input Types: List[v0], Counter[str], int, Optional[Dict[str, float]] Output Type: Tuple[List[v0], Set[str]] Dependencies: Function Name: v1 F...
Imports: ```python import typing ``` Type definitions: Input Types: tuple Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple): self.rect.x = v1[0] * self.size[0] self.rect.y = v1[1] * self.size[1] ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('S') ``` ```python v1 = TypeVar('T') ``` Input Types: Sequence[v1], Sequence[v0] Output Type: tuple[list[v1], list[v0]] Dependencies: Function Name: v2 Function: ```python def v2(v3: Sequence[v1], v4: Sequence[v0]) -> tuple[list[v1], list[v0...
Imports: ```python import typing ``` Type definitions: Input Types: type, Any Output Type: t.List[type] Dependencies: Function Name: v0 Function: ```python def v0(v1: type, v2=False) -> t.List[type]: v3: int = 0 v4 = v1.__subclasses__() while v3 < len(v4): v5 = v4[v3].__subclasses__() for ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1 = 0 while True: v1 = int(input('WHAT IS YOUR BOARD SIZE (MIN 7/ MAX 19)? ')) if v1 < 7 or v1 > 19: print('I SAID, THE MINIMU...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = {'width': 0, 'height': 0, 'resolution': 0.0, 'size': os.path.getsize(v1), 'type': 'image', 'signature': '', 'signature_type': ''} return ...
Imports: ```python import typing ``` Type definitions: Input Types: float, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: int) -> bool: if not self._initialized: raise RuntimeError('modifier must be initialized first') if not self._enabled: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: ControlledGate Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None, v3=False, v4=None) -> ControlledGate: if v2 == None: v2 = '1' * v1 v5 = self._gate if not v3 else self.invers...
Imports: ```python import numpy as np from tqdm import tqdm import typing ``` Type definitions: Input Types: Any, Any, Any, Any, int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3, v4, v5: int=25, v6: str='main_triplet.npy'): print('Starting to make dataset ready...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, numpy.ndarray], numpy.ndarray, bool Output Type: Tuple[Dict[str, numpy.ndarray], numpy.ndarray, bool] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, numpy.ndarray], v2: numpy.ndarray, v3: bool=False) -> Tuple...
Imports: ```python from zlib import crc32 from math import ceil import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: bytes) -> str: v2 = '' for v3 in v1: v4 = bin(v3)[2:].ljust(8, '0') v2 += v4 return v2 ``` ```python def v5(v6: str) -> by...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: callable Dependencies: ```python def v0(self): self._token = token self._expires = 2 ** 32 yield from () ``` Function Name: v1 Function: ```python def v1(v2: str) -> callable: def v3(self): self._token = v2 ...
Imports: ```python import math import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2): self.identifier = v1 self.value = v2 def v3(self, v4): if v4 is None or not isinstance(v4, v0): return False return self.identifier == v4.identifier an...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Text Dependencies: ```python def v0(v1: Dict[str, Any]) -> Text: return v1['sender']['login'] ``` Function Name: v2 Function: ```python def v2(v3: Dict[str, Any]) -> Text: v4 = v3['action'] v5 = v3['member'] ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, Set[Any], str Output Type: Tuple[int, int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: Set[Any], v3: str) -> Tuple[int, int, int, int]: v4 = v2.difference(set((v3,))) v5 = v1.loc[v3...
Imports: ```python from itertools import groupby import numpy as np import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v1 = list(np.ravel(v1)) (v2, v3) = ([], []) v4 = 0 for (v5, v6) in groupby(v1): v6 = ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: k8s.V1Service Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> k8s.V1Service: v2 = self.k8s_namespace.get_service(v1) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: QGraphicsItem.GraphicsItemChange, typing.Any Output Type: typing.Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: QGraphicsItem.GraphicsItemChange, v2: typing.Any) -> typing.Any: if v1 == self.ItemPositionChange and self.s...
Imports: ```python import base64 import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.create_model('meeting/110', {'name': 'name_DsJFXoot'}) v1 = base64.b64encode(b'testtesttest').decode() v2 = self.client.post('...
Imports: ```python import math import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(): indexing.index._connect_to_mongo() if li.the_index._check_if_mongo_should_be_refreshed(): clear_mongo_cache([]) li.the_index._check_if_mongo_should_be_refreshe...
Imports: ```python import ast import logging import typing ``` Type definitions: Input Types: ast.Yield, ast.stmt Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Yield, v2: ast.stmt) -> None: if isinstance(v2, ast.Expr) and v2.value is v1: return v3 = self.va...
Imports: ```python from plotly.subplots import make_subplots from plotly import graph_objects as go import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): v1 = v1.sort_values(by=['target_amt'], ascending=False) ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, str, str, str, str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str, v4: str, v5: str, v6: str, v7: str) -> dict: v8 = {'project_id': v1} v9 = {'project_id': v1, 'expt_id': ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int, v2: int) -> None: self.x: int = v1 self.y: int = v2 def v3(self, v4: Union['Position', Tuple]) -> 'Position': if type(v4) == tuple: return v0(self.x + v4[0], self.y + v4[1...
Imports: ```python import typing ``` Type definitions: Input Types: list, str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: str, v3: int) -> str: v4 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V...
Imports: ```python from contextlib import suppress, contextmanager import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._cache_clearing_disabled: return with suppress(KeyError): del self.__dict__['...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: bool=False): if not v3: v1.spines[v2].set_color((0, 0, 0, 1)) v4 = {v2: True} if v2 in ['top', 'bottom']: v1.tick_...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): for v2 in self.vertices: v2.dxf.linetype = v1 ```
Imports: ```python import typing ``` Type definitions: ```python class v0(IDEndpoint): v1 = '/v1/appClipDefaultExperiences/{id}/releaseWithAppStoreVersion' def v2(self, *, v3: Union[AppStoreVersionField, list[AppStoreVersionField]]=None, v4: Union[AppStoreVersionLocalizationField, list[AppStoreVersionLocalizat...
Imports: ```python import re import typing ``` Type definitions: Input Types: Union[str, None] Output Type: Union[str, None] Dependencies: ```python def v0(v1: Union[str, None]) -> Union[List[str], None]: if v1: return list(filter(lambda x: len(x.strip()) > 0, [s for v2 in re.split('[\\\\/]', v1)])) el...
Imports: ```python import typing ``` Type definitions: Input Types: 'pb.Record' Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: 'pb.Record') -> str: v2 = str(v1.WhichOneof('record_type')) if v2 == 'request': v3 = v1.request v2 = str(v3.WhichOneof('request_type')...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Union[bool, str], Union[str, Callable[[Dict[str, Any], Dict[str, Any]], Dict[str, Any]]] Output Type: Union[List, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v5: Dict[str, Any], v2: str='hard', v3: Union...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: ```python class v0: def __repr__(self): raise NotImplementedError() def v1(self) -> ir.Type: raise NotImplementedError() def v2(self): raise NotImplementedError() ``` Input Types: Any, v0 Output Type:...
Imports: ```python import configparser import hashlib import typing ``` Type definitions: Input Types: List[Path], Path Output Type: bool Dependencies: ```python def v0(*v1: Path) -> str: v2 = hashlib.sha256() for v3 in v1: v2.update(v3.read_bytes()) return v2.hexdigest() ``` ```python def v4(v5: P...
Imports: ```python from pathlib import Path import numpy as np import xarray as xr from tqdm import tqdm from tqdm.contrib.concurrent import process_map import typing ``` Type definitions: Input Types: Iterable[Union[Path, str]], gpd.GeoDataFrame, int Output Type: gpd.GeoDataFrame Dependencies: ```python def v0(v1: Un...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> float: if self._drop_frame is not None: return self._drop_frame.get_scroll_value_percentage(v1) return -1 ```
Imports: ```python import shutil import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: global temp_dirs for v1 in temp_dirs: shutil.rmtree(v1) v2 = [] ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor from torch.nn import Parameter, ReLU, Tanh, BatchNorm2d, ConvTranspose2d, Conv2d, Sequential, Sigmoid from torch.nn import LSTM, BatchNorm1d, Linear, Parameter import typing ``` Type definitions: Input Types:...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: del os.environ['INFRASTRUCTURE_FACTORY'] del os.environ['DYNAMO_TABLE'] del os.environ['DYNAMO_ENDPOINT_URL'] super().tearDown() ``...
Imports: ```python import qiskit from qiskit.ignis.mitigation.measurement import CompleteMeasFitter, TensoredMeasFitter, complete_meas_cal, tensored_meas_cal, MeasurementFilter from qiskit.providers.aer.noise import NoiseModel from qiskit.providers.aer.noise.errors.standard_errors import pauli_error import typing ``` T...
Imports: ```python import asyncio import functools from PIL import Image, ImageDraw, ImageFont, ImageSequence import typing ``` Type definitions: Input Types: Any, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2, v3: bool): v4 = await self.dl_image(v2.file_...
Imports: ```python import typing ``` Type definitions: Input Types: ops.charm.RelationChangedEvent Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ops.charm.RelationChangedEvent): if v1.unit: self.on.cluster_changed.emit() ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, float, Any, int, int, int, float, Any Output Type: (np.ndarray, np.ndarray, np.ndarray, np.ndarray) Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=None, v2: float=None, v3=0.0, v4: int=None, v5: i...
Imports: ```python from collections import defaultdict, namedtuple from itertools import combinations_with_replacement, product import numpy as np import typing ``` Type definitions: ```python v0 = namedtuple('Partition', 'assignments, cluster_sizes') ``` Input Types: v0, v0 Output Type: float Dependencies: ```python d...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: ```python def v0(v1): v2 = '' v3 = 0 if v1 // 100: v2 += word[v1 // 100] + ' Hundred' v3 = 1 v1 %= 100 if v1 // 10 == 1: if v3: v2 += ' ' v2 += word[v1]...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: DottedDict v2: DottedDict def __init__(self, v3: Optional[str]=None, v4=True): """ Load the default config and load and check the user provided config. If a logfile was specified, direct logs there. ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: List[List[int]] Dependencies: ```python def v0(v1: int, v2: int, v3: int, v4: List[int], v5: List[List[int]]) -> None: if v3 == 0: v5.append(v4[:]) return for v6 in range(v1, v2 - v3 + 2): v4.appen...
Imports: ```python import typing ``` Type definitions: Input Types: Any, dict Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python async def v0(v1, v2: dict) -> Optional[str]: try: if v2['group'] == '': return None if not await v1.groups.count_documents({'_id'...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Optional[float]=None, v2: int=100) -> None: self.radius = v1 self.radius_norm_step = v2 def v3(self, v4: Union[list, np.ndarray]) -> v0: if self.radius is None: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = {'vb': 'test_verb', 'vb_arg': 'test_srl', 'evrel': 'test_evrel'} return v2[v1] ```
Imports: ```python import re from keyword import iskeyword import typing ``` Type definitions: ```python @dataclass class v0: v1: TypeSpec v2: str v3: str v4: TypeSpec v5: List[ArgumentSpec] v6: str ``` Input Types: dict Output Type: List[v0] Dependencies: ```python def v7(v8): v9 = re.match...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> pd.DataFrame: v2 = pd.melt(v1.reset_index(), id_vars='date', var_name='produto', value_name='vlr') retu...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: float, v3: np.ndarray): v2 = v2 ** np.arange(v1.shape[1], -1, -1) v4 = np.c_[v1, v3][:, ::-1] ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = _quotable_re.fullmatch(v1) if v2 is None: raise ValueError('invalid characters for quoted-string encoding') return '"' + _quote_re.sub('\\\\\\1', v1) + '"' `...
Imports: ```python import math import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3, v4) -> float: v5 = float(v1) / float(self.num_epochs) v6 = None if v2 == 'linear_schedule': v6 = v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], Dict[str, Union[str, Iterable]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2: Dict[str, Union[str, Iterable]]): self.matrix_headers_index_dict = {head: ndx for (v3, v4) in enumerat...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in range(self.strip.numPixels()): self.strip.setPixelColor(v1, 0) self.strip.show() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[int, ...] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Tuple[int, ...]: try: return tuple(self.__procedure_ids[v1]) except KeyError: return () ```
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray Output Type: Any Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray): return (v3.T @ v1 @ v2) ** 2 ``` Function Name: v4 Function: ```python def v4(v5: np.ndarray, v6: np.nd...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: str): v3 = [(hostname, line) for (v4, v5) in v1 if v2 in v5 and self.stack.port_id in v5] self.assertEqual(1, len(v3), v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): (v2, v3) = (set(), set()) v4 = len(v1) if v4 < 10: return v3 for v5 in range(0, v4 - 9): v6 = v1[v5:v5 + 10] if v6...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.resources.load(self.context) self.resources.setup() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v1 = [char for v2 in v1] v3 = set() for v4 in ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']: v3.add(v4) (v5, v6) = (0,...
Imports: ```python from shapely.geometry import Polygon, Point import shapely.affinity as affinity import typing ``` Type definitions: Input Types: float, Union[str, Tuple[float, float], Point] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: Union[str, Tuple[float, flo...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=None, v3=None): self.val = v1 self.left = v2 self.right = v3 ``` Input Types: v0, int Output Type: bool Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v0, v6: int) -...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, np.array, Union[np.array, None], bool, Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: np.array, v3: Union[np.array, None]=None, v4: bool=True, v5=None, v6=None) -> dict: ...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[str, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[str, str]): if self.attrs: self.attrs.append(v1) else: self.attrs = [v1] ```
Imports: ```python import os import re import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str) -> str: v2 = re.match('^(\\w+)\\s*=', v1) if v2: v3 = v2.group(1) v4 = PATCHVAR_PREFIX + v3 v5 = os.environ.get(v4, None) if...
Imports: ```python import requests import json import typing ``` Type definitions: Input Types: str, str, str, int, int, dict, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str, v4: int, v5: int=None, v6: dict={}, v7: dict={}): if v2 == 'vnc': ...
Imports: ```python import typing ``` Type definitions: Input Types: Mapping[Text, Mapping[Text, Any]], Text Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: Mapping[Text, Mapping[Text, Any]], v2: Text) -> float: for v3 in v1.values(): if v2 in v3['']: v4 = v3['...
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: List[dask.delayed] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable, *v2: Any) -> List[dask.delayed]: v3 = [] for v4 in zip(*v2): v3.append(self.submit(v1, *v4)) return v3 ```