text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): (v2, v3) = self.preprocess(v1) v4 = self.run(v2, v3) return v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, *v1) -> dict: assert v1[3] == self.recent_response return self.final_response ```
Imports: ```python from matplotlib import pyplot as plt import typing ``` Type definitions: Input Types: str, int, dict, Path, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int, v3: dict, v4: Path, v5: bool=False): plt.figure(figsize=(3 * v2, 2), dpi=100) for (v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int, Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int, v3=1, v4=10, v5=None) -> None: self.__animation.scale_height(height=v2, offset=v3, milliseconds=v4) self.__animation.start...
Imports: ```python from scipy import signal import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3) -> np.ndarray: v4 = max(1, 3 * (max(v3.size, v2.size) - 1)) v5 = signal.filtfilt(b=v2, a=v3, x=v1, padtype='...
Imports: ```python import select import os import typing ``` Type definitions: ```python v0 = Callable[[bytes], None] ``` Input Types: Popen, Optional[v0], Optional[v0], Optional[Callable[[int], None]] Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Popen, v3: Optional[v0]=None, v...
Imports: ```python import re import typing ``` Type definitions: Input Types: List[tuple], List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[tuple], v2: List[str]): self.fieldnames = ['winner'] + self.fieldnames v3 = [] v2 = [line.strip().split('\t') for ...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Output Type: Tuple[str, int] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[str, int]: try: v1 = requests.request(method='POST', url=self.token_refresh_endpoint, data=self.get_refresh_request_bo...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = {'dataset', 'dataset/imagenet', 'level1/level2/nested1', 'level1/level2/nested2', 'configs_with_defaults_list/global_package', 'configs_...
Imports: ```python import typing ``` Type definitions: Input Types: 'BigInt', 'BigInt' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'BigInt', v2: 'BigInt') -> None: if not v1.sign or not v2.sign: return self._multiply_digits(v1.digits, v2.digits) if v1.sig...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[Tuple[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[Tuple[str, str]]: if self._error_string: return None return (self._content['display_name'], self._content['licence'])...
Imports: ```python import typing ``` Type definitions: Input Types: float, Optional[int] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: Optional[int]=2) -> float: v1 = float(v1) while not -180 <= v1 < 180: v3 = 360 if v1 < -180 else -360 v1 += v3 ...
Imports: ```python import os import sys import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1 = os.getcwd() v2 = v1.split('/') if not v2: print('cwd not found', file=sys.stderr) return 1 if os.path.exi...
Imports: ```python import typing ``` Type definitions: Input Types: 'Vocabulary', List[str], List[List[str]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Vocabulary', v2: List[str], v3: List[List[str]]) -> bool: v4 = 0 for v5 in range(len(v2)): if self.target...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: bool v2: int v3: List[Image] v4: Dict[str, Localization] v5: str def v6(self, v7: bool) -> v0: self.auto_enroll = v7 return self def v8(self, v9: int) -> v0: self.display_order = v...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: tuple): self.key: str = v1 self.originalPosition: tuple = tuple([*v2]) self.removeFromBoard() def v3(self): self._setPieceInGame() self.updateCurrentPosition(self....
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: int Dependencies: ```python def v0(v1: list) -> int: v2 = 0 v3 = [] v4 = 0 while v4 not in v3 and v4 != len(v1): (v5, v6) = v1[v4].split() v3.append(v4) if v5 == 'acc': v2 += int(v6...
Imports: ```python from copy import copy import typing ``` Type definitions: Input Types: list, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int=None, v3: int=None): v4 = copy(v1) if v2: v4.insert(0, v2) if v3: v4.append(v3) return ...
Imports: ```python import logging from pathlib import Path import pandas as pd import typing ``` Type definitions: Input Types: Dict[str, pd.DataFrame] Output Type: Path Dependencies: ```python def v0() -> Path: v1 = asksaveasfilename(initialdir='.', initialfile='entity-info.xlsx', filetypes=[('Excel', '.xlsx')]) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super()._connect() self.flush_connection() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: (v2, v3) = (0, len(v1) - 1) while v2 < v3: while v2 < v3 and (not self.isAlphaNumeric(v1[v2])): v2 += 1 while...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): self._raw_device_state = v1 for (v2, v3) in v1.items(): if v2 in self._data_points: self._data_points[v2].set_attribute_data...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '{foo}' with self.assertRaises(UnicodeEncodeError): v1.encode('b64') ```
Imports: ```python import typing ``` Type definitions: Input Types: commands.Context, list, dict, discord.Message, int, float, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: commands.Context, v2: list, v3: dict, v4: discord.Message, v5: int, v6: float=None, v7: str=Non...
Imports: ```python from collections import defaultdict from qiskit.circuit.quantumcircuit import QuantumCircuit from qiskit.circuit.barrier import Barrier from qiskit.pulse.schedule import Schedule from qiskit.scheduler.config import ScheduleConfig from qiskit.scheduler.lowering import lower_gates import typing ``` Typ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: pandas.Series Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> pandas.Series: v3 = getattr(self, v1) return v3[v2] ```
Imports: ```python import typing ``` Type definitions: Input Types: Chem.Mol Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Chem.Mol=None): if v1 is None: v1 = self.positioned_mol return [atom.GetDoubleProp('_Stdev') if atom.HasProp('_Stdev') else 0 for v2 in v1....
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, torch.Tensor] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, torch.Tensor]): v2 = {k: v.detach().cpu().item() for (v3, v4) in v1.items()} for (v3, v4) in v1.items(): self.visd...
Imports: ```python import glob import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): for v2 in glob.glob(f'{v1}/*/'): if os.path.isdir(v2) and (not os.listdir(v2)): print('removing empty directory', ...
Imports: ```python import ast import typing ``` Type definitions: Input Types: ast.Subscript Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Subscript) -> Any: if self._marking: self._is_subscript = True self.generic_visit(v1) self._is_subscript = ...
Imports: ```python import gzip import logging import os import shutil import stat import typing ``` Type definitions: Input Types: str, str, bool, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: bool, v4: bool) -> None: logging.info(f'Unzipping files in {v1}...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = 'ivor' return 'hello' + v1 ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Container): v1: uint64 v2: Root v3: Slot v4: Fork v5: BeaconBlockHeader v6: Vector[Root, SLOTS_PER_HISTORICAL_ROOT] v7: Vector[Root, SLOTS_PER_HISTORICAL_ROOT] v8: List[Root, HISTORICAL_ROOTS_LIMIT] v9: Eth1Dat...
Imports: ```python from typing import Any, cast, Dict, Iterator, Iterable, List, Optional, Sequence, Sized, Tuple, Set import typing ``` Type definitions: Input Types: Sequence[Iterable[Optional[Any]]], Sequence[Iterable[Optional[Any]]], bool, bool Output Type: Any Dependencies: ```python def v0(v1: Sequence[Sized]) -...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: [str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> [str]: if self._sys_path is None: return None return [path for v1 in self._sys_path if 'lib' in v1 and v1.startswith('/')] ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = v1.split(' ') v3 = v2[0].split('-') if len(v3[0]) == 2: v2[0] = v3[2] + '-' + v3[0] + '-' + v3[1] v1 = ' '.join(v2) ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: t.Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> t.Dict: if self.name.startswith('ascad'): if self.name.endswith('_mlp'): v2 = 'mlp' v3 = 100 v4 = 200...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = v1.split('/') v3 = v2[len(v2) - 1] return self.get_issue(v3) ```
Imports: ```python from rdkit import Chem from rdkit.Chem import Draw, AllChem from rdkit.Chem.Draw import rdMolDraw2D import typing ``` Type definitions: Input Types: str Output Type: Dict Dependencies: ```python def v0(v1: Chem.Mol) -> nx.Graph: v2 = mol_coords(v1) v3 = nx.Graph() for v4 in v1.GetAtoms()...
Imports: ```python import random import typing ``` Type definitions: Input Types: nx.DiGraph, nx.DiGraph Output Type: Sequence['PackageName'] Dependencies: ```python def v0(v1): with graph.nodes[v1]['payload'] as v2: v3 = v2.get('new_version', '') v4 = v2.get('new_version_attempts', {}).get(v3, 0) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, str]: v1: Dict[str, str] = {} for (v2, v3) in self._data.items(): if not isinstance(v3, str): v3 = v3() v1[...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> str: if type(v2) == str: v2 = f"'{v2}'" return f'{v1} != {v2}' ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = [self.positions[v1 + '_row_start'][self.index_of_meas], self.positions[v1 + '_row_end'][self.index_of_meas], self.positions[v1 + '_col_start'][se...
Imports: ```python import typing ``` Type definitions: Input Types: Tensor, Optional[Tensor] Output Type: Tuple[int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Optional[Tensor]) -> Tuple[int, int, int]: if v2 is not None: v3 = int(v2[0]) else: v3...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: 'Storyboard' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Any) -> 'Storyboard': self.story += f'{v1}: {v2}\n' self.add_new_line = True return self ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> dict: v2: dict = {} if hasattr(self, 'auto_enroll'): v2['autoEnroll'] = bool(self.auto_enroll) elif v1: v2['autoEnr...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: 'np.ndarray' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'np.ndarray', *v2, **v3) -> Any: self.logger.info(f'{self._greetings} {v1}') return np.random.random([v1.shape[0], 3]) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: int, v2: str) -> str: if len(v2) == 0: return v2 if v2[0] not in vowel: v2 = v2[1:] + v2[0] return v2 + 'ma' + 'a' * (v1 + 1) ``` Function Name: v3 Function: ```python...
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 v1 < self.__latest_slot: return False if v1 > self.__latest_slot: self.__latest_slot = v1 self._logger.debug(f...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if v1.lower().startswith('this') or v1.lower().startswith('that'): v2 = 'D' if v1[0].isupper() else 'd' v1 = v2 + v1[2:] else: i...
Imports: ```python import tensorflow as tf from tensorflow.python.framework import func_graph from tensorflow.python.framework import ops import typing ``` Type definitions: Input Types: Optional[str] Output Type: str Dependencies: ```python def v0(v1: str) -> str: return v1.replace('/', '#') ``` Function Name: v2...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = v1.rstrip('/') + '/' v2 = v1 + 'rtx_kg2.' return {'nodes': [v2 + 'node.tsv', v2 + 'nodeprop.tsv'], 'edges': [v2 + 'edge.tsv', v2 + 'edgeprop.ts...
Imports: ```python import typing ``` Type definitions: Input Types: list[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[str]): if self.primary_constraint is None: return False return self.primary_constraint.column_names == v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: TextIO, dict, Any Output Type: Any Dependencies: ```python def v0(v1: TextIO, v2: int): v1.write(str(v2) + '\n') v1.write('\\raisebox{-.5\\height}{' + '\\includegraphics[scale=0.2]{./molecule_diagrams/' + str(v2) + '.pdf}}\n') ``` Function Nam...
Imports: ```python import os import tempfile import tensorflow as tf import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): with tempfile.TemporaryDirectory() as v2: v3 = self.__make_fname(v1) v4 = os.path.jo...
Imports: ```python import torch from torch import Tensor import random import typing ``` Type definitions: Input Types: int, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3=None): v2 = min(v1, v2) return torch.tensor(random.sample(range(v1), v2), devic...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '\n import bar\n import baz\n\n def foo() -> None:\n pass\n ' v2 = '\n import ...
Imports: ```python import torch from torch.utils.data import DataLoader, Dataset, Sampler, Subset import typing ``` Type definitions: Input Types: Dataset Output Type: DataLoader Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dataset) -> DataLoader: v2 = self.loader_batch_size if isinstance(...
Imports: ```python import numpy as np import PIL import PIL.ImageOps import skimage.color as sk_color import skimage.exposure as sk_exposure import skimage.feature as sk_feature import skimage.filters as sk_filters import skimage.future as sk_future import skimage.morphology as sk_morphology import skimage.segmentation...
Imports: ```python import logging import logging.handlers import typing ``` Type definitions: Input Types: str, Union[logging.Logger, str] Output Type: Any Dependencies: ```python def v0() -> logging.Logger: if _defaultLogger is None: v1 = 'No default logger instance available.' raise Exception(v1)...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: Tuple[np.ndarray, float, bool, dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> Tuple[np.ndarray, float, bool, dict]: if self.lanes and (not self.lane.on_lane(self.vehicle.position)...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False) -> dict: v3 = f'\n <item xsi:type="xsd:str">{v1}</item>\n <item xsi:type="xsd:bool">{v2}</item>\n ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if v1.endswith('consist-of'): return False return v1.endswith('-of') ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.example_user('hamlet') self.login(v1.email, realm=v1.realm) ```
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[Iterable[int], Iterable[Any]], np.ndarray Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[Iterable[int], Iterable[Any]], v2: np.ndarray) -> None: for ((v3, v4), v5) in zip(v1, v2): if sel...
Imports: ```python import torch from torch.autograd import Variable import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v1 = torch.LongTensor(v1) (v2, v3) = torch.sort(v1, descending=True) return (v2, v3) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T', bound='Union[_StorageBase, _TypedStorage]') ``` Input Types: Any, Any Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2=None, v3=False, **v4) -> v0: v5 = self._storage.cuda(v2, v3, **v4) return ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> Dict[str, Any]: v1.update({'server_name': 'example.com', 'tou_url': 'dummy-url', 'testing': True, 'dashboard_bundle...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Generator['music21.base.Music21Object', None, None] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Generator['music21.base.Music21Object', None, None]: v1 = self.origin while v1 is not None: yield v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2): v3 = self.params.copy() v3[v1] = v2 return v3 ```
Imports: ```python import numpy as np from pandas._libs import missing as libmissing from pandas.compat import np_version_under1p17 from pandas.core.nanops import check_below_min_count import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, bool Output Type: Any Dependencies: ```python def v0(v1: Call...
Imports: ```python import copy import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3): v4 = copy.deepcopy(self.config_dict) v4[v1][v2] = v3 if self._config_legal(v4, self.config_schema): ...
Imports: ```python import colorsys from matplotlib.colors import ListedColormap import typing ``` Type definitions: Input Types: tk.Event Output Type: None Dependencies: ```python def v0(v1: float) -> ListedColormap: return ListedColormap([colorsys.hsv_to_rgb(v1, saturation / 255, 1) for v2 in range(255)]) ``` ```...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> int: assert os.path.isdir(v1), 'The directory {filedir} is not accessible.' if os.path.isfile(os.path.join(v1, 'features.tsv.gz')): ...
Imports: ```python import logging import os import re import sklearn import sys import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1): return 'unk...
Imports: ```python import typing ``` Type definitions: Input Types: bytes Output Type: Dict[str, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> Dict[str, float]: v2 = {} for v3 in v1.decode().splitlines(): v4 = v3.split() if v4[0] != '#': v2.update(...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Tuple[tf.Tensor, ...], Tuple[np.ndarray, ...]] Output Type: Dict[Text, tf.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Tuple[tf.Tensor, ...], Tuple[np.ndarray, ...]]) -> Dict[Text, tf.Tensor]: self._tra...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: if callable(self._Response): return self._Response(v1) return self._Response ```
Imports: ```python import torch import typing ``` Type definitions: Input Types: Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self) -> tuple: v1 = [self.buffers[i].sample_all() for v2 in range(self.rollout_num)] return (torch.cat([item[0] for v3 in v1], dim=0), torch.cat([v3[...
Imports: ```python import typing ``` Type definitions: Input Types: dict, psycopg.Cursor Output Type: Any Dependencies: ```python def v0(v1: dict, v2: psycopg.Cursor): v3 = v1.get('players') if v3 == None: return None for v4 in v3: v2.execute('\n INSERT INTO involved_player (even...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: try: v2: int = int(v1) if v2 % 1000 == 0: return f'{int(v2 / 1000)} kV' return f'{v1} V' except ValueError: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: if isinstance(v1, str): v2 = True if v1 in self.task_list else False else: v2 = False return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[str, bool] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[str, bool]: while True: v1 = self.__FH.readline() self.__pos = self.__FH.tell() if v1 == '': return ('', ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None): print() if v1 is None: self._help_all() else: self._help_single(v1) print() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.in_channel is not None and self.ip_consuming_tag is not None: self.stop_consuming(self.in_channel, self.ip_consuming_tag) return ```
Imports: ```python import sys from ast import literal_eval import typing ``` Type definitions: Input Types: dict, tuple Output Type: Tuple[dict, list] Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: tuple=('gpu', 'save')) -> Tuple[dict, list]: v3 = [] v4 = v1.copy() (v5, v6) = (No...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Mapping[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, **v1: str) -> Mapping[str, str]: v2 = dict(self.params, **v1) if self.password is not None: v2['password'] = self.password return v2 ...
Imports: ```python import math import typing ``` Type definitions: Input Types: np.datetime64 Output Type: float Dependencies: ```python def v0(v1: SortedDict, v2: Any) -> int: v3 = len(v1) if not v3: return -1 v4 = v1.bisect_left(v2) if v4 == v3: return v3 - 1 if v1.keys()[v4] != v...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bytes: if '\r' in v1: raise ValueError('Snapshot testing strings containing "\\r" is not supported.\nTo snapshot test non-standard new...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: return self.command pass ```
Imports: ```python import random import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: list Dependencies: ```python def v0(v1: list, v2: list, v3: list, v4: int) -> int: if random.randrange(0, 2) == 1: (v1, v2) = (v2, v1) v5 = 0 v6 = 0 v7 = 0 for v8 in range(4): ...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: Union[List, np.ndarray, pd.Series], dt.DataType, Optional[pd.Index] Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[List, np.ndarray, pd.Series], v2: dt.DataType, v3: ...
Imports: ```python import argparse import re import sys import typing ``` Type definitions: Input Types: str, int, Sequence[Sequence[int]], Sequence[str], Sequence[Sequence[str]], Sequence[str] Output Type: argparse.Namespace Dependencies: ```python def v0(v1: str) -> Sequence[str]: if v1 == '[]': return [...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = re.findall('{{pipelineparam:op=([\\w\\s_-]*);name=([\\w\\s_-]+);value=(.*?);type=(.*?);}}', v1) if len(v2) == 0: v2 = re.findall(...
Imports: ```python import typing ``` Type definitions: Input Types: Field, List[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Field, v2: List[str]) -> List[str]: v3 = [] v4 = v1.name + '.' v5 = len(v4) for v6 in v2: if v6.startswith(v4): ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: object Dependencies: Function Name: v0 Function: ```python def v0(self) -> object: v1 = np.array(range(self.npop), dtype=np.float) v2 = 1 / (np.sqrt(2 * np.pi) * self.q * float(self.npop)) * np.square(np.exp(-...
Imports: ```python import typing ``` Type definitions: Input Types: zarr.Group, int Output Type: Tuple[Tuple[slice, slice], npt.NDArray] Dependencies: Function Name: v0 Function: ```python def v0(v1: zarr.Group, v2: int) -> Tuple[Tuple[slice, slice], npt.NDArray]: v3 = v1['/0'][v2, 0, ...] (v4, v5) = v3.nonze...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = [] for v2 in self.dict: v1.append((v2, self.dict[v2])) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): if v1.get('possibly_sensitive'): return v1.get('possibly_sensitive') return False ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = self.bandwidth_scale v2 = self._x @ self._x_weights v3 = v2.shape[0] v4 = int(np.ceil(4 * (v3 / 100) ** self.rate))...