text
stringlengths
190
325k
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.ArgumentParser Dependencies: Function Name: v0 Function: ```python def v0() -> argparse.ArgumentParser: v1 = argparse.ArgumentParser(prog='dbt-package-manager') v1.add_argument('--repo-type', required=Tr...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str='', v3=None): if not v2.startswith('.'): v2 = '.' + v2 v4 = list() for (v5, v6, v7) in os.walk(v1, followlinks=Tr...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: bool v2: Predicate ``` ```python v3 = Union[Variable, Function] ``` Input Types: v0 Output Type: str Dependencies: ```python def v4(v5: v3) -> str: if isinstance(v5, Function): v6 = [v4(argument) for v7 in v5.a...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[int]]) -> bool: v2 = len(v1) v3 = len(v1[0]) for v4 in range(v2): v5 = v1[v4][0] for (v6, v7) in zip(range(v4, v2),...
Imports: ```python from matplotlib import rcParams from matplotlib.pyplot import errorbar, fill_between, plot from numpy import array, ndarray from numpy.typing import ArrayLike import typing ``` Type definitions: ```python v0 = v1 = v2 = Any ``` ```python v0 = v1 = v2 = Any ``` Input Types: ArrayLike, ArrayLike, bool,...
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]]: if len(v1) == 0: return [[]] else: v2 = self.subsets(v1[:-1]) return v2 + [it +...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: float) -> np.ndarray: v3 = np.zeros(v1.shape) v3[1] = np.mod(v1[1] + v2 * np.sin(v1[0]), 2 * np....
Imports: ```python import torch import typing ``` Type definitions: Input Types: str Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> torch.Tensor: assert v1 in self.variables v2 = getattr(self, v1) v3 = getattr(self, f'{v1}_fixed') v4 = getattr(se...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[int]: if not v1: return list() return [int(x) for v2 in v1.rstrip(',').split(',')] ```
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = Union[str, np.ndarray] ``` Input Types: v0, Any, Any, Any Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3, v4, v5): self.init_norms() v6 = self._lookup_if_needed(v2) v7 = v4...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1: Dict[str, Any] = {'transactions': [], 'elements': [], 'aggregate': self.aggregate.serialize().hex().upper()} for v2 in self.p...
Imports: ```python import typing ``` Type definitions: Input Types: Callable, str, session.Session, int, Optional[int] Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable, v2: str, v3: session.Session, v4: int=200, v5: Optional[int]=None, **v6: Any) -> List[Any]: v7: Lis...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.__dictionary.setup_corpus() self.__dictionary.index() ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[float] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: List[float]): v3 = [abs(float(p)) + self.epsilon for v4 in v2] for (v5, v6) in zip(v1, v3): self.memory[v5] = ...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Any, Any, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: int) -> None: self.agents.append(v2) for v4 in range(v3 - 1): v5 = copy.deepcopy(v2) self.agents.append(v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v1 = self.validate_username(v1) v2 = self.connection.request('GET', self.admin_patterns(f'/users/{v1}/admin', 1)) return v2.json()['a...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False): v3 = '[LOG]' self._process(v1, symbol=v3, nl=v2) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any, np.ndarray, np.ndarray, np.ndarray, Any, Any, Any, float, float Output Type: Tuple[Tuple[float], Tuple[float], Tuple[float]] Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: np.ndarray, v4: np.ndarra...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = v1.split(' ') v1 = [word.strip().title() for v3 in v2 if v3 != ''] return ' '.join(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, List[str]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, List[str]]=None): if v1 is None: v2 = list(self.by_name) elif isinstance(v1, str): v2 = [v1] else: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: if v1 is None: return False return v1.startswith('/') ```
Imports: ```python import ast import inspect import typing ``` Type definitions: Input Types: inspect.Signature Output Type: ast.arguments Dependencies: Function Name: v0 Function: ```python def v0(v1: inspect.Signature) -> ast.arguments: v2 = [] v3 = [] v4 = None v5 = [] v6 = None for v7 in v...
Imports: ```python import torch from torch import nn from torch.nn import functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor): ...
Imports: ```python import math import typing ``` Type definitions: Input Types: [], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: [], v2): v3 = 0 v4 = len(v1) - 1 while v3 <= v4: v5 = math.ceil((v3 + v4) / 2) if v1[v5] == v2: return v5 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: int) -> np.ndarray: if v1.ndim == 1: (v3,) = v1.shape v4 = 1 else: (v3, v4) = v1...
Imports: ```python import typing, datetime, asyncio import typing ``` Type definitions: Input Types: str, typing.Callable Output Type: typing.List[typing.Any] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: typing.Callable=None) -> typing.List[typing.Any]: v3 = [] v4 = date...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, t.Type, t.Any Output Type: t.Any Dependencies: ```python def v0(v1: str) -> bool: return v1.lower() in ('yes', 'true', 't', '1') ``` Function Name: v2 Function: ```python def v2(self, v3: str, v4: str, v5: t.Type, v6: t.Any) -> t.Any: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(ABC): def __init__(self, v1: Optional[Text]=None, v2: Optional[List[Text]]=None, v3: Optional[TensorNetwork]=None, v4: Optional[BaseBackend]=None, v5: Optional[Tuple[int]]=None) -> None: """Create a node for the TensorNetwork. Should...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None): v2 = self._note_store_call('listNotebooks') v2 = [{'guid': nb.guid, 'name': nb.name} for v3 in v2] if not v1: return v2 ret...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.epsilon *= self.epsilon_decay if self.minimum_epsilon is not None: self.epsilon = max(self.epsilon, self.minimum_epsilon) ```
Imports: ```python from datetime import datetime from os.path import abspath from os.path import expanduser from os.path import exists import typing ``` Type definitions: Input Types: Event Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Event) -> None: v2 = abspath(expandus...
Imports: ```python import ast import typing ``` Type definitions: Input Types: ast.Name Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Name): v2 = self.symtable v3 = v1.id if isinstance(v1.ctx, ast.Store): v2.entered.add(v3) elif isinstance(v1.ctx, as...
Imports: ```python import os from pathlib import Path import typing ``` Type definitions: Input Types: pd.DataFrame, str, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: str, v3: str=None, v4: bool=True): v5 = Path(v2) if v3 is None: v3 = '' ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, float, Any, Any, Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: float, v3=1.0, v4=0.0, v5=1.0, v6=0.0) -> float: v7 = (v2 - v4) / v3 v8 = 0.0 if v7 >= 0.5 and v7 <= 1: v8 = v1(v...
Imports: ```python import typing ``` Type definitions: Input Types: int, float Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0, v2: float=0.01) -> bool: self.command_return_error = '' self.command = 'F072#2#' + str(v1) + '#' + str(v2) + '#' (v3, v4) = self.send...
Imports: ```python import typing ``` Type definitions: Input Types: 'Prensor' Output Type: List[tf.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Prensor') -> List[tf.Tensor]: v2 = [] self._append_to_components(v1, v2) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: 'BinaryIO', 'Instance' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'BinaryIO', v2: 'Instance') -> None: self.write_header(v1, 1, 1, 1, 0) self.write_instance(v1, v2) while len(self._object_cache)...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseModel): v1 = ForeignKeyField(Player) v2 = ForeignKeyField(Chart) v3 = DoubleField() v4 = IntegerField() v5 = CharField() v6 = CharField() ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v7 Function: ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any, Any, Any, Optional[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1=1, v2=0, v3='stdout', v4: Optional[str]=None) -> str: v4 = v4 if v4 else os.getcwd() return f'{v4}/job-{v1}/{v2}.{v3}' ```
Imports: ```python import requests, bs4, datetime import typing ``` Type definitions: Input Types: datetime.time Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: datetime.time) -> bool: v2 = datetime.datetime.now().time() if v2 < v1: print(f"RuntimeError: can't run unti...
Imports: ```python import shutil import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: try: shutil.rmtree(path='{}'.format(self.old_repo), ignore_errors=False) shutil.rmtree(path='{}'.format(self.new_repo), ign...
Imports: ```python import re from pathlib import Path import typing ``` Type definitions: Input Types: Any, Any, Any, Any, Any, Any Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1, v2='', v3='', v4=True, v5=False, v6=DATE_FMT) -> List[str]: v7 = Path(v1) if not v7.is_dir()...
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): await self.configure_user() await self.configure_profile(v1) await self.configure_code(v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict) -> Dict: v2 = {'cls1': None, 'cls2': None, 'ent1': None, 'ent2': None} if v1['n1'] == 'class' and v1['n2'] == 'class': v2['cls1'] = v1['uri'][...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]], str Output Type: bool Dependencies: ```python def v0(v1, v2, v3): if v1 == len(word): return True if v2 < 0 or v2 >= rows or v3 < 0 or (v3 >= cols): return False if board[v2][v3] != word[v1]: return...
Imports: ```python import typing ``` Type definitions: Input Types: QtGui.QResizeEvent Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: QtGui.QResizeEvent) -> None: self.detailsTab.setColumnWidth(0, int(self.detailsTab.width() / 9)) self.detailsTab.setColumnWidth(1, self....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {'title': '', 'description': '', 'termsOfService': '', 'contact': {}, 'license': {}, 'version': ''} if self.contact: v1['contact'] = sel...
Imports: ```python import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: Any, Any Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> torch.Tensor: assert v1.shape[0] == v2.shape[0] and v1.shape[1] == v2.shape[1], (v1.shape,...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> np.ndarray: v2 = self._transformer.transform(v1).to_numpy() v3 = getattr(self._estimator, 'predict_proba', None) if cal...
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 = v1 - self._window_size + 1 while self._origin_ms < v2: v3 = self._buckets[self._origin_index] self._total.count -= v...
Imports: ```python import cffi import typing ``` Type definitions: ```python @unique class v0(IntEnum): v1 = -404 v2 = -203 v3 = -101 v4 = -18 v5 = -14 v6 = -10 v7 = -9 v8 = -8 v9 = -6 v10 = -5 v11 = -4 v12 = -3 v13 = -2 v14 = -1 v15 = 0 ``` ```python class v1...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray) -> np.ndarray: v2 = np.arange(0.0, 255.0, 1.0) v3 = np.zeros_like(v2) v4 = np.transpose(np.where(v1 > 0)) v5 = [(abs(i - j), (i...
Imports: ```python import typing ``` Type definitions: ```python v0 = Callable[[], AsyncContextManager[AsyncSession]] ``` ```python class v1(BaseSettings): v2: str v3: str v4: str v5: int v6: str v7: int = 5 v8: int = 10 v9: int = 30 v10: int = -1 v11: bool = False v12: str ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], 'Optional[Lintable]' Output Type: Union[bool, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: 'Optional[Lintable]'=None) -> Union[bool, str]: if 'common' not in str(v2): if 'ac...
Imports: ```python from random import randint import typing ``` Type definitions: Input Types: list['Ship'] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list['Ship']): for v2 in range(self.aoe): v1[randint(0, len(v1) - 1)].damages_ship(self) ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[Text, Any], Union[Text, List[Text]] Output Type: Text Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[Text, Any], v2: Union[Text, List[Text]]) -> Text: if isinstance(v2, str): v2 = [v2] print(v2) print(v1)...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: json.dump(self.list, self.path.open('w', encoding='utf-8'), indent=4, separators=(',', ': '), ensure_ascii=False) return True ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Callable Dependencies: ```python def v0(v1): if self.uselist: self._registry.setdefault((target, qualifier), []).append(v1) else: assert (target, qualifier) not in self._registry self._registry[tar...
Imports: ```python import typing ``` Type definitions: Input Types: 'Node' Output Type: 'Node' Dependencies: ```python def v0(v1): if not v1: return None v0(v1.left) print(v1.val) if not self.lastNode: self.firstNode = v1 else: self.lastNode.right = v1 v1.left = self...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = re.compile('^(.*)\\/\\/.*$|^(.*)$', re.MULTILINE) v3 = [m.span(m.lastindex) for v4 in v2.finditer(v1)] for (v5, v6) in v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[str]) -> None: with open(v1, encoding='utf8') as v3: v2.extend(v3.read().splitlines()) ```
Imports: ```python from collections import defaultdict import typing ``` Type definitions: ```python class v0(wrapt.ObjectProxy): v1: bool = False def __init__(self, v2: sqlite3.Connection): super(v0, self).__init__(v2) if isinstance(v2, v0): raise ValueError('Attempted to create `C...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int): v3 = {'id': f'{v1}', 'warns': v2} return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: List[Dict[str, Any]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Dict[str, Any]]): global npcs v2 = [] for v3 in v1: v4 = npc_types[v3['classname']](0, 0, 0) del v3['classname'] ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.set_models(self.permission_test_model) v1 = self.request('mediafile.update', {'id': 111, 'token': 'test'}) self.assert_status_code(v1, 400) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {} v1.update(self.x()) v1.update({'diff': self.y()}) return v1 ```
Imports: ```python from collections import deque import typing ``` Type definitions: Input Types: List[List[str]] Output Type: int Dependencies: ```python def v0(v1, v2): v3 = False v4 = deque([(v1, v2)]) while v4: (v5, v6) = v4.popleft() v7 = 0 <= v5 < rows and 0 <= v6 < cols v8 = ...
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._client.measures.get_component_with_specified_measures(component=v1, metricKeys='ncloc') v3 = v2['component']['measures'] return v3[...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> dict: v3 = None for (v4, v5) in enumerate(v1): if v4 == 0: v3 = v2[v5] else: v3 = v3[v5] v6 = {} ...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: if self._pending is None: return v1 = [] for (v2, v3) in self._pending.items(): if not v3.done(): ...
Imports: ```python import typing ``` Type definitions: Input Types: tanjun.context.AutocompleteContext, mock.Mock Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tanjun.context.AutocompleteContext, v2: mock.Mock): v3 = v1.get_channel() assert v3 is v2.get_channel.return_v...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Any, Any Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2, v3) -> np.ndarray: (v4, v5) = v1.shape (v6, v7) = v2 v8 = [] for v9 in range(0, v4 - v6 + 1...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Dataset], Optional[List[str]], str Output Type: Dict[str, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Dataset]=None, v2: Optional[List[str]]=None, v3: str='eval', **v4) -> Dict[str, float]: v4 = v...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Optional[Dict[str, np.ndarray]] Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Dict[str, np.ndarray]]=None) -> Tuple[np.ndarray, np.ndarray, np.n...
Imports: ```python import typing ``` Type definitions: Input Types: maxes.Axes, List[int], List[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: maxes.Axes, v2: List[int], v3: List[int]): for v4 in v3: v1.axhspan(v4 - 0.5, v4 + 0.5, fill=None, hatch='\\\\\\', alpha=0.3)...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Generator[str, None, None] Dependencies: Function Name: v0 Function: ```python def v0(v1: str=string.ascii_lowercase) -> Generator[str, None, None]: (v2, v3, v4) = (0, 0, '') while True: if v2 < len(v1): y...
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.mirrored_channels().get(v1, {}) return (v2.get('last_spoke', None), v2.get('last_spoke_timestamp', None)) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: if self._unmask: return v1 if v1 not in self._name_map: self._name_map[v1] = '%d' % len(self._name_map) return self._na...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = requests.get(v1) v2.encoding = 'utf-8' return v2.text ```
Imports: ```python import torch from torch import Tensor from torch.nn.functional import grid_sample, conv2d, interpolate, pad as torch_pad import typing ``` Type definitions: Input Types: Tensor, List[float], List[float], bool Output Type: Tensor Dependencies: ```python def v0(v1: Tensor) -> None: if not _is_tens...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> int: if v1: return self.epoch else: return self.global_step ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self) -> Any: if not self.isOpen(): raise Exception('cursor: Database not open') if self.cursor_ is None: if self.conn_ is None: raise Ex...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> None: if v1 not in self.percentiles_requested: self.percentiles_requested.append(v1) self.percentiles_regenerated = False ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float Output Type: Union[int, None] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> Union[int, None]: if self.is_calibrated: v2 = np.arange(self.n_channels)[np.logical_and(self.lower_bin_l...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: tuple[str, int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> tuple[str, int, int]: v2 = int(v1[:3], base=2) v3 = int(v1[3:6], base=2) return (v1[6:], v2, v3) ```
Imports: ```python from inspect import Parameter, isclass, signature import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Type[v0] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Type[v0]) -> v0: if not isclass(v2): self.fail(f'{v2} is not a ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: try: self.throwsKeyboardInterrupt() except KeyboardInterrupt: self.fail('Unexpected KeyboardInterrupt') ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Optional[Dict[str, Wikicode]]=None): if v1 is None: self._articles = {} else: self._articles = {_normalize_title(name): article for (v2, v3) in v1.items()} def v4(self, v5:...
Imports: ```python import copy import typing ``` Type definitions: Input Types: set, set Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: set, v2: set): v3 = copy.copy(v1) v4 = set() v5 = set() v6 = set() v7 = set() v8 = False while v3: v9 = set() ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: while self._srl_count > 0: self.srl_get() ```
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: int, bool Output Type: typing.NoReturn Dependencies: ```python def v0() -> float: return datetime.now().timestamp() ``` Function Name: v1 Function: ```python def v1(self, v2: int, v3: bool=False) -> typing.NoReturn: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: if not self.stations: return 0 v1 = self.stations[-1].get('counter') if v1 is not None: return v1 return self.lineLength() ...
Imports: ```python import typing ``` Type definitions: Input Types: int, float Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=5, v2: float=0.5) -> Dict[str, str]: v3 = '{}/jobs/{}/status/v/1'.format(self._websocket_url, self._job_id) return self.stream(url...
Imports: ```python import curses from curses import panel, ascii from curses.textpad import Textbox import typing ``` Type definitions: Input Types: str, int, int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int=20, v3: int=0, v4: int=curses.COLOR_WHITE) -> None...
Imports: ```python import typing ``` Type definitions: Input Types: int, str, list, str Output Type: requests.models.Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, v3: list=[], v4: str=None) -> requests.models.Response: v5 = 'v1/projects/{}/docs'.format(v1) v6 = {'...
Imports: ```python import typing ``` Type definitions: Input Types: List, str Output Type: List Dependencies: ```python def v0(v1: Dict) -> bool: return is_dataset_file(v1['name']) or is_directory_entry(v1) ``` ```python def v2(v3: Dict) -> bool: return 'directory' == v3['type'] ``` ```python def v4(v5: Dict) ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, bool Output Type: bool Dependencies: ```python def v0(v1: Any) -> Optional[bool]: v2 = getattr(v1, '_apply_unitary_', None) if v2 is None: return None v3 = qid_shape_protocol.qid_shape(v1, None) if v3 is...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: ```python def v0(v1: str) -> str: v2 = 'git@([^:]+):([^/]+)/(.+)' v3 = re.search(v2, v1, re.IGNORECASE) if v3: return f'https://{v3.group(1)}/{v3.group(2)}/{v3.group(3)}' r...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: Optional['ANode'] v2: RC v3: int = 0 v4: int = 0 @property def v5(self) -> float: return self.g + self.h @classmethod def v6(cls, v7: 'ANode', v8, *v9: RC): v10 = cls.calc_g(v7) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self.ERROR = True self.errors.append(v1) ```