text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: assert v1.startswith('urn:li:'), 'urns must start with urn:li:' return v1.split(':')[2] ```
Imports: ```python import itertools import typing ``` Type definitions: ```python v0 = Union[OrderedSet, FrozenOrderedSet] ``` Input Types: Union[Sequence[AbstractSet], Sequence[bool]], Tuple[v0, v0] Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(v2: Union[Sequence[AbstractSet], Sequence[...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Dict, str, None], Any Output Type: Dict[str, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[Dict, str, None], v2) -> Dict[str, float]: if not v1 or isinstance(v1, str): return v2 else: return...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: np.ndarray, float Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: float) -> np.ndarray: if v2 != 1.0: (v3, v4, v5) = v1.shape v3 = int(v3 * v2) v4 = int(v4 ...
Imports: ```python import os from collections import ChainMap import typing ``` Type definitions: Input Types: str, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2={}) -> str: v3 = ChainMap(os.environ, v2) return v1.format(**v3) ```
Imports: ```python import inspect from typing import Any, Awaitable, Callable, cast, Dict, List, Optional, Tuple from .typing import ASGI2Framework, ASGI3Framework, ASGIFramework import typing ``` Type definitions: Input Types: ASGIFramework, dict, Callable, Callable Output Type: None Dependencies: ```python def v0(v1...
Imports: ```python 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: v3: np.ndarray = self.voting_procedure.provide_keypoints(mask=v1, vmap=v2) return v...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, List[str]], Set[str] Output Type: Tuple[bool, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, List[str]], v2: Set[str]) -> Tuple[bool, str]: v3 = v2.copy() for v4 in v1.keys(): if v4 not in v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[float] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[float]) -> None: if self.matrix is None: self.matrix = [[item] for v2 in v1] elif len(v1) == self.nrows: for (v3, ...
Imports: ```python import random import logging import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: logging.info('Going to shuffle the deck') random.shuffle(self._deck) return self._deck ```
Imports: ```python import typing ``` Type definitions: Input Types: drgn.Object Output Type: Iterable[drgn.Object] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: drgn.Object) -> Iterable[drgn.Object]: v2 = int(v1.avl_offset) v3 = v1.avl_root yield from self._helper(v3, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int, int, int Output Type: Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: str=None, v3: int=None, v4: int=None, v5: int=None, **v6) -> Response: v7 = {'token': self._token} if v1 is not N...
Imports: ```python import typing ``` Type definitions: Input Types: list, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: float): if ('HD' in v1 or 'FL' in v1) and v2 == 1: v3 = 'XH' elif 'HD' in v1 or 'FL' in v1: v3 = 'SH' elif v2 == 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: str Dependencies: ```python def v0(v1: int, v2: int, v3: int) -> float: return total_marks(v1, v2, v3) / 3 ``` ```python def v4(v5: int, v6: int, v7: int) -> int: return v5 + v6 + v7 ``` Function Name: v8 Function: `...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None): for v2 in self.components: v2.save() super().save(filename=v1) ```
Imports: ```python import json from json.decoder import JSONDecodeError import typing ``` Type definitions: Input Types: str, Optional[bool], Optional[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[bool]=None, v3: Optional[int]=None) -> None: v4 = sel...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Optional[str] Output Type: 'VerifyMessage' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Optional[str]) -> 'VerifyMessage': if self._nothing: raise ValueError('Verify content conflicts with verifying n...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None, v2: str=None): if v1: v3 = self.__class__(**v1) else: v3 = self.__class__() if hasattr(self, '__dict__'): f...
Imports: ```python import collections import typing ``` Type definitions: ```python class v0: v1: str v2: Dict v3: Set['NamegraphNode'] def __init__(self, v4: Dict, v5: Optional[Iterable['NamegraphNode']]=None): self.schema = v4 self.name = v4['name'] if v5 is not None: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[Any, Any], Dict[Any, Any] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[Any, Any], v2: Dict[Any, Any]) -> bool: if len(v1) > len(v2): return False if set(v1.items()).issubset(v2.items()): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: any Dependencies: Function Name: v0 Function: ```python def v0(self) -> any: (v1, v2, v3) = (0, 0, self.resource_lines('input')) try: next(v3) while True: v4 = next(v3) v1 = (v1 + 3) % len...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: for v1 in range(len(self._hit_points)): if not self._hit_points[v1][2]: return False return True ```
Imports: ```python import numpy import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1) -> bool: v2 = isinstance(v1[0], float) or isinstance(v1[0], numpy.float16) or isinstance(v1[0], numpy.float32) or isinstance(v1[0], numpy.float64) ...
Imports: ```python import re import typing ``` Type definitions: Input Types: discord.Client, discord.Message, int Output Type: Any Dependencies: ```python def v0(v1): v2 = re.match(regex_discord_message_url + regex_extra_url, v1) v3 = v2.groupdict() return {'base_author_id': int(v3['base_author_id']), 'au...
Imports: ```python import shutil from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Path: v2 = shutil.which(v1) assert v2, f'{v1} not found' return Path(v2) ```
Imports: ```python import os import typing ``` Type definitions: ```python class v0(Enum): v1 = auto() v2 = auto() v3 = auto() ``` Input Types: str, str, bool, v0, Optional[Dict[str, Any]] Output Type: str Dependencies: ```python def v4(v5: str, v6: str, v7: bool, v8: v0, v9: Optional[Dict[str, Any]]=None) ...
Imports: ```python import asyncio from asyncio.tasks import FIRST_COMPLETED import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python async def v0(self, v1) -> int: try: while v1 is not None: v2 = v1.poll() if v2 is no...
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 range(self.comm.size)] for (v4, v5) in self.bounded_projs.items(): for (v6, v7, v8) in v5._get_oob(): v9 ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: v2 = self._get_prior_proc() if v2 is not self._active_proc: if self._active_proc is not None: self._active_proc.preempt...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.optimizer_loop._hiddens = None self.manual_loop._hiddens = None ```
Imports: ```python import torch from torch import nn from torch.nn import functional as F from torch import Tensor import typing ``` Type definitions: Input Types: Any Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Tensor: v2 = torch.randn(v1, self.latent_dim) v3 =...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = str(float(v1)) v3 = len(v1[v1.index('.'):]) v4 = len(v2[v2.index('.'):]) if v3 == v4: return v2 else: return v2 + '0' * (v3 - v4) ``` ```pyth...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> int: if not v1: return 0 (v2, v3) = (0, v1[0]) for v4 in v1: if v2 <= 0: v2 = v4 else: v2 += v4 ...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> int: v1 >>= 1 for v2 in itertools.count(): if not v1: return v2 v1 >>= 1 raise Exception('Invariant: ...
Imports: ```python import typing ``` Type definitions: Input Types: float, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: int): if v2 == 0: return 1 if abs(v1 - 0.0) < 1e-07: return 0.0 if abs(v1 - 1.0) < 1e-07: return 1.0 i...
Imports: ```python import torch from torch import nn, Tensor import typing ``` Type definitions: Input Types: Tensor, Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Tensor) -> Tensor: v3 = v1[range(len(v1)), v2] v4 = torch.ones_like(v1, dtype=bool) ...
Imports: ```python import typing ``` Type definitions: Input Types: bpy.types.Context Output Type: Any Dependencies: ```python def v0(v1: str) -> str: v1 = v1.lower() v1 = v1.replace('-', ' ') v1 = v1.replace('_', ' ') v1 = v1.strip() v2 = None v3 = '' for v4 in v1: if not v2 is Non...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, int, bool Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: int=10, v4: bool=False) -> Tuple[float, float]: if v2 <= v1: raise ValueError(f'`upper` should b...
Imports: ```python import numpy as np import numpy.ma as ma import typing ``` Type definitions: Input Types: int, float, float Output Type: float Dependencies: ```python def v0(v1: int) -> Tuple[int, int]: v2 = gdal_array.GDALTypeCodeToNumericTypeCode(v1) return (np.iinfo(v2).min, np.iinfo(v2).max) ``` Functio...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Iterable['Model'] Dependencies: Function Name: v0 Function: ```python def v0(self, *, v1: str='bfs') -> Iterable['Model']: if v1 == 'bfs': return self._walk_bfs() elif v1 == 'dfs_pre': return self._walk_dfs(po...
Imports: ```python from datetime import datetime, timedelta, timezone import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, *v1: str) -> None: v2 = datetime.now(timezone.utc) + timedelta(seconds=self.ttl_s) for v3 in v1: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1: Iterable[Iterable[Cell]]=None, v2: Iterable[Cell]=None, v3: int=None, v4: int=None): assert bool(v1 is not None) ^ bool(v2 and v3 and v4) if v1 is not None: self.grid = np.array(v1)...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='') -> bool: if not self._validate_input(v1, ['.', '-']): return False v1 = self._only_digits(v1) if len(v1) != 11 or self._is_repeated...
Imports: ```python import typing ``` Type definitions: Input Types: socket.socket, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: socket.socket, v2: str) -> None: v1.send('CLIENT_NAME'.encode('utf-8')) v3 = self.process_packet(v1, 2048) print(v3) v1.send('CL...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array) -> np.array: self.window.append(v1[:2]) return np.concatenate(self.window) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): with open(v1, 'w') as v2: v2.write('\n'.join(self.__vocab.keys())) ```
Imports: ```python from datetime import date from urllib.parse import urljoin, urlparse import typing ``` Type definitions: Input Types: str, str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=v1.today().isoformat(), v2: str='v4', v3: int=100): v4 = {'date': v1, 'ip...
Imports: ```python import typing ``` Type definitions: Input Types: 'Role' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Role') -> None: v2 = 'userId' v3 = 'roleId' v4 = 'mutation SetOrganizationRolePyApi($%s: ID!, $%s: ID!) {\n setOrganizationRole(data...
Imports: ```python import typing ``` Type definitions: Input Types: set Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: set): for v2 in v1: self.addDataPriorityRule(*v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: 'ApplyResult[typing.Tuple[GetBatchDataWithPostResponseWrapper, int, typing.MutableMapping]]' Dependencies: Function Name: v0 Function: ```python def v0(self, v1, **v2) -> 'ApplyResult[typing.Tuple[GetBatchDataWithPostResponseWrapper,...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray=None): v2 = self.srcrange if v2 is None else v2 assert len(v1) == len(v2), ValueError('...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: def v1(self) -> None: self._name: Optional[str] = None def v2(self) -> str: return self._name or f'<{type(self).__qualname__}>' def v3(self, v4: Context) -> None: raise NotImplementedError() ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: argparse.Action Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: Any, **v2: Any) -> argparse.Action: v3 = self.parser.add_argument(*v1, **v2) self.actions.append(v3.dest) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: list, list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list) -> list: if len(v1) < 4: return v2 if len(v2) < 4: return v1 return [v1[0] if v1[0] < v2[0] else v2[0], v1[1] if v...
Imports: ```python import typing ``` Type definitions: Input Types: str, tuple Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: tuple) -> list: v3 = [] if (v4 := v2[0]) > 0: v3.append(v1[0:v4]) for v5 in range(len(v2) - 1): v3.append(v1[v2[v5]:v2[v5...
Imports: ```python import typing ``` Type definitions: ```python class v0(Protocol): def __repr__(self) -> str: return f'{self.raw_name} {self.version} ({self.location})' def v1(self) -> str: return f'{self.raw_name} {self.version}' @property def v2(self) -> Optional[str]: """...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, bytes Output Type: Optional[bytes] Dependencies: ```python @contextlib.contextmanager def v0() -> Generator[None, None, None]: try: yield except redis.ResponseError as error: if error.args[0].startswith('WRONGTYPE ') or ...
Imports: ```python import typing ``` Type definitions: Input Types: t.Dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: t.Dict) -> bool: v2 = v1.get('services', {}).get('iptables-restore', {}) return v2.get('status') == 'enabled' ```
Imports: ```python import datetime import typing ``` Type definitions: Input Types: datetime.datetime Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: datetime.datetime=None): if v1 is None: v1 = datetime.datetime.now() v2 = str(v1.weekday() + 1) v3 = '0' + str(v1.mo...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: if len(v1) != len(v2): return False v3: bool = True v4: list = list(v1) v5: list = list(v2) v4.sort() v5....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: for v1 in range(3): if self.board[0][v1] == self.board[1][v1] == self.board[2][v1] != 0: return self.board[0][v1] if self.board...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = 'product-reviews/.+' v3 = re.compile(v2) v4 = re.search(v3, v1).group() v1 = 'https://www.amazon.co.jp/' + v4 return v1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = [0] * (len(v1) + 1) v2[0] = 1 for v3 in range(1, len(v1) + 1): v4 = 4 if v1[v3 - 1] in ('7', '9') else 3 for v5 in...
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): self.ws = await self.client._state.app.factory.ws_connect(self.gateway, compress=15) if not v1: await self.identify() ...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict: v1 = {'add': {}, 'remove': {}, 'change': {}} (v2, v3) = (self._old['model'], self._new['model']) v4 = 0 for v5 in ('unit_models',...
Imports: ```python from timeit import default_timer as timer import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.timer_step_backward = timer() self.timedelta_step_forward = self.timer_step_backward - self.timer_step...
Imports: ```python import typing ``` Type definitions: Input Types: tuple, tuple, tuple, tuple, str Output Type: Any Dependencies: ```python def v0(v1: str): v1 = v1.lstrip('#') v2 = len(v1) return tuple((int(v1[i:i + v2 // 3], 16) / 255 for v3 in range(0, v2, v2 // 3))) ``` ```python def v4(v5: tuple): ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: Union[np.ndarray, None] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Union[np.ndarray, None]: if v1 is None: return None v2 = self._weak_heap_image_infos.get(v1, None...
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._create_cursor() v3 = f'DELETE FROM {v1} WHERE {v2}' await self._cursor.execute(v3) await self._connection....
Imports: ```python import typing ``` Type definitions: Input Types: List[int], Any Output Type: List[int] Dependencies: ```python def v0(v1, v2): v3 = [] for (v4, v5) in enumerate(v1): if v5 == v2: v3.append(v4) return v3 ``` Function Name: v6 Function: ```python def v6(v7: List[int], v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self._check_not_discarded() pass ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self.session.post(f'{self.url}/connections/create-invitation') v1.raise_for_status() return v1.json() ```
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.sample_genotype(v1) return max(v2) == 1 ```
Imports: ```python import functools import numpy as np import typing ``` Type definitions: Input Types: Union[pd.DataFrame, pd.Series], Union[pd.DataFrame, pd.Series], float, bool, int, int, int, float Output Type: Union[pd.DataFrame, pd.Series] Dependencies: ```python def v0(v1: float) -> Union[float, np.float]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[smart_contract_model.SmartContractModel] Dependencies: ```python def v0(v1: str) -> smart_contract_model.SmartContractModel: return smart_contract_model.new_from_at_rest(storage.get_json_from_object(f'{FOLDER}/{v1}/metadata.json...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], Optional[str], str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str], v2: Optional[str], v3: str) -> str: if v1 and v2: v4 = v2 + '.' + v1 + '.' + v3 elif v1: v4...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: List[str] v3: int v4: str v5: str v6: str v7: str v8: str v9: bool v10: str v11: int v12: str v13: str v14: str v15: str v16: int v17: Dict[str, int] v18:...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'Debugger' Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> 'Debugger': if self.enabled and v1: if self.indent not in (None, ''): print(self.indent, end='') print(*v1, **v2) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> None: for v2 in self._observers: v2(v1) ```
Imports: ```python import requests import logging from requests.exceptions import HTTPError, ConnectionError import typing ``` Type definitions: Input Types: Dict[str, str], Any Output Type: None Dependencies: ```python def v0(v1: Optional[str], v2: Optional[str], v3: Dict[str, str]) -> str: v4 = v3['key'] v5 ...
Imports: ```python from pandas._libs import lib, tslib from pandas._libs.tslibs import BaseOffset, NaT, NaTType, Resolution, Timestamp, conversion, fields, get_resolution, iNaT, ints_to_pydatetime, is_date_array_normalized, normalize_i8_timestamps, timezones, to_offset, tzconversion from pandas.errors import Performanc...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'Protocol' Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: BaseWorker) -> 'Protocol': if self.workers_resolved: raise RuntimeError(f"This protocol is already deployed to {', '.join((worker.id for (v2, v...
Imports: ```python import logging import numpy as np import typing ``` Type definitions: Input Types: int, int, bool Output Type: List[List[Any]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: bool=False) -> List[List[Any]]: v4 = self.graph v5 = [] v6 = list(v4.node...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._wait_for_msgs_task and (not self._wait_for_msgs_task.done()): self._wait_for_msgs_task.cancel() if self._message_iterator: s...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, dict Output Type: Any Dependencies: ```python def v0(v1, v2: int): return (sum(v1[1:]) / 3600 * v2 + sum(v1[:len(v1) - 1]) / 3600 * v2) / 2 ``` ```python def v3(v4: [list]) -> list: v5 = [] v6 = len(v4[0]) for v7 in range(v6)...
Imports: ```python import typing ``` Type definitions: ```python @attr.s(slots=True, cmp=True, frozen=True, cache_hash=True) class v0: v1 = attr.ib(cmp=True, kw_only=True, type=str) v2 = attr.ib(cmp=True, factory=frozenset, kw_only=True, type=typing.FrozenSet[typing.Tuple[str, typing.Any]]) v3 = attr.ib(cmp...
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[dict[str, Any]], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[dict[str, Any]], v2=None) -> None: self.player_grid.load_setup(v1) self.opposite_grid.ai_setup = v2 or list() se...
Imports: ```python import torch as th from torch import nn import typing ``` Type definitions: Input Types: Callable[[th.Tensor], th.Tensor], Any, Any, Any Output Type: th.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable[[th.Tensor], th.Tensor], v2, v3=10, v4=1e-10) -> th.Tensor: v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[Dict[str, Dict]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[Dict[str, Dict]]: v1 = [] for (v2, v3) in self._app.toolbox.tools(): try: v4 = v3.lineage.to_dict() excep...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: numpy.array, float Output Type: numpy.array Dependencies: Function Name: v0 Function: ```python def v0(v1: numpy.array, v2: float=None) -> numpy.array: if v2 is None: if v1.dtype == bool: v2 = False elif v...
Imports: ```python import json import typing ``` Type definitions: Input Types: pd.DataFrame, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: str): v1.to_json('tabela.json', orient='records') with open('./tabela.json') as v3: v4 = json.load(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, List[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, List[str]]: v1 = v1.lstrip(' -') v1 = v1.split() v2 = [] v3 = 0 for (v4, v5) in enumerate(v1): if v5....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = self.check_output(['gcloud', 'sql', 'operations', 'list', '-i', v1, '--format=get(NAME,TYPE,STATUS)']) return v2.decode('utf-8').strip...
Imports: ```python import json import base64 import typing ``` Type definitions: Input Types: Any Output Type: Optional[Union[Dict, List]] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Optional[Union[Dict, List]]: if v1.method == 'POST': if v1.content_type == 'application/json': ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, *v2, **v3) -> None: self._schedule_event(self.comet.log, 'space_logging', v1, *v2, **v3) super().takeoff(v1, *v2, **v3) ```
Imports: ```python import os import subprocess import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = subprocess.run('echo $GNUPGHOME', shell=True, stdout=subprocess.PIPE) if v1.stdout.decode('utf-8').strip(): return...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable['Term'] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable['Term']): self.has_var = bool(sum(tuple((term.has_var for v2 in v1)))) self.has_ivar = bool(sum(tuple((v2.has_ivar for v2 in v1)))...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: ```python def v0() -> List[tf.config.PhysicalDevice]: return tf.config.list_physical_devices('GPU') ``` Function Name: v1 Function: ```python def v1(v2: int): v3 = v0() tf.config.s...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self.settings(JWT_AUTH_KEYS={'zulip': {'key': 'key', 'algorithms': ['HS256']}}): v1 = self.client_post('/accounts/login/jwt/') self....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): try: v2 = int(v1) except (ValueError, TypeError): return v1 else: return v2 ```