text
stringlengths
190
325k
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = np.zeros(shape=(self._playingMatrixSize[0], self._playingMatrixSize[1]), dtype=np.uint8) for v2 in range(len(self.IO_nodeMatr...
Imports: ```python import typing ``` Type definitions: Input Types: list, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2=None) -> str: v2['advice'] = True v3 = v1[1] return f'{v3};' ```
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> None: v2 = self.max_volt v3 = 0 v4 = v1 v5 = self.max_curr / self.rampup_time while v2 < self.max_volt and v4 < self.min_comfor...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Awaitable | None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> Awaitable | None: if not self._conn: return v1 = await self._execute(self._conn.close) self._conn = None return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str) -> str: v4 = self._get_metric(v1, v2, v3) if v4.empty: return '' else: return v4.units.item() ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int) -> None: self.key = v1 self.parent = self self.rank = 0 ``` Input Types: int Output Type: v0 Dependencies: Function Name: v2 Function: ```python def v2(self, v3: int) -> v0: v4 = self...
Imports: ```python import typing ``` Type definitions: Input Types: list, Sequence, Any Output Type: list Dependencies: ```python def v0(v1): try: iter(v1) except TypeError: return False return True ``` Function Name: v2 Function: ```python def v2(v3: list, v4: Sequence=str, v5=inf) -> list...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[str]]): for v2 in v1: if len(v2) < 2: raise ValueError('no parent and child tables given') for v3 in range...
Imports: ```python import os import typing ``` Type definitions: Input Types: io.FileIO, bytes, bool Output Type: Any Dependencies: ```python def v0(v1: io.FileIO): v1.flush() os.fsync(v1.fileno()) ``` Function Name: v2 Function: ```python def v2(v3: io.FileIO, v4: bytes, v5: bool=False): v6 = len(v4) ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: NumpyIndexT, int Output Type: NumpyIndexT Dependencies: Function Name: v0 Function: ```python def v0(v1: NumpyIndexT, v2: int) -> NumpyIndexT: if isinstance(v1, np.ndarray): return np.tile(v1, v2) v3 = np.tile(np.ar...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: tf.logging.info('Running driver for %s', self._component_info.component_id) v1 = self._run_driver(self._input_dict, self._outpu...
Imports: ```python import typing ``` Type definitions: ```python class v0(ArgsBase): v1 = Arg(str, 'docker.service') v2 = Arg(str, '/usr/bin/docker') v3 = Arg(str, '/etc/systemd/system') v4 = Arg(str, '/usr/local/etc') v5 = Arg(Literal['present', 'absent'], 'present') v6 = Arg(str) v7 = Arg(...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: shapely.geometry.Polygon, v2: pre.Material=pre.DEFAULT_MATERIAL, v3: Optional[List[float, float]]=None, v4=12): """Inits the Geometry class.""" if isinstance(v1, MultiPolygon): raise ValueE...
Imports: ```python import typing ``` Type definitions: Input Types: bytes Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> int: v2 = int(v1.decode()) return v2 ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str) -> str: if len(v1) > 255: return '\\\\?\\' + v1 return v1 ``` ```python def v2(v3: str) -> str: if len(v3) > 255: v3 = os.path.abspath(v0(v3)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> tuple: v2 = 0 v3 = 0 for v4 in self: v5 = v4.getAttribute(v1) if v5: v2 += 1 else: v3 += 1 ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[StreamInterface, ColumnarInterface] ``` Input Types: bool Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, *v3, v2: bool=False) -> v0: v4 = self.get_dataframe().groupby(by=v3, as_index=v2) return self.st...
Imports: ```python import torch import torch.nn as nn from math import log10 import math from torch.nn import functional as F from torch.nn import Parameter from math import exp import typing ``` Type definitions: Input Types: int, float Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python de...
Imports: ```python import asyncio as aio import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python async def v0(v1: int) -> int: await aio.sleep(0) if v1 % 3 == 0: raise ValueError return v1 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Union[int, float] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[int, float]): if self._volume_filenames is None: return 0 return np.interp(v1, self._time_keyframe_indice...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = TypeVar('T', bound='FDataGrid') ``` Input Types: bool Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self: v0, *v3: v0, v2: bool=False) -> v0: if not v2: for v4 in v3: self._chec...
Imports: ```python from pandas._libs.lib import item_from_zerodim from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, v2: str): v3 = v2.strip('__') in {'eq', 'ne', 'lt', 'le', 'gt', 'g...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: str): v2 = await asyncio.create_subprocess_shell(v1, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, start_new_session=True) ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = self._use_sim if self._ee_margin is not None: self._sphere_id = v2.add_sphere(self._ee_margin) v2.set_targ_obj_idx(v1) ```
Imports: ```python import tensorflow as tf from tensorflow.python.ops import nn_ops from tensorflow.python.ops import embedding_ops from tensorflow.keras.layers import Dropout, Layer, Dense from tensorflow.keras.initializers import Initializer from tensorflow.keras.regularizers import Regularizer from tensorflow.keras....
Imports: ```python import typing ``` Type definitions: Input Types: 'IRunner' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'IRunner') -> None: v2 = v1.valid_metrics[self.reduced_metric] (v3, v4) = self._scheduler_step(scheduler=self._scheduler, reduced_metric=v2) ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = os.getenv('PYTHON_VERSION') return f'Hello World from a default Python {v1} app in a Docker container, with Meinheld and Gunicorn (default)'...
Imports: ```python import typing ``` Type definitions: ```python v0 = Callable[[chex.Numeric], chex.Numeric] ``` Input Types: int, float, float, float, float Output Type: v0 Dependencies: ```python def v1(v2: float, v3: float, v4: float): return v3 + (v2 - v3) / 2.0 * (jnp.cos(jnp.pi * v4) + 1) ``` ```python def v5...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self) -> Any: v1 = self._get() return v1.result() if v1 is not None else None ```
Imports: ```python import typing ``` Type definitions: ```python v0 = ColumnarInterface ``` Input Types: int, bool, bool Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, *v5, v2: int=10, v3: bool=True, v4: bool=True, **v6) -> v0: self.actualize() v7 = v3 and hasattr(self, 'tee_s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> bool: if set(np.unique(v1)) == set([0, 255]): v2 = max(v1.shape) / min(v1.shape) v3 = np.bincount(v1.ravel()) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str): v2 = {'tags': ['networks', 'configure', 'trafficShaping', 'applicationCategories'], 'operation': 'getNetworkTrafficShapingApplicationCategories'...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: ```python def v0(v1, v2, v3): if v1 == v3: return v2 v4 = 0 v5 = '' v6 = v2[0] for v7 in v2: if v7 == v6: v4 += 1 else: v5 += str(v4) v5...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: int v2: int v3: int @property def v4(self) -> CtxtType: return CtxtType.from_ptid(self.ptid) ``` ```python @dataclass class v5(object): v6: ExecUnit v7: int v8: Optional[ExecUnit] v9: ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: List[int]) -> int: v3 = sum(v1) v4 = sum(v2) if v3 - v4 < 0: print('cant travel') return -1 else: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: ```python def v0(v1): return v1 * v1 > x ``` Function Name: v2 Function: ```python def v2(self, v3: int) -> int: def v4(v5): return v5 * v5 > v3 (v6, v7) = (0, v3 + 1) while v6 < v7: ...
Imports: ```python from collections import Counter import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(): v1 = Counter() while self.index < len(formula) and formula[self.index] != ')': if formula[self.index] == '(': self.index += 1 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[dict], List[dict], List[List[str]], list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[dict], v2: List[dict], v3: List[List[str]], v4: list): v5 = dict() v6 = dict() v7 = dict...
Imports: ```python import re import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: with open('INCAR', 'rt+') as v2: v3 = v2.read() v4 = re.sub('ENCUT\\s*=\\s*-?\\s*([0-9]+)?', 'ENCUT={}'.format(v1),...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str=None, v3: dict=None): self.__config__['replayer']['mode'] = v1 if v2 is not None: self.__config__['replayer']['path'] = ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: (v1, v2) = self.basic_test({'default_projector_$_id': {'not_existing': 1}}, check_200=False) self.assert_status_code(v2, 400) self.assertIn("data...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int): yield (v1, v2) while True: match v1: case 0: (v1, v2) = (13, v2 + 6) case 1: ...
Imports: ```python import copy import typing ``` Type definitions: ```python v0 = TypeVar('Component', bound='Component') ``` ```python v1 = TypeVar('T', bound='ComponentFile') ``` Input Types: Type[v0] Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(self, v3: Type[v0]) -> v1: v4 = copy....
Imports: ```python import logging import typing ``` Type definitions: Input Types: asyncio.Task[Any] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: asyncio.Task[Any]) -> None: self._active_callbacks = [t for v2 in self._active_callbacks if not v2.done()] self._active_ca...
Imports: ```python import difflib import winreg import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1): (v2, v3) = (0, 50) (v4, v5) = (None, None) for v6 in v1: v7 = v6['DisplayName'] v8 = None try: v8 = v6['InstallL...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3=None): self.key_l = v1 self.my_fixed = v2 if self.key_l == 'H': self.my_list = self.h_list self.m = self....
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=None): self.val = v1 self.next = v2 ``` Input Types: List[Optional[v0]] Output Type: Optional[v0] Dependencies: Function Name: v3 Function: ```python def v3(self, v4: List[Optional[v0]]) -> Optio...
Imports: ```python import os import cv2 import numpy as np import typing ``` Type definitions: Input Types: List[str] Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> Tuple[np.ndarray, np.ndarray]: v2 = len(v1) v3 = np.zeros((v2, *se...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: List[float] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> List[float]: v3 = np.ones(3) v3[:3] = v1 v4 = np.dot(v2, v3) return [v4[0...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[torch.Tensor] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[torch.Tensor], **v2): for v3 in v1: v3.data.clamp_(max=self.max, min=self.min) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.MultiArray(1, [2, 3], [[4, 5], [6, 7]], [[[8, 9], [10, 11]], [[12, 13], [14, 15]]], [[[[16, 17], [18, 19]], [[20, 21], [22, 23]]]], [[[[[24, 25...
Imports: ```python import numpy as np import cv2 import typing ``` Type definitions: Input Types: Union[List[str], List[np.ndarray]], Union[Dict, np.ndarray], int, int, int, bool Output Type: Generator[np.ndarray, np.ndarray, None] Dependencies: ```python def v0(v1, v2) -> List: return (v1[pos:pos + v2] for v3 in ...
Imports: ```python import platform import sys import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: if platform.system() == 'Windows': sys.stderr.reconfigure(encoding='ansi') ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: assert self.buffer is not None v1 = self._get_alazar() v2 = 1.0 * self.buffers_per_acquisition * self.records_per_buffer ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray): v1 = np.divide(v1, np.sum(v1, axis=1)[:, np.newaxis]) v2 = np.log(v1) v3 = max(v1.shape[1], 1) v4 = 1 / v3 * np...
Imports: ```python import math import typing ``` Type definitions: Input Types: int, int, bool Output Type: Any Dependencies: ```python def v0(v1): return Backend.to_numpy(v1) ``` ```python def v2(v3, v4, v5, v6): v7 = Backend.get_xp_module() v8 = Backend.get_sp_module() with timeit('generate demo imag...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: bytes Output Type: tuple[str, int, dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes) -> tuple[str, int, dict[str, Any]]: try: v2 = self.serializer.loads(v1) except (pickle.Pickle...
Imports: ```python import os import typing ``` Type definitions: Input Types: Text Output Type: Text Dependencies: ```python def v0() -> Text: v1 = 'stats.tfdv' return v1 ``` Function Name: v2 Function: ```python def v2(v3: Text) -> Text: v4 = os.path.join(os.path.dirname(v3), v0()) return v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: int): v3 = [] v4 = [-1 for v5 in range(v2)] for (v5, v6) in enumerate(v1): if v4[v6[0]] >= 0: v3.append((v4[v6[0]], v5)) ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2=None): v3 = os.getenv(v1) return v3.strip().lower() == 'true' if v3 else v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str=None) -> str: v2 = await self.fetch_player_mmr(v1) v3 = v2['LatestCompetitiveUpdate']['SeasonID'] if len(v3) == 0: v3 = self.__get...
Imports: ```python import typing ``` Type definitions: Input Types: List, List, float Output Type: float Dependencies: ```python def v0(v1: List, v2: List) -> float: v3 = [d for v4 in v2 if v4 in v1] return len(v3) / len(v2) ``` ```python def v5(v6: List, v7: List) -> float: v8 = [d for v9 in v7 if v9 in v...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: discord.Message Output Type: typing.Awaitable Dependencies: Function Name: v0 Function: ```python def v0(self, v1: discord.Message) -> typing.Awaitable: v2 = [] self.state_msg = v1 v2.append(v1.edit(content=None, embed=self...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, str Output Type: int or str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: str) -> int or str: if v3 == '+': return v1 + v2 if v3 == '-': return v1 - v2 if v3 == '*': ret...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = ('original', 'modified', 'alignment') v2: str '\n The original string, before any modifications.\n ' v3: str '\n The current value of the string, after all modifications.\n ' v4: Alignment '\n The ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> dict: async with self.session.get(f'https://{self.base_url}/search/fuzzy/json', params={'query': v1, 'language': 'en-US', 'api-version': self...
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): v3 = self.getRegister(v2) v3 &= ~(1 << v1) & 255 return self.setRegister(v2, v3) ```
Imports: ```python import numpy import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: if self.etype == 'custom': return self.encoder.conv_subsampling_factor * int(numpy.prod(self.subsample)) else: return ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: trimesh.Trimesh, tuple Output Type: Any Dependencies: ```python def v0(v1, v2=None): v1 = [np.asarray(x) for v3 in v1] v4 = v1[0].dtype v5 = np.prod([v3.size for v3 in v1]) if v2 is None: v2 = np.zeros([v5, l...
Imports: ```python import torch from torch.nn import functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, str, bool Output Type: torch.Tensor Dependencies: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3: str='elementwise_mean', v4: bool=False) -> torch.Tensor: v5 = ...
Imports: ```python import json import os import typing ``` Type definitions: Input Types: dict, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: str) -> None: with open(os.path.join(self.path_save, f'{v2}.json'), 'w') as v3: json.dump(v1, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Set[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Set[str]: v2 = {'RoleName': v1} v3 = set() while True: v4 = self.iam.list_attached_role_policies(**v2) v5 = v4.get('Att...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1) -> str: with open(v1, 'ab') as v2: v2.write(subprocess.check_output('ipconfig /all')) ```
Imports: ```python import io import typing ``` Type definitions: Input Types: str, str, Optional[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: Optional[str]=None) -> None: with io.open(v1, 'w', newline=v3) as v4: v4.write(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: str) -> int: v3 = '%s' % f'{v1:b}' v4 = '' for v5 in range(0, len(v2)): if v5 >= len(v3): v4 = (v2[-1 - v5] if v2[-1 - v...
Imports: ```python import typing ``` Type definitions: Input Types: int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=-1, v2=None): v3 = self.interpolate_time(v1) if v2 is None else v2 v4 = self.dk[v1] v5 = self.sensitivityCalculation(self.timeHistories[0][...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('TModule', bound='Module') ``` Input Types: 'Project', str Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: 'Project', v3: str) -> Optional[v0]: v4: Optional[str] = self.path_for(v3) retu...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], lsp.MessageType, bool Output Type: None Dependencies: ```python def v0(v1: lsp.ClientCapabilities) -> bool: v2 = v1.window if v2 is not None: return v2.status is not None else: return False ``` ```python...
Imports: ```python import pandas as pd from pandas.core.accessor import CachedAccessor from pandas.io.formats.printing import pprint_thing from pandas.api.types import is_list_like, is_hashable from pandas.api.extensions import ExtensionDtype from pandas.tseries.frequencies import DateOffset import typing ``` Type defi...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4, v5, v6, v7={}, v8=[]): """Result object must be static; alway to be ensure it is revealed. """ self.delay = DynamicVariableOperation.reveal_argument(v1) self.damage = Dynami...
Imports: ```python import typing ``` Type definitions: ```python class v0(ABC): v1 = [] def v2(self) -> dict: """Serializes model metadata item to dictionary. Returns ------- dict The dictionary representation of model metadata item. """ return {fiel...
Imports: ```python import glob import os import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = [] for v2 in self.dict_path: v1.extend(glob.glob(os.path.join(os.path.abspath(v2), '*.dict'))) retur...
Imports: ```python import typing ``` Type definitions: Input Types: ttLib.TTFont Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: ttLib.TTFont) -> str: v2 = None try: v3 = v1['name'] v4 = next((v4 for v4 in v3.names if v4.nameID == 6)) v2 = v4.toUnicode()...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, **v3) -> int: v4 = self.base_put_request(f'{self.base_url}/{v1}', firstName=v2, **v3) return self.process_result_with_status_code(v4,...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=2) -> str: v2 = f"{' ' * v1}{self.message}\n" v2 += ''.join((child.display(depth=v1 + 2) for v3 in self.children)) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = v1.get_data() self.spread_engine.stop_algo(v2.algoid) ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, int, bool Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor, v2: int, *, v3: bool=False) -> tf.Tensor: (v4, v5) = (tf.shape(v1)[0], tf.shape(v1)[1]) v6 = tf.cast...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: str = None ``` ```python @dataclass class v2: v3: WorkflowService v4: v4 v5: WorkflowClientOptions @classmethod def v6(cls, v7: str='localhost', v8: int=7933, v9: str='', v10: WorkflowClientOptions=None) -...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[List[str], List[str]] Dependencies: ```python def v0(v1: LoggingTransaction) -> Tuple[List[str], List[str]]: (v2, v3) = self._get_media_mxcs_in_room_txn(v1, room_id) v4 = [] v5 = [] for v6 in v2: v4.appen...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: ```python def v0(v1) -> str: if 'http' in v1: v2 = v1.split('/') v2 = [z for v3 in v2 if not 'http' in v3] return ''.join(v2) return v1 ``` Function Name: v4 Function:...
Imports: ```python import ast import typing ``` Type definitions: Input Types: ast.Call Output Type: Tuple[bool, Optional[ast.Lambda]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Call) -> Tuple[bool, Optional[ast.Lambda]]: if len(v1.args) < 1 or len(v1.args) > 3: raise SyntaxE...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str) -> bool: v3 = {'query': 'mutation( $orgID:String! $agentID:String! $advPeriod:Long! ) { quarantineAssets( orgId:$orgID assetIds: [$agent...
Imports: ```python from io import BytesIO from datetime import datetime from tarfile import TarInfo, TarFile import typing ``` Type definitions: Input Types: TarFile, bytes, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: TarFile, v2: bytes, v3: str): v4 = TarInfo(name=v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float): v4 = v2 - v1 return v3 / (1 + 10 ** (v4 / 400)) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, urlmatch.UrlPattern Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *, v2: urlmatch.UrlPattern=None) -> None: v3 = self._values[v1].remove(v2) if v3: self._mark_changed() ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str, float, float Output Type: List[Tuple[str, int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: float, v3: float) -> List[Tuple[str, int]]: v4 = v3 - v2 v5 = int(np.log2(v4)) if v4 > 0 els...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: try: for v2 in os.listdir(v1): if os.path.isdir(v2): os.rmdir(v2) except OSError: pass ``...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None) -> List[str]: v3 = v1.findall(self.body) if v2: v3 = list(map(v2, v3)) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict): self._parameters = {} for v2 in v1: for v3 in self.__markup: v4 = self.__markup[v3] if v4 == v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], Any, Optional[str], Optional[dict] Output Type: Any Dependencies: ```python def v0(v1, *, v2: Optional[str]=None, v3=None, v4: Optional[str]=None, v5: Optional[dict]=None): if type(v3) in (list, set, tuple): v3 = '\n'.j...