text
stringlengths
190
325k
Imports: ```python import traceback import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python @functools.lru_cache(maxsize=1) def v0(): return _eps() ``` ```python def v1(v2: str, v3: str) -> EntryPoint: v4 = v0().select(group=v2, name=v3) if v3 not in v4.names: ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: ```python def v0(v1: str, v2: int) -> int: v3 = 1 assert v1[v2] == '{' v4 = v2 + 1 while v4 < len(v1): if v1[v4] == '{': v3 += 1 elif v1[v4] == '}': ...
Imports: ```python import torch from torch import Tensor import torch.nn as nn import typing ``` Type definitions: Input Types: Any, Any, List, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: List, v4): (v5, v6) = ([t_sub[0] for v7 in v3], [v7[-1] for v7 in v3]) (v5...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('Position', 'column row') ``` Input Types: v0, v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: v0): v4 = self._remove_object(v2) if not v4: raise ValueError('Trying to move ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = set() v2 = {self._initial_state} while not v2 <= v1: v1 |= v2 v3 = v2.copy() v2 = set() for v4 in v3: ...
Imports: ```python import tensorflow.compat.v2 as tf import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, tf.Tensor, float, Tuple[float, float], Tuple[float, float], int Output Type: tf.Tensor Dependencies: ```python def v0(v1, v2): if v1.dtype == tf.dtypes.string: v3 = tf.image.decode_an...
Imports: ```python import functools import operator import numpy as np import typing ``` Type definitions: Input Types: Mapping[str, Any] Output Type: Iterable[Tuple[str, int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping[str, Any]) -> Iterable[Tuple[str, int]]: for (v2, v3) in sel...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: tuple Dependencies: ```python def v0(v1: str) -> bool: v2 = ET.parse(config_xml_schema.xsd) v3 = ET.XMLSchema(v2) return v3.validate(ET.parse(v1)) ``` ```python def v4(v5: str) -> DetectorCharacteristics...
Imports: ```python import typing ``` Type definitions: Input Types: List[date], Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[date], v2, v3): v1 = [[x.toordinal()] for v4 in v1] self._model1.fit(v1, v2) self._model2.fit(v1, v3) ```
Imports: ```python import os import argparse import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: ```python def v0() -> Any: v1 = argparse.ArgumentParser() v1.add_argument('--data_dir', default='', type=str, help='Directory where the sequences (csv files) are...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> None: v3 = {'output_index': v1[:, -1].astype(int)} self.gpy_model.update_model(False) self.gpy_mo...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: self._get_main() v2 = re.findall('id="post_to_country_as".*?<option value="(\\d?)">.*?</option>.*</select>', self.r.text, re.S ...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: typing.NoReturn Dependencies: Function Name: v0 Function: ```python def v0() -> typing.NoReturn: v1 = int(input()) v2 = list(map(int, sys.stdin.read().split())) v3 = min(v2) v4 = (v1 + v3 - 1) // v3 + 4 pr...
Imports: ```python import torch import torch.nn.functional as F from torch.distributions import AffineTransform, TransformedDistribution import typing ``` Type definitions: Input Types: torch.Tensor, Optional[int] Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Ten...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2=None, **v3): self.set_params(**v3) v4 = self.sinusoidal_model.fit(v1, v2).tracks_ self.param_matrix_ =...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Dict[int, Any] Dependencies: ```python def v0(v1: int) -> Optional[str]: if v1 == self.selection: return 'select' if v1 == self.previous_selection: return 'prev' return None ``` Function Name: v2 Function: ...
Imports: ```python import matplotlib.pyplot as plt from sklearn.metrics import classification_report, confusion_matrix import numpy as np import typing ``` Type definitions: Input Types: Any, Any, Any, list, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4: list=None, v5:...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = 0 for v2 in self.tracks: for v3 in v2.segments: v1 += len(v3.points) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: bool, Sequence[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool, v2: Sequence[int]): v3 = self._bot._conn.cursor() with self._bot._conn: v3.executemany('\n INSERT INTO user...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Doc, Span] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[Doc, Span]) -> str: v2 = '' for v3 in v1: v2 += v3.lemma_ v2 += v3.whitespace_ return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Any) -> Dict[str, Any]: v2: Dict[str, Any] = v1.__dict__.copy() return v2 ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='cp2k.inp', v2: str='.', v3: bool=True): if not os.path.isdir(v2) and v3: os.mkdir(v2) v4 = os.path.join(v2, v1) wi...
Imports: ```python import typing ``` Type definitions: Input Types: list[list[int]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[list[int]]) -> int: v2 = 0 for v3 in v1: if v3[-1] >= 0: continue if v3[0] < 0: v2 += len(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.login('hamlet') v1 = self.send_stream_message(self.example_user('hamlet'), 'Scotland', topic_name='editing', content='/poll Games?\nYES\nNO') ...
Imports: ```python import numpy as np from sklearn import decomposition import math import multiprocessing import typing ``` Type definitions: Input Types: np.ndarray, int, float, int, Any, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2): v3 = np.zeros([np.shape(v1)[0]]) for v4 in range(1...
Imports: ```python import typing ``` Type definitions: Input Types: ast.VariableDeclaration Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.VariableDeclaration): if v1.value: self.visit(v1.value) self.visit_list(v1.variables) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int]) -> int: v2 = len(v1) v3 = [1] * v2 for v4 in range(1, v2): for v5 in range(0, v4): if v1[v5] < v1[v4]: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, m.Message Output Type: None Dependencies: ```python def v0(self) -> List[Tuple[str, str]]: return [('help | usage | ?', 'Print all available commands')] ``` Function Name: v1 Function: ```python async def v1(self, v2: str, v3: str, v4: m...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Dict[str, Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: Dict[str, Any]): v3 = ', '.join((f'{c}' for v4 in v2['columns'])) if 'columns' in v2 else '*' v5 = v2.get('partitioned') is True ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.val = v1 self.left = None self.right = None ``` Input Types: v0 Output Type: bool Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0) -> bool: if not v3: ...
Imports: ```python import glob import csv import typing ``` Type definitions: Input Types: str Output Type: List[Tuple[int, int, int, int]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[Tuple[int, int, int, int]]: v2 = glob.glob(v1 + '*.csv') v3: List[Tuple[int, int, int, int]] =...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3, v4, v5: bool): v6 = self.get_decorator_string() if v3 == 'post': return v6 + self.get_request_post_template(v1, v2,...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with open(self.FILE_NAME, 'r', encoding='utf8') as v1: self._file = v1.readlines() ```
Imports: ```python import typing ``` Type definitions: Input Types: etree.Element Output Type: dict Dependencies: ```python def v0(v1: etree.Element, v2: list) -> dict: v3 = dict() for v4 in v1: if callable(v4.tag): continue elif v4.tag in v2: if v4.tag not in v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.bg: self.screen.blit(self.surface, self.get_coord()) else: self.screen.blit(self.surface.convert_alpha(), self.get_coord()) `...
Imports: ```python import math import typing ``` Type definitions: Input Types: List[int] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int]) -> float: v2 = sum(v1) / len(v1) v3 = sum(((element - v2) ** 2 for v4 in v1)) / len(v1) return math.sqrt(v3) ```
Imports: ```python from decimal import Decimal import typing ``` Type definitions: Input Types: int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int=8) -> str: v3 = pow(10, v2) return '{:.8f}'.format(Decimal(v1) / v3).rstrip('0').rstrip('.') ```
Imports: ```python from http import HTTPStatus import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.url_prefix % '@bob:test' v2 = self.make_request('PUT', v1, access_token=self.admin_user_tok, content={'password...
Imports: ```python from collections import Counter, defaultdict import typing ``` Type definitions: ```python class v0: def __init__(self, v1: dict) -> None: self.smarts = {k: v[0] for (v2, v3) in v1.items()} self.logp_contributions = {v2: v3[1] for (v2, v3) in v1.items()} self.mr_contribut...
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._io_stdout is None: return None return self._io_stdout.getvalue() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.copy(source=self.installationFiles[-1], destination=self.defaultModulePath) self.copy(source=f'{self.draggedFromPath}/{self.moduleName}', destin...
Imports: ```python import typing ``` Type definitions: Input Types: commands.Context Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: commands.Context): self._author_id = v1.author.id v2 = await self._source.get_page(self.current_page) v3 = await self._get_kwargs...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: bool v2: int v3: int v4: str v5: str v6: bool v7: str v8: int v9: int v10: str v11: str v12: str v13: Dict[str, ModelsDeploymentConfigOverride] v14: Dict[str, ModelsPodCountConfi...
Imports: ```python import typing ``` Type definitions: Input Types: Any, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: list): v3 = list(v1.keys()) for v4 in v3: for (v5, v6) in v2: if v5 in v4: v7 = v4.replace(v5, v6) ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: float): self.m00 = float(v1) self.m01 = float(v2) self.m02 = float(v3) ```
Imports: ```python import typing import warnings from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional, Tuple, Type, TypeVar, Union, overload import typing ``` Type definitions: ```python class v0: v1 = ['previous_context', 'name', 'parent_context', '_resource_usage', 'usage_start', 'main_thread', 'f...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: while len(self._cache) > self._max_size: (v1, v2) = self._cache.popitem(0) self._earliest_known_stream_pos = max(v1, self._earliest_known...
Imports: ```python import typing ``` Type definitions: Input Types: List[bytes] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[bytes]) -> None: super()._cache_static_data(resp=v1) self.env_id = self.get_unique_id() ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = None v2 = set() def __init__(self, v3: Optional[inspector.CallInfo]=None, v4: Optional[str]=None): if v3 is None: v5 = inspector.non_init_caller_frameinfo().frame.f_globals['__name__'] v3 = inspe...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> List[str]: v2 = v1.get('type', None) v3 = v1.get('anyOf', None) v4 = [] if isinstance(v2, list): v4.extend(v2) elif ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = True if len(self.ingredients) + v1 <= self.capacity else False return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, tuple Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: tuple=(255, 255, 255)) -> np.ndarray: v1 = v1[..., None] v3 = np.concatenate(3 * [v1], axis=-1) * v2 ...
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, v3: int=0): if self.should_render(): self.print_and_log(v1, v2, step=v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor, v4: torch.Tensor) -> torch.Tensor: v1 = self.s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> dict: v2 = {} for (v3, v4) in v1.items(): if v3 in self.space.real_names: v5 = np.random.normal() * se...
Imports: ```python import logging import timeit import typing ``` Type definitions: Input Types: List[str] Output Type: List[List[int]] Dependencies: ```python def v0(): return timeit.default_timer() ``` ```python def v1(v2): return int(v0() - v2) ``` Function Name: v3 Function: ```python def v3(self, v4: List...
Imports: ```python import warnings import typing ``` Type definitions: Input Types: str, Dict[str, Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict[str, Any]): if 'prototype' not in v2[v1]: return v3 = v2[v1]['prototype'] v4 = [] if v3 in...
Imports: ```python import math import typing ``` Type definitions: Input Types: Any, Any, Any, int, int, float Output Type: None Dependencies: ```python def v0(v1: int, v2: int) -> List[float]: v3 = bin(int(v1))[2:].zfill(v2) v4 = [0.0] * v2 for v5 in range(v2): for v6 in range(v5, v2): ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> List[str]: v2 = 'SELECT name from modules where name like ? order by idx ASC' v3 = self._conn.execute(v2, [v1.replace('*', '%')]) retu...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3 = f'@echo off\n\n{v2} enunu.py %*\n\nPAUSE\n' with open(v1, 'w') as v4: v4.write(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().setUp() self.permission_test_model = {'mediafile/7': {'meeting_id': 1, 'is_directory': True}, 'mediafile/8': {'meeting_id': 1, 'is_directory'...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2, v3: bool=True): if v3 or not self._annotations.get(v1): self._annotations[v1] = str(v2) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Any, v2: Any, v3: Optional['TreeNode']=None, v4: Optional['TreeNode']=None, v5: Optional['TreeNode']=None): self._key = v1 self._payload = v2 self._left_child = v3 self._right_child = v...
Imports: ```python import typing ``` Type definitions: Input Types: List, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List, v2: int): (v3, v4) = (0, len(v1) - 1) while v3 <= v4: v5 = v3 + (v4 - v3) // 2 if v1[v5] < v2: v3 = v5 + 1 els...
Imports: ```python import typing ``` Type definitions: Input Types: os.PathLike Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: os.PathLike) -> None: with open(v1, mode='w') as v2: v2.write(self.dumps()) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = list(self.dt.group_type_names()) self.assertEqual(len(v1), 23) self.assertEqual(v1[0].slug, 'adhoc') self.assertEqual(v1[1].slug, 'adm')...
Imports: ```python import typing ``` Type definitions: Input Types: ast.Expr Output Type: ast.Expr Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Expr) -> ast.Expr: v1.value = self.modify_expr(v1.value, print_it=True) super().generic_visit(v1) return v1 ```
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.Namespace Dependencies: Function Name: v0 Function: ```python def v0(*v1: str) -> argparse.Namespace: v2 = argparse.ArgumentParser(prog='git check', description=__doc__) v2.add_argument('filename', nargs...
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable=None): self.plot = {} self.cx = v1 self.states._cx = self.cx() self.controls._cx = self.cx() self.J = [] self.g = [] s...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: with open(self.data_file, 'rb') as v1: v2 = pickle.load(v1) v3 = {} for v4 in v2: v4['Description'] = self.combine_...
Imports: ```python import hashlib import hmac from base64 import b64decode from base64 import b64encode from urllib.parse import urlencode import typing ``` Type definitions: Input Types: str, Dict[str, Any] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict[str, Any])...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1): return struct.unpack('L', struct.pack('l', v1))[0] ``` ```python @contextmanager def v2(): try: yield except pywintypes.com_error as err: if err.excepinfo: ...
Imports: ```python import typing ``` Type definitions: Input Types: 'sphinx.application.Sphinx' Output Type: None Dependencies: ```python def v0(v1, v2, v3, v4, v5, v6): if len(v6) == 0: logger.warning(sphinx.locale.__(f'{v2} {v3} is undocumented')) v6.append(f'.. Warning:: {v2} ``{v3}`` undocument...
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: Dict[int, int] = {} for (v4, v5) in enumerate(v1): if v5 in v3 and (v6 := v3[v5]) != v4: ...
Imports: ```python import typing ``` Type definitions: Input Types: list[int], int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list[int], v2: int): v3 = 0 for v4 in v1: if v4 != v2: v3 += v4 return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: 'ProjectionContext', 'ProjectionAttributeStateSet', 'CdmAttributeContext' Output Type: 'ProjectionAttributeStateSet' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'ProjectionContext', v2: 'ProjectionAttributeStateSet', v3: 'Cdm...
Imports: ```python import typing ``` Type definitions: Input Types: int, bytes Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: bytes) -> List[Any]: v3 = v2.split(b'\x00') assert v3.pop() == b'' assert len(v3) % v1 == 0, v3 return [v3[i:i + v1] for v4 in r...
Imports: ```python import difflib import logging import typing ``` Type definitions: Input Types: Sequence[Hashable], Sequence[Hashable], bool Output Type: float Dependencies: ```python def v0(v1: Sequence[Hashable], v2: Sequence[Hashable], v3: bool=False) -> float: if v1 == v2: v4 = len(v1) return...
Imports: ```python import numpy as np import cv2 import typing ``` Type definitions: Input Types: Any Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> np.array: v1 = cv2.resize(v1, (int(self.input_shape[1]), int(self.input_shape[2]))) if self.model.name != 'Efficie...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[BaseException] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[BaseException]=None) -> None: super().connection_lost(v1) if not self.conn_made_fur.done(): v2 = ConnectionError()...
Imports: ```python import typing ``` Type definitions: Input Types: [], [] Output Type: [] Dependencies: Function Name: v0 Function: ```python def v0(v1: [], v2: []) -> []: for v3 in v2: v1.append(v3) return v1 ```
Imports: ```python import logging import os import typing ``` Type definitions: Input Types: dict Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> list: v2 = list() for (v3, v4) in v1.items(): if isinstance(v4, str): v2.append(os.path.join(v3,...
Imports: ```python import scipy.sparse as sps import typing ``` Type definitions: Input Types: pd.DataFrame, List[pd.DataFrame] Output Type: sps.csr_matrix Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame, v2: List[pd.DataFrame]=[]) -> sps.csr_matrix: v3: List[sps.csr_matrix] = []...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, str]) -> None: v2 = v1.get('ig-set-www-claim') if v2 is not None: self.state.www_claim = v2 v3 = v1.get('ig-set-author...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: str): async with self.config.guild(v1.guild).whois_dict() as v3: v4 = v3.get(v2, None) return v4 ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: str Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> tf.Tensor: v2 = tf.io.read_file(v1) v3 = tf.image.decode_png(v2, channels=self.IMG_C) v3 = tf.image.convert_im...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: typing.List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> typing.List[str]: v2 = self.traj assert v2 is not None v3 = [] v1 = v1.lower() if v1 not in ['def', ...
Imports: ```python import typing ``` Type definitions: Input Types: 'CThostFtdcInputOrderField', 'CThostFtdcRspInfoField', 'int', 'bool' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'CThostFtdcInputOrderField', v2: 'CThostFtdcRspInfoField', v3: 'int', v4: 'bool'): if v2.Er...
Imports: ```python import torch from torch import nn import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = v1.lower() if v1 == 'elu': return nn.ELU elif v1 in ['leakyrelu', 'lrelu', 'leaky_relu']: ret...
Imports: ```python import typing ``` Type definitions: Input Types: Union[StopIteration, 'Return'] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[StopIteration, 'Return']) -> Any: try: return v1.value except AttributeError: pass try: return v1...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: ValueNode Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool) -> ValueNode: v2 = self._parse_value_literal_method_names.get(self._lexer.token.kind) if v2: return getattr(self, f'parse_{v2}')(v1...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> list: v2 = (response.result() for v3 in v1) v4 = [r.json() if r.status_code == 200 else None for v5 in v2] return v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in self.game.get_all_players(): v1.refresh_skills_list() ```
Imports: ```python import json import re import shutil import subprocess import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: ```python def v0(v1: List[str]): if shutil.which(constants.COMPAREMATRIX_GO_CMD): v2 = ','.join(v1) print(v2) v3 = subprocess.ru...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = (self.state.speed - v1.state.speed) / (v1.state.position - self.state.position) if v1.state.speed > 0 > v1.state.accel...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: v2 = self.__to_cardinal(v1) v3 = [] for v4 in v2.split(): if v4 != 'tre' and v4[-3:] == 'tre': v4 = v4[:-3] + 'tré'...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = [(label.label, label.is_required) for v2 in self.labels if v2.is_path] v3 = ['def thunk(labels):'] if not v1: v3 += [' return []'] ...
Imports: ```python import warnings import typing ``` Type definitions: Input Types: Dict, Dict, Optional[List[str]] Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict, v2: Dict, v3: Optional[List[str]]=None) -> Dict: if v3 is None: v3 = [] for (v4, v5) in v2.it...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): @dataclass class v1: v2: str v3: list[int] def v4(self) -> 'Step.Key': return v0.Key(self.guid, self.path) def v5(self) -> dict[str, str]: return {'guid': self.guid, 'pat...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = set(v1).intersection(set(self.supported_ticker_formats)) if not v2: raise NotImplementedError(f"No supported ticker format in {v1})...