text
stringlengths
190
325k
Imports: ```python import torch import torch.nn.functional as f from torch import nn, Tensor import typing ``` Type definitions: Input Types: Tensor, Tensor, Tensor, Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Tensor, v3: Tensor, v4: Tensor) -> Tensor: ...
Imports: ```python import typing ``` Type definitions: Input Types: v1.Pipeline, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: v1.Pipeline, v2, v3): self._subpipelines[v1.id] = v1 v4 = {'type': 'SUBPIPELINE', 'pipeline': {'id': v1.id}, 'inputs': [{'data': input...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> dict: v2 = {'user_agent': 'Thin Egress App for userid={0}'.format(v1), 's3': {'addressing_style': 'path'}, 'connect_timeout': 600, 'read_timeou...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2=' PARAPHRASE: ', v3=False): v4 = self.sentence_additions(text=v1, prompt_text=v2, prompt=v3) return v4 ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: str v2: Set['Node'] v3: Set['Node'] v4: NodeType v5: 'DependencyGraph' v6: 'Configuration' v7: Optional[str] v8: bool v9: Optional[List[str]] v10: Optional[List['Node']] v11: Optional[List['Node']]...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: if v1.data.get(v1.app).get('alert_rules', None) is not None: return True return False ```
Imports: ```python import socket import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.socket is None: v1 = socket.getaddrinfo(self.server, self.port, socket.AF_UNSPEC, self.proto) if v1 is None: ...
Imports: ```python import typing ``` Type definitions: Input Types: 'containers.BaseImageCreationContext' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'containers.BaseImageCreationContext') -> None: if not self.verify_install(self.install_location()): raise Assert...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='negative/', v2: str='jpg') -> tuple: v3 = self._get_filenames(v1, v2) return (v3, []) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('EntityType', bound=domain.BaseEntity) ``` Input Types: v0 Output Type: domain.StateDict Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> domain.StateDict: if not (v3 := v2.changed_state()): return {} ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int Output Type: None Dependencies: ```python def v0(v1: LoggingTransaction) -> None: self.db_pool.simple_upsert_txn(v1, table='ratelimit_override', keyvalues={'user_id': user_id}, values={'messages_per_second': messages_per_second, 'bur...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.parser.load_data_set() self.parser.featurize_base() self.parser.featurize_secondary() ```
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[int, ...] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[int, ...]): v2 = tuple((s + pl + pr for (v3, (v4, v5)) in zip(v1, self.padding()))) return v2 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[str, sa.sql.expression.Executable] ``` Input Types: v0, Any Output Type: Any Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: v0, v3=None): async with self.connection(v3) as v4: v5 = await v4.execute(v2) ...
Imports: ```python import numpy as np import tensorflow as tf import typing ``` Type definitions: Input Types: Output Type: tf.keras.Model Dependencies: Function Name: v0 Function: ```python def v0() -> tf.keras.Model: v1 = tf.keras.layers.Input([4]) v2 = tf.keras.layers.Dense(units=2, use_bias=False, name='...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): assert len(v1) == 15 return int(v1, 16) ```
Imports: ```python import os from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str, v2: int=None, v3: int=None, v4: int=None): if not isinstance(v1, Path): v1 = Path(v1) if v2 is not None and v2 != v1.stat().st_uid: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(bpy.types.Operator): v1 = 'skls_browser.open_skls_file' v2 = 'Open .skls file' v3 = 'Opens .skls file with collection of animations. Used to import X-Ray engine animations.' + ' To import select object with X-Ray struct of bones' ...
Imports: ```python import typing ``` Type definitions: ```python class v0(models.Model): v1 = 40 v2 = 40 v3 = 255 v4 = 3000 v5 = 10000 v6 = [u'Google', u'Email', u'GitHub', u'LDAP', u'Dev', u'RemoteUser', u'AzureAD'] v7 = '' v8 = models.CharField(max_length=v1, null=True) v9 = models...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = re.search(self.__ARG_SHORT_EXPRESSION, v1) if v2 is not None and len(v2.groups()) >= 1: return v2.group(0) return None ...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: str, Optional[str], Optional[int], bool, int, int Output Type: Any Dependencies: ```python def v0(v1, **v2): while True: v3 = v1.receive_messages(**v2) if len(v3) == 0: return for v4 in v3: ...
Imports: ```python from urllib.parse import urlparse, parse_qsl import typing ``` Type definitions: Input Types: str Output Type: Tuple[bool, Dict[str, Union[str, int, ItemsView]]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[bool, Dict[str, Union[str, int, ItemsView]]]: v2 = ('tim...
Imports: ```python import os import sys from pathlib import PureWindowsPath, WindowsPath from pathlib import Path import typing ``` Type definitions: Input Types: Path Output Type: dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> dict[str, str]: v2 = os.environ.get('PATH') ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('_ZhaGroupEntityT', bound=type['ZhaGroupEntity']) ``` Input Types: str Output Type: Callable[[v0], v0] Dependencies: ```python def v1(v2: v0) -> v0: self._group_registry[component] = v2 return v2 ``` Function Name: v3 Function: ```pyt...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1='minecraft', v2='air', v3=None) -> dict: if v3: v3 = self.properties_to_string(v3) if v1 in self._definitions['internal']: if ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float | None Dependencies: Function Name: v0 Function: ```python def v0(self) -> float | None: if self.heat_temp_min: return round(self.heat_temp_min, 1) return None ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True): super()._make_model(v1) self.__type_metric._make_model(self.ops['target_variable_representations'], v1) v2 = tf...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> str: v2 = self.load_jinja_template() v3 = self._make_context() return v2.render(**v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Dict[str, str]] Dependencies: Function Name: v0 Function: ```python def v0() -> Dict[str, Dict[str, str]]: v1 = {} v1['name'] = '租車服務' v1['id'] = 'car-rental' v2 = {} v2['motorcycle-rentals'] = '機車出租' v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self.default is not None: v1 = '{0.name}: {0.type}={0.default}'.format(self) else: v1 = '{0.name}: {0.type}'.format(self) return...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: if len(v1) < self.position_end: return self.original_expr = v1[self.position_start:self.position_end] ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = self._get('quotas', admin=True) v1.raise_for_status() return v1.json() ```
Imports: ```python import typing ``` Type definitions: Input Types: str, typing.Sequence[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: typing.Sequence[str]=('dim_1', 'dim_2')): self.dataset = self._dark_subtract(self.dataset, v1, v2) return ```
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(self, v1: np.ndarray) -> np.ndarray: v1 = v1.reshape((self.dim, v1.size // self.dim)) if self.wij_matrix is not None: v2 ...
Imports: ```python import os import matplotlib.pyplot as plt import seaborn as sns import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None): v2 = self.df v2 = v2[v2.normal_tissue == v2.tissue].sort_values('tissue') ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.dataset.source_file = ['Hello', 'World!'] self.assertRaises(TypeError, lambda : self.dataset.get_content()) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = 0 v2 = 1 class v3: def __init__(self, v4: typing.Any=None) -> None: self.children: typing.List[v0.Item] = list() self.parent: typing.Optional[v0.Item] = None self.id: typing.Optional...
Imports: ```python from hashlib import md5 import typing ``` Type definitions: Input Types: str, str, Optional[str] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='', v3: Optional[str]=None, **v4: Union[int, bool, str]) -> dict: if v3 is None: v5 = md5(...
Imports: ```python import typing ``` Type definitions: ```python @dataclass() class v0: v1: int v2: int @staticmethod def v3(v4): if v4.hours > 24 or v4.hours < 0: raise InvalidTimeException('Hours are in invalid range') elif v4.minutes > 60 or v4.minutes < 0: ra...
Imports: ```python from copy import copy import typing ``` Type definitions: Input Types: int, bool Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=None, v2: bool=False) -> pd.DataFrame: v3 = copy(self._data) if v2 and v1: return v3.sample(v1) if ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._executor_thread and self._executor_thread.is_alive(): self._sync_flow_executor.stop() self._executor_thread.join() ```
Imports: ```python import math import typing ``` Type definitions: Input Types: dict, dict, float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: dict, v3: float=6371.0) -> float: v4 = v1['coord']['lat'] v5 = v2['coord']['lat'] v6 = v1['coord']['lon'] v7 = v...
Imports: ```python from collections import defaultdict, deque import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int) -> int: (v3, v4) = (deque([0]), defaultdict[int, int](int)) for v5 in range(1, v2 + 1): ...
Imports: ```python from datetime import datetime, timezone import typing ``` Type definitions: Input Types: Optional[datetime], 'Dialect' Output Type: Optional[datetime] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[datetime], v2: 'Dialect') -> Optional[datetime]: if v1 is not None...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self._database_access(): self._db.execute("DROP TABLE 'index'") self._db_manager_index.clear_cache() self._db_manager_index....
Imports: ```python import typing ``` Type definitions: Input Types: ast.ClassDef Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.ClassDef) -> None: v2 = self.tab * self.indent + f'class Test{v1.name}:' self.lines.extend([v2, self.tab * (self.indent + 1) + f'"""Tests ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: ```python def v0(v1): v2 = v1.get('Galaxy', []) if v2: return [galaxy.get('Name') for v3 in v1.get('Galaxy')] ``` ```python def v4(v5): v6 = v5.get('Object', []) if v6: return [event_...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str, v3: str): if v3 is None: async with self._session.request(v1, self.BASE_URL + v2) as v4: return (v4, await...
Imports: ```python import json import pickle import typing ``` Type definitions: Input Types: bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> str: v2 = {} if self.parent is None or not v1: v3 = self else: v3 = self.root for (v4, ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: int Output Type: Iterator[v0] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: int=0) -> Iterator[v0]: for v3 in self.iter_batches(prefetch_blocks=v2, batch_format='_blocks'): for v4 in v...
Imports: ```python import typing ``` Type definitions: Input Types: float, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: str) -> str: if self.binds_cutoff is not None and v1 >= self.binds_cutoff and (v2 in {'=', '~', '<', '<='}): return 'yes' retu...
Imports: ```python import math import typing ``` Type definitions: Input Types: int, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int, v4: int): if v2 > 1: v5 = math.ceil((v1 - v3 * v4) / v2 + 1) v6 = v2 * (v5 - 1) + v3 * v4 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: ```python def v0(v1): v2 = _HungarianState(v1) v3 = None if 0 in v1.shape else _step1 while v3 is not None: v3 = v3(v2) v4 = np.array(np.where(v2.marked == 1))...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int) -> str: v3 = v2 - v1 v4 = str() v5 = str() v6 = str() v7 = str() v8 = str() v9 = 60 ** 2 v10 = v3 >= v9 v11 = v...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: str v2: str v3: str v4: bytes ``` Input Types: str, str, List[v0] Output Type: Any Dependencies: Function Name: v5 Function: ```python def v5(self, v6: str, v7: str, v8: List[v0]): v9 = (v6, v7) with self...
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.ljust(v2) if len(v3) > v2: v3 = v3[:5] + '…' + v3[6 - v2:] return v3 ```
Imports: ```python import numpy as np from hashlib import md5 from os import makedirs from os import name as os_name from os.path import join, getmtime, isfile import typing ``` Type definitions: Input Types: Any, Any Output Type: Union[np.ndarray, None] Dependencies: Function Name: v0 Function: ```python def v0(self...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('R', contravariant=True) ``` ```python v1 = TypeVar('T') ``` Input Types: Callable[[v1], Tuple[v0, v0]], Iterable[v1] Output Type: Tuple[List[v0], List[v0]] Dependencies: Function Name: v2 Function: ```python def v2(v3: Callable[[v1], Tuple[...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]): v2 = self.converter.create_forwarder_configuration(v1) self.producer.produce(self.topic, value=v2) self.producer.flush() ```
Imports: ```python import json import sys import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.component_identifier() != 'orchestrator': return False try: v1 = self.parse_message() except json....
Imports: ```python import os import typing ``` Type definitions: Input Types: Any Output Type: List[InputExample] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> List[InputExample]: v2 = self._create_examples(self._read_fasta_remote_homology(os.path.join(v1, 'train.fasta')), 'train') r...
Imports: ```python import typing ``` Type definitions: Input Types: s_schema.Schema, bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: s_schema.Schema, *, v2: bool=False) -> str: v3 = super().get_verbosename(v1) if v2: v4 = self.get_subject(v1) if v4 is...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> list: v2 = [] v3 = f'https://www.songkick.com/artists/{v1}/gigography' v4 = self.get_soup(v3) v5 = v4.find('div', class_='component eve...
Imports: ```python import typing ``` Type definitions: Input Types: list, list Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: list) -> int: if len(v2) == 0: return 0 v1.sort(reverse=True) v2.sort(reverse=True) v3 = 0 v4 = 0 for v5 in v1:...
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): v1 = self._user_pipeline(v1) v3 = self._db.get(self.config['libblackburn']['user_database'], v1) v4 = self._password_pipeline(v2...
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._container_client().get_blob_client(v1) v3 = 2097152 v2.max_block_size = v3 v2.max_single_put_size = v3 v2.max_single_get_si...
Imports: ```python import logging import os import shutil import typing ``` Type definitions: Input Types: config.Config Output Type: None Dependencies: ```python def v0(v1: str, v2: str, v3: str, v4=None) -> None: v1 = os.path.join(v1, v3) v2 = os.path.join(v2, v3) logging.info('Copying "%s" to "%s"', v1,...
Imports: ```python import typing ``` Type definitions: Input Types: object Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: object) -> Optional[str]: if hasattr(v1, '__module__') and hasattr(v1, '__qualname__'): return f'{v1.__module__}.{v1.__qualname__}' retur...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if not hasattr(self, 'ticket') or self.ticket is None: return False if not hasattr(self, 'namespace') or self.namespace is None: retu...
Imports: ```python import torch as th import typing ``` Type definitions: Input Types: Optional[bool], Optional[bool] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[bool]=False, v2: Optional[bool]=False): v3 = self.batch_size() v4 = [self.mask] (v5, v6) = ((...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: if not re.search('\\d', v1): return False if not re.search('[a-z]', v1) or not re.search('[A-Z]', v1): ...
Imports: ```python from datetime import timedelta import typing ``` Type definitions: Input Types: float Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float) -> str: v2 = timedelta(seconds=v1) if not v2.microseconds: return str(v2) + '.000' return str(v2) ```
Imports: ```python import os from multiprocessing.context import Process from PIL import Image from tqdm import tqdm import typing ``` Type definitions: Input Types: str, str, bool, int, dict Output Type: Any Dependencies: ```python def v0(v1: int, v2: int, v3: bool): v4 = [transforms.Resize(max(v1, v2), interpola...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('TM', bound='Model') ``` Input Types: Output Type: Callable[..., Coroutine[Any, Any, List[v0]]] Dependencies: ```python async def v1(v2: int) -> v0: v3: v0 = await self._get_one()(v2) await self.db_model.filter(id=v2).delete() re...
Imports: ```python import os import shutil import typing ``` Type definitions: Input Types: str, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: bool=False): if os.path.isfile(v2): if v3: return if os.path.getmtime(v1) == os.p...
Imports: ```python import typing ``` Type definitions: Input Types: 'TreeNode' Output Type: 'int' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'TreeNode') -> 'int': if not v1: return False self.rst = float('-inf') self.helper(v1) return self.rst ```
Imports: ```python from copy import copy import pandas as pd import typing ``` Type definitions: Input Types: str, bool Output Type: 'Daily' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='1D', v2: bool=False) -> 'Daily': v3 = copy(self) v3.data = v3.data.groupby(['station', pd.Group...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[int], bool Output Type: Tuple[List[Dict[str, Any]], int] Dependencies: ```python def v0(v1: Literal['events', 'reports'], v2: int, v3: Union[List[Dict[str, Any]], List[ProcessedAccountingEvent]], v4: bool) -> Tuple[Union[List[Dict[str, Any]],...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: try: self._bound_names.remove(v1) except KeyError: pass else: self._registry.unbind(v1) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Text Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: Text) -> int: v2 = re.search('ckpt-(\\d+)$', v1) return -1 if v2 is None else int(v2.group(1)) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> List[int]: v3 = [] v4 = list(range(1, v2 + 1)) for v5 in range(len(v1)): v6 = v4.index(v1[v5]) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[v0] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[v0]: if isinstance(self.tokenizer.peek_token(), v0): return self.tokenizer.next_token().value return None ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().create_config() with self.open_file('bot.conf'): pass with self.open_file('conf/users.conf'): pass ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: 'Crumb' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> 'Crumb': v2 = self.copy() if not v2.isabs(): v2._path = self._abspath(first_is_basedir=v1) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=0) -> bool: for (v2, v3) in enumerate(self._pipes): try: if v3.poll(v1): (v4, v5, v6) = v3.recv() ...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, bytes Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes, v2: bytes) -> int: if self.direction == 0: return self._compare_internal(v1, v2) else: return -self._compare_internal(v1...
Imports: ```python import typing ``` Type definitions: Input Types: tuple, str Output Type: Cursor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple, v2: str=None) -> Cursor: if v2 is None: v2 = self.db_name self.cursor.execute(f"INSERT INTO {v2} VALUES ({('?,' * len(v1))[:-1]...
Imports: ```python import sys from sys import stdout import typing ``` Type definitions: Input Types: Any, Any, Any, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4: str, v5=False): v6 = v1['code'] try: v7 = v1['make']().value(v4) if not v5: ...
Imports: ```python import typing ``` Type definitions: Input Types: set Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: set): v2 = [] if 'android.support.annotation.NonNull' in v1: v2.append('android.support.annotation.NonNull') v1.remove('android.support....
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.rstrip('0123456789') v3 = v1[len(v2):] return (v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> int: v3 = {} v4 = 0 for v5 in v1: v3[v5] = True for v6 in v2: if v6 in v3: v4 += 1 return ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float) -> bool: if self.higher_is_better(): return v1 > v2 else: return v1 < v2 ```
Imports: ```python import asyncio from asyncio import Future import typing ``` Type definitions: Input Types: bool Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: bool=True) -> None: if v1 == self._intercept_requests: return self._intercept_requests = v1 ...
Imports: ```python import warnings import typing ``` Type definitions: ```python v0 = TypeVar('_FT', bound=Callable[..., Any]) ``` Input Types: None | str Output Type: Callable[[v0], v0] Dependencies: ```python @wraps(func) def v1(*v2: Any, **v3: Any) -> None: if _WARN: v4 = UserWarning(msg) v4.__ca...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): (v2, v3) = ([], []) for v4 in self.par_names: if v4 in v1: v2.append(v1[v4]) v3.append(v1[v4]...
Imports: ```python import torch import typing ``` Type definitions: Input Types: str, str, str, Dict[str, torch.Tensor] Output Type: Tuple[torch.Tensor, Optional[torch.Tensor], Optional[torch.Tensor]] Dependencies: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor) -> bool: return torch.numel(v...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> List[str]: v2 = [] v3 = False for v4 in v1: if 'V' in v4: (v5, v6) = v4.split('-', 1) if v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: tomlkit.container.Container Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tomlkit.container.Container): self._toml_comment(v1, '"true" and "false" are the only valid boolean values') self._toml_comment(...
Imports: ```python import typing ``` Type definitions: Input Types: Exception Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Exception): print('error') print(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> List[str]: if v1 is not None: return v1 return self.dataset[0].covariates.index.to_list() ```