text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self): self._n = 0 self._root = None assert is_bst(self) @property def v1(self) -> int: """Returns the total number of nodes. Time complexity: O(1).""" assert is_bst(sel...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: (self._vpnLeft, self._vpnRight) = super().do_make_layout_llrr() self._pnlReliabilityResults.fmt = self.fmt self._vpnLeft.pack1(self._pnlReliabili...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray, v3: int, v4=None): v5 = v1.shape[0] if type(v4) is type(None): v4 = self.max_iter f...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: List[List[int]] Dependencies: ```python def v0(v1: List[int], v2: List[int]) -> List[List[int]]: v3: List[List[int]] = weave(v1[1:], v2) v4: List[List[int]] = [] for v5 in v3: v4.append([v1[0]] + v...
Imports: ```python import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: Tuple[np.ndarray, np.ndarray] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[np.ndarray, np.ndarray]) -> None: (v2, v3) = v1 plt.figure(figsize=(10, 6)) plt.scatter(v...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: Output Type: Tuple[dict, list] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[dict, list]: v1: Dict[Any, Any] = {} v2 = [] v1['type-serialized'] = pickle.dumps(type(self)) (v1['dtype'], v3) = ...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: str, Union[int, float], int, int Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: Union[int, float]=2, v3: int=30000, v4: int=0) -> None: if v4 == 0: await self.page.wait...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Path Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path) -> None: logging.info(f'Reading SLS file {v1}') with v1.open('r') as v2: for v3 in v2.readlines(): (v4, v5, v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._read_internal() self._reset() return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict, dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: dict) -> dict: v3 = v2 v3['citizenship_country'] = self.convert_val(v1['location']['citizenshipCountry']['name']) if 'city' in v1....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = ''.join([chr(ord(x) - 21) if ord(x) + 5 > ord('z') else chr(ord(x) + 5) for v3 in v1]) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable, Optional[Dict[Type, Any]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable, v2: Optional[Dict[Type, Any]]=None) -> Any: try: v3 = self._executors[v1] except KeyError: v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: self.weird_type_votes_ = [] if type(v1) == str: v2 = '[UNK]' v1 = v1.replace('le sous-amendment', 'le sous-amendement') ...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): v1: str v2: str v3: str v4: bool v5: int v6: int v7: bool v8: str v9: str v10: int v11: int v12: int v13: int v14: int v15: int v16: int v17: int v18: int v19: i...
Imports: ```python import typing ``` Type definitions: Input Types: torch.device Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.device) -> None: for (v2, v3) in self.state.items(): self.state[v2] = v3.to(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self) -> str: v1 = await self.request.request(url=f'https://thumbnails.roblox.com/v1/badges/icons?badgeIds={self.id}&size=150x150&format=Png&isCircular=false') ...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: int Dependencies: ```python def v0(v1, v2): (v3, v4) = v1 (v5, v6) = v2 ((v3, v4), (v5, v6)) = sorted([(v3, v4), (v5, v6)]) if v3 == v5: (v4, v6) = sorted([v4, v6]) for v7 in range(v4, v6 + 1): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.ui.button_scan.set_label('Rescan' if self.images else 'Scan') if not self.document.editable: self.window.actions['append'].set_enabled(F...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): v2 = dict(unit=self.unit, dateadded=self.dateadded, workorder=self.workorder, title=self.title) v2.update(v1) v3 = self.p_base / self.get_fo...
Imports: ```python import warnings import typing ``` Type definitions: Input Types: str, bool, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False, v3: int=0, v4: int=0): warnings.warn("The function 'query_contact_details' is deprecated, and has been ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: Tuple[str, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict) -> Tuple[str, Dict]: if 'type' in v1 and 'category' not in v1: v1['category'] = v1['type'] del v1['type'] return sup...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dataset Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dataset: assert self.__geneval_dataset is not None return self.__geneval_dataset ```
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: Any, Any, List, Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4): v5 = [] v6 = v2 for v7 in range(len(v2)): if v3 and v7 not in v3: continue v8 = [] v9: ...
Imports: ```python from torch import FloatTensor, max, LongTensor, BoolTensor, gather, Tensor from numpy import array, ravel from torch.nn import Sequential, Linear, ReLU, MSELoss, Module from torch.optim import Adam import typing ``` Type definitions: Input Types: List[Tuple] Output Type: Tensor Dependencies: Functi...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: if self.start is None: raise RuntimeError('Timer not started.') if self.end is not None: return self.end - self.start else: ...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str, v2: str, v3: int, v4: str, v5: list) -> None: v6 = tator.get_api(host=v1, token=v2) v7 = tator.models.AlgorithmLaunchSpec(algorithm_name=v4, media_ids=v5) logger.in...
Imports: ```python import requests import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0() -> pd.DataFrame: v1 = 'http://17.push2.eastmoney.com/api/qt/clist/get' v2 = {'pn': '1', 'pz': '2000', 'po': '1', 'np':...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: if not self.db(): return False return self.driver().rollbackSavePoint(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0, v2: bool=False): v3 = self.padding + len(self.txt_separator) if self.address_width: v3 += self.address_width + len(self.hex_addr_sp...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[bool] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[bool]: if self.websocket is not None: return self.websocket.eof_received() else: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = v1.get('packagetype') if v2 == 'sdist': return False if v2 in self._packagetypes: return True v3 = v1['filename']...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor): assert v1.ndim == 2 v1 = v1[:, self.shuffle_idxs] v2 = (v1 * self.weight[None]).sum(dim=-1) + self.bias return v2 ```
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: str or list, datetime or str, datetime or str, dict Output Type: dict Dependencies: ```python def v0(v1: str) -> bool: return v1 is not None and isinstance(v1, str) and (v1 != '') ``` ```python def v2(v3: str) -> date...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = v1.split('.') for v3 in v2: if len(v3) == 0 or len(v3) > 3: return 'Neither' if v3[0] == '0' and len(v3) != 1 or not v3.isdigit() or int(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: io.RawIOBase Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: io.RawIOBase): v2 = bytearray() while True: v3 = v1.read(1) if not v3: break v2 += v3 if v2.endswith(b'\n...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> tuple: (v2, v3) = v1.read() return np.shape(v3)[:2] ```
Imports: ```python from skimage.morphology import ball, disk, white_tophat import typing ``` Type definitions: Input Types: Union[xr.DataArray, np.ndarray] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[xr.DataArray, np.ndarray]) -> np.ndarray: if self.is_volume...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: object, object, object Output Type: object Dependencies: Function Name: v0 Function: ```python def v0(self, v1: object, v2: object, v3: object=0.05) -> object: v4 = numpy.reshape(v1, (-1, v2)) v5 = numpy.nanmean(v4, axis=1) v...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=1, v2: int=None, v3: bool=False): for v4 in range(v1): self._alert.wait(v2) if v3 == True: self.disable(False) return...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[str]=None): v3: Dict[str, Any] = {'SearchText': v1} if v2 is not None: v3['CatalogId'] = v2 v4 = self._clie...
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: List Dependencies: ```python def v0(v1: str) -> BinaryIO: try: v2 = json.load(v1) except: raise ValueError(f'Could not load JSON file {v1}') return v2 ``` Function Name: v3 Function: ```python d...
Imports: ```python import torch from torch import Tensor, optim import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: Namespace, bool Output Type: Namespace Dependencies: Function Name: v0 Function: ```python def v0(v1: Namespace, v2: bool=True) -> Namespace: impor...
Imports: ```python from pandas._config import config, get_option from pandas._libs import lib, writers as libwriters from pandas._libs.tslibs import timezones from pandas._typing import ArrayLike, FrameOrSeries, Label from pandas.compat._optional import import_optional_dependency from pandas.errors import PerformanceWa...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: Dict, Dict, float Output Type: None Dependencies: ```python def v0(v1: set, v2: set) -> float: v3 = float(len(v1.intersection(v2))) v4 = float(len(v1.union(v2))) return v3 / v4 ``` Function Name: v5 Function: ```python def...
Imports: ```python import typing ``` Type definitions: Input Types: Union[list, tuple, str], str, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[list, tuple, str], v2: str, v3: dict): v4 = self.render_template(v2, v3) return self.write_file(v1, v4) ```
Imports: ```python import os import requests import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): self.log.debug('saving url %s => %s', v1, v2) try: if os.path.getsize(v2) == 0: self.l...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> int: try: v2 = [x[0] for v3 in self.db.get_nhentai_ids()] if not int(v1) in v2: return 3 self.db.nhentai_block(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._save_time_since_data >= self.save_dt: self.save_grids_and_figs() self._save_iter += int(1) self._save_time_since_data = ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any, Any, Any, bool, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4, v5: bool=True, v6: int=500): v7 = v2 // v3 + int(v2 % v3 != 0) v8 = v3 * v4 return {i: [np.random...
Imports: ```python import csv import typing ``` Type definitions: Input Types: float, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=0.0, v2: int=0): with open(self.csv_file_name, 'a') as v3: v4 = csv.writer(v3) v4.writerow([v1, v2]) ```
Imports: ```python import typing ``` Type definitions: Input Types: int, List[List[int]] Output Type: int Dependencies: ```python def v0(v1): if parents[v1] == v1: return v1 parents[v1] = v0(parents[v1]) return parents[v1] ``` ```python def v2(v3, v4): v5 = ranks[v3] v6 = ranks[v4] if v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str=None, v3=None): for v4 in self.ls(): if v4['title'] == v1: return self.get_by_id(v4['id'], v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame, int Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame, v3: int=1) -> pd.Series: v4 = v1.div(v2) return v4.mean(v3) * 100 ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str, v2: float, v3: float, v4: str, v5: str): if round(v2, 1) == v3: v6 = re.search(v5, v1) if v6: v2 += 0.1 v4 += 'Верно.\n' else: ...
Imports: ```python import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.colors import Normalize from statsmodels.tsa.arima_model import ARIMA from statsmodels.tsa.stattools import acf, pacf from statsmodels.tsa.stattools import adfuller import statsmodels.api as sm import typing ``` Type definitio...
Imports: ```python import io import tokenize import typing ``` Type definitions: Input Types: bytes Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> str: if not isinstance(v1, bytes): raise TypeError("'code' should be bytes") with io.BytesIO(v1) as v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Dict[str, str]], str, Set[str], str Output Type: Dict[str, Dict[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Dict[str, str]], v2: str, v3: Set[str], v4: str='N/A') -> Dict[str, Dict[str, str]]: v5 ...
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._cache.pokemon_cache[v1['id']] = v1 self._cache.pokemon_cache[v1['name']] = v1 self._cache.sprites_cache_data[v1['id']] = v1['...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]): v2 = [] for v3 in self.tinfos: v4 = 'Test' in v3.tannotations v5 = 'Deprecated' in v3.tannotations v6 = 'Ignor...
Imports: ```python import typing ``` Type definitions: Input Types: gen.SignalGenerator, range Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: gen.SignalGenerator, v2: range): v3 = [] for v4 in v2: v3.append(v4) v5 = [] for v6 in v1.samples(self.device.sam...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: MouseEvent Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: MouseEvent) -> bool: if self.selectByPixelToolButton.isChecked() and (not self.plotimage.figToolbar.mode): if not v1.inax...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: 'ImageContainer' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> 'ImageContainer': self._data = self.data.rename_vars({v1: v2}) return self ```
Imports: ```python import random import cv2 import typing ``` Type definitions: Input Types: Any, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: float=0, v3: float=0): import cv2 v4 = False if random.random() < v2: v4 = True v5 = False if r...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: ```python def v0(v1): if isinstance(v1, int): return True if v1: return True return False ``` Function Name: v2 Function: ```python def v2(self) -> Dict[str, Any]: v3: Dict[str...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._instrument.settings.close() super().close_instrument() ```
Imports: ```python import copy import typing ``` Type definitions: ```python v0 = Tuple[str, Optional[List[Any]]] ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> v0: v2 = copy.deepcopy(v2) return self.fuzzer.expand_tree(v2) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = {Constant.DASHBOARD_LIST: '{POWERBI_BASE_URL}/{WORKSPACE_ID}/dashboards', Constant.ENTITY_USER_LIST: '{POWERBI_ADMIN_BASE_URL}/{ENTITY}/{ENTITY_ID}/users', Constant.TILE_LIST: '{POWERBI_BASE_URL}/{WORKSPACE_ID}/dashboards/{DASHBOARD_ID}...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Union[list, np.ndarray] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[list, np.ndarray]) -> np.ndarray: self.fit(v1) return self.alphas * np.sqrt(self.lambdas) ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Protocol): def __call__(self, v1: Union[Dict[str, Any], None], v2: bool=False, v3: str='material', v4: bool=False, v5: Optional[bool]=None, v6: bool=False, v7: bool=False, v8: bool=True, v9: bool=True, v10: bool=True, v11: bool=False, v12: O...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: ```python def v0(v1: str) -> None: v2 = self.get(v1, None) if v2 is not None: v2.pop(addr, None) self.put(v1, v2) ``` ```python def v3(v4: str) -> None: v5 = self.get(v4, None) if v5 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> np.ndarray: v2 = int(np.ceil(np.sqrt(v1.shape[0]))) v3 = 1 v4 = v1.shape[1] v5 = v1.shape[2] v6 = ...
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 = v1.rstrip('\\') return f'{v3}\\{v2}' ```
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: List[str]): v3 = ', '.join(v2) v4 = ', '.join(('%s' for v5 in v2)) return f'INSERT INTO {v1} ({v3}) VALUES ({v4});' ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: etree.Element, bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: etree.Element, v2: bool) -> str: v3 = v1.nsmap v4 = v1.find('journal-meta', v3) v5 = v4.find('journal-title-group', v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, tf.Tensor Output Type: Tuple[tf.Tensor, tf.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tf.Tensor, v2: tf.Tensor, v3: tf.Tensor) -> Tuple[tf.Tensor, tf.Tensor]: v4 = self._create_tf_embed_nn(v...
Imports: ```python import io import os import sys import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0() -> bool: if os.getenv('CI'): return False v1 = sys.stdout if not hasattr(v1, 'fileno'): return False try: ...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple, List Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple, v2: List) -> List: v3 = [] v4 = [] for (v5, v6) in enumerate(v1): if isinstance(v6, (tuple, list, slice)): v4.append(0...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: self.locks.clear() await asyncio.gather(*map(self.cleanup_key, self.store.keys())) ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: ```python def v0(v1: List[str], v2: dict): v3 = v1[0] if len(v1) == 1: return v2[v3] for v3 in v1: if isinstance(v2[v3], list): return [v0(v1[1:], val) for v4 in v2[v3]] ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: str, *v3, **v4) -> Dict: v5 = {} for v6 in v1: v7 = v1[v6] v8 = self.check_dataloader_idx(v7) v9 = getattr(v7, v2) ...
Imports: ```python import torch as th from torch.nn import Module from torch.optim import Optimizer as TorchOptim from torch.optim.lr_scheduler import _LRScheduler import typing ``` Type definitions: ```python class v0(Protocol): def __call__(self, *, v1: int, v2: th.Tensor) -> th.Tensor: ... ``` Input Typ...
Imports: ```python import typing ``` Type definitions: Input Types: any, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: any, v2: int=2) -> str: v1 = int(v1) return v1.to_bytes(v2, 'big').hex() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[dict[str, Union[bool, dict]]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[dict[str, Union[bool, dict]]]: v2 = self.root for v3 in v1: if v3 not in v2: ret...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: ```python def v0(v1): v2 = [int(n) for v3 in v1.split('.')] v2 += [0] * (4 - len(v2)) return v2 ``` Function Name: v4 Function: ```python def v4(v5: str, v6: str) -> bool: def v7(v8): v...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[TableQuerySQL, RowQuerySQL, Tuple[Union[int, str]]] ``` Input Types: Output Type: v0 Dependencies: ```python def v1(v2: int) -> str: return f"({'?, ' * (v2 - 1)}?)" ``` Function Name: v3 Function: ```python def v3() -> v0: v4 = '\n ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int): v3 = self.src_onto.idx2labs[v1] v4 = self.tgt_onto.idx2labs[v2] if not self.use_edit_dist: v5 = int(len(self.overlap(v3,...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, int, float, float Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: int, v4: float, v5: float) -> dict: v6 = {'r1': v1, 'r2': v2, 'k': v3, 'f': v4, 'dw': v5} self.cest_p...
Imports: ```python import re from scipy.spatial import distance import typing ``` Type definitions: Input Types: list Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> float: v2 = ('JJ', 'JJR', 'JJS') v3 = ('NN', 'NNS', 'NNP', 'NNPS') v4 = 0 v5 = 0 v6...
Imports: ```python import shutil import requests import typing ``` Type definitions: Input Types: Path, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, v2: int) -> None: v3 = f'https://uniprot.org/taxonomy/?query=ancestor:{v2}&format=tab&force=true&columns=id&compr...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = self.create_category_table(v1) self.create_products_table(v2, v1) return ```
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseClient): def __init__(self, v1, v2, **v3): v1 = url_concat(v1, v2, 'reputation') super().__init__(v1, **v3) v4 = 'domain' v5 = 'ip' v6 = 'detailed-iprepdata.txt' v7 = 'detailed-domainrepdata.txt' v8 = ...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> List[str]: v2 = {'*': 3, '÷': 3, '+': 2, '-': 2, '(': 1} v3 = [] v4 = [] for v5 in v1: if v5 in '+-*÷': ...
Imports: ```python import typing ``` Type definitions: ```python v0 = int ``` ```python v1 = Dict ``` ```python v2 = Optional[nd.array] ``` ```python v3 = float ``` Input Types: v0 Output Type: Tuple[v2, v3, bool, v1] Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v0) -> Tuple[v2, v3, bool, v1]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: Any, **v2: Any) -> None: self.applicationRunning.emit() super().exec_(*v1, **v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float, bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: bool=True) -> bool: if v2 is None: return True if v3: return v1 >= v2 else: return v1 ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = re.search('[\\*|\\{]', v1) if v2: return v1[:v2.start()] else: return v1 ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = os.getenv(v1) if v2 is None: raise Exception(f'{v1} is not set') return v2 ``` Function Name: v3 Function: ```python def v3(v4: str) -> str: v5...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1 = {} for (v2, v3) in self.properties.items(): if callable(v3): v1[v2] = v3 else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: str Dependencies: ```python def v0(v1: str, v2: Dict, v3: List) -> str: v4 = '' for v5 in v3: if v2[v5] not in ['true', '']: v4 += f"Invalid {v1}.{v5} '{v2[v5]}'. Needs to be either 'true' or '' (empty).\n...
Imports: ```python import typing ``` Type definitions: Input Types: Path, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, v2: int) -> None: v3 = self.get_candidate_pos(v1, v2) if v3 < 0: return v4 = self._candidates[v3] if not v4['is_opened_tree...