text
stringlengths
190
325k
Imports: ```python import datetime import typing ``` Type definitions: Input Types: int, int Output Type: Iterator[Tuple[int, int]] Dependencies: ```python def v0(v1: int, v2: int) -> Iterator[Tuple[int, int]]: while True: yield (v1, v2) v2 += 1 if v2 > 12: v2 = 1 v1...
Imports: ```python import os import json import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = os.path.expanduser('~/.config/pyapikey.json') with open(v2, 'rt') as v3: v4 = json.load(v3) return v4[...
Imports: ```python import ast, astunparse, copy import typing ``` Type definitions: Input Types: ast.arg Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.arg): if v1.arg == 'i': v2 = ast.arg('j', v1.annotation) return v2 return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, libtmux.Server Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: libtmux.Server): if v3.has_session(v1): return else: v4 = v3.new_session(v1) v4.set_environment...
Imports: ```python import sympy as sp import sympy.physics.mechanics as me from sympy.core.numbers import Float import typing ``` Type definitions: Input Types: set Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: set) -> dict: v2 = {} for v3 in list(v1): if isinstance(...
Imports: ```python import typing ``` Type definitions: Input Types: int, Dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: Dict) -> None: self.anns_delete_by_img_id(v1) self.add_annotations_from_dict(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in self._registries: v1.teardown() ```
Imports: ```python import torch from torch import nn import typing ``` Type definitions: Input Types: Any, Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> tuple: v3 = torch.cat([v1, v2], dim=-1) (v4, (v5, v6)) = self.lstm(v3.transpose(0, 1)) v7 = self.fc(...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2 = list((v1[j] for v3 in range(len(v1)) if v1[v3] > v1[v3 - 1] and v3 != 0)) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: T.Component, T.QObject Output Type: T.QObject Dependencies: Function Name: v0 Function: ```python def v0(self, v1: T.Component, v2: T.QObject) -> T.QObject: v3 = self._core.create_object(v1, v2) return v3 ```
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: str, bool Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: bool=False, **v3) -> list: if self.loggingEnabled: self.logger.debug(f'Starting getSchemas') v4 =...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> bool: if v2 == v1: return True elif v2 == '*': return True elif v2 == '' or v1 == '': return False ...
Imports: ```python from pandas._config import config from pandas._libs import lib from pandas._libs.tslibs import Period, Tick, Timestamp, to_offset from pandas._typing import Axis, CompressionOptions, Dtype, DtypeArg, FilePathOrBuffer, FrameOrSeries, IndexKeyFunc, IndexLabel, JSONSerializable, Level, Manager, NpDtype,...
Imports: ```python import typing ``` Type definitions: ```python v0 = Callable[[bytes], bytes] ``` Input Types: Callable[..., Any], v0 Output Type: Callable[..., Any] Dependencies: ```python @functools.wraps(func) def v1(*v2, **v3): v4 = func(*v2, **v3) callback(v4) return v4 ``` Function Name: v5 Function:...
Imports: ```python import typing ``` Type definitions: Input Types: float, int, int, Tuple[ndarray, ndarray], bool Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=NOISE_PARAMS['A_cc'], v2: int=0, v3: int=1, v4: Tuple[ndarray, ndarray]=None, v5: bool=False, **v6) -> float:...
Imports: ```python import typing ``` Type definitions: Input Types: th.Tensor Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: th.Tensor) -> NoReturn: if v1.dim() not in [2, 3]: raise RuntimeError(f'FSMN expects 2/3D input, got {v1.dim()}') ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: str, str, str Output Type: str Dependencies: ```python def v0(v1: dict) -> Tuple[str, list]: v2 = v1['attr_type'] if not 'selected_cond' in v1['cond']: logging.info('empty cond check') return ('', []) v3 = v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str, v3: str, v4=True): v5 = await self.blockchain._cli_cmnd('claimname', v1, v2, v3) if v4: await self.generate(1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: if self._currentaddr: return self._variablenames.name_at_addr(v1, self._currentaddr) else: return None ...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: float, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=0.6, v2: int=1): v3 = [] v4 = [] for v5 in range(len(self.my_slices) - 1): v4.append((self.my_slices[...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: List[LayerConfig]): self.layers = v1 @staticmethod def v2(v3: dict) -> 'AppConfig': LOGGER.debug('app config data: %r', v3) return v0(layers=[LayerConfig.from_json(layer_data) for v4 i...
Imports: ```python import collections import typing ``` Type definitions: Input Types: Dict[str, Union[int, float]] Output Type: str Dependencies: ```python def v0(v1, v2='', v3='_'): v4 = [] for (v5, v6) in v1.items(): v7 = v2 + v3 + v5 if v2 else v5 if isinstance(v6, collections.MutableMappin...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: if v1 not in self.ignore: self._initial_expanded.add(v1) ```
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseModel): pass ``` Input Types: str, Type[v0], Any Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str, v3: Type[v0], v4=False): if v2 not in self._map or v4: self._map[v2] = v3 ```
Imports: ```python from asyncio import Queue import typing ``` Type definitions: Input Types: Tuple[str, int, int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[str, int, int]) -> None: self.items_added += 1 Queue._put(self, (self.items_added, *v1)) ```
Imports: ```python import importlib, importlib.resources import typing ``` Type definitions: Input Types: str Output Type: typing.TextIO Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> typing.TextIO: (v2, v3, v4) = v1.rpartition('/') v5 = self.precomputation_package if v3: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, int, int, int, int, int, int, np.array Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int, v4: int, v5: int, v6: int, v7: int, v8: np.array) -> np.array: v9 = 1 << 31...
Imports: ```python import cvxpy as cp import cvxpy.interface as intf import cvxpy.settings as s from cvxpy.constraints import PSD, ExpCone, NonPos, Zero from cvxpy.error import DCPError, ParameterError, SolverError from cvxpy.expressions.constants import Constant, Parameter from cvxpy.expressions.variable import Variab...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T', str, int, float, bool) ``` Input Types: Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python def v1(self) -> Optional[v0]: if self.value is None: raise RuntimeError(f'Item is required!') return ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str): v3 = str() for (v4, v5) in v1.items(): v6 = '{} {} '.format(v4, v2) v7 = iter(sorted(v5)) v6 += next(v7) ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> List[int]: v3 = [] for v4 in range(v1, v2 + 1): (v5, v6) = (v4, 0) v7 = True while v5 > 0: ...
Imports: ```python import torch from torch import nn from torch.utils.data.dataloader import DataLoader from torch.utils.data.dataset import Dataset from torch.utils.data.distributed import DistributedSampler from torch.utils.data.sampler import RandomSampler, Sampler, SequentialSampler import typing ``` Type definitio...
Imports: ```python import logging import typing ``` Type definitions: Input Types: sqlite3.Connection Output Type: int Dependencies: ```python def v0(v1: sqlite3.Connection, v2: str, *v3: Any) -> sqlite3.Cursor: try: v4 = transaction(v1, v2, *v3) except Exception as e: logging.exception('Could ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> bool: if v1 < 2 or (v1 % 2 == 0 and (not v1 == 2)): return False for v2 in range(3, v1 + 1, 2): if v2 * v2 <= v1: if v1 %...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame) -> pd.DataFrame: v3 = pd.merge_asof(left=v1, right=v2, left...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> tuple: v2 = [i % self.cycle for v3 in range(self.head, self.head + v1)] self.head = (self.head + v1) % self.cycle return tuple((data[v2] f...
Imports: ```python import string import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> str: v2 = v1.lower() v3 = self._strip_url(v2) v4 = '' if len(v3) > 0: v5 = self._split_by_punctuation_empty_space(v3) ...
Imports: ```python import re import typing ``` Type definitions: Input Types: List[Tuple[str, str]] Output Type: List[Tuple[Pattern, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Tuple[str, str]]) -> List[Tuple[Pattern, str]]: v2 = [] for v3 in v1: v2.append((re.compile(v3[...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._column_sel in self._columns: v1 = self._columns.index(self._column_sel) if v1 > 1: v1 = v1 - 1 else: ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v1 = re.sub('\\033\\[(\\?\\d+[hl]|[HJ])', '', v1) v1 = re.sub(' *\\n', '\n', v1) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: str Dependencies: ```python def v0(v1): return '{!r}'.format(v1) ``` Function Name: v2 Function: ```python def v2(v3: str, v4=v4) -> str: v5 = v3 if v3.startswith('/'): pass elif v3.startswith('@'): ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if v1 < 0: raise ValueError(f'{self.name}.level_down must be given a positive value.') self._level = max(self.min_level, self._level - v1)...
Imports: ```python from pathlib import Path import tempfile import typing ``` Type definitions: Input Types: Any Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1=None) -> Path: if v1: v2 = Path(tempfile.mkdtemp(prefix=v1)) else: v2 = Path(tempfile.mkdtemp()) ...
Imports: ```python from os.path import isfile, isdir, join from os import listdir, getcwd import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=getcwd()): if isdir(v1): for v2 in listdir(v1): try: ...
Imports: ```python import typing ``` Type definitions: Input Types: config_parser.ImportStatement Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: config_parser.ImportStatement): if v1.is_from and v1.module.startswith('__gin__.'): if v1.alias: raise SyntaxE...
Imports: ```python import typing ``` Type definitions: Input Types: PathLike Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: PathLike): with open(v1) as v2: self._config.read_file(v2) ```
Imports: ```python import hashlib import json import typing ``` Type definitions: Input Types: Any, int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: int, v3: int) -> str: v4 = ((v1.config.K, (str(type(v1.config.agent)),), v1.config.change_omega_for_bandits, v1.config.no...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: list): v3 = None if isinstance(v1, np.ndarray): if len(v1.shape) == 1: v3 = [] ...
Imports: ```python import re import typing ``` Type definitions: Input Types: list Output Type: bool Dependencies: ```python def v0(v1: str) -> int: v2 = re.findall('\\d+', v1) if len(v2) > 0: return int(v2[0]) else: return 0 ``` Function Name: v3 Function: ```python def v3(self, v4: list) ...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes, v2=4) -> tuple: assert len(v1) >= v2, f'not enough bytes to parse array length, wanted {v2}' v3 = int.from_bytes(v1[:v2], 'big') assert le...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self._content is None: self._content = str(self) return self._content ```
Imports: ```python import typing ``` Type definitions: Input Types: bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool, v2: bool): v3 = 0 if v1: if v2: v3 = 3 else: v3 = 1 elif v2: v3 = 2 else: v...
Imports: ```python import logging import typing ``` Type definitions: ```python v0 = Union[str, Path] ``` Input Types: v0, v0, int, float, float, float, float, float, int, int Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0, v4: int, v5: float, v6: float, v7: float, v8: float...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: np.ndarray[np.int64] Output Type: Tuple[np.ndarray[np.int64], int, int, int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray[np.int64]) -> Tuple[np.ndarray[np.int64], int, int, i...
Imports: ```python import typing ``` Type definitions: Input Types: List[Union['EOAAccount', 'Address']], int, Optional['Address'], Optional[List['Address']] Output Type: List['TransactionResult'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[Union['EOAAccount', 'Address']], v2: int, v3: O...
Imports: ```python from base64 import b64encode import typing ``` Type definitions: Input Types: dict, datetime Output Type: dict Dependencies: ```python async def v0(v1: dict, v2: str) -> dict: if not v1: raise CredentialsError async with httpx.AsyncClient() as v3: if not v1.get('access_token'...
Imports: ```python import typing ``` Type definitions: Input Types: bytearray Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytearray) -> None: self.statusBar.update(status='Copy Function Starts') if not self.functionStartsCmd: return self.newFunctionStarts...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int, v2: List[int], v3: int): self.num = v1 self.days = v2 self.size = v3 self.assigned_day = None @staticmethod def v4(v5: int, v6: int) -> int: """ computes the cost ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str, int]: v2 = v1.split('/') if len(v2) < 2 or len(v2) > 3: raise ValueError(f'workflow_string should contain onl...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2) -> None: v3 = getattr(self, v1) if isinstance(v2, (list, tuple)): v4 = ' or '.join([c.__name__ for v5 in v2]) else: v...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: v2 = {} v2['resources'] = [] v3 = {} if v1.get('subscription_id', None): v3['subscription_id'] = v1.get('subscription_id', No...
Imports: ```python from itertools import chain, islice import typing ``` Type definitions: Input Types: Output Type: Union[List[chain], chain] Dependencies: ```python def v0(v1: Iterable) -> chain: try: v2 = next(v1) except StopIteration: return None return chain([v2], v1) ``` Function Nam...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = ('Generating text to output file.', 'Saving model', 'Saving model current', 'Updating stateGenerating final text', 'Updating state', 'Pipe co...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: _t.Iterable Dependencies: Function Name: v0 Function: ```python def v0(self) -> _t.Iterable: v1 = self._get_subs_from_view() if self.allowed_subs is None: return [] elif self.allowed_subs: return set(self.all...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self.args.max_test_samples return not self.args.valid_only and self.sample_size == v1 ```
Imports: ```python import copy import datetime import json import typing ``` Type definitions: Input Types: str, str, str, str Output Type: Any Dependencies: ```python def v0(v1): v2 = copy.copy(v1) v2[9] = '0' v2 = json.dumps(v2, ensure_ascii=False) v2 = v2.replace('"', '\\"') return v2 ``` Functi...
Imports: ```python import typing ``` Type definitions: Input Types: str, Mapping[str, Any] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Mapping[str, Any]) -> List[str]: v3 = [v1] for (v4, v5) in v2.items(): v3.append(f'--{v4}') v3.append(v5) ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): for v2 in self.__dxs_entries: if v2.dxsId == v1: return v2 return None ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any): if self.value == v1: return True for v2 in self.children: if v2.search(v1): return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str | None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str | None: for v2 in self.hue_lights: if v2.unique_id == v1: return v2.number return None ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, str]) -> None: if v1 != self._filter: self._filter = v1 self._update() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._validate_mean(self.xpxp_mean_vector, self.d) self._validate_cov(self.xpxp_covariance_matrix, self.d) ```
Imports: ```python import typing ``` Type definitions: Input Types: base.NodeDriver, str Output Type: base.NodeImage Dependencies: Function Name: v0 Function: ```python def v0(v1: base.NodeDriver, v2: str='debian-10') -> base.NodeImage: for v3 in v1.list_images(): if v3.name.startswith(v2): re...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1='git') -> bool: if not self.mapped: self.read_in(v1) self.mapped = True return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): if v1: self.__canvas.config(background='red') else: self.__canvas.config(background='green') ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: ```python def v0(v1): v2 = np.abs(v1.copy()[0]) v3 = np.angle(v1.copy()[0]) v4 = {'amplitudes': v2, 'phases': v3} return v4 ``` Function Name: v5 Function: ```python def v5(v6,...
Imports: ```python import numpy as np from numpy.typing import ArrayLike import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, bool Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray, *, v2: str='uint8', v3: str='minmax', v4: Tuple[int, int]=(2, 98)) -> np.ndarray: v5 = np.iin...
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.image_annotation_counts.pop(v1) self.annotations.pop(v1, None) self.image_names.remove(v1) os.remove(self.path / v1) ```
Imports: ```python from functools import partial from urllib import parse import typing ``` Type definitions: Input Types: (tuple, list, str), str, bool, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: (tuple, list, str), v2: str='dataframe', v3: bool=True, v4=None, v5=T...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: logging.info('stop') super().stop() ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> None: if v1 != self.__width and v2 != self.__height: self.__width = v1 self.__height = v2 self.__changed = Tr...
Imports: ```python import logging import typing ``` Type definitions: Input Types: int, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: Any) -> None: logging.info('Received signal: {}'.format(v1)) self.halt = True ```
Imports: ```python import typing ``` Type definitions: Input Types: syaml.YAML Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: syaml.YAML) -> Tuple[str, str]: v2 = v1.split('/') if len(v2) == 1: print('Type improperly formatted, a namespace is missing: ', v1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = ['oxx', 'oyy', 'ozz', 'txy', 'tyz', 'txz', 'eff_plastic_strain', 'eff_plastic_strain', 'eff_creep_strain', 'exx', 'eyy', 'ezz', 'exy', 'ey...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> str: v2 = self.get_template() for (v3, v4) in v1.items(): v2 = v2.replace(f'*|{v3}|*', v4) return v2 ```
Imports: ```python from secrets import choice import typing ``` Type definitions: Input Types: Tuple[str, str], str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[str, str], v2: str) -> str: (v3, v4) = v1 return v3 if '1' == v2 else v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[str] Output Type: dict[tuple[str, str], int] Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[str]) -> dict[tuple[str, str], int]: v2 = {} for v3 in v1: v4 = v3.split() v5 = int(v4[-1]) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self.expect_exact('Enter test name:') self.write(v1) self.expect_exact('Got test name: ' + v1) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Tuple[Dict[str, Any], Dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> Tuple[Dict[str, Any], Dict[str, Any]]: v2: Dict[str, Any] = {} v3: Di...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, int, int, int, int, bool Output Type: tf.Tensor Dependencies: ```python def v0(v1: tf.Tensor, v2: tf.Tensor, v3: int) -> None: v4 = v1.shape[1].value if v4 is not None: v5 = v4 * v3 assert v5 ...
Imports: ```python import os from urllib.parse import parse_qs, parse_qsl, ParseResult, quote, unquote_to_bytes, urldefrag, urlencode, urlparse, urlsplit, urlunparse, urlunsplit from urllib.parse import _coerce_args from urllib.request import pathname2url, url2pathname import typing ``` Type definitions: Input Types: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int): v3 = f'/{v1}' v4 = 'emendas/documentos' return self._request(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> bool: self.db.contributor.find_one_and_update({'_id': v1['_id']}, update={'$set': {'is_admin_approved': False}}) return T...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> pd.DataFrame: v2 = [] v3 = pd.ExcelFile(v1) v4 = len(v3.sheet_names) for (v5, v6) in enumerate(v3.sheet_names): ...
Imports: ```python import typing ``` Type definitions: Input Types: 'TimeSeries' Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'TimeSeries') -> bool: if len(v1) != len(self): return False return (v1.time_index == self.time_index).all() ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.check_reserved_keyword(v1): return tuple([False, f'name: {v1} cannot be a reserved SQL keyword']) elif not bool(re.match...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: 'tf.Tensor', 'tf.Tensor', 'tf.Tensor' Output Type: 'tf.Tensor' Dependencies: ```python def v0(v1: 'tf.Tensor', v2: 'tf.Tensor', v3: 'tf.Tensor') -> 'tf.Tensor': v4 = tf.tile(tf.expand_dims(v2, 0), (v1, 1, 1)) return tf....
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=None): self.val = v1 self.next = v2 ``` Input Types: v0, v0 Output Type: v0 Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0, v5: v0) -> v0: if v4 is None or v5 is None...
Imports: ```python import logging import os import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: if os.path.isdir(v1): return os.path.realpath(v1) logging.debug(f"{v1} doesn't exist. ...
Imports: ```python import os import json import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = 'guild/' + str(v1) + '/core_settings.json' if os.path.isfile(v2): with open(v2, 'r') as v3: v4 = json.loa...