text
stringlengths
190
325k
Imports: ```python import asyncio from asyncio import TimerHandle, iscoroutinefunction import typing ``` Type definitions: ```python class v0: def __init__(self, v1: TaskScheduler, v2: Coro, v3: float): self._scheduler = v1 self.coro = v2 self.delay = v3 self._handle: Optional[Timer...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None): self.switch_to_pdf_document(v1) if self.rpa_pdf_document is None: self.parse_pdf() return self.rpa_pdf_document.dump_xml() ```
Imports: ```python import typing ``` Type definitions: ```python @dataclasses.dataclass(frozen=True) class v0: v1: descriptor_pb2.FieldDescriptorProto v2: 'MessageType' = None v3: 'EnumType' = None v4: metadata.Metadata = dataclasses.field(default_factory=metadata.Metadata) def v5(self, v6): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, str Output Type: str Dependencies: ```python def v0(v1): try: v1 = interpret_value(v1) except: pass if v1 is None: v2 = 'blank' elif isinstance(v1, integer_types): v2 = 'an integer' elif is...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if v1 == 'SP': return 'proprietor' elif v1 == 'GP': return 'partner' else: return None ```
Imports: ```python from dataclasses import MISSING, Field, field, fields, is_dataclass from inspect import signature import typing ``` Type definitions: Input Types: Callable Output Type: Iterator[Field] Dependencies: ```python def v0(v1=MISSING, /, *, v2=None, v3=MISSING, v4=True, v5=True, v6=None, v7=None, v8=True, ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: v2: Dict[int, bytes] = self.to_packet_cache v3: int for v3 in sorted(v2.keys()): if v3 < v1 and len(v2) > 1: del ...
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if not self.is_tracking_weights: raise Exception('track_weights is off') with torch.no_grad(): ...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Tuple[int, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: str) -> Tuple[int, str]: if v2 not in ['error', 'warnings', 'test']: return (v1, v2) v2 = v2.replace('warnings', 'warning') ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, str]) -> Any: (v2, v1) = self.loader.predict_load_sample(v1) v3 = getattr(self, 'input_transform_fn', None) if v3: v2 =...
Imports: ```python import PIL import numpy as np import matplotlib as plt import typing ``` Type definitions: Input Types: str, np.ndarray, np.ndarray, np.ndarray, List[str], float, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: np.ndarray, v3: np.ndarray, v4: np.ndarray,...
Imports: ```python import torch from torch.nn.utils.rnn import pad_sequence from torch.utils.data import DataLoader, Dataset, RandomSampler, SequentialSampler from torch.utils.data.distributed import DistributedSampler import typing ``` Type definitions: Input Types: torch.Tensor, PreTrainedTokenizer, Any, Optional[di...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): v2 = self._get_nodes_optimized_sparsities(v1, balance_perf_loss=1.0, settings=None) for (v3, v4) in v2.items(): self._nodes_settings[v...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[List[str]], bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[List[str]]=None, v2: bool=False): v1 = self._parse_names(v1, 'models') for v3 in v1: yield self.get_models(v3, re...
Imports: ```python import typing ``` Type definitions: ```python v0 = Optional[int] ``` Input Types: v0 Output Type: Optional[int] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> Optional[int]: if v2 is not None: try: v2 = int(v2) except ValueError: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if not 3 <= len(v1) <= 28: raise ValueError(f'invalid domain name ({v1}) - bad length ({len(v1)})') for v2 in v1: if not ('a' <= v2 <= '...
Imports: ```python import typing ``` Type definitions: Input Types: Tensor Output Type: Tuple[Tensor, Tuple[Tensor, Tensor]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor) -> Tuple[Tensor, Tuple[Tensor, Tensor]]: v2 = self.encoder(v1) v3 = self.hyper_encoder(v2) (v4, v5) = se...
Imports: ```python import typing ``` Type definitions: Input Types: _ArgumentGroup Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: _ArgumentGroup): if (v2 := self.get_group_index_pos(v1)) > 0: self._action_groups.remove(v1) self._action_groups.insert(v2 - 1, v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self.stack return sorted(v1)[0] ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List: v2 = self.client.show_blocks(v1) v3 = [] for (v4, v5) in enumerate(v2.split(' ---------------\n')): if v4 == 0: c...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if hasattr(self._executor, '_counts'): v1 = self._executor._counts else: v1 = self._counter.get_counts() v2 = v1.get(self._counte...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterator[Optional[Dict]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator[Optional[Dict]]: v1 = {'resourceNames': ['projects/{project_id}'.format(project_id=self.project_id)], 'pageSize': self.pagesize, '...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Any: if v1 not in self._splittable_variables: return None v2 = self._max_values_cache[v1] v3 = np.random.choice(s...
Imports: ```python import base64 import typing ``` Type definitions: Input Types: Callable[[Any], str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable[[Any], str], *v2: Tuple[Any, ...], **v3: Dict[str, Any]) -> str: v4 = v1.__module__ + '.' + v1.__name__ + '.' + str(v2) + ...
Imports: ```python import typing ``` Type definitions: ```python class v0(LookMlObject): def __init__(self, v1: str, v2: str, v3: List[Dimension]=None): self.name = v1 self.model_name = v2 self.dimensions = [] if v3 is None else v3 self.errors: List[ValidationError] = [] sel...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> List[List[int]]: v2 = {} for v3 in v1: v2[v3] = v2.get(v3, 0) + 1 v4 = [[]] for v5 in v2: v6 = s...
Imports: ```python from copy import copy from pathlib import Path import typing ``` Type definitions: Input Types: dict, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2=True): self.template_config = copy(v1) self.template_config['base_path'] = Path('/'.join([...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: int=None) -> bool: if isinstance(v1, (list, tuple)): if v2 != None: if len(v1) != v2: return False for v3 in...
Imports: ```python import torch import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: int=200) -> np.ndarray: v4 = v2.shape[1:] v5 = 'cuda' if torch.cuda.is_available()...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[float] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[float]) -> None: self._check_min(v1) self._min_value = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, typing.Callable[[], None] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: typing.Callable[[], None]): try: v2() except Exception as e: self.panic("Exception on '%s' thread" %...
Imports: ```python import typing ``` Type definitions: Input Types: Exception Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Exception=None): print('lexdriver.py <file>\n\n <file>:\n Source code file ending with the extension .src\n') if v1: print(v1) exi...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1) -> int: if v1 < 0: return -1 elif v1 == 0: return 0 elif v1 == 1: return 1 v2 = 0 v3 = 0 v4 = 1 for v5 in range(2,...
Imports: ```python 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: v3 = self.discriminator(v1) v4 = self._adv_loss(v3, ones=True) (v5,...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = ['[*;!r;!H0:1]~[*;!r:2]~[*;!r;!H0:3]>>[*:1]1~[*:2]~[*:3]1', '[*;!r;!H0:1]~[*!r:2]~[*!r:3]~[*;!r;!H0:4]>>[*:1]1~[*:2]~[*:3]~[*:4]1', '[*...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> None: if not self.components: raise NotImplementedError for v3 in self.components: v3.apply(*v1, **v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: ray.tune.trial.Trial Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ray.tune.trial.Trial): global trial_num v2 = v2 + 1 v3 = v1.trainable_name + '_' + str(v2) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.example_email('hamlet') v2 = self.client_post('/accounts/home/', {'email': v1}) self.assertEqual(v2.status_code, 302) self.assertIn...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict=None) -> dict: if v1 is None: v1 = {} if 'deleted' not in v1: v1['deleted'] = False return v1 ```
Imports: ```python import torch from torch import nn as nn from torch.nn import functional as F import typing ``` Type definitions: Input Types: int, Optional[torch.Tensor], Optional[torch.Tensor], Optional[str] Output Type: Tuple[torch.Tensor, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> dict: v2 = re.search('day:(\\d{0,2})', v1) v3 = re.search('month:(\\d{0,2})', v1) v4 = re.search('year:(\\d{0,4})', v1) return {'nu...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[float, float] ``` Input Types: List[v0] Output Type: float Dependencies: Function Name: v1 Function: ```python def v1(v2: List[v0]) -> float: v3 = 0 (v4, v5) = v2[-1] for (v6, v7) in v2: v3 += v6 * v5 - v7 * v4 (v4,...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: v1 = PermissionError('[WinError 5] Access is denied') setattr(v1, 'winerror', 5) raise v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.firing_timer.is_active and self.current_direction: if self._valid_next_direction(self.current_direction): return self...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1): return (analyze_function(v1), []) ``` ```python def v2(v3: List[object], v4: List[int]) -> List[object]: ... ``` Function Name: v5 Function: ```python def v5(self) -> None: def v6(v7:...
Imports: ```python import math import typing ``` Type definitions: ```python @dataclass class v0: v1: float = 120 v2: float = 1 v3: float = 33000 v4: float = 16500 v5: float = 0.001 v6: float = 1.8 v7: float = 0 def v8(self) -> float: return self.m - self.n def v9(self) -> ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[List[int]], bool, bool Output Type: str Dependencies: ```python def v0(v1: List[int]) -> str: if not v1: raise ValueError('Expecting at least one alinea.') if _is_range_of_size_at_least_2(v1): return f'Les alinéas n°{m...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[LegacyQuery, Select] ``` ```python class v1(Collection, Generic[T]): v2: Meta ``` ```python v3 = Callable[[v0, Optional[bool]], v1[T]] ``` ```python class v4(SqlaSession): def v5(cls, v6: Request) -> SqlaSession: """Yield the s...
Imports: ```python import random import math import typing ``` Type definitions: Input Types: Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> float: v3 = [] for (v4, v5) in v1: v6 = v5 * math.exp(v2 * random.normalvariate(0, 1)) v7 = v4 +...
Imports: ```python import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import PathPatch from matplotlib.path import Path import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: Any Dependencies: ```python def v0(v1, v2): return np.convolve(v1, np.ones(v2), 'valid')...
Imports: ```python import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str, v2: int, v3: Dict[str, Any]): v4 = v3.get('testname', '') return f'{v1}_{v2}_{v4}' ``` Function Name: v5 Function: ```python def v5(self) -> None: f...
Imports: ```python import tempfile import typing ``` Type definitions: Input Types: Path, bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Path, v2: bool=False) -> bool: try: if not v1.exists(): if not v2: return False v1.mkdir(p...
Imports: ```python import os import torch import pickle import typing ``` Type definitions: Input Types: str, Optional[bool] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[bool]=False): v3 = os.path.join(v1, 'cond_params.pt') v4 = os.path.join(v1, 'adap...
Imports: ```python from os import path import zipfile import json import requests import typing ``` Type definitions: Input Types: dict Output Type: list Dependencies: ```python def v0(v1: str, v2: int, v3: int) -> list: v4 = [] v5 = set() v6 = 0 print('Start loading ArXiv dataset -----------:', v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, dict, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: dict, v3=''): v4 = v1.client('elbv2') v5 = v2['id'] v4.delete_load_balancer(LoadBalancerArn=v5) ```
Imports: ```python import os from json import load import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> dict: with open(os.getcwd() + '/neverglowbot/resources/idol_data.json', 'r') as v2: v3 = load(v2) return v3[v...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Dict[str, int]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Dict[str, int]]): if self._indexed_labels is None and self.labels is not None: for v2 in self.labels: v1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> float: v2 = self.nsamps(v1) return v2 / self.sr ```
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: types.Image, types.Coordinates2D Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: types.Image, v2: types.Coordinates2D): v2 = v2.reshape((-1, 1, 2)).astype(np.int32) v3 = np.zeros_l...
Imports: ```python from collections import deque import typing ``` Type definitions: Input Types: str Output Type: deque Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> deque: with open(v1, mode='rb') as v2: v3 = v2.readlines() v3 = deque(v3) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: xr.DataArray, xr.DataArray, str Output Type: xr.DataArray Dependencies: Function Name: v0 Function: ```python def v0(v1: xr.DataArray, v2: xr.DataArray, v3: str) -> xr.DataArray: for v4 in v2[v3].coords: v1 = v1.assign_coords({v4: (v3, v2...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1): v2 = os.path.abspath(os.path.dirname(v1)) if not os.path.exists(v2): os.makedirs(v2) ``` Function Name: v3 Function: ```python def v3(v4: str, v5: str): v0(v4)...
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: for v3 in range(self.que.rowCount()): if self.que.item(v3, 3).text() == v1 or self.que.item(v3, 3).text() == v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bytes Dependencies: ```python def v0(v1: str, *, v2=None) -> bytes: if v2 is None: v2 = constants.net return v2.XPRV_HEADERS[v1].to_bytes(length=4, byteorder='big') ``` Function Name: v3 Function: ```python def v3(self...
Imports: ```python from PIL import Image import numpy as np import typing ``` Type definitions: Input Types: str, Any, Any, Any, Any, Any, Any Output Type: Any Dependencies: ```python @jit(nopython=True) def v0(v1, v2): v3 = np.inf v4 = None v1 = np.clip(v1, 0, 255) (v5, v6, v7) = v1 for (v8, (v9, ...
Imports: ```python import typing ``` Type definitions: Input Types: Type, Union[int, sip.simplewrapper], bool, Type Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Type, v2: Union[int, sip.simplewrapper], v3: bool=False, v4: Type=None) -> str: if v4 is None: v4 = v2.__class...
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 = v1.copy() v2.sort() v3 = 0 v4 = len(v1) - 1 while v3 < v4 < len(v1): v5 = 1 if v2[v3] == v1[v3...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: ```python def v0(v1): if v1 == 0: return False elif v1 == 1: return True elif v1 % 2 == 0: return v0(v1 // 2) elif v1 % 3 == 0: return v0(v1 // 3) elif v1 % 5 == 0...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '<?hh\n\ninterface I0 extends I1 {\npublic function bar(): void;\n}\ninterface I1 {\npublic function bar(): void;\n}\n' self.obj._add_interface...
Imports: ```python import json import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): with open(self.saved_path) as v2: v3 = json.load(v2) v4 = [a['id'] for v5 in v3] if v1['id'] not in v4: v3 = [v1...
Imports: ```python from tqdm import tqdm import typing ``` Type definitions: Input Types: List[str], Any, bool Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2=False, v3: bool=False) -> List[str]: v4 = [] for v5 in tqdm(v1): try: v6 ...
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, 'body') or self.body is None: return False if not hasattr(self, 'namespace') or self.namespace is None: return F...
Imports: ```python import logging import numpy as np import typing ``` Type definitions: Input Types: core.Angle Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: core.Angle) -> bool: v2 = self.locate_angle(v1) if 0 <= v2[0] < self.shape[0] and 0 <= v2[1] < self.shape[1]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.mmd_estimator = self._compute_mmd() return ```
Imports: ```python import csv from pathlib import Path import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: ```python def v0(v1: dict): v2 = 0 v3 = {} for v4 in v1['runs']: v5 = Path(v4['fullPath']) / 'results.csv' with open(v5, 'r') as v6: v7 = c...
Imports: ```python import sys import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[str]: v2 = sys.stdin if v1 == '-' else open(v1) return v2.read().splitlines() ```
Imports: ```python import subprocess import sys import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = str(subprocess.check_output([sys.executable, '-m', 'pip', 'list', '--outdated', '--disable-pip-version-check'])) if v1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: pv.EnviroBuilder Dependencies: Function Name: v0 Function: ```python def v0(self) -> pv.EnviroBuilder: self._define_package_to_run() v1 = self.launch_package(self._args.package, no_check=self._args.no_check) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> None: self.__register_event(self.node_id, 0, 'quitting') self.last_flush_on_quitting() ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Lock=Locked(0), v2: Opener=Inactive(0), v3: bool=False, v4: float=0.0, v5: bool=False) -> None: self.lock = v1 self.opener = v2 self.connected_light = v5 self.bolt_present = v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Set[Any] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: Set[Any]) -> bool: try: v3 = v1 not in v2 v2.add(v1) return v3 except BaseException: return True ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Generic[T]): ... ``` ```python v1 = TypeVar('T') ``` Input Types: v0[v1], v1 Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0[v1], v4: v1): if v3 in self.__container: raise KeyError(f'token...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: Any, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> str: print('Detecting nfs server') v3 = 'kubectl get pv --context {0} {1}'.format(v1, v2) + ' -o jsonpath="{.spec.nfs.server}"' ...
Imports: ```python import typing ``` Type definitions: Input Types: set Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: set) -> dict: v2 = {} for v3 in v1: v4 = self.id_to_node[v3] v5 = v4.get_visible_version() v2[v3] = v5 return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray): for v2 in self.hole_coords: for (v3, v4) in enumerate(v1[v2]): v5 = v4.flatten() self.R.shuffle(v5) ...
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 not hasattr(self.train_dataset, 'datadir') or not hasattr(self.val_dataset, 'datadir'): raise AttributeError('Both the train and v...
Imports: ```python import typing ``` Type definitions: Input Types: int, np.ndarray Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: np.ndarray) -> Tuple[float, float]: v3 = self._nodes[v1] for v4 in v3: (v5, v6) = self._template_finder.sea...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if v1 not in range(self.height): raise ValueError(f'y must be 0 - {self.height - 1}') v2 = v1 * self.lineByteLength v3 = v2 + self.lin...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: bool=False): if self.local_proc: self.log.debug(f'YarnProvisioner.cleanup: Clearing possible defunct process, pid={self.local_proc.pid}...') ...
Imports: ```python import typing ``` Type definitions: Input Types: Union[int, str], bool, bool, float Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[int, str]=0, v2: bool=True, v3: bool=False, v4: float=0.05) -> pd.Series: if v1 not in [0, 'index']: rais...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.metadata['remaining_content_length'] and (not self.metadata['stream_closed_server']) and self.metadata['request_sent']: self.send_data() ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Exception): def __init__(self, v1: str='Error calling GitHub API', v2: List[str]=[], *v3, **v4): super().__init__(*v3, **v4) self.title = v1 self.errors = v2 ``` Input Types: v0 Output Type: Any Dependencies: Functio...
Imports: ```python import json import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=True) -> Any: if v2 and (not isinstance(v1, str)): return v1 try: return json.loads(v1) except json....
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[Mapping], bool] Output Type: Callable[[Mapping], bool] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable[[Mapping], bool]) -> Callable[[Mapping], bool]: self._reset_token_validator = v1 return v1 ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.ready_for_refresh(): self.force_fetch() else: logging.info('%s is already fresh.', self.configured_url) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: if not self.state_machine.quitting: self.state_machine.quit() ```
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[str, str] Output Type: int Dependencies: ```python def v0(v1: Tuple[str, str]) -> Tuple[int, int]: return (int(v1[0].split(':')[0]) * 60 + int(v1[0].split(':')[1][:2]), int(v1[1].split(':')[0]) * 60 + int(v1[1].split(':')[1][:2])) ``` Functi...
Imports: ```python import typing ``` Type definitions: Input Types: bytes Output Type: Tuple[str, ...] Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> Tuple[str, ...]: v2 = max(v1.find(b'\n'), v1.find(b'\r')) if v2 >= 0: return (v1[:v2].rstrip().decode(), '\n', v1[v2:].lstrip(...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = namedtuple('System', ['A', 'B', 'K', 'Kbar', 'R', 'theta', 'Q']) ``` Input Types: v0, float, np.ndarray Output Type: np.ndarray Dependencies: ```python def v1(v2: np.ndarray, v3: np.ndarray=None, v4: float=1e-05): v5 = np.ident...
Imports: ```python import os import tensorflow as tf from tensorflow.core.util import test_log_pb2 from tensorflow.python.platform.benchmark import TEST_REPORTER_TEST_ENV, _run_benchmarks import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def...