text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1 = {} v1['time_offset'] = self.__time_offset for (v2, v3) in self.__class__.variables.items(): v1[v2] = getattr(sel...
Imports: ```python import json import os import pandas as pd import typing ``` Type definitions: Input Types: str, str, int Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: int) -> pd.DataFrame: v4 = [] for v5 in range(v3): with open(os.path.jo...
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 = self.get_value(self.ip + 1, v1[1]) v3 = self.get_value(self.ip + 2, v1[2]) if v2 == v3: v4 = 1 else: v4 = 0 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: T.List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> T.List[str]: v2 = [] v3 = v1['fortran_std'] v4 = {'legacy': 'none', 'f95': 'f95', 'f2003': 'f03', 'f2008': 'f08', 'f2018': 'f18'} if ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array, int, int Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: int, v3: int) -> np.array: v4 = np.logical_and(v1[:, 0] > 0, v1[:, 0] < v2) v5 = np.logical_and(v1[:, 1] ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Dict) -> None: v3 = [f"id={v2.get('mid')}\n", f"name={v2.get('name')}\n", f"version={v2.get('version')}\n", f"versionCode={v2.get('versionCode')}\...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> int: v2 = v1[-1] - v1[0] v2 = v2 / (len(v1) + 1 - 1) for v3 in range(0, len(v1) - 1): if v1[v3 + 1] - v1[v3] != v2: re...
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=False): v3 = [] v4 = self.child[self.parent == v1].tolist() v3.extend(v4) while v4: v5 = v4.pop(0) v6 = self.child[...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, 'Environment', T.Union[None, T.List[str], T.Callable[['CompileCheckMode'], T.List[str]]], T.Optional[T.List['Dependency']] Output Type: T.Tuple[bool, bool] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: str Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Dict[str, str]: if not isinstance(v1, str): raise ValueError('filename must be a string') v2 = os.path.ba...
Imports: ```python import typing ``` Type definitions: Input Types: 'FuturesSession', 'Connection', int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: 'FuturesSession', v2: 'Connection', v3: int=0, v4: int=1000): v5 = f'{v2.base_url}/api/contactGroups' v6 = {'offset': v3,...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = np.ndarray ``` Input Types: v0, v0 Output Type: float Dependencies: ```python def v1(v2: v0) -> float: return (v2[2] - v2[0]) * (v2[3] - v2[1]) ``` ```python def v3(v4: v0, v5: v0) -> float: v6 = np.maximum(v4[:2], v5[:2]) ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.Series, pd.Series Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.Series, v2: pd.Series): for (v3, v4) in zip(v1, v2): v3 = v3.split('>') v3.insert(0, 'START') if v4 == 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1) -> bool: for v2 in v1.parameters: self._ensure_finalized(self._arguments[v2]) if self._arguments[v2].is_late: return False return...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> None: self._databases[v1] = await self.receive_message(v1, msg_id='encrypted_data') self._logger.info(f'Stored encrypted data from {v1}')...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: dict): v1['deviceData'].update({'online': await self.session.attr.onlineOffline(v1['device_id'])}) v2 = {} if v1['deviceData']['online']: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Contract): def v1(self, v2: str, v3: Wei, v4: Dict=None) -> None: v5 = f'mint_{self.address}' if hasattr(sys.modules[__name__], v5): getattr(sys.modules[__name__], v5)(self, v2, v3) return if h...
Imports: ```python import argparse from pathlib import Path import re import subprocess import sys import typing ``` Type definitions: Input Types: List[str] Output Type: int Dependencies: ```python def v0(v1: TextIO, v2: Path, v3: str): print(FILE_HEADER, file=v1) gen_common(v1, v2, v3) gen_targets(v1, v2...
Imports: ```python import getpass import os import typing ``` Type definitions: Input Types: str, Optional[str] Output Type: str Dependencies: ```python def v0() -> str: return os.environ.get('BUILD_URL', 'Manual run by {}'.format(getpass.getuser())) ``` Function Name: v1 Function: ```python def v1(v2: str, v3: Op...
Imports: ```python from inspect import isclass import typing ``` Type definitions: Input Types: Union[str, Type['BaseAlgorithm']] Output Type: str Dependencies: ```python def v0(v1: Type['BaseAlgorithm']) -> str: v2 = str(v1) v3 = v2.replace("'", '').replace('>', '') v4 = v3.split('.') v5 = v4[-1] ...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray, int, dl.NormalizeType, ImageDataGenerator, int, str, str, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np...
Imports: ```python import typing ``` Type definitions: Input Types: 'libioc.Jail.Jail' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'libioc.Jail.Jail') -> None: v1.config['name'] = 'jail.with.dots' assert v1.identifier.endswith('jail*with*dots') ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[str]: v2 = list() for v3 in range(v1.count(' ') + 1): v2.append(v1.rsplit(' ', v3)[0]) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, t.Tuple[t.Any, ...], t.Dict[str, t.Any] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: t.Tuple[t.Any, ...], v3: t.Dict[str, t.Any]) -> bool: v4 = self.is_active self.is_active = True s...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: int Output Type: asyncio.Lock Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: int) -> asyncio.Lock: async with self.main_lock: if not v1 in self.locks: self.locks[v1] = asyncio.Lock() ...
Imports: ```python import typing ``` Type definitions: Input Types: datetime.datetime Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime.datetime) -> None: if self.__is_datetime_aware(v1): return raise self._generate_data_validation_failed_exc('The input da...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=10 * 1024 * 1024): if v1 <= 0: v1 = 10 * 1024 * 1024 self.__max_size = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Text Output Type: List[Text] Dependencies: Function Name: v0 Function: ```python def v0(v1: Text) -> List[Text]: with open(v1, 'r') as v2: return [line.strip() for v3 in v2.readlines()] ```
Imports: ```python import typing ``` Type definitions: Input Types: tf.config.PhysicalDevice Output Type: bool Dependencies: ```python def v0(v1: tf.config.PhysicalDevice) -> tuple: try: v2 = int(v1.name.split(':')[-1]) v3 = numba.cuda.select_device(v2) v4 = v3.compute_capability v3...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool): v3 = 'passing' if v2 else 'failing' v4 = 'brightgreen' if v2 else 'red' return (v1, v3, v4) ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> list: for v2 in range(len(v1)): v3 = abs(v1[v2]) - 1 if v1[v3] > 0: v1[v3] = -1 * v1[v3] v4 = [] for v2 in ra...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.get_url('self') return self.session.get(v1).text ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: (bool, int) Dependencies: Function Name: v0 Function: ```python def v0(v1) -> (bool, int): v2 = 0 v3 = 0 v4 = set() while v3 < len(v1): if v3 not in v4: v4.add(v3) else: return ...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Output Type: typing.Dict[str, typing.Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Dict[str, typing.Any]: v1: typing.Dict[str, typing.Any] = {class_name: class_obj for (v2, v3) in inspect.getmembe...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: assert self.working_model is not None, 'Called get_log_z() before run().' assert len(self.working_model.variables) == 0, 'Model is not fully elimin...
Imports: ```python import typing ``` Type definitions: Input Types: dict, Optional[dict] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: Optional[dict]) -> None: if v2 is None: self.log.error('DELETE_SUBJECT record doesnt have a value, should have') ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): (v2, v3, v4, v5, v6, v7) = v1.split(' ') return {'order_id': v2, 'ata': float(v3), 'distance': float(v4), 'simple_eta': float(v5), 'driver_id': int(v6),...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> int: assert v1.shape == v2.shape return v1[v2 == 1].sum() ```
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='DEFAULT'): if v2 not in self._config: raise KeyError('Fail to found the [{}] section in the configuration'.format(v2)) if v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Mapping Output Type: typing.Sequence Dependencies: Function Name: v0 Function: ```python def v0(v1: typing.Mapping) -> typing.Sequence: v2 = [] for v3 in v1['fields']: if v3['enable']: v2.append(v3) return v2 ``...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> str: v3 = min(len(v1), len(v2)) v4 = next((idx for v5 in range(v3) if v1[v5] != v2[v5]), v3) return v1[v4:] ```
Imports: ```python from statsmodels.tsa.holtwinters import ExponentialSmoothing import typing ``` Type definitions: Input Types: Union[pd.Series, np.ndarray], Any, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[pd.Series, np.ndarray], v2, v3, v4): if v2 == 'N': ...
Imports: ```python from PIL import Image, ImageDraw, ImageFont import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: dict): v2 = Image.open('img/embed-2.png') v3 = ImageDraw.Draw(v2) v4 = ImageFont.truetype('font/ReadexP...
Imports: ```python import typing ``` Type definitions: Input Types: Set[bytes] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Set[bytes]): (v2, v3) = ({}, {}) for v4 in v1: for v5 in self.prefix_db.channel_to_claim.iterate((v4,), include_key=False): v...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: v2 = '' v3 = 'v_{{{0}x}}'.format(v1) v4 = '{}'.format(self.point.x) v2 += self.get_xml_element_value(v3, v4) + '\n' v5 = 'v_{{{...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int): if v1 < 1 and v2 < 1: return 0 if v3 < 0: return 0 v4 = [[False for v5 in range(v2)] for v6 in ran...
Imports: ```python import re import pandas as pd from collections import OrderedDict from pandas import DataFrame from datetime import datetime import typing ``` Type definitions: Input Types: Any, Any, bool, str Output Type: Any Dependencies: ```python def v0(v1): v2 = {'과목': 'label_ko', '주석': 'comment'} v3 =...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self) -> np.ndarray: v1 = np.zeros(self.obs_space_size) v1[self.current_position] = 1 if self.holding_object: v1[-1] = 1 re...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Union[int, bool, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Union[int, bool, str]: v2 = getattr(self, v1) if hasattr(v2, 'value'): return v2.value return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: typing.NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> typing.NoReturn: v2 = self.__data if v2[v1] < 0: return v1 v2[v1] = self.find(v2[v1]) return v2[v1] ```
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 in self.queries and self.queries[v1]['result'] is not None: v2 = self.queries[v1]['result'] del self.queries[v1] return ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Decimal, Decimal, Decimal, Decimal, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: Decimal, v3: Decimal, v4: Decimal, v5: Decimal, v6): if self.box is None: self.box_explorer.update() ``...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Tuple[int, ...] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[int, ...]) -> float: v2 = self.reduced(v1) return (np.trace(v2._C) + v2._m.conjugate() @ v2._m).real ```
Imports: ```python import os import shutil 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): v4 = v3 if v3.startswith('/') else '/' + v3 os.makedirs(os.path.dirname(v4), exist_ok=True) ...
Imports: ```python import typing ``` Type definitions: ```python @attr.s class v0(object): v1 = attr.ib(default=None) v2 = attr.ib(default=None) v3 = attr.ib(default=None) v4 = attr.ib(default=None) v5 = attr.ib(default=None) v6 = attr.ib(default=None) @classmethod def v7(cls, v8: Dict[...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: 'SACPolicy' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> 'SACPolicy': self.training = v1 self.actor.train(v1) self.critic1.train(v1) self.critic2.train(v1) return self ```
Imports: ```python import random import pickle import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with open(self.cfg.expert_data_path, 'rb') as v1: self.expert_data = pickle.load(v1) print('the data size is:...
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._rows.values(): assert len(v1.inferiors) == len(self._cols) ```
Imports: ```python import typing ``` Type definitions: Input Types: logging.Logger, float, float, float, float, [], [] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: logging.Logger, v2: float, v3: float, v4: float, v5: float, v6: [], v7: []) -> bool: if v2 >= self._validati...
Imports: ```python import typing ``` Type definitions: Input Types: Dataset, str, array Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Dataset, v2: str, v3: array) -> None: v4 = v3.shape if len(v4) == 0: v4 = (1, 1) elif len(v4) == 1: v4 = (v4[0], 1) v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._reporter.verbosity == 0: if self._written_refs: self._reporter.write_line('Regenerated files:', yellow=True) for...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = len(v1) v3 = 1 while v3 < v2 / 3: v3 = 3 * v3 + 1 while v3 >= 1: for v4 in range(v3, v2): v5 = v4 ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str): v3 = 'cancel_withdraw.do' v4 = {'api_key': self._api_key, 'symbol': v1, 'withdraw_id': v2} v4['sign'] = self.sign(v4) ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> int: if v2 == '': return 0 v3 = len(v2) for v4 in range(len(v1) - v3 + 1): v5 = 0 while v5 < v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.exception_log.clear() self.severity = 0 self.setText('') ```
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('::')[0] v3 = v2.split('/')[-1] if v3.startswith('tier_'): return '-'.join(v3.split('_')[0:2]) if v3.startswith('ti...
Imports: ```python import typing ``` Type definitions: Input Types: np.array, float Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: float=1.2) -> Tuple: v3 = v1[:, -1] > 0 v4 = v1[v3][:, :-1] v5 = 0.5 * (v4.max(axis=0) + v4.min(axis=0)) v6 = v4.max(axis=...
Imports: ```python import typing ``` Type definitions: Input Types: xr.Dataset, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: xr.Dataset, v2: str=None): self._granule_name = v2 v3 = v1.dims self._tile_spec_list = self._generate_slices(v3) return self ```
Imports: ```python import math import sympy import typing ``` Type definitions: ```python v0 = Union[int, float, List[bool], str, sympy.Symbol, sympy.Add, sympy.Mul] ``` ```python v1 = Union[float, sympy.Symbol, sympy.Add, sympy.Mul] ``` Input Types: v2.program_pb2.FloatArg, str, Optional[str] Output Type: Optional[v1]...
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=None): v3 = self.session.get(url=self._get_url(v2, v1)) return self._process_response(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float) -> str: v3 = int(v3 * 255) if v2 == 0.0: return f'#{v3:02x}{v3:02x}{v3:02x}' v4 = int(v1 * 6.0) v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> list: v3 = [] for v4 in range(0, self.BOXES): for v5 in range(0, self.BOXES): v6 = v4 * v1.shape[1] // self.BOXES ...
Imports: ```python import json import requests import typing ``` Type definitions: Input Types: Any, Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: str): if self.auth_header is None: raise ValueError('need to login first') v4 = requests.post(self...
Imports: ```python import typing ``` Type definitions: ```python v0 = Any ``` ```python v1 = Any ``` Input Types: Sequence[v0], v0 Output Type: Tuple[Sequence[str], Sequence[v1]] Dependencies: Function Name: v2 Function: ```python def v2(v3: Sequence[v0], v4: v0) -> Tuple[Sequence[str], Sequence[v1]]: if not all((...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[str], bool Output Type: Union[List[int], Tuple[List[int], Dict]] Dependencies: ```python def v0(v1: Sequence) -> np.ndarray: (v2, v3) = np.unique(v1, return_index=True) return np.asarray(v1)[np.sort(v3)] ``` Function Na...
Imports: ```python from pathlib import PurePosixPath import typing ``` Type definitions: ```python @dataclass class v0: v1: str 'GitHub organization/user that owns the repository.' v2: str 'GitHub repository name (without the owner prefix).' v3: RepositorySettingsFile 'Repository settings, read ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=''): self._buffer.write(f'{self._indent_string()}{v1}\n') return self ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = '\n SELECT ?dataset\n WHERE {\n ?startdataset TEMP:collectionTitle ?string .\n ?dataset TEMP:coll...
Imports: ```python from torch import nn import torch import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: dict): v3 = 'Summary\n' v3 += '\n'.join([f'{key}: {value.item()}' if torch.is_tensor(value) else f'{key}: {value}'...
Imports: ```python import base64 import binascii import json import typing ``` Type definitions: Input Types: Dict, str Output Type: Dict Dependencies: ```python def v0(v1: bytes) -> Dict: v2: bytes = v1 v3: bytes = binascii.a2b_base64(v2) v4: bytes = base64.b64decode(v3) return json.loads(v4.decode('u...
Imports: ```python import fileinput import logging import os from urllib.request import urlopen import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if os.name == 'nt': v2 = 'launch.bat' v3 = ';%INSTALL_DIR%' ...
Imports: ```python import typing ``` Type definitions: Input Types: XProtParser.Param_mapContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: XProtParser.Param_mapContext): v2 = self.visit(v1.param_map_tag()) v3 = dict() for v4 in v1.node(): (v5, v6) = self...
Imports: ```python from os import makedirs, path import typing ``` Type definitions: Input Types: str, Union[bool, Callable[[float, float, str], None]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[bool, Callable[[float, float, str], None]]=None) -> None: if...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Tuple[tf.Tensor, tf.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> Tuple[tf.Tensor, tf.Tensor]: v2 = tf.io.decode_raw(v1[self._image_field_key], ...
Imports: ```python import os, cv2 import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = cv2.VideoCapture(self.path) (v2, v3) = v1.read() v4 = 0 v5 = v1.get(cv2.CAP_PROP_FRAME_COUNT) v6 = 30 v7 = v6 * 6...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1) -> None: v2 = v1.test_client v3 = v2().post('/api/user/registration') assert 400 == v3.status_code v4 = json.loads(v3.data.decode('utf-8'...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('N') ``` Input Types: v0, List Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: List): if self._udf_data_views: for v4 in range(len(self._udf_data_views)): for (v5, v6) in ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=None, v2=None): self.key = v1 self.value = v2 self.next = None self.prev = None ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v3 Function: ```python def v3(self, v4:...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str='', v3: str='') -> bool: if v2: v4 = v1.get('host') if v4.find(v2) < 0: return False if v3: v5 =...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = [] with open(v1, 'r') as v3: v4 = v3.readlines() for v5 in v4: if not v5.startswith(' '): v2.append(v5[:v5.fi...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: Dict): for (v3, v4) in v2.items(): v1.axhline(y=v4, linestyle='--', alpha=0.7) v5 = v1.get_xlim()[0] v1.text(x=v5, y=v4, s=v3, h...
Imports: ```python import typing ``` Type definitions: Input Types: 'ex_struct.util.uri.URI' Output Type: Optional['ex_struct.context.base.Base'] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: 'ex_struct.util.uri.URI') -> Optional['ex_struct.context.base.Base']: if not self.is_supporte...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray=None, v2: np.ndarray=None, v3: str=None): super().setInputData(v1, v2, v3) self.updateOcclusion() ```
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[Tuple[str, Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str]]], Sequence[Tuple[str, str, str, Optional[str], Optional[int]]], Sequence[Tuple[str, str, str, str, Optional[int...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): for v2 in range(self.PHYSICS_STEPS): self.physics_space.step(v1 / self.PHYSICS_STEPS) v3 = 0 if self.controls['left']: v3 ...
Imports: ```python from os import environ import asyncio import logging import typing ``` Type definitions: Input Types: Any Output Type: asyncpg.Connection Dependencies: ```python async def v0(v1) -> None: await v1.execute('CREATE TABLE IF NOT EXISTS status_history(\n url TEXT NOT NULL,\n re...
Imports: ```python import typing ``` Type definitions: Input Types: StreamWriter, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: StreamWriter, v2: str): v1.write(v2.encode()) await v1.drain() ```
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: str v3: int def v4(self) -> Tuple[str, str, int]: return (self.cluster_id, self.pool_type, self.storage_ndx) ``` Input Types: v0, str Output Type: List[str] Dependencies: Function Name: v5 Functio...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: 'ClientBuilder' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> 'ClientBuilder': self._job_config.set_runtime_env(v1) return self ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array, Image Output Type: Dict Dependencies: ```python def v0(v1: np.ndarray): (v2, v3, v4, v5) = [i[:, 0] for v6 in np.split(v1, [1, 2, 3], axis=1)] v7 = [v2 - 0.5 * v4, v3 - 0.5 * v5, v2 + 0.5 * v4, v3 + 0.5 * v5] r...