text
stringlengths
190
325k
Imports: ```python from typing import Any, Callable, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Union import typing ``` Type definitions: Input Types: Iterable Output Type: Iterable Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable) -> Iterable: for v2 in v1: ...
Imports: ```python from code.util import COLUMN_TWEET from code.feature_extraction.conditional_char_counter import PunctuationNum, CapLettersNum import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.INPUT_COLUMN = COLUMN_...
Imports: ```python from pandas._config import get_option from pandas._libs import algos as libalgos, lib, properties from pandas._libs.lib import no_default from pandas._typing import AggFuncType, ArrayLike, Axes, Axis, CompressionOptions, Dtype, FilePathOrBuffer, FrameOrSeriesUnion, IndexKeyFunc, Label, Level, Renamer...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: List[Set[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List[Set[int]]: v2: np = np.argsort(self.dist_matrix, axis=0) v3 = v2.T[:, :v1] v4 = [] for v5 in range(v2...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: int, v3): nonlocal first_left_distance, first_right_distance if v1.key != 13 and v1.key != -13: return assert v1.left.key == v1.key ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = self.get_room_by_number(v1) v3 = v2.guests v4 = v2.free_room() if v4: return v4 self.guests -= v3 ```
Imports: ```python import sys import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: ```python def v0(v1: str) -> bool: v2 = v1.split('/') if len(v2) != 3: print_stderr('Date input ({}) is invalid.'.format(v1)) print_stderr('Dates must use format: mm/dd/yyyy') ...
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 = {'tags': ['appliance', 'configure', 'prefixes', 'delegated', 'statics'], 'operation': 'getNetworkAppliancePrefixesDelegatedStatic'}...
Imports: ```python import torch import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='', v2: bool=False): v3 = 21 v4 = 200 v5 = 7 v6 = torch.nn.Sequential(torch.nn.Linear(v3, v4), torch.nn.ReLU(), torch.nn.Linear...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._send_request_to_api('GET', 'versions') v2 = v1.json() return v2['dashboard']['label'] ```
Imports: ```python import numpy import typing ``` Type definitions: Input Types: float Output Type: Tuple[numpy.array, numpy.array] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> Tuple[numpy.array, numpy.array]: if self.bbox is not None: return (numpy.arange(self.bbox[0], s...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: bool) -> Dict[str, Any]: v2 = 'DEBUG' if v1 else 'INFO' return {'version': 1, 'disable_existing_loggers': False, 'handlers': {'darq.standard': {'l...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: typing.Union[dict, mz.preprocessors.units.Vocabulary.TermIndex], Any Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Union[dict, mz.preprocessors.units.Vocabulary.TermIndex], v2=l...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('Point', ['x', 'y', 'clfname']) ``` Input Types: Any, v0 Output Type: float Dependencies: Function Name: v1 Function: ```python def v1(v2, v3: v0) -> float: v4 = v3.x - v2.x v5 = abs(v4) v6 = v3.y - v2.y v7 = abs(v6) i...
Imports: ```python import typing ``` Type definitions: Input Types: List, int, int, int Output Type: List[List[List]] Dependencies: ```python def v0(v1: int, v2: int) -> List[int]: if v1 == 0: return [] v3 = (v1 + v2 - 1) // v2 v4 = v1 // v3 v5 = v1 - v3 * v4 return [v4 + 1] * v5 + [v4] * (...
Imports: ```python import torch from torch import Tensor import typing ``` Type definitions: Input Types: Optional[torch.Size], Optional[Tensor] Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[torch.Size]=None, v2: Optional[Tensor]=None) -> Tensor: if v2 is not No...
Imports: ```python import matplotlib.pyplot as plt from matplotlib.colors import TwoSlopeNorm import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, Any, Any, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4=None, v5=None, v6=None, v7=False, v8=True): ...
Imports: ```python import argparse import json import pathlib import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str) -> str: v2 = pathlib.Path(__file__).with_name(v1) with open(v2) as v3: return v3.read() ``` ```python def v4(v5: str) -> Dict[str, Se...
Imports: ```python import typing ``` Type definitions: Input Types: dict, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None, v2: bool=False): try: return self._getList(v1, by='location', allPages=v2) except Exception: raise ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: int): assert v1.shape[v3 - 1] == v2.shape[v3 - 1] return np.concatenate((v1, v2), a...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseSwallow): def __init__(self, v1: dict, v2: int) -> None: """MOSwallow Class. Parameters ---------- bounds : dict Provides the upper and lower bounds of the search space. n_obj : int ...
Imports: ```python import shutil import subprocess import typing ``` Type definitions: Input Types: Output Type: typing.Optional[typing.List[str]] Dependencies: ```python def v0() -> typing.Optional[str]: for v1 in ('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', 'C:\\Program Files (x86)\\Google\\...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: int=100) -> Model: v2 = np.arange(np.datetime64('2020-01-01'), np.datetime64('2020-01-10'), dtype='datetime64[D]') v3 = np.ones((v1, v2.size), dtype=np.float) v4 = np...
Imports: ```python import datetime from collections import OrderedDict import typing ``` Type definitions: Input Types: List[datetime.datetime] Output Type: List[datetime.datetime] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[datetime.datetime]) -> List[datetime.datetime]: if len(v1) < 2: ...
Imports: ```python from math import asin from math import cos from math import pow from math import sin from math import sqrt import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: float Dependencies: ```python @dispatch(np.ndarray, np.ndarray) def v0(v1: np.ndarray, v2...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: AnyStr Dependencies: Function Name: v0 Function: ```python async def v0(self) -> AnyStr: await self.accept() return await self._receive() ```
Imports: ```python import typing ``` Type definitions: Input Types: io.BytesIO, int, bytes Output Type: None Dependencies: ```python def v0(*, v1: io.BytesIO, v2: str, v3: Union[int, str], v4: Union[bytes, int]) -> None: if not v1: raise Exception() if isinstance(v3, int): assert v3 >= 0, f'{v3...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = '' v1 += str(self.name) + '\n' v1 += '# ' + '\t'.join(self._order[0][0]) + '\n' v1 += ' ' + str(self.ALGORITHM) + '\n' v1 += '# ' + '...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool) -> None: self._table_view_page.setEnabled(v1) self._save_changes_button.setEnabled(v1) ```
Imports: ```python import warnings import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str): if v1 in ('spacy', 'spacy-de'): return spacy_de elif v1 in ('stanza', 'stanza-de'): return stanza_de else: raise Exception(f"Unknown Toke...
Imports: ```python import typing ``` Type definitions: Input Types: Request, Response, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Request, v2: Response, v3: str): if hasattr(v1, 'no_log') and v1.no_log and (not v3): return v4 = {'request': v1.__to_dict__(...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False): self.view.hide() self.loginModel.login(bool(1 - v1)) self.loginModel.show() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self.b == 0: return 1 else: return self.a ** self.b ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> str: v3 = v1[:v2] if len(v3) < len(v1): v3 += '...' return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> dict: v2 = {} for v3 in v1.units: v4 = v1.data[v3].get('port', 80) v5 = v1.data[v3].get('hostname') if v5: v2.up...
Imports: ```python import os import os.path import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: if '.tar' in v1: return v1.split('.tar')[0] else: return os.path.splitext(v1)[0] ``` Function Name: v2 Function: ```python ...
Imports: ```python import collections import typing ``` Type definitions: Input Types: tasks_group.TasksGroup, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: tasks_group.TasksGroup, v2): v3 = collections.defaultdict(set) if len(v1.tasks) != 1: raise ValueError(f'Er...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[int, int, int] ``` Input Types: List[v0], int Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: List[v0], v3: int=250) -> List[v0]: v4 = [] for v5 in v2: if len(v4) == 0: v4.append...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: try: [v2] = list(v1['stopping_condition']) except ValueError: raise ValueError(f"The simulation config 'stopping_condition' f...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Output Type: Sequence[dm_env.specs.Array] Dependencies: ```python def v1(v2: Sequence[v0], v3: Sequence[bool]) -> Tuple[Sequence[v0], Sequence[v0]]: v4 = [] v5 = [] for (v6, v7) in zip(v3, v2): if v6...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: str v3: float ``` Input Types: Output Type: None Dependencies: ```python def v4(v5: list[str], v6: list[v0], v7: str) -> None: for v8 in v6: if v8.author == v7: v5 = v5 + [v8.title] ```...
Imports: ```python import json import typing ``` Type definitions: Input Types: bool Output Type: Union[str, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> Union[str, Dict]: if v1: return json.dumps(self.__header) return self.__header ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: Tuple[torch.Tensor, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> Tuple[torch.Tensor, torch.Tensor]: if v1.size(0) == v2.size(1): return self.single_forward(v1, v2...
Imports: ```python import datetime as dt import typing ``` Type definitions: Input Types: Output Type: int or None Dependencies: Function Name: v0 Function: ```python def v0(self) -> int or None: v1 = dt.datetime.now() v2 = dt.time(v1.hour, v1.minute, v1.second) for v3 in self._timeSlots: if v3.s...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, Dict, object] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Dict, object]) -> str: if not v1: return '' if isinstance(v1, str): return v1 if isinstance(v1, dict) and ...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Any, Dict[str, Any] Output Type: Type[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: Dict[str, Any]) -> Type[Any]: v3 = v2.pop('class') v4 = v2.pop('state_dict') v5 = inspect.signature(v1).para...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` ```python v1 = TypeVar('U') ``` Input Types: Callable[[v1], v0] Output Type: property Dependencies: ```python @functools.wraps(func) def v2(self: v1) -> v0: if not hasattr(self, specific_name): setattr(self, specific_name...
Imports: ```python import logging 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, **v3) -> None: if self.solver.type == 'lineal': logging.info('Creating element matrices...') se...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._read_stopbit() return self.mm[self.mm.next_slice(v1)].decode() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self.current_method_id self.current_method_id += 1 return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Tuple[float, float]: if self._cache_px_date == v1: return self._cache_px_result try: v2 = self._quotes.index.get_loc(...
Imports: ```python from typing import Any, Callable, Dict, Iterable, List, NewType, Set, Tuple, Type, Union, cast, get_type_hints import typing ``` Type definitions: Input Types: Type[Any], str Output Type: None Dependencies: ```python def v0(v1: Any) -> bool: return isinstance(v1, type(NewType)) ``` Function Name...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: v2 = 50 v3 = ' ' * ((v2 - len(v1)) // 2 - 1) print('=' * v2) print('{}{}'.format(v3, v1)) print('=' * v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.log('Preparing the environment.') self._prepare(v1) self.log('Running commands before the install.') self.__before() self.log('Ru...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Dict[str, Union[bool, np.ndarray]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Dict[str, Union[bool, np.ndarray]]: v2 = {} v3: pd.Series = self.annotations.iloc[v1] v4: Dict[str, Union[boo...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: list, list, int, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list=[1.0, 0.25, 0.125, 0.0625], v2: list=[-35, 35], v3: int=20, v4: bool=True, v5: bool=False): v6 = sorted(v2 * len(v...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[int] Output Type: Dict[int, int] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Iterable[int]) -> Dict[int, int]: v2 = await self.db_pool.simple_select_many_batch(table='state_group_edges', column='prev_state_...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.recNumber = v1[0:20].strip() self.recType = v1[20:40].strip() self.recVersion = v1[40:60].strip() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: v2: str = '' while v2.lower() != 'y' and v2.lower() != 'yes': v2 = input(v1 + ' [y/N] ') if v2.lower() == 'n' and v2.lower() !=...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): for v2 in range(len(v1)): v3 = v1.index(min(v1[v2:])) v4 = v1[v2] v1[v2] = v1[v3] v1[v3] = v4 return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str=fmt_dev, v3: bool=False): v4 = v1.split('-') assert len(v4) in (3, 4) v5 = len(v4) == 4 (v6, v7, v8) = v4[:3] (v9, v10, v1...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], List[str], List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2: List[str], v3: List[str]) -> str: v4 = [f'// HOOK_{hook.macro_name}({hook.args}){{}}' for v5 in self.hooks if v5....
Imports: ```python import typing ``` Type definitions: Input Types: tuple[int, int], tuple[float, float], float, float, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: tuple[int, int], v2: tuple[float, float], v3: float=5.0, v4: float=1.0, v5: float=0.75, v6: float=2.0 / 3...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[dict[str, Any], list[Any], int, float, str, None] ``` Input Types: Output Type: AsyncIterator[tuple[tuple[Union[str, int], ...], v0]] Dependencies: Function Name: v1 Function: ```python async def v1(self) -> AsyncIterator[tuple[tuple[Union[st...
Imports: ```python import math import typing ``` Type definitions: Input Types: Dict[Tuple[Tuple[str, str], Tuple[str, str]], float], List[Tuple[str, str]], Any Output Type: Any Dependencies: ```python def v0(v1: Dict[Tuple[Tuple[str, str], Tuple[str, str]], float], v2: List[Tuple[str, str]], v3: int=None): v4 = 0...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.value = v1 self.next: v0 = None def __repr__(self): return str(self.value) ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: Optional[np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[np.ndarray]: if v1 in self: return self._load_embed_from_disk(v1) elif self.oov_handler is ...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, List[str]], str, str Output Type: List[str] Dependencies: ```python def v0(v1: str, v2: str, v3: str) -> List[str]: return [f"FILTER (regex({v1}, '{v3}'))", f"FILTER (!regex({v2}, '{v3}'))"] ``` ```python def v4(*v7, v5: bool=False, v6:...
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 = '' for (v3, v4) in enumerate(v1): if v4 == ' ': return (v2, v1[v3 + 1:].strip()) if v2.i...
Imports: ```python from urllib import parse import typing ``` Type definitions: Input Types: Union[str, Dict[str, Any], None] Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, Dict[str, Any], None]) -> Dict[str, str]: if not v1: return {} if is...
Imports: ```python import logging from logging import CRITICAL from logging import DEBUG from logging import ERROR from logging import FATAL from logging import INFO from logging import WARN from logging import WARNING import typing ``` Type definitions: Input Types: str Output Type: logging.Logger Dependencies: ```py...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str): v3 = {'tags': ['Management interface settings'], 'operation': 'getNetworkDeviceManagementInterfaceSettings'} v4 = f'/networks/...
Imports: ```python import importlib import os import pathlib import re import subprocess import tempfile import typing ``` Type definitions: Input Types: str Output Type: types.SimpleNamespace Dependencies: ```python def v0(v1: pathlib.Path, v2: pathlib.Path, v3: pathlib.Path): v4 = v2 / 'axes.py' v5 = v3 / 't...
Imports: ```python import nltk import numpy as np from nltk import WordNetLemmatizer import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: np.array Dependencies: ```python def v0(v1) -> list: v2 = nltk.word_tokenize(v1) v2 = [lemmatizer.lemmatize(word.lower()) for v3 in v2] return v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Union[str, List[str]]], Optional[Union[str, List[str]]], Optional[Union[str, List[str]]], Optional[int], int, Optional[bool], Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Union[...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None, v3: int=100): for v4 in range(v3): self.model.train(True) v5 = self._one_epoch(v1) self.train_losses.append(v5) ...
Imports: ```python import random import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: v2 = ['World', 'Sports', 'Business', 'Sci/Tech'] (v3, v4, v5) = ([], [], []) for v6 in zip(v1['text'], v1['label']): ...
Imports: ```python import typing ``` Type definitions: Input Types: int, str, Optional[List[Dict]] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, v3: Optional[List[Dict]]) -> dict: (v4, v5) = self.chroot2distro_arch(v2) v6 = self.distro2compose(v4, v5) ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list: if not isinstance(v1, str): return [] return re.findall('(([0-9])\\2{1,})', v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[float] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[float]) -> float: v2: str = '| ' for v3 in v1: v2 += str(v3) + ' ' v2.strip() v4: Tuple[float, float] = self._mab.predict...
Imports: ```python from asyncio import coroutine, create_task, sleep, to_thread import typing ``` Type definitions: Input Types: Any, List[Dict[str, Any]], int Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python async def v0(v1: Any, v2: List[Dict[str, Any]], v3: int) -> Dict[str, Any]: ...
Imports: ```python import datetime from datetime import timezone import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = datetime.datetime.now(timezone.utc).isoformat(timespec='minutes') return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, bool, bool, bool Output Type: torch.LongTensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v5, v2: bool=True, v3: bool=False, v4: bool=False) -> torch.LongTensor: v6 = self.tokenize(v1, add_special_tokens=v2) ...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str) -> None: v4 = 'udp' v5 = ['sudo', 'iptables', '-A', 'OUTPUT', '-p', v4, '-d', v2, '--destination-port', '5...
Imports: ```python import torch from torch import Tensor import typing ``` Type definitions: Input Types: torch.Tensor, Dict[str, Union[str, int]] Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: Dict[str, Union[str, int]]) -> Tensor: (v1, v3) = v1.sort() v4...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.Namespace Dependencies: Function Name: v0 Function: ```python def v0() -> argparse.Namespace: v1 = argparse.ArgumentParser() v1.add_argument('csv_path', metavar='csv-path', help='Path to csv file with gi...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: if self.d.tablesList_: return self.d.tablesList_ else: return self.sql_inspector.table_names() ```
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[str]) -> str: if len(v1) == 0: return '' elif len(v1) == 1: return v1[0] elif len(v1) == 2: return f'{v1[0]} an...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> int: if v1 >= v2: raise RuntimeError('In the range, low must be lower than high.') return self.rmq_table[v2 - 1][v1] ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: if self._is_c(): v1 = self._cur() if '=' in v1: if ';' in v1: return v1.split('=')[1].split...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str Output Type: (str, str, str) Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> (str, str, str): v3 = [None, None, None] v4 = re.search(v1, v2) for v5 in [1, 2, 3]: v3[v5 - 1] = v4.g...
Imports: ```python import typing ``` Type definitions: Input Types: Iterator[int], polygames.Game, int, int, bool, Optional[tube.DataChannel], Optional[tube.ChannelAssembler], bool, float, float Output Type: Any Dependencies: ```python def v0(v1: polygames.Game, v2: mcts.MctsOption, v3: int, v4: tube.DataChannel, v5: ...
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: int Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> torch.Tensor: v2 = torch.randn(v1) v2 = v2.sign().mul(v2.abs().sqrt()) return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray) -> np.ndarray: return v1 / np.linalg.norm(v1) ``` Function Name: v2 Function: ```python def v2(v3: np.ndarray, v4: np.ndarray) -> np.n...
Imports: ```python import typing ``` Type definitions: Input Types: aw.Document, aw.Document Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: aw.Document, v2: aw.Document): for v3 in v2.lists: for v4 in range(v3.list_levels.count): for v5 in v1.lists: ...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: sys.stdout.write(self.prompt_text) sys.stdout.flush() v1: Optional[str] = None try: v1 = self.input_file...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0() -> dict: v1 = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36 '} return v1 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Callable[[Any], Any] ``` Input Types: str, Optional[str], v0 Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str, v3: Optional[str]=None, v4: v0=lambda a: a) -> None: if v3 is not None: self._name_m...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: biorbd.Model, np.array, np.array, np.array Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: biorbd.Model, v2: np.array, v3: np.array, v4: np.array): v5 = v2[:v1.nbQ()] v6 = v2[v1.nbQ():] v...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self) -> pd.DataFrame: v1 = [] for (v2, v3) in self.to_dict().items(): v3 = v3.rename(v2) if v2 == 'deaths': ...