text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: while True: v1 = await self._receive() assert self._in_queue is not None, 'Input queue not initialized.' self._in_queue.put...
Imports: ```python import re import typing ``` Type definitions: Input Types: Any Output Type: Optional[Dict] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Optional[Dict]: v2 = re.match('^https://github.com/([^/]+)/([^/]+)/commit/([0-9a-f]+)$', v1) if v2 is None: return None el...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Optional[dict] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: int) -> Optional[dict]: v2 = 'SELECT * FROM `dailies` WHERE userid = %(u)s;' async with self.bot.db_query(v2, {'u': v1}) as v3: ...
Imports: ```python import torch from torch import nn from torch.nn.modules.loss import MSELoss, CrossEntropyLoss import typing ``` Type definitions: Input Types: torch.Tensor, List[str], torch.Tensor, bool Output Type: Tuple[torch.Tensor, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tor...
Imports: ```python from math import asin, sqrt, sin, cos, atan2 import numpy as np from numpy import deg2rad, float64, savetxt import math import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4) -> float: v5 ...
Imports: ```python import numpy as np import torch import typing ``` Type definitions: Input Types: str, Union[torch.Tensor, np.ndarray] Output Type: None Dependencies: ```python def v0(v1: Union[torch.Tensor, np.ndarray]) -> np.ndarray: if isinstance(v1, torch.Tensor): assert v1.dim() == 2, 'Input tensor ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): for v2 in self.players: if v2['player'] == v1: return v2['rank'] ```
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Any, 'str', int, Any Output Type: list Dependencies: ```python def v0(v1: 'Figure', v2: str) -> str: v3 = Path(_temp_dir_path) v4 = str(v3 / f'{v2}.png') v3.mkdir(exist_ok=True) v1.write_image(v4) return v4...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self.mock_config_info({'api_key': 'TEST'}): self.verify_reply('help', '`archive` Archive a conversation.\n`delete` Delete a conversation.\n`...
Imports: ```python import os from os import sys import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self) -> str: v1 = os.environ.get('SCRYPTED_FFMPEG_PATH_ENV_VARIABLE', None) if v1: v2 = os.environ.get(v1, None) ...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: ```python def v0() -> dict: return {'created': f'{get_current_iso_timestamp()}', 'updated': f'{get_current_iso_timestamp()}', 'description': 'Asset description', 'copyrightHolder': 'As...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.item = self.next_item self.next_item = next(self._it, self._default_item) ```
Imports: ```python import re from typing import Any, Awaitable, Callable, Dict, Iterable, List, Literal, Optional, Pattern, Set, Tuple, Type, Union import typing ``` Type definitions: Input Types: Optional[List[str]] Output Type: Union[None, List[str], Pattern[str]] Dependencies: ```python def v0(v1: Optional[List[str...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in range(self.first_leaf - 1, -1, -1): self.fix_node(v1) ```
Imports: ```python import math import warnings import torch from torch import Tensor import typing ``` Type definitions: Input Types: float, float, int, int, float, str, Optional[float], torch.device, Optional[torch.dtype] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: floa...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int or None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int or None: if v1 not in self.cache: return None v2 = self.cache[v1] self._move_to_tail(v2) return v2.val ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('A') ``` Input Types: Callable[[v0, v0], bool], Optional[v0], Optional[v0] Output Type: bool Dependencies: Function Name: v1 Function: ```python def v1(v2: Callable[[v0, v0], bool], v3: Optional[v0], v4: Optional[v0]) -> bool: if v3 and ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): v2 = self.trainer.cfg.test_data.data.type if v2 in self.mulit_metircs_dataset_type: v3 = [k for v4 in list(v1.keys()) if v4.find('metric...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[int, int], Tuple[int, int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[int, int], v2: Tuple[int, int]): (v3, v4) = v1 (v5, v6) = v2 if v3 == v5: self._add_vertical_line(v3, v4,...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> int: if v1 == 1: return False elif v1 % 2 == 0 and v1 > 2: return False else: for v2 in range(3, int(v1 ** (1 / 2)) + 1, 2...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[int]: v1 = [] for v2 in self._score_grouped_embedding_configs_per_rank: v3 = 0 for v4 in v2: v3 += v4.num_features() ...
Imports: ```python import threading import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().enable() threading.Thread(target=self.remove_expired_tpas_thread).start() ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): if v1: self.switchFromLoginUI(True) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self.request.path.split(b'/') v2 = self.sAPI.test_for_namespace(v1) if len(v2) > 0: v3 = self.sAPI.get_microblog(v2) v4 = 'pro...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.LongTensor, torch.LongTensor, torch.LongTensor, Optional[torch.LongTensor], Optional[torch.LongTensor], Any, Any Output Type: Any Dependencies: ```python def v0(v1: torch.LongTensor, v2: torch.LongTensor): v3 = v1.unsqueeze(-1) ...
Imports: ```python import base64 import hashlib import os import re import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='S256', v2: int=64): v3 = {'S256': hashlib.sha256} v4 = base64.urlsafe_b64encode(os.urandom(40)).dec...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]) -> Dict[str, Any]: v1['remote_host'] = v1['remote_system_name'] return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: bool): v1 = max(v1, 0) super().enablePWMOutput(v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.stream_name != '': return True if self.connection_type is not None: return True if self.premises is not None: ret...
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[dict], int Output Type: Sequence[dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[dict], v2: int) -> Sequence[dict]: v3 = [] for v4 in v1: v4 = v4.copy() v5 = v4.pop('stages', None) ...
Imports: ```python import typing ``` Type definitions: Input Types: list, bool Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: bool=True) -> list: if not isinstance(v1, list): raise TypeError('array parameter should be a list') if not isinstance(v2, bool): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, Optional[int] Output Type: List[dict] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: int, v3: Optional[int]=None) -> List[dict]: if v3 is not None: if not self._receipts_stream_cache.has_enti...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int, int, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3: int, v4: int, v5: int, v6: int, v7: int): for v8 in range(max(v2, -50), min(v3, 50) + 1): for v9 in ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterator['Entity'] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator['Entity']: for v1 in self.vmf.entities: if self.id in v1.visgroup_ids: yield v1 ```
Imports: ```python from pymatgen.core import Structure, Element, Species, Lattice from pymatgen.core.operations import SymmOp import typing ``` Type definitions: Input Types: Union[str, Element, Species] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Element, Species]) ->...
Imports: ```python import random import re import typing ``` Type definitions: ```python class v0(NamedTuple): v1: str v2: int v3: int ``` Input Types: List[v0] Output Type: str Dependencies: ```python def v4(v5: float) -> str: return re.sub('\\.?0*$', '', '{:.3f}'.format(v5)) ``` Function Name: v6 Func...
Imports: ```python import torch from torch.autograd import Variable as V from torch.nn import functional as F import re import numpy as np import typing ``` Type definitions: Input Types: Image Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Image) -> List[str]: v2 = ['...
Imports: ```python import datetime as dt import typing ``` Type definitions: Input Types: Optional[dt.datetime], Any Output Type: Optional[dt.datetime] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[dt.datetime], v2) -> Optional[dt.datetime]: if self.auto_now: v1 = dt.dateti...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if v1 not in (v2 := self._cfg_types()): raise ValueError("Unknown config type '{c}'. Known types: {k}".format(c=v1, k=', '.join(v2.keys()))) `...
Imports: ```python import typing ``` Type definitions: Input Types: List[Union[float, int]], List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(*, v1: List[Union[float, int]], v2: List[str]) -> None: for v3 in range(len(v1) - 1): if v1[v3] > v1[v3 + 1]: rais...
Imports: ```python 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: v2 = v1[:, 0] return self.lr_.predict(self.__transform(v2)) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: for v1 in self.stamina['priority']: (v2, v3) = (v1.split(':') + ['1'])[:2] if self.objects[f'stamina_{v2}'].found(False) and int(v3) > 0:...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: int, Any Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2=None) -> Dict: if v2 is None: v3 = self.ase_db.get(v1) else: v3 = self.ase_db.get(v1, default=v2...
Imports: ```python import typing ``` Type definitions: Input Types: ast.AST Output Type: ast.AST Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.AST) -> ast.AST: v1 = self._handle_assignments(v1) v1 = self._handle_expressions(v1) return self.generic_visit(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, pd.DataFrame, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: pd.DataFrame, v3: str=None): v3 = v3 or self.schema_name self.schema[v3].experiments[v1.lower()] = v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: try: v2 = v1[2:].replace('-', '_') return self.args[v2] except KeyError: return self.args[v1] `...
Imports: ```python from numpy import abs, linalg, log2, ndarray, sqrt, pi, exp, asarray, tile, power, diag, dot from numpy.random import randn import typing ``` Type definitions: Input Types: int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> List[int]: v2 = [] w...
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 typing ``` Type definitions: ```python @attr.s(slots=True, eq=False, order=False, repr=False) class v0: v1: str = attr.ib() v2: 'Type' = attr.ib() v3: 'Type' = attr.ib() v4: str = attr.ib(default=None) v5: 'Type' = attr.ib(default=None) v6: bool = attr.ib(default=None) ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int): if self.DEBUG: print('TX %d=%d' % (v1, v2)) self.i2c.send(self.addr, [v1, v2]) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]], str Output Type: List[Iterator[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[str]], v2: str) -> List[Iterator[str]]: v3 = [iter(house) for v4 in v1] for v5 in range(int(v2)): for (v6, ...
Imports: ```python import sys import requests import typing ``` Type definitions: Input Types: list[str] Output Type: None Dependencies: ```python def v0(v1: str) -> None: print(f'Downloading binary content: {v1}') v2 = fetch(v1) v3 = lib.make_filename(v1, '.pdf', ADD_DATETIME_DEFAULT) v4 = PNG_DIR / v...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> bool: v2 = (1 + (24 * v1 + 1) ** 0.5) / 6 return v2 == int(v2) ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import typing ``` Type definitions: Input Types: List[torch.Tensor], int Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[torch.Tensor], v2: int)...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: axes.Axes, Tuple[float, float], float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: axes.Axes=None, v2: Tuple[float, float]=(0, 0), v3: float=1.0, **v4): v5 = np.linspace(0, 2 * np.pi, 15...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> pd.DataFrame: if self.columns is None: self.columns = list(v1.columns) raise NotImplementedError ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str): self._source = v1 self._initial_state = [] self._state = [] self._pc = 0 self._hlt = True self._wait = False self._mode_pipeline = [] self._opcodes...
Imports: ```python import asyncio from asyncio.streams import StreamReader, StreamReaderProtocol, StreamWriter from asyncio import events import typing ``` Type definitions: Input Types: asyncio.transports.BaseTransport Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: asyncio.tra...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: self.UpdateButtons() return self.OnButtonIsPress() ```
Imports: ```python import importlib from importlib import import_module import typing ``` Type definitions: Input Types: Optional[str] Output Type: Optional[Callable] Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[str]) -> Optional[Callable]: if v1 is None: return None (v2, v3...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(v1: list, v2: int, v3: int): if v2 >= v3: return v4 = v1[v2] v5 = v2 + 1 for (v6, v7) in enumerate(v1[v2 + 1:v3], v2 + 1): if v7 > v4: v5 = v6 ...
Imports: ```python import typing ``` Type definitions: Input Types: 'User' Output Type: t.List[t.Optional[str]] Dependencies: ```python def v0(v1): return v1.tf_totp_secret and v1.tf_primary_method ``` Function Name: v2 Function: ```python def v2(self, v3: 'User') -> t.List[t.Optional[str]]: if v0(v3): ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): for v2 in ['left', 'right']: v1[v2 + '_strip_tokenized_len'] = v1[v2 + '_strip_tokenized'].apply(len) ```
Imports: ```python import asyncio import random import typing ``` Type definitions: Input Types: float, float Output Type: Any Dependencies: ```python async def v0(v1): nonlocal disconnect_called_num v2 += 1 ``` Function Name: v3 Function: ```python def v3(self, v4: float=0.01, v5: float=0.005): async def...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: chr, v2: chr) -> bool: return v1 != v2 and (v1 == v2.lower() or v1 == v2.upper()) ``` ```python def v3(v4: str) -> str: v5 = '' for v6 in range(0, len(v4)): if v6 == len(v4) - 1...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): self.__filter_sync_err = v1 self.__filter_sync_event.set() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: ```python def v0(v1: Any) -> str: v2 = str(type(v1)) if isinstance(v1, Circuit): return 'quantumflow' if 'cirq' in v2 and 'Circuit' in v2: return 'cirq' if 'braket' in v2 and 'Cir...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = 0 v3 = [] while v2 < len(v1): v4 = v1.find(' ', v2) if v4 == -1: v3.append(v1[v2:]) break v3.ap...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: v1 = v1 - (v1 >> 1 & 1431655765) v1 = (v1 & 858993459) + (v1 >> 2 & 858993459) v1 = v1 + (v1 >> 4) & 252645135 v1 = v1 + (v1 >> 8) ...
Imports: ```python import typing ``` Type definitions: ```python v0 = tp.TypeVar('EnumTy', bound=Enum) ``` Input Types: tp.Union[str, v0], tp.Optional[click.Parameter], tp.Optional[click.Context] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: tp.Union[str, v0], v3: tp.Optional[cli...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[int, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[int, str]: v1 = self.option_name if v1 == '--help': return (2, '--help') elif v1 == '--version': return (1, '--version...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = os.path.join(self._tmpdir, 'async.txt') v2 = 'Async Text' try: for v3 in range(1): with self._pathmgr.opena(v1...
Imports: ```python import sqlite3 import typing ``` Type definitions: Input Types: Any, tuple, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: tuple, v3, v4): (v5, v6) = self._make_args_and_hash(v2, v3) v7 = [(v1, v6, v5, v4)] try: self.connection...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, bool Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: bool=False) -> Tuple: v3 = np.diff(v1, axis=0) v4 = np.diff(v1, axis=1) if v2: v3 = np.pad...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2, v3, v4=50, v5=False): self._server = v1[:-1] if v1.endswith('/') else v1 self._proxies = v2 self._auth_headers = {'Content-Type': 'application/json'} self._use_ssl = not v5 ...
Imports: ```python from numpy import isscalar import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: if isscalar(v1): return self.lower <= v1 <= self.upper return self.lower <= v1.lower and v1.upper <= self.u...
Imports: ```python from urllib.parse import urlparse import typing ``` Type definitions: Input Types: str Output Type: Optional[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Optional[int]: try: v2 = urlparse(v1).path return int(v2.split('/')[-1].split('-')[0]) exc...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: dict or list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0) -> dict or list: if v1 == 0: return self.orderbook['obu'] return self.orderbook['obu'][v1] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[str]=None, v3: Optional[str]=None): self.workbook = self.auth.create(v1, folder=v2, template=v3) self.sh...
Imports: ```python from typing import List, Type, ClassVar, cast import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self._get_init_task_runner() v2 = self.get_test_assignment() v3: List['Agent'] = [cast('Agent'...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=None, v2: str=None): if v2: v1 = self.performance_measure.index(v2) if v1: self.performance_data = self.performance_data_all[v1...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[Gender, Counter] ``` ```python v1 = Dict[Gender, WordFrequency] ``` ```python v2 = Union[Counter, WordFrequency] ``` Input Types: str, str, str Output Type: Dict[Union[str, int, float], v2] Dependencies: ```python def v3(v4: v0, v5: str, v6: str...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[Node, Set[Node]] ``` ```python v1 = TypeVar('Node') ``` Input Types: Output Type: None Dependencies: ```python def v2(v3: str, v4: Callable[[str], v1]) -> v0[v1]: v5: v0[v1] = {} for v6 in v3.splitlines(): (v7, *v8) = map(v4, v6...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: np.ndarray Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> bytes: if v1.ndim == 2: v1 = v1[..., None] return tf.image.encode_png(v1).numpy() ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> dict: v2 = self.s.request('GET', url=f'{self.endpoint}/accounts/{v1}/transactions?bookingStatus=both&dateFrom=2000-01-01', data={}) return v2.j...
Imports: ```python import typing ``` Type definitions: Input Types: decafAlejandroV2Parser.VardeclrContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: decafAlejandroV2Parser.VardeclrContext): v2 = v1.var_type().getText() if v1.field_var().var_id() is not None: ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[bool] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[bool]=None) -> bool: if v1 is None: return self._get('fastreadout') self._put('fastreadout', FastReadout=v1) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.base_dir is not None: v1 = os.path.join(self.base_dir, v1) v2 = self.loader(v1) if self.transform is not None: ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('Symbol') ``` Input Types: Union[int, v0] Output Type: Union[v0, int] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Union[int, v0]) -> Union[v0, int]: if isinstance(v2, int): return self._id2sym[v2] els...
Imports: ```python import logging import typing ``` Type definitions: ```python class v0(NamedTuple): v1: str v2: int ``` Input Types: int Output Type: None Dependencies: ```python def v3(v4: int) -> v0: if v4 == 0: return v0(LOG_FORMAT_DEFAULT, logging.WARNING) elif v4 == 1: return v0(L...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> np.ndarray: assert np.all(v2 > 0), f'Orders {v2} must be positive' assert v1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple['_Substring', '_Substring', '_Substring'] Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: Callable[[str], int]) -> Tuple['_Substring', '_Substring', '_Substring']: (v2, v3, v4) = self._find(*v1) retur...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: _typing.Dict[str, _typing.Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v2) -> _typing.Dict[str, _typing.Any]: v3 = self._help_config.modes if v1 not in v3: self._log('Warning', self....
Imports: ```python import torch import typing ``` Type definitions: Input Types: Any, str, Any Output Type: Any Dependencies: ```python def v0(v1): v2 = {} for (v3, v4) in v1.items(): if 'num_batches_tracked' in v3: continue if v3.startswith('module.'): if True: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1) -> bool: v2 = '.' not in v1 return v2 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[Sequence[Real], type(EMPTY_SET)] ``` Input Types: v0 Output Type: Real Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> Real: v2.sort() v3 = v2[-1] - v2[0] if len(v2) > 0 else 0 return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Iterator[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> Iterator[int]: with v1.open('r') as v2: for v3 in v2: yield int(v3.strip()) ```
Imports: ```python import os import typing ``` Type definitions: ```python v0 = Union[BaseStore, MutableMapping, str, None] ``` Input Types: v0 Output Type: Any Dependencies: ```python def v1(v2): return isinstance(v2, (str, os.PathLike)) ``` ```python def v3(v4: v0, v5, **v6): v7 = v1(v4) v8: BaseStore = n...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list=[]): v2 = {} for v3 in v1: if v3 in self.sensor_dict.keys(): v2[v3] = self.sensor_dict[v3] return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *, v2: bool=False, **v3: bool) -> None: if v1: v4 = v1.rsplit('\n', 1)[-1] if '\n' in v1: self._current_line = v4 ...