text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if len(v1) == 1: v2 = '1' elif len(v1) == 2: v2 = '2' elif len(v1) == 3: v2 = '3/{}'.format(v1[0]) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.helper.create_room_as(self.user_id, tok=self.token) self._test_retention(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self.lang = v1 self.tbl = self._get_db_tbl_name(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool, int, int Output Type: Any Dependencies: ```python def v0(v1: int, v2: int, v3: bool, v4: int, v5: int) -> int: v6 = v1 v6 %= 26 v1 = v1 // (26 if v3 else 1) v6 += v4 v6 = 1 if v6 != v2 else 0 v7 = 25 v7 *= v6 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: str, v4: str, **v5) -> None: if len(v2) != 1: raise Exception('short_flag needs to be a single character') v6 = v1.add_mu...
Imports: ```python import hashlib import random import requests import typing ``` Type definitions: Input Types: Output Type: str Dependencies: ```python def v0(v1): try: v2 = requests.get('http://check:5000/', params={'digest': hashlib.sha224(v1.encode('utf-8')).hexdigest()}) except Exception as e: ...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor) -> torch.Tensor: if self.device == 'cuda': self.fAddNet1 = self.fAddNet...
Imports: ```python import os import pandas as pd import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str): v3 = ['count', 'min', 'max', 'mean', 'range', 'std'] v4 = [] for v5 in v3: v4.append(v1[v5]) ...
Imports: ```python import shlex import typing ``` Type definitions: Input Types: argparse.Namespace Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: argparse.Namespace) -> str: v2 = vars(v1) v3 = ['log_file', 'logging_level', 'file_logging_level', 'stdout_logging_level', 'stderr...
Imports: ```python import typing ``` Type definitions: Input Types: Mapping Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping) -> Any: try: return self._parse_transforms(v1['transforms']) except KeyError: return self._value_source_resolver.resolve(v1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: ```python def v0(v1: str) -> int: assert '(' not in v1 assert ')' not in v1 v2 = v1.split(' ') v3 = int(v2.pop(0)) while len(v2) != 0: v4 = v2.pop(0) v5 = int(v2.pop(0)) as...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: typing.Union['steps.ProjectStep', None] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> typing.Union['steps.ProjectStep', None]: for v2 in self.steps: if v2.definition.name == v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python @lru_cache(maxsize=None) def v0(v1: str, v2: str) -> str: v3 = f'{greeting} {v1} {v2}' work_log.append(v3) return v3 ``` ```python def v4(v5: str) -> Tuple[List[str], List[str]]: v6: List[str]...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[str]=None, v3: Optional[str]=None) -> Any: if v1 not in self and v1.endswith('s'): v1 = v1[:-1] ...
Imports: ```python import re import typing ``` Type definitions: ```python v0 = Optional[int] ``` Input Types: str, str, str, v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str, v3: str, v4: str, v5: v0=None): v6 = v5 is None v7 = v6 or self._lines_parsed_in_block < v5...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not any([row.geometry.geom_type == 'Polygon' and row.geometry.interiors for (v1, v2) in self.df.iterrows()]): self.is_no_holes = True ```
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Iterable[langedge.models.request.Job], Any Output Type: List[langedge.models.response.Order] Dependencies: ```python def v0(v1: Awaitable[Any]) -> Any: with LoopContext() as v2: return v2.run_until_complete(asyncio.Task(v1))...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: ```python v0 = namedtuple('Padding', ('top', 'bottom', 'left', 'right')) ``` Input Types: np.ndarray, int, int, int, int, v0, bool, str Output Type: np.ndarray Dependencies: ```python def v1(v2: np.ndarray) -> np.ndarray: if len(v2.shape...
Imports: ```python import typing ``` Type definitions: ```python class v0(_BASENODE): def __init__(self, v1, v2, v3=None): super().__init__() self.ref_count = v1 self._type = v2 self.arr_offset = v3 self.is_tmp = False self.is_param = False def v4(self) -> int: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: await self.task() self.assertTrue(self.coro_called) self.mocked_store.create_task.assert_called_once_with(self.task.id) self.mocked_sto...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self._oc.create_vm_sync(yaml=os.path.join(f'{self._run_artifacts_path}', f'{self.__name}_{v1}.yaml'), vm_name=self.__vm_name) self._oc.w...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> None: if os.path.exists(v2): v3 = 'a' else: v3 = 'w' with open(v2, v3) as v4: if os.pat...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self.device_info('com.apple.disk_usage') v2 = v1['TotalDiskCapacity'] v3 = v1['TotalDataCapacity'] v4 = v1['TotalDataAvailable'] v5 ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: List[Dict[str, Any]] Output Type: Dict[str, List[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Dict[str, Any]]) -> Dict[str, List[str]]: v2: Dict[str, List[str]] = defaultdict(list) ...
Imports: ```python from numpy import ndarray, vectorize, vstack import typing ``` Type definitions: Input Types: ndarray Output Type: ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ndarray) -> ndarray: if self.vectorize_fcn_list is not None: return vstack([self.vectorize_fcn_...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = [] v2 = self._list_pipeline_executions() self.logger.debug(f'{inspect.stack()[0][3]} - Filtering the pipeline executions for ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('EnumT', bound=Enum) ``` Input Types: Any Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Any) -> v0: v3 = self._server() if isinstance(v2, v3): return v2 if isinstance(v2, str): ...
Imports: ```python import asyncio import uuid import typing ``` Type definitions: Input Types: Callable, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Callable, v2: str, v3: str, **v4: Optional[dict]) -> str: if not asyncio.iscoroutinefunction(v1): se...
Imports: ```python import shlex import typing ``` Type definitions: Input Types: str, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, *, v3: str) -> str: v4 = self.sh_get_command('python', relative_to=v3) v5 = self.sh_write_helper(v1, v2, relative_t...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='', v2: bool=True) -> None: if self.private_cursor._model: self.private_cursor._model.where_filters['main-filter'] = v1 if v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> int: v2: int = 0 for v3 in range(0, len(v1)): for v4 in range(v3 + 1, len(v1)): v2 = max(v2, min(v1[v3], v1[v4])...
Imports: ```python import os import shutil import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if not os.path.isdir(v1): return print(f'cleaning {v1}') for v2 in os.listdir(v1): v3 = os.path.join(v1, v2)...
Imports: ```python from re import finditer as re_finditer import typing ``` Type definitions: Input Types: Namespace, str Output Type: Any Dependencies: ```python def v0(v1: str): if len(v1) == 0: return '' if v1[0] == '[': if len(v1) < 2 or v1[len(v1) - 1] != ']': raise Exception("...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.content = v1 self.version += 1 self.save() ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, int, List[int], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: List[int], v4=False) -> None: self.basis_matrix = np.random.uniform(low=0, high=2, size=(v1, self...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: ```python def v0(v1: np.ndarray) -> np.ndarray: v2 = v1.shape[0] v3 = np.zeros(v2) for v4 in range(v2): v3[v4] = (abs(v1[v4]) >= 0) * (abs(v1[v4]) < 0.5) + 2 * (1 - abs(v...
Imports: ```python import typing ``` Type definitions: ```python class v0(Enum): v1 = 0 'the optimization algorithm succeeded to find an optimal solution.' v2 = 1 'the optimization algorithm ended in a failure.' v3 = 2 'the optimization algorithm obtained an infeasible solution.' ``` Input Types...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Size Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Size) -> torch.Tensor: v2 = self.dist.rsample(v1) if self.map_fn is not None: v2 = self.map_fn(v2) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: logging.Logger Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: logging.Logger) -> None: global _logger v2 = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: if v1 <= 1: return v1 if self.dp[v1]: return self.dp[v1] self.dp[v1] = self.fib(v1 - 1) + self.fib(v1 - 2) return s...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[Tuple[str, int, int]] Dependencies: ```python def v0(v1: str) -> Tuple[str, str]: v2 = v1.split('-')[0] v3 = v1.split('-')[-1] return (v2, v3) ``` Function Name: v4 Function: ```python def v4(v5: List[str]) -> L...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: kp.Tensor, v2: np.dtype, v3: tp.Tuple[int]): if isinstance(v1, TensorPlaceholder): super().__setattr__('tensor', v1) else: super().__setattr__('tensor', TensorPlaceholder(v1)) ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.Series Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.Series) -> pd.Series: if self.lower_mask is not None: v1 = v1.mask(self.lower_mask, other=self.lower_original_values) if self.upp...
Imports: ```python from logging import basicConfig, error, ERROR, getLevelName, getLogger, shutdown import typing ``` Type definitions: Input Types: ClassVar, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ClassVar, v2: bool) -> None: if v2: self.error_reason['...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = 'WPScan result summary: alerts={}, warnings={}, infos={}, error={}'.format(len(self.get_alerts()), len(self.get_warnings()), len(self.get_infos()), '1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = ['', 'abc', 'aaabccd', 'aab0bb0012', 'λaé', 'a' * 1000, 'ababcaab'] for v2 in v1: v3 = self.decode(self.encode(v2)) assert v3 ==...
Imports: ```python import glob import os import pickle from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str): v2 = os.path.join(local_dir, 'backtest-stats-buy&hold...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: ```python @dataclass() class v0: v1: Optional[str] v2: str ``` Input Types: v0, Optional[str], str, Optional[str] Output Type: Any Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0, v5: Optional[str], v6: str...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0() -> Dict[str, str]: v1 = {} v1['mips'] = 'mips-linux-gnu-as -march=mips64 -mabi=64 -o "$OUTPUT" "$INPUT"' v1['mipsel'] = 'mips-linux-gnu-as -march=mi...
Imports: ```python import re import ast 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 = ''.join(v1) v3 = re.findall('\\[.*\\]', v2) if len(v3) != 1: raise ValueError('expe...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str]: v2 = v1.split('@') if len(v2) == 1: return (v2[0], 'master') elif len(v2) == 2: return (v2[0], v2[1])...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Optional[str], int, float, str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: Optional[str]=None, v4: int=0, v5: float=0.0, v6: str=None) -> dict: if self.in_portfolio(v1) and se...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._write_dispatcher.stop() assert self.is_closed(), f'{len(self._connections)}/{self._write_dispatcher.is_stopped()}' ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[dict], Optional[Any] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[dict], v2: Optional[Any]) -> Dict[str, Any]: v3: dict = {'per_page': self.MAX_PER_PAGE} if v2: v3[...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Union[str, List] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Union[str, List]: if any((char.isdigit() for v2 in v1)): if re.findall('(^[a-fA-F0-9]{40}$)', v1): return...
Imports: ```python import typing ``` Type definitions: ```python v0: _TypeAlias = Optional[Dict[Expression, Type]] ``` Input Types: List[v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: List[v0]) -> v0: v3 = {} for v4 in v2: if v4 is not None: v3.update(v4)...
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: try: if v1[0] in ['v', 'V']: v1 = v1[1:] if v2[0] in ['v', 'V']: v2 = v2[1:] return 'br...
Imports: ```python import typing ``` Type definitions: Input Types: list, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list): v3 = [] for v4 in v2: v5 = '`' for v6 in v1: if v6.name in v4: if ' ' in v6.name: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: super().set_context(v1) self.log_relative_path = self._render_filename(v1, v1.try_number) self.upload_on_close = not v1.raw ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, int Output Type: pd.DataFrame Dependencies: ```python def v0(v1: str): if v1.endswith('.tsv') or v1.endswith('.tsv.gz'): return '\t' return ',' ``` Function Name: v2 Function: ```python def v2(v3: str, v4: int=...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str) -> Tuple[str, str]: v2 = re.sub('(?i)\\.(anki2)$', '.media', v1) v3 = v2 + '.db2' return (v2, v3) ``` Function Name: v4 Function: ```python def v4(self) -> None...
Imports: ```python import re import json import logging import subprocess import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: ```python def v0(v1: str, v2: str) -> None: assert ' ' not in v1 assert ' ' not in v2 v3 = minimal_master_JSON.replace('MY_NAME', MY_NAME).replace('...
Imports: ```python import json import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: ```python def v0(v1: dict, v2: str, v3: dict, v4: list) -> None: if 'properties' in v3: add_property_definition(v1, v2, v3, v4) elif 'items' in v3: add_item_definition(v1, v2, v3...
Imports: ```python import numpy as np import cvxpy as cp import typing ``` Type definitions: Input Types: np.ndarray, int Output Type: Any Dependencies: ```python def v0(v1: int, v2: int, v3: set=None): assert v2 < v1, 'Needs a desired rank less than the problem dimension.' v4 = cp.Variable((v1, v1), PSD=True)...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('Message') ``` Input Types: Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python def v1(self) -> Optional[v0]: if not self.active(): return None try: if self.sock_ready(self.csock): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, *v1) -> str: if len(v1) == 1: return ', '.join(v1[0]) else: return ', '.join(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Union[list, tuple] Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[list, tuple]) -> tuple: v3 = v1 v4 = [] for (v5, v6) in enumerate(v2): v7 = f'parameter_{v5}' v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = self.operator_version if v2 != v1: v3 = {'metadata': {'annotations': {'mysql.oracle.com/mysql-operator-version': v1}}} ...
Imports: ```python import threading import socket import typing ``` Type definitions: Input Types: str, int, str, int, bytes, int Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4, v5): v6 = sniffer.sniff(v1, v2, v3, v4, v5) q.put(v6) ``` Function Name: v7 Function: ```python def v7(v8: str, v9: i...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int, v2: str, v3: str): """Please see help(VeilResult) for more info.""" self.return_code = v1 self.error_msg = v2 self.stdout_msg = v3 @property def v4(self): """If no...
Imports: ```python from glob import glob import typing ``` Type definitions: Input Types: str, str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str='*log*') -> list: v3 = [] for v4 in glob(v1 + v2): v3.append(v4) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: tuple, tuple, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple, v2: tuple, v3): v4 = v3.pathfinder.return_path(v1, v2) self.memory['last_start_position'] = self.actions['move']['start_position'](...
Imports: ```python import os, json import typing ``` Type definitions: Input Types: Any, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=False) -> str: v3 = os.path.join(self.reference_folder, os.path.split(v1)[1]) v4 = v3.replace('.gz', '').replace('.tar', '').rep...
Imports: ```python import typing ``` Type definitions: Input Types: UUID, str, str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: UUID, v2: str, v3: str, v4: str, v5: str) -> None: for v6 in self._authorization_handlers: await v6(v1, v2, v3, v4, v5) ...
Imports: ```python import torch from torch import Tensor, nn import typing ``` Type definitions: Input Types: Dict[str, Tensor], Dict[str, Tensor] Output Type: Dict[str, Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Tensor], v2: Dict[str, Tensor]) -> Dict[str, Tensor]: v3:...
Imports: ```python from io import BytesIO, IOBase from mmap import mmap import typing ``` Type definitions: Input Types: Union[Path, str, IOBase, mmap] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Path, str, IOBase, mmap]) -> None: if not isinstance(v1, (IOBase, mma...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> np.ndarray: self.pooled = self._pool(self.input()) return self.pooled ```
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): self.last_price = v1 self.calculate_pnl() ```
Imports: ```python import typing ``` Type definitions: Input Types: 'BriefVariableSet' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'BriefVariableSet') -> None: for v2 in v1.variables: if v2.name in self.index_by_name: continue self.variables.a...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False, v3=None) -> None: self.process_stack.append(v1) if v2: self.process_stack.append('confirmation') if v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = {'text': ':warning: Please select at least one area. :warning:', 'color': 'danger'} self.attachments = [v1] ```
Imports: ```python import logging as log import typing ``` Type definitions: Input Types: list, list, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list, v3: str): v4 = [attr for v5 in v2 if v5 not in v1] if len(v4): v6 = 'layer {}'.format(v1['NativeType...
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable): v1(self.workflow_builder) self.step.children.append(self.step.id + 1) return self ```
Imports: ```python import typing ``` Type definitions: ```python @dataclasses.dataclass(frozen=True) class v0: v1: datetime.datetime v2: float v3: str v4: str v5: Optional[str] v6: Optional[int] = None v7: Optional[dict] = None v8: Optional[str] = None v9: Optional[str] = None v1...
Imports: ```python from transformers import is_torch_available from transformers.testing_utils import require_multigpu, require_torch, slow, torch_device import typing ``` Type definitions: Input Types: int, Any Output Type: List[int] Dependencies: ```python def v0(v1, v2, v3=None, v4=None): if v3 is None: ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[str]: v2 = os.path.join(v1, 'hm3d_annotated_basis.scene_dataset_config.json') assert os.path.exists(v2) v3 = os.path.join(v1,...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Dict[str, Any] Dependencies: ```python def v0(v1: str) -> Any: v2 = re.search('^(\\d+\\.*\\d*)(\\w+)$', v1) if v2 is not None: v3 = float(v2.group(1)) v4 = v2.group(2).lower() else: return...
Imports: ```python import typing ``` Type definitions: Input Types: str, Union[int, str] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[int, str]) -> dict: v3 = self.db[v1] return {k if k != '_id' else 'id': v for (v4, v5) in (v3.find_one({'_id': v2}) or ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if type(v1) is int: v2 = [] for v3 in self.nodes: if v3.interval_index == v1: v2.append(v3) else: ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: Output Type: DefaultDict[str, Dict[str, Union[int, list, None]]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> DefaultDict[str, Dict[str, Union[int, list, None]]]: v1 = defaultdict(lambda...
Imports: ```python from selenium.common.exceptions import StaleElementReferenceException, TimeoutException from selenium.webdriver import Firefox, FirefoxProfile from selenium.webdriver.firefox.options import Options from selenium.webdriver.remote.webdriver import WebDriver, WebElement from selenium.webdriver.support.u...
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() if v1 == 'a': return 'alpha' elif v1 == 'b': return 'beta' elif v1 in ['c', 'pre']: return 'rc' ...
Imports: ```python import typing ``` Type definitions: Input Types: str, dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: dict) -> str: v3 = {'txHash': 'tx_hash', 'prevHash': 'prev_block_hash', 'transactionsHash': 'merkle_tree_root_hash', 'timestamp': 'time_stamp', 'ha...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tf.Tensor, v2: tf.Tensor) -> tf.Tensor: v3 = self.bernoulli.sample([self.spsa, 2, v2.shape[0]]) * 2 - 1 v...
Imports: ```python import typing ``` Type definitions: Input Types: 'BaseStrategy' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'BaseStrategy'): super().before_training_iteration(v1) if self._reset_at == 'iteration' and self._mode == 'train': self.reset(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str] Output Type: utils.RUN_STATUS Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[str]=None) -> utils.RUN_STATUS: if v1 is None: return (False, 'cwd parameter is not set.') return (True, None) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = t.TypeVar('TMODEL', bound=PWModel) ``` Input Types: t.Type[v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: t.Type[v0], **v3) -> v0: v4 = v2(**v3) v4 = await self.save(v4, force_insert=True) ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0() -> List[str]: v1 = [f.split('.')[1] for v2 in os.listdir('.') if v2.startswith('Dockerfile.')] return v1 ```
Imports: ```python import numpy as np from scipy.ndimage import gaussian_filter1d from scipy.signal import find_peaks from scipy.stats import norm import typing ``` Type definitions: Input Types: Union[str, List[str]], Union[str, List[str]], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def...
Imports: ```python import typing ``` Type definitions: Input Types: int, List[str], str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: List[str], v3: str=None) -> None: v3 = v3 or self._next_row_name() self.row_names.insert(v1, v3) self.data.insert(v1, v2) ...