text
stringlengths
190
325k
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 = 0 v3 = self.root while v2 < len(v1): v4 = False for v5 in v3.child: if v5.ch == v1[v2]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str] Output Type: 'JoinedQuery' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str]) -> 'JoinedQuery': self.data.inject_at = v1 return self ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[bytes, str] Output Type: Optional[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[bytes, str]) -> Optional[int]: v2 = self.get_account_blob(v1) if v2: return v2.get_sequence_number() return 0 ...
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): if v2 == 'short': if self._flags_short.get(v1) is not None or self._options_short.get(v1) is not None: raise Runtime...
Imports: ```python import typing ``` Type definitions: Input Types: SkylineParser.MultExpContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: SkylineParser.MultExpContext): v2 = [n for v3 in v1.getChildren()] v4 = self.visit(v2[0]) v5 = v4.height[-1] * int(v2[2].ge...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> dict: if v1 is None: raise ValueError("Id can't be none") return self.get('requirementSkeletons/%s' % v1) ```
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 == 'g++': return '/gcc/g++' ```
Imports: ```python import shutil from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: if not self.options.has_scrubber(): shutil.copyfile(self.file_name, v1) else: v2 = P...
Imports: ```python from math import floor, sqrt import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = int((sqrt(8 * v1 + 1) - 1) / 2) v3 = int((v2 ** 2 + v2) / 2) v4 = v1 - v3 v5 = v2 - v4 return [v5, v4] ```
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: os.PathLike, hirise.CCDID, Path Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: os.PathLike, v2: hirise.CCDID, v3: Path) -> Path: if str(v1).startswith('.'): return v3 / Path(str(v...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[dict] Output Type: None Dependencies: ```python def v0() -> list[list[Entity]]: v1 = [] v1.append([Rook([0, 0], 'black'), Knight([1, 0], 'black'), Bishop([2, 0], 'black'), Queen([3, 0], 'black'), King([4, 0], 'black'), Bishop([5, 0], ...
Imports: ```python from logging import basicConfig, exception, debug, error, info, warning, getLogger import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2 = {} for v3 in v1: if len(v3.split(':')) > 2: ...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: str Dependencies: ```python def v0(v1: object) -> Union[ReturnTypes, util.JSONSerializable]: if isinstance(v1, BaseModel): return v1.dict(by_alias=True, exclude_none=True) return util.api_boundary_json_encoder...
Imports: ```python import numpy as np from scipy.ndimage.measurements import center_of_mass from scipy.spatial.distance import pdist, squareform import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray, float, bool Output Type: float Dependencies: Function Name: v0 Function: ```...
Imports: ```python import logging from sklearn.svm import SVR from sklearn.decomposition import PCA from sklearn.manifold import TSNE from sklearn.neighbors import NearestNeighbors import typing ``` Type definitions: Input Types: int, float, np.ndarray, float, int, int Output Type: None Dependencies: Function Name: v...
Imports: ```python import asyncio import typing ``` Type definitions: ```python @dataclass class v0: v1: Dict[BackendTag, BackendInfo] = field(default_factory=dict) v2: Dict[EndpointTag, TrafficPolicy] = field(default_factory=dict) v3: Dict[BackendTag, Tuple[EndpointTag, Any]] = field(default_factory=dict) ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[torch.Tensor], Optional[torch.Tensor], int Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[torch.Tensor]=None, v2: Optional[torch.Tensor]=None, v3: int=1) -> torch.Tensor: v4 = self...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[str, str] ``` ```python v1 = Dict[str, Any] ``` Input Types: v0 Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0) -> v1: v4 = self.header.setdefault('glonass_slot', {}) if 'num_satellite' in v3: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.num = v1 self.left = None self.right = None ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0): if not v3: return ...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str): with self.conn.cursor() as v3: v3.execute('UPDATE channels SET discord_command_prefix = %s WHERE channel_id = %s', [v2, v1]) ...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1='http://localhost:4891/read', v2: dict=None): v3 = requests.post(url=v1, params=v2) return v3.json() ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], Dict[str, Any] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: Dict[str, Any]) -> None: v3 = v1['pubsubTarget']['attributes'] if 'pubsubTarget' in v1 else {} v4 = {**v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().move() for (v1, v2, v3) in self.movements: if v2 is not None and v3 is not None: v1.n_moves -= 2 ```
Imports: ```python import os import io import shutil import argparse import zipfile import typing ``` Type definitions: Input Types: Output Type: argparse.ArgumentParser Dependencies: ```python def v0(v1: str, v2: str, v3: Dict): v4 = fypp.Processor(evaluator=fypp.Evaluator(env=v3)) for (v5, v6, v7) in os.wal...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: int=None, v4: int=None): v5 = np.sqrt(len(self.input_cells)) v6 = v1.shape[1] v7 = v1.shape[0] v8 = in...
Imports: ```python import typing ``` Type definitions: Input Types: viewers.Viewer Output Type: pd.Index Dependencies: ```python @functools.lru_cache(maxsize=1) def v0(v1: viewers.Viewer=bootstrap.VIEWER) -> pd.DataFrame: return v1.get_df(ports.SECURITIES, ports.SECURITIES) ``` Function Name: v2 Function: ```pytho...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.NoReturn Dependencies: Function Name: v0 Function: ```python def v0() -> typing.NoReturn: (v1, v2) = map(int, input().split()) v3 = 10 ** 9 + 7 print((v2 - 1) * pow(v2 - 2, v1 - 1, v3) % v3) ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = pd.read_csv(v1).drop_duplicates(['epoch', 'iter'], keep='last', inplace=True) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str, str]: v2 = v1.find('> GO') (v3, v4) = (v1[:v2], v1[v2:]) (v5, v6) = v3.strip().split(' ', 1) (v7, v8) = v4.sp...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.word: str = v1[4] self.location = v1[:4] ``` Input Types: int, v0, List[v0] Output Type: bool Dependencies: Function Name: v2 Function: ```python def v2(self, v3: int, v4: v0, v5: List[v0]) -> b...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1 = 'http://np-anotice-stock.eastmoney.com/api/security/ann' v2 = {'sr': '-1', 'page_size': '100', 'page_index': '1', 'ann_type': 'KCB', '...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: if v1 not in self.respondents: return 'No comment.' (v2, v2, v3) = self.respondents[v1] return v3 if v3 else 'No comment.' ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Enum): v1 = 'v1' v2 = 'v2' v3 = 'magic-eden-v1' ``` ```python class v4(Enum): v5 = 'devnet' v6 = 'mainnet-beta' ``` ```python class v7: def __init__(self, v8: str=None, v9: List[int]=None, v10: str=None, v11: Union[str, D...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, sparse.csr_matrix, 'list[float]', str Output Type: 'tuple[np.matrix, np.ndarray]' Dependencies: ```python def v0(v1: np.ndarray, v2: sparse.csr_matrix, v3: str) -> np.matrix: if not '-q' in v3: v3 += ' -q' ...
Imports: ```python import shutil from pathlib import Path import typing ``` Type definitions: Input Types: Path, Path, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, v2: Path, v3: bool=True): v1 = Path(v1) v2 = Path(v2) v4 = self.base_path / v1 / 'out' ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): self.filename_valid = v1 self.validate_ok() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for (v1, v2) in self.all_info_states.items(): v3 = v1[self.player] v3 = self.simplify_state(v3) v4 = self._num_hidden_stones(v1) ...
Imports: ```python import typing ``` Type definitions: ```python v0 = NodeKey ``` Input Types: v0, float, str Output Type: Tuple[bool, bool] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: float, v4: str) -> Tuple[bool, bool]: if self.ema_error is None: self.ema_error = v3 ...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: List[str] v2: List[List[int]] v3: int v4: int ``` Input Types: v0, int, int Output Type: Any Dependencies: Function Name: v5 Function: ```python def v5(v6: v0, v7: int, v8: int): if v8 > 0: yield ((v7,...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, List[Tuple[float, float]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: List[Tuple[float, float]]): v3 = len(v2) v4 = np.reshape(np.random.rand(v1 * v3), [v1, v3]) v5 = np...
Imports: ```python import typing ``` Type definitions: Input Types: abc.Client Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: abc.Client, /) -> None: if not self._client or self._client != v1: raise RuntimeError("Component isn't bound to this client") for (v2, v...
Imports: ```python import string 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 = '' if v2 != '': v1 = v1.split(v2) for v4 in v1: v3 += self._decrypt_num(v4) ret...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> None: super().update(v1) for (v2, v3, v4) in zip(self.finger_bodies, self.finger_motors, [-1, 1]): v5 = v2.angle - self.body.angle ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('X') ``` Input Types: v0, MutableMapping[v0, v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: MutableMapping[v0, v0]) -> v0: if v2 not in v3: raise ValueError(f'Unknown element: {v2}.') ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=1.0, v2=1.0): self._height: float = v1 self._width: float = v2 def v3(self, v4: float): self._height = v4 def v5(self, v6: float): self._width = v6 def v7(self) -> float: ...
Imports: ```python import os from datetime import datetime import numpy as np import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=''): v2 = os.environ.get('HOME') + '/Desktop/save-flight-' + v1 + '-' + datetime.now().strfti...
Imports: ```python import typing ``` Type definitions: Input Types: Text, Dict[Text, Any], Text Output Type: tf.Tensor Dependencies: ```python def v0(v1: Dict[Text, Any], v2: Text='/', v3: Text='') -> Sequence[Text]: v4 = [] for (v5, v6) in v1.items(): v7 = v5 if not v3 else f'{v3}{v2}{v5}' if ...
Imports: ```python from tqdm import tqdm import typing ``` Type definitions: Input Types: Any, Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: dict): with open(v2, mode='w', encoding='utf-8') as v4: print('Writing ' + v2) for v5 in tqdm(v1, total=l...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: dict=None) -> dict: await self.async_set_unique_id(self.DOMAIN) self._abort_if_unique_id_configured() assert self.hass is not None if se...
Imports: ```python import typing ``` Type definitions: Input Types: str, Union[Sequence[torch.Tensor], None] Output Type: Sequence[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[Sequence[torch.Tensor], None]=None) -> Sequence[int]: if not hasattr(self, '_unique_params_idx...
Imports: ```python import typing ``` Type definitions: Input Types: List[float], List[float] Output Type: Tuple[Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float], Tuple[float, float, float], Tuple[float...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): assert type(v1) == pd.DataFrame v2 = 100 * (1 - v1.count() / v1.apply(len)) v2 = v2.reset_index() v2.colum...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, float], str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, float], v2: str): if self.metrics_to_log is None: v3 = sorted(v1.keys()) else: v3 = self.metrics_to_log ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = '' for (v2, v3) in enumerate(self.array): if v2 % 3 == 0 and v2 != 0: v1 += f"{'-' * 21}\n" v4 = '' for (v5, v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, List[int]] Dependencies: ```python @functools.lru_cache() def v0(v1: bool): return lsc.PCQM4MDataset(only_smiles=v1) ``` Function Name: v2 Function: ```python def v2() -> Dict[str, List[int]]: v3 = v0(only_smiles=True) ...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Optional[str], bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str]=None, v2: bool=False, **v3): v4 = copy.deepcopy(self) if v1: if v2: v4.message = v1 ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: Any, Any, Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3=True, v4: int=None): v5 = nn.Linear(v1, v2, bias=v3) if v4 is not Non...
Imports: ```python import asyncio import typing ``` Type definitions: ```python class v0(Event): v1 = MockEventType v2 = 0 ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v3 Function: ```python async def v3(self, v4: v0) -> Any: await asyncio.sleep(0.1) v4.data += 1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: while v1.startswith('../'): v1 = v1[3:] return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {} if hasattr(self, 'public_id'): v1['publicId'] = self.public_id return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str] Output Type: None Dependencies: ```python def v0() -> None: import ethereum.frontier.spec as slow_spec from . import spec as fast_spec slow_spec.validate_proof_of_work = fast_spec.validate_proof_of_work ``` ```python def v1(v...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1) -> bool: v2 = v1 & v1 >> 7 if v2 & v2 >> 14: return True v2 = v1 & v1 >> 6 if v2 & v2 >> 12: return True v2 = v1 & v1 >> 8 if...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list: v2 = [] v3 = v1.splitlines() for v4 in v3: v5 = v4.find(':') v2.append({'name': v4[:v5], 'mangoes': v4[v5 + 1:].split('>(u*...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = len(v1) if v2 == 0: return '' v3 = 1 v4 = 0 v5 = 0 v6 = {} for v7 in range(v2): v6[v7, v7] = True ...
Imports: ```python import math import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray Output Type: Any Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> typing.Tuple[float, float, float]: [v3, v4] = v1 [v5, v6] = v2 v7 = v5 - v3 v8 = v6 - v4 if v7 == 0 a...
Imports: ```python import typing ``` Type definitions: Input Types: dict, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: int) -> None: assert v1['n/ep'] > 0 (v3, v4) = (v1['rews'], v1['lens']) (v5, v6, v7, v8) = (v3.mean(), v3.std(), v4.mean(), v4.std(...
Imports: ```python import typing ``` Type definitions: Input Types: int, Union[None, str], str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=80, v2: Union[None, str]=None, v3: str='tcp') -> bool: v4: List[int] = self.get_process_pid_by_listen_port(v1, v2, v3) if le...
Imports: ```python import glob import subprocess import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1=[], v2=[]): for v3 in v1: v4 = ['tar', '-xvf', v3, '-C', WHEEL_BUILD_DIR] subprocess.check_call(v4) for v3 in v2: v4 = ['unzip', v3, '...
Imports: ```python import typing ``` Type definitions: ```python class v0(Operation): v1: str = '/dsmcontroller/admin/namespaces/{namespace}/configs/deployments/{deployment}/overrides/versions/{version}/regions/{region}' v2: str = 'POST' v3: List[str] = ['application/json'] v4: List[str] = ['application...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2=None, v3=None): """ Constructor for a node, the sub-trees can be omitted if there is no value for these. :param value: The node payload. :param left: the left...
Imports: ```python import json import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: ```python def v0(v1: str, v2: dict=None, v3: dict=None) -> dict: v4 = urllib.request.Request(url=v1, headers=v2) if v3: v4.data = bytes(json.dumps(v3), encoding='utf8') v5 = urllib.r...
Imports: ```python import typing ``` Type definitions: ```python class v0(dict): def v1(self, v2: str, v3: str) -> None: super().__setitem__(v2.lower(), v3) def v4(self, v5: str) -> bool: return super().__contains__(v5.lower()) def v6(self, v7: str) -> str: return super().__getite...
Imports: ```python import typing ``` Type definitions: ```python class v0(ConfigurationData): v1: Dict[str, v0] = {} v2: str = 'default' v3: Optional[Union[CascadeAppend, CascadeReplace, CascadeBaseProfile]] = None def v4(self, v5: str, v6: v0, v7: Union[CascadeAppend, CascadeReplace, CascadeBaseProfil...
Imports: ```python import re import typing ``` Type definitions: Input Types: bytes, List[bytes] Output Type: List[bytes] Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes, v2: List[bytes]) -> List[bytes]: v3 = [] for v4 in v2: if not re.search(b'\n', v4): continue ...
Imports: ```python import os import pandas as pd import typing ``` Type definitions: Input Types: bool Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: bool) -> pd.DataFrame: if v1: v2 = 'PATH_DATASET' else: v2 = 'PATH_DATASET_EXPANDED' return pd.rea...
Imports: ```python import math import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, int Output Type: torch.Tensor Dependencies: ```python def v0(v1: torch.Tensor, v2: int=50) -> torch.Tensor: raise_error_if_laf_is_not_valid(v1) (v3, v4, v5, v...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0() -> Optional[str]: v1 = 'http://metadata.google.internal/computeMetadata/v1/instance/zone' v2 = {'Metadata-Flavor': 'Google'} v3 = req...
Imports: ```python import io import typing ``` Type definitions: Input Types: Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self) -> bytes: with io.BytesIO() as v1: self.Write(v1) return v1.getvalue() ```
Imports: ```python import typing ``` Type definitions: Input Types: dict, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2=''): v3 = {} for (v4, v5) in v1.items(): v6 = '.'.join([v2, v4]).strip('.') if isinstance(v5, dict): v3[v4] =...
Imports: ```python import typing ``` Type definitions: ```python class v0(so.SubclassableObject, s_anno.AnnotationSubject, s_abc.Type): v1 = so.SchemaField(s_expr.Expression, default=None, coerce=True, compcoef=0.909) v2 = so.SchemaField(ExprType, default=None, compcoef=0.909) v3 = so.SchemaField(bool, defa...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], str, str, Any Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[str], v2: str, v3: str='w3c', v4=None) -> Optional[str]: if v4 is None: v4 = ['source', 'id'] elif isinsta...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: self.log_info(v1, 'authentication succeeded') if v1['auth_token'] is not None: self._openvpn.send_command('client-auth %s %s\np...
Imports: ```python import os import tempfile import zipfile from tqdm.auto import tqdm import typing ``` Type definitions: Input Types: bool Output Type: 'ads.secrets.adb.ADBSecretKeeper' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> 'ads.secrets.adb.ADBSecretKeeper': if v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Dict[str, str]] Dependencies: Function Name: v0 Function: ```python def v0() -> Dict[str, Dict[str, str]]: v1 = {} v1['name'] = '流動廁所-出租' v1['id'] = 'mobile-toilets' v2 = {} v2['mobile-toilets'] = '流動廁所' ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, bool Output Type: (torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor) Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tenso...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.process is not None: self.process.terminate() print('Server stopped') self.process = None else: print('Server...
Imports: ```python import json import subprocess import sys from pathlib import Path import typing ``` Type definitions: ```python class v0(NamedTuple): v1: Path v2: str v3: str v4: bool v5: bool @property def v6(self): return f'{self.crate_name}:{self.cargo_target}' ``` Input Types...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: if len(self.future_eps) > 0: self.epsilon = self.future_eps.pop(0) return self.epsilon ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: object Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: object=None) -> pd.DataFrame: if self.loggingEnabled: self.logger.debug(f'Starting transformToDataFrame') v2 = v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: int, /) -> None: v4 = self.__read_del(v1, v2) v4.ac_expire = v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self._profile_template['stat'].values v2 = {} for v3 in v1: v2[v3] = self._stats[v3] return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: bytes Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> str: v2 = b'\xfe\xff' v3 = b'\xff\xfe' v4 = b'\xef\xbb\xbf' v5 = b'\x00\x00\xfe\xff' v6 = b'\xff\xfe\x00\x00' v7 = len(v1) if ...
Imports: ```python import matplotlib.pyplot as plt from math import ceil from math import floor import warnings from datetime import datetime import typing ``` Type definitions: Input Types: Any, Any, List['str'], List, Any, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.tensor, float, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.tensor, v2: float, v3: float) -> None: with torch.no_grad(): v4 = 0 v5 = torch.tensor(self.dones)...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if ~self.get_url().find('/manga/'): self.__new_url() return self._get_name('/(?:read-|manga/)(\\w+)') ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.sources = dict(source_id=dict(type=self.SOURCE_TYPE, parameters=dict(url=f'https://{self.SOURCE_TYPE}'))) self.metric = dict(type=self.METRIC_TY...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> None: if not isinstance(v1, float): raise TypeError('Do-nothing worth must be a floating number.') if v1 < 0.0: raise Value...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: bool=False) -> None: if not v2 and set(self._metadata).intersection(set(v1)): raise ValueError(f'Cannot overwr...
Imports: ```python import numpy as np import scipy.optimize as optimize from scipy.stats import norm from scipy.interpolate import splrep, splev from scipy.linalg import expm import typing ``` Type definitions: Input Types: Union[np.ndarray, float], float, float Output Type: Union[np.ndarray, float] Dependencies: Fun...
Imports: ```python from .io import serve from .io.document import init_doc from .io.embed import embed_state from .io.loading import start_loading_spinner, stop_loading_spinner from .io.model import add_to_doc, patch_cds_msg from .io.notebook import ipywidget, render_mimebundle, render_model, show_embed, show_server fr...