text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self) -> Any: self._composition.kill(self._mz_service.name) self._composition.up(self._mz_service.name) return 0.0 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> bool: v3 = self.get_enrolled_courses(v1) return int(v2) in [p.id for v4 in v3] ```
Imports: ```python import zipfile from PIL import Image import pandas as pd from tqdm import tqdm import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if (self._processed_dir / 'ISIC-images').is_dir(): return if n...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> Dict[str, Any]: v1 = self.set_defaults(v1) v1 = self.validate_fields(v1) v1 = self.update_instance(v1) ...
Imports: ```python import json import base64 import typing ``` Type definitions: Input Types: object Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: object) -> str: v2 = json.dumps(v1) v3 = bytes(v2, 'utf-8') v4 = base64.b64encode(v3) v5 = v4.decode('utf-8') return ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Union[None, str] Dependencies: ```python def v0(v1: str, v2: int) -> str: return v1 + (str(v2) if v2 > 1 else '') ``` Function Name: v3 Function: ```python def v3(v4: str) -> Union[None, str]: if not v4 or v4 is None: ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: if os.getenv('LOGZIO_REGION') == 'us': return 'https://listener.logz.io:8053' else: return 'https://listener.logz.io:8053'.replac...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: Dict[Tuple[Type[Object], sn.Name], sd.RenameObject[Object]] v2: Dict[Tuple[Type[Object], sn.Name], sd.DeleteObject[Object]] v3: Optional[DeltaGuidance] v4: List[sd.ObjectCommand[Any]] def __init__(self, *, v5: bool=False...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: assert self.module if self.function: return self.function.fullname() if self.classes: return self.classes[-1].fullname() return...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, QtCore.QThread Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: QtCore.QThread): v3.function = v1 v3.arguments = v2 v3.start() ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if not self.resample_opts: v1 = '' else: v1 = f'RESAMPLE {self.resample_opts}' v2 = f'CREATE CONTINUOUS QUERY {self.name}...
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 = self.P_f.invert().permutate(v1) for v2 in self.rounds[::-1]: v1 = v2.decrypt(v1) return self.P_i.invert().permutate(v1) ``...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: (Union[Tensor, None], (float, float, float)) Dependencies: Function Name: v0 Function: ```python def v0(self, v1, *v2) -> (Union[Tensor, None], (float, float, float)): (v3, v4, v5) = v1 (v6, v7, v8, v9, v10) = v2 (v11, v1...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, List[int], Any Output Type: List[torch.Tensor] Dependencies: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3='exp_rank') -> torch.Tensor: v4 = process_recsys_components(v1, v2) v5 = v4.device ...
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str, *, v2: Iterable[str]) -> str: v3 = input(v1) while v3 not in v2: print('TRY AGAIN...') v3 = input(v1) return v3 ``` ```python def v4(v5: float) -> boo...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: List[str], Optional[str] Output Type: Any Dependencies: ```python def v0(v1: List[str], v2=True) -> str: v3 = '\x1b[34m' v4 = '\x1b[0m' v5 = ' '.join(v1) return f'{v3}# {v5}{v4}' if v2 else f'# {v5}' ``` Function Name...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> None: self.losses.reset_accuracy_metric() for (v3, v4, v5) in v1: self._call_test(v3, v5, v2) return self.losses.get_accuracy_r...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: ```python def v0(v1: str) -> int: v2 = 0 for v3 in v1[0:68]: if v3.isdigit(): v2 += int(v3) elif v3 == '-': v2 += 1 v2 = v2 % 10 return v2 ``` ```python de...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], Dict[str, str], List[str], bool, int Output Type: str Dependencies: ```python def v0(v1: str, v2: int, v3: bool=False, v4: int=2) -> str: v5 = v2 + v4 if v3: return v1.center(v5, ' ') v6 = v1.rjust(min(int(v4 / 2) + len(...
Imports: ```python import typing ``` Type definitions: ```python v0 = Generator[Any, Any, Any] ``` Input Types: Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self) -> v0: while True: if not self.ready: self.iopoll(None) else: self.iopoll(0) ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, int], Dict[str, int], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, int], v2: Dict[str, int], v3: bool) -> None: v4 = '\n--------------------------\n Third-party packages\n------------...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[Hashable], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[Hashable], v2: Any=None) -> None: v1 = frozenset(v1) self.add_vertices(v1) for v3 in v1: self._adjacency_lists...
Imports: ```python import io import typing ``` Type definitions: Input Types: Any, bool, bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, *, v2: bool=False, v3: bool=False) -> bool: if v2 or v3: return (not v2 or hasattr(v1, 'read')) and (not v3 or hasattr(v1, 'wr...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: bool) -> None: v4 = self.get_link_properties(v1, v2) v5 = v4['position'] v6 = v4['orientation'] v7 = v4['mass'] ...
Imports: ```python from collections import deque import typing ``` Type definitions: Input Types: int, int Output Type: IO[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> IO[str]: if v1 == v2: return v3 = [False] * self._num_vertices v3[v1] = True v4 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'TexturesVertex' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'TexturesVertex': v1 = self.__class__(self.verts_features_padded().detach()) if self._verts_features_list is not None: v1._verts_featur...
Imports: ```python import typing ``` Type definitions: Input Types: int, str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: str, v3: int=3) -> str: for v4 in ['', 'K', 'M', 'B']: if v1 < 1000: break v1 /= 1000 return f'{v1:.{v3}f} {v4}...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2): v3 = self.params[v1] setattr(self[v3], v1, v2) if v3 == 'cosmo' and v1 == 'H0': if self.cosmo.fix_Omega_b_h2: sel...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: if v1 not in self.store: return '' v2 = self.store[v1] if v2 == self.tail: self.tail = v2.left if v2.left: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, float] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, float]) -> str: v2 = [] (v3, v4) = ([], None) for v5 in sorted(v1.keys()): v6 = v5.rsplit('_', maxsplit=1)[0] if v6...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> float: if isinstance(v1, float): return v1 * 180.0 / np.pi elif str(v1) == 'EAST': return 0.0 elif str(v1) ==...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str, v3: Any): if v2 not in v1: v1[v2] = v3 return v1[v2] ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if len(self.rows) < v1: return self._cursor.fetchmany(size=len(self.rows)) else: return self._cursor.fetchmany(size=v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[int]=None) -> None: self.main.stackedWidget_modes.setCurrentWidget(getattr(self.main, f'page{v1}')) for v3 in self.mai...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = ['CM', 'CD', 'XC', 'XL', 'IX', 'IV'] v3 = 0 for v4 in v2: if v4 in v1: v1 = v1.replace(v4, '') v3 ...
Imports: ```python import asyncio import typing ``` Type definitions: ```python v0 = TypeVar('R') ``` ```python v1 = TypeVar('T') ``` Input Types: Callable[[v1], Awaitable[v0]], Callable[[v1], Awaitable[v0]], Sequence[v1] Output Type: Sequence[v0] Dependencies: ```python async def v2(): while pending: for v...
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 = self._create_redirect_uri('facebook') return f'https://www.facebook.com/v8.0/dialog/oauth?client_id={self.facebook_id}&redirect_uri={v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.store > 100: self.environment[self.y][self.x] += self.store self.store = 0 ```
Imports: ```python import requests from requests import Response import typing ``` Type definitions: Input Types: str, dict Output Type: Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: dict=None) -> Response: v2 = v2 or {} return requests.post(f"{self._server_address}/{v...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[List[str]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[List[str]]=None) -> None: v1 = v1 or [] if len(v1) == 0: if self.config.path.exists(): self.config.path.un...
Imports: ```python from operator import attrgetter import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Iterable[v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: Iterable[v0], **v3: Any) -> v0: v4 = [(attrgetter(attr.replace('__', '.')), value) for (v5,...
Imports: ```python import numpy import numpy as np import typing ``` Type definitions: Input Types: numpy.ndarray, numpy.ndarray, int Output Type: numpy.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: numpy.ndarray, v2: numpy.ndarray=None, v3: int=0) -> numpy.ndarray: (v4, v5, v6) = v1.shap...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: io, bool, Optional[int], Optional[bool] Output Type: Any Dependencies: ```python def v0(v1: pd.DataFrame, v2: Optional[int], v3: bool, v4: bool) -> pd.DataFrame: v1 = v1.T if v3 is True else v1 v1 = v1.dropna(how='all', axi...
Imports: ```python import torch from torch import Tensor from torch.nn import Module from torch.utils.data import DataLoader, Dataset import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3=0) -> Tensor: v1 = v1.view(...
Imports: ```python import pandas as pd import requests import typing ``` Type definitions: Input Types: str, Any Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2='1h') -> pd.DataFrame: if self.basic_auth: v3 = requests.auth.HTTPBasicAuth(self.basic_aut...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.package_dir.mkdir() v1 = self.package_dir / '__init__.py' v2 = self.env.get_template('package_init.pyi') v1.write_text(v2.render(descrip...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int=2, **v3: Dict[str, int]): assert v1 == 1 assert v2 == 2 assert v3['c'] == 3 return ('success', vars()) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('M', bound=Union[NamedType, NicknamedType]) ``` Input Types: str, Iterable[v0] Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: str, v3: Iterable[v0]) -> Optional[v0]: v4: Optional[int] try: ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Union[str, Real]], Optional[Real] Output Type: Any Dependencies: ```python def v0(v1: str) -> Real: v2 = v1.lower().rsplit('u', 1) v3 = len(v2) if v3 == 2: v1 = v2[1] elif v3 != 0: return 0 v4 = num_or_none...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str, v2=False) -> list: v3 = set() v4 = helper.find_vanity_number_format(v1) if v4 == '': print('Invalid Number') return v4 (v5, v6) = v4 v7 =...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.keycloak_type() return f'{v1}:{self.pk}' ```
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in self.tv.get_children(): self.tv.delete(v1) self.path = os.path.abspath(self.directory) self.node = self.tv.insert('',...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: tuple, int, float, frozenset, frozenset, frozenset, float, frozenset, bool Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple, v2: int, v3: float=0.5, v4: frozenset...
Imports: ```python import string import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): for v2 in range(v1): self.symboles.append(string.ascii_lowercase[v2]) ```
Imports: ```python import typing ``` Type definitions: Input Types: argparse.ArgumentParser Output Type: argparse.ArgumentParser Dependencies: Function Name: v0 Function: ```python def v0(v1: argparse.ArgumentParser) -> argparse.ArgumentParser: v1.add_argument('--max-num-samples', dest='max_num_samples', type=int...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: types.Comparable[v0], types.Comparable[v0], types.Comparable[v0] Output Type: types.Comparable[v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: types.Comparable[v0], *, v3: types.Comparable[v0], v4: ty...
Imports: ```python import shutil import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: ```python def v0(v1: str) -> None: try: shutil.rmtree(v1) except FileNotFoundError: pass ``` Function Name: v2 Function: ```python def v2(v3, v4) -> None: print('Writin...
Imports: ```python import pandas as pd from pandas.io.parsers import TextFileReader import typing ``` Type definitions: Input Types: List[int], Union[List[int], None] Output Type: Dict[str, datetime] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: Union[List[int], None]=None) -> Di...
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: if self._user_repository.user_exists(v1): return 'Käyttäjätunnus on jo olemassa' if len(v2) < 6: return 'Sala...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = ['labbooks'] self.__stop_containers() self.__delete_local_images() for v2 in v1: self.__delete_directory(v2) return True ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str, Any, Any Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *, v2=False, v3=False) -> Optional[str]: v4 = {} if v3: v5 = f' > >(tee "{self.cmd_output_path}") 2>&...
Imports: ```python import typing ``` Type definitions: ```python v0 = str ``` Input Types: str Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: str) -> v0: v3 = 1 v4 = 'message_id' v5 = f'{v4} DESC LIMIT {v3}' v6 = f'SELECT {v4} FROM {v2} ORDER BY {v5};' return v6 ```
Imports: ```python import os from pathlib import Path from tempfile import TemporaryDirectory import typing ``` Type definitions: Input Types: str Output Type: Union[Path, 'TemporaryDirectory[str]'] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Union[Path, 'TemporaryDirectory[str]']: v2 =...
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._path_to_env(self.env.db_service, v2) v4 = self._path_to_env(self.env.db_service, v1) self.env.engine.path_copy(v4, v3...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[], None] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable[[], None]): if self._triggered: v1() else: self._callables.append(v1) ```
Imports: ```python import multiprocessing import tensorflow as tf import typing ``` Type definitions: Input Types: Union[List[str], str], int, Optional[int] Output Type: Union[List[str], str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[List[str], str], v2: int=1, v3: Optional[int]=None)...
Imports: ```python from sklearn.metrics import f1_score import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, Any Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3=False) -> torch.Tensor: v1 = v1.cpu().numpy().tolist(...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: List['Var'] v2: List['Var'] v3: List['Atom'] v4: List['JaxprEqn'] def __init__(self, v5: Sequence['Var'], v6: Sequence['Var'], v7: Sequence['Atom'], v8: Sequence['JaxprEqn']): """ Args: constvars: list ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1=True) -> dict: v2 = {k: getattr(self, k) for v3 in ['name', 'label', 'description']} v2['channels'] = [item.json() for v4 in self.channels] v2['spec...
Imports: ```python import typing ``` Type definitions: Input Types: 'CeedFuncRef' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'CeedFuncRef'): if v1.func not in self._ref_funcs: raise ValueError("Returned function that wasn't added") self._ref_funcs[v1.func] -=...
Imports: ```python import typing ``` Type definitions: Input Types: 'CdmEntityDefinition', 'CdmAttributeContext' Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'CdmEntityDefinition', v2: 'CdmAttributeContext') -> str: self._bldr = '' self._get_content_declared_path(v1.at...
Imports: ```python import torch import torch.nn as nn from torch import optim from torch.utils.data import DataLoader, RandomSampler import typing ``` Type definitions: Input Types: list Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> dict: v2 = 0 v3 = 0 for...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Output Type: Dict[str, tf.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, tf.Tensor]: with tf.name_scope('scalars'): self._build_metrics_op() return {'accuracy': self....
Imports: ```python import typing ``` Type definitions: Input Types: ir_database.Database, split.Splitter Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ir_database.Database, v2: split.Splitter): v3 = v2.Split(v1) assert len(v3) == 3 ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3 = pd.date_range(v1, v2, freq='1W-MON') print(v3[0], v3[-1]) v4 = v5 = None if v3[0] != v1: v4 = (pd...
Imports: ```python from os.path import join, exists from os import makedirs from numpy import ndarray, array, clip, ceil, matmul, diag, around, power, argwhere, diff, split, where, empty, append import typing ``` Type definitions: Input Types: str, list Output Type: Any Dependencies: ```python def v0(v1: Nifti1Image) ...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: int=1, **v3) -> np.ndarray: if v2 >= len(v1): raise ValueError(f'step ({v2}) should be less than the length ({len(v1)})...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: if not self.git: return await self.git.load() ```
Imports: ```python import typing ``` Type definitions: Input Types: bool, Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool, v2: Optional[int]=None): if not v1: self.keep_alive_service_enabled = False self.keep_alive_service = None if v2: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: npt.NDArray[np.bool_], Any, Any Output Type: Any Dependencies: ```python def v0(v1: npt.NDArray[np.bool_], v2: int) -> npt.NDArray[np.bool_]: v3 = v1.shape[:-1] + (v1.shape[-1] - v2 + 1, v2) v4 = v1.strides + (v1.strides[-1]...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.filterText = (v1 or '').strip() self._applyFilter() ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> None: global MAX_PARALLEL_PILES v2 = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[dict] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[dict]: v1 = 'process_payment' return [{'name': plugin.PLUGIN_NAME, 'config': self.__get_payment_config(plugin.PLUGIN_NAME)} for v2 in self.plugi...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = Callable[[np.ndarray, np.ndarray, np.ndarray, float], np.ndarray] ``` ```python v1 = Union[int, float] ``` Input Types: np.ndarray, np.ndarray, np.ndarray, v1, v0 Output Type: Any Dependencies: Function Name: v2 Function: ```pytho...
Imports: ```python from collections import namedtuple from collections import Counter import typing ``` Type definitions: ```python class v0(NamedTuple): v1: Access v2: datetime.datetime v3: str v4: urllib.parse.ParseResult v5: str v6: urllib.parse.ParseResult v7: Optional[AgentDetails] ``` ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: int, v3: int, v4: int): v5 = next(self.paramete...
Imports: ```python import typing ``` Type definitions: Input Types: tir.BufferStore, None Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tir.BufferStore, v2: None) -> int: v3 = 1 + self(v1.value, None) for v4 in v1.indices: v3 += self(v4, None) return v3 ```
Imports: ```python import numpy import typing ``` Type definitions: ```python v0 = typing.Dict[str, typing.List[typing.Union[int, float]]] ``` Input Types: float, float, v0, float, v0, float, float, int, bool Output Type: float Dependencies: ```python def v1(v2: float, v3: v0, v4: int, v5: bool=False) -> float: if ...
Imports: ```python import math import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> int: v2 = 2 * math.pi v3 = 16 v4 = v1[3] v5 = np.clip(np.floor(v4 / v2 * v3), 0, v3 - 1) retu...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Dict, List[float] Output Type: List[float] Dependencies: ```python def v0(v1: List[float], v2: List[float]) -> float: if len(v1) == 0: return 0 return np.sum(np.interp(np.arange(0, 1.1, 0.1), v1, v2)) / 11 ``` ```pyt...
Imports: ```python from typing import BinaryIO, Dict, Generic, List, Optional, Sequence, TextIO, Tuple, TypeVar, Union, cast import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: if self.codec: cast(BinaryI...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: str, *, v3: bool=False, **v4: Any) -> None: with open(v2, 'a') as v5: v1.to_csv(v5, header=False, index=v3, **v4) `...
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: Dict[str, torch.Tensor] Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, torch.Tensor]) -> torch.Tensor: v2 = [] for v3 in self.inputs: v4 = []...
Imports: ```python import shlex import typing ``` Type definitions: Input Types: str Output Type: list[str] Dependencies: ```python def v0(): nonlocal buff, cmd_split cmd_split.append(' '.join(buff)) v1 = [] ``` Function Name: v2 Function: ```python def v2(v3: str) -> list[str]: def v4(): nonl...
Imports: ```python from PIL import Image, ImageDraw, ImageFont, ImageOps import typing ``` Type definitions: Input Types: Image.Image, str, str Output Type: ImageFont Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Image.Image, v2: str, v3: str=None) -> ImageFont: v4 = 1 if not v3: ...
Imports: ```python import gc import inspect from itertools import islice import typing ``` Type definitions: Input Types: int, int | None Output Type: str Dependencies: ```python def v0(v1: FrameType) -> str: v2 = v1.f_code.co_name v2 = next((f.__qualname__ for v3 in gc.get_referrers(v1.f_code) if inspect.isfu...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): if self.csvheader: v2 = [] for v3 in self.csvheader: v2.append(str(v1[v3])) self.writer.log(100, ','.join(v2)) ...
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: self.roll_key = np.copy(self.kra_key) self.collector = np.zeros([5, 5], dtype=np.uint64) self.digest = bytearray(b'') self...
Imports: ```python from math import pi, acos, sqrt from numbers import Number import typing ``` Type definitions: Input Types: tuple, tuple, bool Output Type: float Dependencies: ```python def v0(v1: float) -> float: v2 = v1 / abs(v1) if abs(v1) > 1: return 1 * v2 else: return v1 ``` ```pyt...
Imports: ```python import datetime as dt import typing ``` Type definitions: Input Types: int Output Type: dt.date Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> dt.date: v2 = dt.date(v1, 8, 1).isocalendar()[2] v3 = 7 - v2 return dt.date(v1, 8, 1 + v3) ```