text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int): self.vectorizer.doc_index = v1.doc2index for (v3, v4) in v1.gen_batches(v2): self.vectorizer.fit_batch(v3, v4) ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Optional[np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Optional[np.ndarray]: if v1 in self.batch_sizes_to_load: v2 = self.cost_files_to_load[self.batch_sizes_to_load.index(v1)] ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: print('R wants to show a message') print(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: v2 = self.db.players.delete_one({'_id': v1}) if v2.deleted_count != 0: return True return False ```
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): v3 = self._git_helper.GenerateBranchName(v2) if not self._git_helper.HasBranch(v3): self._output_handler.PrintOutput('Creati...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self.beat_idx == self.beat_samples.shape[0] - 1: return self.beat_samples[0] + self.buffer.buf_size - self.buf_idx else: return self...
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): try: (v3, v4) = self.__find_by_id(v1, v2) except TypeError: return self.data[v1].pop(v3) for (v5, v6) in [(v...
Imports: ```python import h5py import numpy as np import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: np.array, v2: int): v3 = np.concatenate((v1, v1[-1].reshape(1, -1)), axis=0) v3 = np.concatenate((v3, v3[:, -1].reshape(-1, 1)), axis=1) v4 = np.ti...
Imports: ```python import typing ``` Type definitions: Input Types: list, Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: Callable=operator.eq): v3 = [None] * len(v1) v4 = 0 for (v5, v6) in enumerate(v3): if v6 is not None: continue ...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> pd.DataFrame: v2 = pd.to_datetime(v1['Arrival Time']) v1['Arrival Date'] = v2.dt.strftime('%Y-%m-%d') ...
Imports: ```python import typing ``` Type definitions: ```python @stable_api class v0(NamedType): def __init__(self, v1: Namespace, v2: str) -> None: NamedType.__init__(self) self.basetype: Optional[Type] = None self._constraint = None self.name: str = v2 self.namespace: Nam...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.scene_name not in self._cached_graphs or v1 not in self.nav_actions_set: return v2 = self.get_key(self.last_event.metadata['agent'...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: Callable Dependencies: ```python def v0(v1): v2 = (v1 - 1) % jnp.ceil(K / M) return alpha_0 * 0.5 * (jnp.cos(jnp.pi * v2 / jnp.ceil(K / M)) + 1) ``` Function Name: v3 Function: ```python def v3(v4: float, v5: f...
Imports: ```python import typing ``` Type definitions: Input Types: tuple[object] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple[object]): if self.cfg.platform == 'vk': self.__vk_run__(v1[0], v1[1]) ```
Imports: ```python import requests from requests.exceptions import HTTPError from requests.auth import HTTPBasicAuth import typing ``` Type definitions: Input Types: Output Type: requests.Response Dependencies: Function Name: v0 Function: ```python def v0(self) -> requests.Response: v1 = f'{self._root}/api/v1/re...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: if v1['Senior'][2] != 0: v1['Senior'] = [v1['Senior'][0] / v1['Senior'][2], v1['Senior'][1] / v1['Senior'][2]] if v1['Middle'][2] != ...
Imports: ```python import sys 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: if (sys.version_info.major, sys.version_info.minor) < (3, 9): with self.assertRaises(NotImplementedError): ...
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 = v1.copy() v3 = v1.shape[1] for v4 in range(v3): v2[:, v4] = np.random.choice(np.u...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = self.true.size v2 = self.true[1:v1] - self.true[0:v1 - 1] v3 = np.std(v2, ddof=1) return float(self.rmse() / v3) ``...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> None: v2 = [] v3 = [] v4 = [] v5 = set() v6 = set() v7 = set() for v8 in v1: if v8: for v9 in v8.tags...
Imports: ```python import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: dict): yield from map(hash, v1) if v2: yield from map(hash, v2.items()) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = py_utils.NestedMap ``` Input Types: v0 Output Type: v0 Dependencies: ```python def v1(v2: v0) -> v0: v3 = v2.copy() v3.conv = v0(w=v2.w) v3.act = v0() del v3.w return v3 ``` Function Name: v4 Function: ```python def v4(v5: v0) -> ...
Imports: ```python import json from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(self) -> Path: v1 = Path('profiles') / self.exp_group v2 = v1 / (self.exp_name + '.json') if v2.is_file(): return j...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.config.traversed_branches[0] self.git.checkout(v1) ```
Imports: ```python import random 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 = v1[:] random.shuffle(v2) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Generator[List[Dict], None, None] Dependencies: ```python def v0(v1: int, v2: int=1) -> List[Dict]: v3 = GetCollectionEditorsJsonDataApi(v1, page=v2) v4 = [] for v5 in v3['editors']: v6 = {'uslug': v5['slug'], 'nam...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: assert isinstance(v1, str) and len(v1) > 0 return self._smallestSubsequence(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Union[bool, str]] Output Type: Optional[Union[bool, str]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Union[bool, str]]) -> Optional[Union[bool, str]]: if not isinstance(v1, bool) and (not v1 == 'randomi...
Imports: ```python import typing ``` Type definitions: Input Types: MultipleSeqAlignment, int, int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: MultipleSeqAlignment, v2: int=80, v3: int=12, v4: int=30) -> str: if len(v1) == 0: raise ValueError('Must have at least on...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray): if v1.dtype != np.dtype(np.uint8): raise TypeError('Img not uint8') ' Une façon de le faire en détail mais pas ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: bool=False): if v3: v1 = self.preprocess(v1, True) self._model.fit(v1, v2) ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: ```python def v0(v1: str, v2: str) -> None: v3 = '%(levelname)s - %(name)s - %(message)s' v4 = logging.getLogger(v1) v5 = logging.FileHandler(v2) v6 = logging.Formatter(v3) v5.set...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = [] def __init__(self, v2: str): self.relevantPulses = [] self.typeOfPulses = None self.otxObj = OTXv2(api_key=v2) def v3(self): v4 = f'//==><==OTX Handler Object==><==\\\\\n//==>Number of Pulses...
Imports: ```python import numpy as np from pandas._typing import Axis, HashableT from pandas.util._decorators import cache_readonly, deprecate_nonkeyword_arguments from pandas.util._exceptions import find_stack_level from pandas.core.dtypes.concat import concat_compat from pandas.core.dtypes.generic import ABCDataFrame...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], Optional[Any] Output Type: Optional[Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[str]=None, v3: Optional[Any]=None) -> Optional[Any]: v4 = self._asset.get('tiers', {}).get(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.logger.info(f'Attempting to authenticate to {self.host}') self._open_pty() self.logger.info(f'Successfully authenticated to {self.host}') ...
Imports: ```python import numpy as np from numpy.linalg import det, inv import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> NoReturn: self.classes_ = np.unique(v2) self...
Imports: ```python from collections import Counter import typing ``` Type definitions: Input Types: List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int]) -> int: for v2 in Counter(v1).items(): if v2[1] == 1: return v2[0] ```
Imports: ```python from random import uniform import typing ``` Type definitions: Input Types: str, Optional[Union[int, float]] Output Type: Any Dependencies: ```python def v0(v1: Union[int, float], v2: Union[int, float]=1, v3: Union[int, float]=0) -> float: v1 = abs(v1) v2 = abs(v2) v3 = abs(v3) v4 = ...
Imports: ```python import typing ``` Type definitions: ```python class v0(dict): v1 = 0.7 v2 = 5 v3 = -1e+300 def __init__(self, v4): """初始化 :Parameters: - ng: NGram计数模型或ARPA模型 """ self.order = v4.order if isinstance(v4, NGramCounter): se...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: with open(v1, 'r') as v2: return [line[:-1] for v3 in v2.readlines() if not not v3] ```
Imports: ```python import typing ``` Type definitions: ```python class v0(dict): def v1(self) -> str: """Get the mode that the service runs in and check that we support it. If the mode is not specified, we check whether the service uses smartstack in order to determine the appropriate defau...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = self.get_mean() v2 = self.get_mode() v3 = float(v1) - v2 v4 = self.get_std() v5 = -10 if v4 != 0: v5 = v3 / float(v4) ...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, str, str, Tuple[float, float, float], Tuple[int, int, int], int, Optional[str], str, Any Output Type: Tuple[List[str], str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str, v4: T...
Imports: ```python import matplotlib.pyplot as plt 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.__fig is None: self.__fig = plt.figure() v1 = [] v2 = [] for v3 in np.aran...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not self.lj.has_layout: print('Only Apps with a layout.json are supported.') sys.exit(1) if 'sqlite3' not in sys.module...
Imports: ```python import os import re import json import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str) -> dict: v2 = {} v3 = [entry for v4 in re.split(KANJI, v1) if v4] for (v5, v6) in zip(v3[::2], v3[1::2]): v2[v5] = parse_kanji(v6) ret...
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 = self.version_utility.get_splitted(v1)[0] v3 = self.version_utility.get_splitted(self.version_utility.local_version)[0] for (v4, ...
Imports: ```python import xarray as xr import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame, bool Output Type: xr.Dataset Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame=None, v3: bool=True) -> xr.Dataset: v4 = xr.Dataset({'counts': (('Gene', 'S...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python async def v0(self, v1) -> bool: if not self.is_connected(): await self.connect() await self._cur.execute('SELECT bot_user.type FROM user_id_x_chat_id INNER JOIN...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if not self.base_path.exists(): return 0 v1 = -1 for v2 in self.base_path.iterdir(): v2 = v2.name if v2.startswith(self._ch...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = None return self.rpc_request(api='action_publisher', endpoint='clear_filter_out', body=v1) ```
Imports: ```python import datetime import os import typing ``` Type definitions: Input Types: context.Context, str, Dict[str, Any], int Output Type: None Dependencies: ```python def v0(v1: datetime.date, v2: int) -> datetime.date: v3 = v1 for v4 in range(v2): v5 = v3.replace(day=1) v3 = v5 - da...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterable[interfaces.objects.ObjectInterface] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterable[interfaces.objects.ObjectInterface]: if not self.mmap: return yield self.mmap v1 = {self.mmap....
Imports: ```python import json import os from tqdm import tqdm import typing ``` Type definitions: Input Types: str, str, str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str, v4: int=1): v3 = os.path.join(v1, 'annotations', v3) assert os.path.isfile(v...
Imports: ```python import typing ``` Type definitions: Input Types: tuple Output Type: False Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple) -> False: (v2, v3) = v1 for v4 in range(v2 + 1): for v5 in range(len(self.cells[0])): if v5 > v3: break ...
Imports: ```python from numbers import Complex import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> v0: if isinstance(v2, Complex): return -v2 else: return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> float: assert v1.shape[1] == v2.shape[1] v3: float = np.linalg.norm(np.dot(v1, v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int, v3: int): if type(v2) is not int: raise TypeError(f'{v1} must be an integer') if v2 < 0: raise ValueError(f'{v1} must ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = dict() for v2 in self.data.target_subscription_diff: v3 = '{}|{}'.format(v2['bk_obj_id'], v2['bk_inst_id']) v1[v3] = v2['type'] ...
Imports: ```python import shutil, os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: v2 = '' v2 = v1 + '.dup' shutil.copy2(v1, v2) ```
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 self.annotating: self.ui.labelXPos.setText(str(v1)) self.ui.labelYPos.setText(str(v2)) self.ui....
Imports: ```python import base64 import json import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> dict: v2 = base64.b64decode(v1.split(',')[1]).decode('ascii') return json.loads(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'stream[Tuple[int, T]]' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'stream[Tuple[int, T]]': self._iterable = v0(self._iterable) return self ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any, v2: Any, v3: Any=None, v4: Any=None) -> List[Any]: self.counter += 1 return [v1, v2, v3, v4] ```
Imports: ```python import typing ``` Type definitions: Input Types: bool | None Output Type: bool Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: bool | None=True) -> bool: if self.is_local: if v1: await self.register_event_listener() return True v2 = {'u...
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, v4) = self.fetcher.read() if not v3: return if v4 > self.lastUpdate: self.fillSet(v3, v4) self.last...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str='United States', v4: str='Active', v5: str='Treatment') -> str: v6 = 'https://clinicaltrialsapi.cancer.gov/api/v2/trials...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Dict[str, np.ndarray] Output Type: Dict[str, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, np.ndarray]) -> Dict[str, np.ndarray]: v2 = [] for (v3, v4) in v1.items(): v2.a...
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.print_templates if not self.print_templates: return if not v1: return v2[0] if v1.isdigit() and int(v1) < len(v2...
Imports: ```python import typing ``` Type definitions: Input Types: Type Output Type: Union[Type, Callable] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Type) -> Union[Type, Callable]: for (v2, v3) in self.registry.items(): if v2.is_superclass_of(v1): return v3 rais...
Imports: ```python from http import HTTPStatus import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.make_request('GET', self.url + '?user_id=%s' % self.other_user, access_token=self.admin_user_tok) self.assertEq...
Imports: ```python import json import os import sys from ctypes import CDLL, CFUNCTYPE, byref, c_char_p, c_size_t, c_void_p, c_int32 from ctypes.util import find_library import typing ``` Type definitions: ```python class v0(c_size_t): def __repr__(self) -> str: """Format request handle as a string.""" ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: if len(v1) == 1: return v1 v2 = 0 for v3 in range(len(v1)): if v1[v3] != 0: (v1[v3], v1[v2]) = (v1[v2], v1[v3]) ...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> torch.Tensor: v1 = v1 * self.dim ** 0.5 v2 = v1.size(-1) v1 = v1 + self.pe[..., :v2] return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: 'Node' Output Type: 'Node' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Node') -> 'Node': if not v1: return v2 = [v1] while v2: v3 = [] v4 = len(v2) - 1 for (v5, v6) in enumerate(v2...
Imports: ```python import numpy as np from matplotlib import pyplot as plt import typing ``` Type definitions: Input Types: np.ndarray Output Type: plt.Figure Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> plt.Figure: (v2, v3) = v1.shape (v4, v5) = plt.subplots(constrained_layou...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v1 = v1.lower() v1 = v1.replace('thunderstorm with light rain', 'Gewitter+leichter Regen') v1 = v1.replace('thunderstorm with rain', 'Gewitte...
Imports: ```python import os import requests import math from tqdm import tqdm import typing ``` Type definitions: Input Types: str, str, Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: Optional[int]=4096): v4 = os.path.basename(v1) v5 = os.path....
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> int: if not isinstance(v1, int): raise TypeError('an integer number is required') if v1 < 0: raise ValueError('a non-negative integer ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[str, Callable[[Item], bool]] ``` ```python v1 = Type[Any] ``` Input Types: v0, Any Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: Any=None) -> v1: for v5 in self.filter(v3): return v5 ...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: ```python @dataclass(frozen=True) class v0: v1: Dict[QPair_T, scipy.optimize.OptimizeResult] v2: Dict[QPair_T, Dict[str, float]] v3: pd.DataFrame ``` Input Types: pd.DataFrame, v0 Output Type: pd.DataFrame Dependen...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2: Decimal = 0.0 v3: int = 0 v4: int = 0 v5: int = 0 v6: int = 1 v7: Decimal = 0.0 v8: Decimal = 0.0 v9: Decimal = -1.0 ...
Imports: ```python from collections import Counter, defaultdict import typing ``` Type definitions: Input Types: list[list[tuple[UserID, int]]] Output Type: Counter[UserID] Dependencies: Function Name: v0 Function: ```python def v0(v1: list[list[tuple[UserID, int]]]) -> Counter[UserID]: v2: Counter = Counter() ...
Imports: ```python import typing ``` Type definitions: Input Types: List[torch.Tensor] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[torch.Tensor]) -> Any: v2 = self._prepare_batch(v1) v3 = self.model(v2) v4 = self.model.logits_to_preds(v3) v4 = self.model....
Imports: ```python import numpy, random import typing ``` Type definitions: Input Types: str, str, bool, Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=False, v2: str=None, v3: bool=False, v4=None, v5: int=2, **v6): '\n **Purpose**\n Configure ...
Imports: ```python import csv import datetime import h5py import numpy as np import typing ``` Type definitions: Input Types: str, str, float, Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: float, v4: Optional[str]): v5 = h5py.File(v1, mode='r') ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict: v1 = self.pass_through_dict v1['sentence_id'] = self.sentence_id v1['translation'] = self.translation v1['score'] = self.score if self.nb...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: pd.Series, pd.Series Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.Series, v2: pd.Series) -> float: (v1, v2) = (v1.values, v2.values) return np.cov(v1, v2)[0][1] / (np.std(v1) * np.std...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = 'return listeners_local()' return self.ag_get_object(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray): v2 = v1.flatten() for v3 in range(0, len(v2) - 1): self.__assert_sub(abs(v2[v3]) < abs(v2[v3 + 1]), 'Object not sorted in it...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: bool=True) -> List[str]: v2 = ['./build-support/bin/install_aws_cli_for_ci.sh', 'pyenv global 2.7.15 3.6.7 3.7.1'] if v1: return ['PATH="/usr/l...
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): for v3 in self._gen_subsets(v1): self.curr_super_freq[v3][0] += v2 self.curr_super_freq[v3][1] += 1 ```
Imports: ```python from scipy.stats import norm, skew from sklearn.preprocessing import MinMaxScaler, StandardScaler, PowerTransformer from scipy.stats import skew from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.preprocessing import PowerTransformer import typing ``` Type definitions: Input ...
Imports: ```python from functools import cmp_to_key import typing ``` Type definitions: Input Types: List[int] Output Type: str Dependencies: ```python def v0(v1, v2): (v3, v4) = (int(v1 + v2), int(v2 + v1)) if v3 > v4: return 1 elif v3 < v4: return -1 else: return 0 ``` Functio...
Imports: ```python import sys import typing ``` Type definitions: Input Types: int, int, str, str, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: str='', v4: str='', v5: int=30) -> None: if sys.stdout.isatty() or ('ipykernel' in sys.modules and v2 != 0): ...
Imports: ```python from inspect import cleandoc import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]): v2 = cleandoc("{red_bg}{white_fg}\n You are violating {owner_name}'s reservation!\n ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: Sequence[tuple], bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[tuple], v2: bool=True) -> bool: v3 = len(v1) v4 = defaultdict(list) if v3 > 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._load_root() self._load_timestamp() self._load_snapshot() self._load_targets('targets', 'root') ```
Imports: ```python import json import typing ``` Type definitions: ```python v0 = TypeVar('TypeT') ``` Input Types: Callable[..., v0], bool Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Callable[..., v0], v3: bool) -> None: v4 = '{"val": 42, "msg": "hello", "frac": 3.14, "f...