text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: ClientDBFilesStorage.DBLocationSearchContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ClientDBFilesStorage.DBLocationSearchContext): if v1.location_search_context.IsAllKnownFiles(): v2 = 'poten...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor) -> tf.Tensor: v2 = tf.concat([v1[:, 1:], tf.zeros_like(v1[:, :1], dtype=v1.dtype)], axis=1) return v1 - v2 ```
Imports: ```python import numpy as np from numpy.linalg import inv, det, slogdet import typing ``` Type definitions: ```python class v0: def __init__(self): """ Initialize an instance of multivariate Gaussian estimator Attributes ---------- fitted_ : bool Initia...
Imports: ```python import typing ``` Type definitions: Input Types: object, object Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: object, v2: object) -> str: if v1 and v1[v2]: return v1[v2].strip() if isinstance(v1[v2], str) else v1[v2] return None ```
Imports: ```python import numpy as np import os import pickle import pandas as pd import typing ``` Type definitions: Input Types: str, list, list, bool, list, Any, Any, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: list, v3: list, v4: bool=False, v5: list=['Ntarget...
Imports: ```python from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.expire_at is None: return False return datetime.now() >= self.expire_at ```
Imports: ```python import typing ``` Type definitions: Input Types: dict, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2=ngram_hsim): v3 = list(v1.keys()) v4 = {track_id: {} for v5 in v3} for (v6, v7) in enumerate(v3): v8 = v1[v7] for v9 in ran...
Imports: ```python from os import path import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3=False): if v2.startswith('/') or '://' in v2: return v2 if not v3: v1 = path.dirname(v1) re...
Imports: ```python import numpy as np from scipy.io import wavfile import typing ``` Type definitions: Input Types: int Output Type: np.ndarray Dependencies: ```python def v0(v1: str, v2: int) -> np.ndarray: (v3, v4) = wavfile.read(v1) if v3 != v2: raise ValueError(f'Frame rate is {v3}, but {v2} is exp...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: List[int]) -> float: v3 = v1 + v2 v3.sort() if len(v3) % 2 == 0: return (v3[len(v3) // 2] + v3[len(v3) // ...
Imports: ```python import typing ``` Type definitions: Input Types: float, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2=0.05) -> str: assert isinstance(v1, (float, int)), 'Sentiment score must be float or int.' assert isinstance(v2, (float, int)), 'Threshold mu...
Imports: ```python from matplotlib.axes import Axes from matplotlib.figure import Figure import matplotlib.pyplot as plt import glob from PIL import Image import typing ``` Type definitions: Input Types: 'DroneState', 'Planner' Output Type: Any Dependencies: ```python def v0(v1: str) -> int: return int(v1.split('/...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: self.prices = self.prices[-self.look_back_intervals:] v1 = self.prices['close'].pct_change().dropna() v2 = ((v1 - v1.mean()) / v1.std())[-1] ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[int, int] ``` ```python v1 = Dict[v0, Dict[str, bool]] ``` Input Types: v1, v0, bool Output Type: Any Dependencies: ```python def v2(v3: v1, v4: v0) -> bool: if v4 not in v3: return False return v3[v4]['is_seat'] ``` Function Na...
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 = ['#include <stddef.h>', 'const char *' + v1 + '[] = {'] for v4 in v2.splitlines(): v4 = v4.replace('\\', '\\\\') ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: ```python def v0(v1: str) -> int: v2: int = 0 for v3 in v1: if v3 != ' ': break v2 += 1 v4: int = v2 // 4 return v4 ``` Function Name: v5 Function: ```python def v5(v6...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int) -> bool: v4 = v1 + v2 + v3 v5 = v4 // 2 v6 = (v5 * (v5 - v1) * (v5 - v2) * (v5 - v3)) ** 0.5 return True if v4 == v6...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().do_make_layout() self.pack_end(self._pnlGeneralData, True, True, 0) self.show_all() ```
Imports: ```python from qiskit import pulse from qiskit.pulse import instructions from qiskit.visualization.exceptions import VisualizationError from qiskit.visualization.pulse_v2 import drawing_objects, types, PULSE_STYLE import typing ``` Type definitions: Input Types: types.NonPulseTuple Output Type: List[Union[dra...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = v1 if 'http' not in v1 else re.findall('/(\\d+)/?', v1)[0] return str(v1) if v1.isdigit() else f'输入信息 {v1} 不是数字或链接!' ```
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 = v1.replace('▁', '') return ''.join(v1.split()) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> bool: v2 = set(v1) if len(v2) % 2 == 1: return False for v3 in v1: if v3 >= 'A' and v3 <= 'Z': if chr(ord(v3) + 32) not in v2: retu...
Imports: ```python import os from os import path import typing ``` Type definitions: Input Types: str, str, str, str, int, int, int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str, v4: str, v5: int=4, v6: int=4, v7: int=1, v8: int=None) -> None: v9 = pat...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Any Output Type: List[Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1=None, **v2) -> List[Dict]: assert len(v2) > 0 v3 = [] for v4 in self.items.values(): if all((v4[key] == desired_value for ...
Imports: ```python import torch import numpy as np from transformers import AutoModel from transformers import AutoConfig from transformers import AdamW from transformers import AutoModelForSequenceClassification from torch.nn import CrossEntropyLoss, MSELoss from transformers import PretrainedConfig from transformers....
Imports: ```python from multiprocessing import shared_memory import typing ``` Type definitions: Input Types: Any, Any Output Type: AnyStr Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> AnyStr: v3 = shared_memory.SharedMemory(name=v1, create=True, size=v2) self.shm_store[v1] = v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool, Optional['TargetDispatcher'], int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool, v3: Optional['TargetDispatcher'], v4: int=0): v5 = f'__{v1}_in' v6 = f'__{v1}_out' if v3 is not No...
Imports: ```python import ast from typing import cast from typing import Iterable from typing import List from typing import Tuple from typing import Type from typing import Union import typing ``` Type definitions: Input Types: ast.Compare, Union[Type[ast.cmpop], Tuple[Type[ast.cmpop], ...]] Output Type: bool Depende...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[int, List[str]] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[int, List[str]]) -> List[str]: v2 = [] for v3 in v1: if len(v1[v3]) == 1: v2.append((v3, v1[v3][0])) retur...
Imports: ```python import typing ``` Type definitions: Input Types: nn.LSTMCell, torch.Tensor, torch.Tensor Output Type: Any Dependencies: ```python def v0(v1, v2, v3=True): v4 = 0 v5 = (v1 + v2) * v2 + v2 if v3: v5 += v2 * 2 v4 += v5 * 4 v4 += v2 * 3 v4 += v2 return v4 ``` Function...
Imports: ```python import platform import sys import typing ``` Type definitions: Input Types: argparse.ArgumentParser, argparse.Namespace Output Type: None Dependencies: ```python def v0() -> None: v1: list[str] = [] v2 = sys.version_info v1.append(f'- Python v{v2.major}.{v2.minor}.{v2.micro}-{v2.releasel...
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._getItem(v1) if v2: self.map.pop(v2.lower()) self.data.discard(v2) ```
Imports: ```python import numpy as np from transformers import default_data_collator import typing ``` Type definitions: Input Types: str, str, int, bool Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: int, v4: bool=False) -> np.ndarray: if v1 not in ...
Imports: ```python import typing ``` Type definitions: Input Types: List Output Type: Dict Dependencies: ```python def v0(v1) -> Union[str, Dict, List]: return [v0(i) for v2 in v1] if isinstance(v1, list) else getattr(v1, 'repr', v1) ``` Function Name: v3 Function: ```python def v3(self, v4: List) -> Dict: v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: 'Message', ui.View Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: 'Message', v2: ui.View) -> dict: v3 = {} if self.content != v1.content: v3['content'] = v1.content self.content = ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.units == 'cgs': self.kB *= self.J2erg self.c0 *= 100.0 self.mp *= 1000.0 v1 = 0.1 * self.c0 ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> None: super()._init_minibatch(v1) v1['cx_var_usage_context_tokens'] = [] v1['cx_var_usage_context_types'] = [] v1...
Imports: ```python import typing ``` Type definitions: Input Types: bigquery.client.Client, Dict[str, Any] Output Type: Any Dependencies: ```python def v0(v1: bigquery.client.Client, v2: str, v3: Dict[str, Any]) -> bigquery.table.RowIterator: v4 = v3['jinja_env'].get_template(v2).render(v3) if v3['verbose']: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str=None, v3: str=None) -> None: v1 = self.gen_reply(v1) if v2: self._client.upload_file(self._body['channel'], v3 or v2, v2...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> None: v3 = open(v1, mode='rb') v4 = v3.read() v3.close() self.send_utf8_bytes(v4, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): (self.state, v2, v3) = self._wrapped_env.step(v1) self._gather_infos() return (self.state, v2, v3) ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: TextIO, Path Output Type: None Dependencies: ```python def v0(v1): v2 = pd.read_csv(data_directory / v1['uuid'] / 'episode.csv') return pd.Series({'uuid': v1['uuid'], 'town': v1['town'], 'weather': v1['weather'], 'student_t...
Imports: ```python from asyncio import ensure_future from asyncio.futures import isfuture from asyncio import Task, get_running_loop, Future import typing ``` Type definitions: Input Types: Future Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Future) -> None: if not isfutu...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.is_current: asyncio.set_event_loop(self.old_asyncio) self.is_current = False ```
Imports: ```python import typing ``` Type definitions: Input Types: ks.Series[self.dtype] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ks.Series[self.dtype]): v2 = v1.name return (v1 - self.X_mean[v2]) / self.X_std[v2] ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1) -> str: v2 = v1.package or v1.path.name v3 = re.match('[a-zA-Z][a-zA-Z_0-9]*$', v2) assert v3, f"'{v2}' is not a valid python package name" ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str], v2: str) -> bool: v3 = self.connections.list_schemas(database=v1, schema=v2) return v2.lower() in [row[0].lower() for v4 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Union[Number, np.ndarray], Union[Number, np.ndarray] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: Union[Number, np.ndarray], v3: Union[Number, np.ndarray]) -> np...
Imports: ```python import os from os.path import splitext import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = f"{v1.replace('-', '_')}_ROOT_CERT" v3 = os.getenv(v2) if v3 is not None and (not v3.startswith('...
Imports: ```python import typing ``` Type definitions: Input Types: str, pd.DataFrame, pd.DataFrame, bool, str Output Type: List[str] Dependencies: ```python def v0(v1: str, v2: pd.DataFrame) -> bool: if v2[f'QUESTAO_{v1}_SITUACAO_DA_QUESTAO'].iloc[0] == 1: v3 = True else: v3 = False return...
Imports: ```python from glob import glob import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1): return int(v1) if v1.isdigit() else v1 ``` ```python def v2(v3): return [v0(c) for v4 in re.split('(\\d+)', v3)] ``` Function Name: v5 Function: ```python...
Imports: ```python import threading import typing ``` Type definitions: Input Types: 'WalletStorage' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'WalletStorage'): if threading.currentThread().isDaemon(): self.logger.warning('daemon thread cannot write db') ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = str(int(str(2 * v1)[0]) - 1) v3 = str(2 * v1)[1:] v4 = int(v2 + v3) return v4 ```
Imports: ```python import urllib from PIL import Image from io import BytesIO import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str) -> str: print('Now processing: {}'.format(v1)) v2 = urllib.request.build_opener(urllib.request.ProxyHandler(proxies))...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(*v1) -> str: v2 = '/' return v2.join(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: v3 = str(int(v1) + int(v2)) v4 = [int(i) for v5 in v3] v6 = '' v7 = 0 for v5 in range(len(v4) - 1, -1, -1): ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> dict: v2 = v1[0] v3 = {} for v4 in range(0, len(v1)): if v4 == 0: continue v5 = v1[v4] v6 = {} for ...
Imports: ```python import collections import fractions from typing import cast, Deque, Dict, List, Optional, Tuple, TYPE_CHECKING, Union import typing ``` Type definitions: Input Types: int, int, Optional[str], vs.VideoNode Output Type: str Dependencies: ```python @functools.lru_cache def v0(v1: vs.VideoNode) -> Deque...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if '.' not in v1: return v1 (v2, v3) = v1.split('.') return f'{v2 or 0}.{v3 or 0}' ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[Callable[[float], float], str, None] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Callable[[float], float], str, None]=None) -> None: if v1 is 'auto': if 'class' in self.objective: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: v2 = self._memory.read_byte(v1) print(f'Execute: {hex(v2)}') ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self) -> bytes: if self._public_key is None: return self.generate_new_key()[1] else: return self._public_key ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self): self.tx = 0 self.ty = 0 self.tz = 0 self.r00 = 1 self.r01 = 0 self.r02 = 0 self.r10 = 0 self.r11 = 1 self.r12 = 0 self.r20 = 0 self....
Imports: ```python import typing ``` Type definitions: ```python v0 = collections.namedtuple('DataTuple', 'dataset loader evaluator') ``` Input Types: v0, Any Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3=None): (v4, v5) = self.predict(v2, dump=v3) v6 = v2.evaluat...
Imports: ```python import typing ``` Type definitions: Input Types: discord.Guild Output Type: bool Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: discord.Guild) -> bool: v2: bool v3: int = v1.id if self.enable_cache and v3 in self._cached_guild: v2 = self._cached_guild...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.text() self.record(v1) self.returned.emit(v1) self.setText('') ```
Imports: ```python import typing ``` Type definitions: Input Types: str, list, set, bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: list, v3: set, v4: bool) -> str: v5 = 0 v6 = '' for v7 in v2: v8 = False if v7 in v3: v5 += 1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.create_model('meeting/222', {'name': 'name_xQyvfmsS'}) self.create_model('group/23', {'name': 'name_asdfetza'}) self.create_model('group/24'...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int, int, int, int Output Type: Tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int, v4: int, v5: int, v6: int=1) -> Tuple[int, int]: v2 = (v2 - 1) * v6 + 1 v7 = (v1 - 1) * v3 - 2 * v...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> str: if v2 <= 1: return v1 v3 = '' for v4 in range(v2): v5 = v2 + (v2 - 2) - v4 * 2 v6 = v4 * 2 ...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: typing.Any, bool Output Type: bool Dependencies: ```python def v0(v1: typing.Any) -> bool: try: v2: str = getattr(getattr(v1, '__class__'), '__name__') return v2 == 'getset_descriptor' except: return Fals...
Imports: ```python from datetime import date from datetime import datetime from datetime import timezone import typing ``` Type definitions: Input Types: t.Optional[datetime] Output Type: t.Optional[datetime] Dependencies: Function Name: v0 Function: ```python def v0(v1: t.Optional[datetime]) -> t.Optional[datetime]:...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[], Any] Output Type: Callable[[], Any] Dependencies: ```python @wraps(func) def v0() -> Any: try: return func.__result__ except AttributeError: func.__result__ = func() return func.__result__ ``` Function Name...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any], v2: str, v3: Any=None) -> Any: if v1 is not None and v2 in v1: return v1[v2] if v3 is not None: return v3...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int, int, int Output Type: Tuple[int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: int, v3: int, v4: int) -> Tuple[int, int, int]: (v5, v6, v7, v8, v9) = (float('-inf'), float('-inf'), v2, v4,...
Imports: ```python from sklearn.base import BaseEstimator from sklearn.ensemble import RandomForestClassifier import typing ``` Type definitions: Input Types: Any, Any Output Type: BaseEstimator Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> BaseEstimator: if v1.dtype.names is None: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: 'Styler' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> 'Styler': self.caption = v1 return self ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Union['cudf.Series', 'cudf.Index'] ``` Input Types: bool Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: bool=False) -> Optional[v0]: v3 = self._column if not v3.ordered: v3 = self._set_...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().setUp() self.batch_size = 4 ```
Imports: ```python import gc from inspect import isfunction, isclass, ismethod import typing ``` Type definitions: ```python v0 = Callable[[Any, Any, Iterable['UpgradeFn']], bool] ``` Input Types: type, type, Iterable[v0] Output Type: bool Dependencies: ```python def v1(v2: Any, v3: Any, v4: Text): try: set...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[List[Any]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[List[Any]]: self.guard_requirements_installed() return self.nc_model_instance.output_node_names + ['custom'] ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T', bound=tpe.MainTaskBase) ``` Input Types: Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self) -> v0: try: v2 = self._queue.popleft() except IndexError: v2 = self._extend_queue() r...
Imports: ```python import torch from torch import nn from torch.nn import LSTM from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence, PackedSequence from torch.utils.data import Dataset, TensorDataset import typing ``` Type definitions: Input Types: Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Ten...
Imports: ```python import typing ``` Type definitions: Input Types: str, message.Message Output Type: Tuple[reflection_pb2.ApiMethod, str, Iterable[str]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: message.Message) -> Tuple[reflection_pb2.ApiMethod, str, Iterable[str]]: v3 = {} ...
Imports: ```python import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, bool, str Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor, v4: bool=True,...
Imports: ```python import typing ``` Type definitions: Input Types: wx.GraphicsContext Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: wx.GraphicsContext) -> None: self.draw_grid(v1) self.draw_pieces(v1) ```
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0() -> List[str]: v1: List[str] = [] for v2 in sys.stdin: v2 = v2.strip() if not v2: continue if v2.startswith('#'...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: try: self.get_transfer_syntax() return True except NotImplementedError: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: TimeAxis.TimePart, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: TimeAxis.TimePart, v2): v1.slug = v2.get('slug', v1.slug) v1.name = v2.get('name', v1.name) v1.time_point = v2.get('time_point', ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float, Tuple[int, int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: float=0.5, v4: Tuple[int, int]=(15, 15)) -> None: v5 = self.map_api.get_next_roads(v1, v2) v6 = ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if v1.lower() == 'euclidean': v2 = 'sqrt((x0 - x1)**2 + (y0 - y1) ** 2) * coord_unit' elif v1.lower() == 'manhattan': v2 = '(abs(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {'type': self.__class__.__name__} return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Dict], Dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Dict], v2: Dict) -> None: if v1 is None: return if 'detected' not in v2['username']: v2['username']['detected...
Imports: ```python from selenium import webdriver import requests from requests import Response from requests.exceptions import ConnectionError, InvalidSchema from selenium.common.exceptions import WebDriverException from selenium.common.exceptions import InvalidArgumentException import typing ``` Type definitions: In...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1) -> str: v2 = os.getenv('PYRE_BINARY') if v2: return 'override: {}'.format(v2) v3 = v1.version_hash if v3: return v3 retu...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): self.pointPadding = v1 return self ```
Imports: ```python from decimal import Decimal from typing import Union, cast import typing ``` Type definitions: Input Types: str Output Type: Decimal Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Decimal: try: return Decimal(cast(float, self.api_fetch('address/' + v1))['ba...
Imports: ```python import typing ``` Type definitions: Input Types: int, str, float, float, float, float, int, float, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, v3: float, v4: float, v5: float, v6: float, v7: int, v8: float, v9: int) -> None: with self...
Imports: ```python import json import typing ``` Type definitions: Input Types: Optional[str] Output Type: Tuple Dependencies: ```python def v0(v1: str) -> str: return _get_id_by_name(v1, list_envs) ``` ```python def v2(v3, v4): v5 = v4() for v6 in v5: if v6.get('name') == v3: return v6...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=True): """ B树结点 Args === `n` : 结点包含关键字的数量 `isleaf` : 是否是叶子节点 """ self.n = v1 self.keys = [] self.children = [] self.islea...