text
stringlengths
190
325k
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: base.ClockSignal Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: base.ClockSignal): v2 = np.nonzero(self.triggers(v1))[0] v3 = [self.shape_maker(v1.clock.get_clock_signal_with_start(i))...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: ```python def v0(v1: int, v2: int, v3: list) -> int: if v1 == 0 or v2 == 0: print(v3) return 0 elif v1 == 1 or v2 == 1: if v2 > 1: v4 = v2 while v4 > 1: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseModel): v1: int v2: t.List[ParkItem] ``` Input Types: Any, Any Output Type: v0 Dependencies: Function Name: v3 Function: ```python def v3(self, v4=0, v5=100) -> v0: v6 = self._client.get_last_parks(v4, v5) return self._parse_...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.LongTensor, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.LongTensor, v2: int): v3 = v1[:, 0] v4 = v1[:, 1] v5 = v1[:, 2] v6 = v3 * v2 + v4 v7 = v4 * v2 + v3 v8 = ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.match_reserved('package') v1 = self.match_identifier(package=True) self.match_reserved(';') if v1[0] == '.' or v1[-1] == '.': ra...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1) -> int: v2 = [-1] * 256 v3 = sys.maxsize for v4 in range(len(v1)): if v2[ord(v1[v4])] == -1: v2[ord(v1[v4])] = v4 e...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], Optional[List[str]] Output Type: Any Dependencies: ```python def v0(v1: str, v2: Union[int, float, str, bool, List[int], List[float], List[str]]) -> List[str]: v3 = [format_key(v1)] if isinstance(v2, list): for v4 in v2:...
Imports: ```python import typing ``` Type definitions: ```python class v0(typing.NamedTuple): v1: str v2: str v3: str v4: typing.Optional[str] ``` Input Types: v0, bytes, str Output Type: bool Dependencies: Function Name: v5 Function: ```python def v5(v6: v0, v7: bytes, v8: str) -> bool: v9 = blob....
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3=None, v4=None) -> List: v5 = self.select(select=v1, table_name=v2, where=v3, extra=v4) if v5 is None: return [] retur...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int=0, v3: bool=True) -> None: v4 = self._calc_abs_indent(v2, v3) for v5 in v1.splitlines(): self.logger.info(' ' * v4 + v5...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> list: if len(v1) <= 1: return v1 else: v2 = 1 v3 = len(v1) while v2 < v3: if v1[v2] == v1[v2 - 1]: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, **v2): v3 = self.get_class(v1) for (v4, v5) in v2.items(): if v5 is None: if v4 in v3: del v3[v4] else:...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Iterator[Tuple[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> Iterator[Tuple[str, str]]: for v2 in v1.read_text().splitlines(keepends=False): (v3, v4, v5) = v2.partition('==') ...
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: v3 = True for v4 in range(min(len(v1), len(v2))): v3 &= v1[v4] == v2[v4] 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): v2 = self.sumo_connection.api.save_top_level_json(json=v1) v3 = v2.json().get('objectid') return v3 ```
Imports: ```python import numpy as np import matplotlib.pyplot as plt from matplotlib import colors import matplotlib.animation as animation from matplotlib.patches import Rectangle import xarray as xr from cartopy.crs import PlateCarree import typing ``` Type definitions: Input Types: xr.DataArray, Any, float, float,...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> str: v3 = {'nt': f'{v2}.exe', 'posix': v2} v4 = v3[os.name] v5 = os.path.join(v1, v4) if not os.path.isfile(v5): ...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[int]]) -> int: v2 = len(v1) if v2 == 1: return v1[0][0] v3 = float('inf') for v4 in range(1, v2): for v5 i...
Imports: ```python import typing ``` Type definitions: Input Types: T_VECTOR, T_VECTOR Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: T_VECTOR, v2: T_VECTOR) -> None: if v1 not in self._verts: raise KeyError(v1) if v2 not in self._verts: raise KeyError(v...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0(object): v1 = ('node', 'input', 'next') v2: 'BaseCDAGNode' v3: str v4: Optional['Subscriber'] ``` Input Types: Output Type: Iterable[v0] Dependencies: Function Name: v5 Function: ```python def v5(self) -> Iterable[v0]...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, int, int, float, Text, bool, Optional[int] Output Type: tf.Tensor Dependencies: ```python def v0(v1: int, v2: int, v3: float, v4: float): v5 = tf.cast(v2, tf.float32) v6 = tf.cast(v1, tf.float32) def v7(...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: Any v2: Optional[str] = None def v3(self, v4: str) -> Any: """Delegates to the underlying model.""" if isinstance((v5 := getattr(self.model, v4)), Column): return Column(self, v5.field, v5....
Imports: ```python import inspect import typing ``` Type definitions: Input Types: object, dict, dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: object, v2: dict, v3: dict=None) -> dict: v3 = v3 or {} v4 = {} v5 = inspect.getfullargspec(v1)[0] for (v6, v7) in v2.i...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, *, v2=_HOOK_MAP): try: v3 = v2[v1] v3() except KeyError: pass ```
Imports: ```python import os import subprocess import typing ``` Type definitions: Input Types: Union[str, Path] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path]) -> bool: v2 = os.path.exists(os.path.join(v1, '.git')) v3 = subprocess.run('git branch'.split(), c...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: Any, List[str] Output Type: Any Dependencies: ```python def v0(v1): from numpy import nan v2 = {} for (v3, v4) in v1.items(): v5 = {} for v6 in v4.keys(): if str(v6) != 'nan' and str(v6) != '' an...
Imports: ```python 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): self.experimental_design_input = v1 self.experimental_design_output = v2 self.design_matrix = self.p...
Imports: ```python import typing ``` Type definitions: ```python v0 = Any ``` ```python v1 = Any ``` ```python v2 = jnp.ndarray ``` ```python v3 = Any ``` Input Types: v3, v1, v2, v0 Output Type: Tuple[jnp.ndarray, v1] Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v3, v6: v1, v7: v2, v8: v0) -> ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0 Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> None: if self.filter(v2): return super().put_nowait(v2) ```
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: torch.Tensor, Optional[torch.ByteTensor], Any Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: Optional[torch.ByteTensor]=None, v3=1) -> List[List[i...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Dict[str, List[str]]], Optional[str] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Dict[str, List[str]]]=None, v2: Optional[str]=None) -> int: v3 = self.get_all_documents(index=v2, filters...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: 'User' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> 'User': v3 = self.create_user(email=v1, password=v2) v3.is_staff = True v3.is_superuser = True v3.save(using=self._db) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: csr_matrix Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> csr_matrix: (v2, v3) = self.match_and_extend(v1) if v2: v4 = self.pipeline_.predict_proba(v2)[:, 1] else: v4 = [] retu...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: v2 = v1[:v1.rfind(':')] return os.path.exists(v2) ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: list Output Type: List[pd.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> List[pd.DataFrame]: v2 = [] for v3 in v1: v4 = pd.read_html(v3.prettify(), flavor='bs4')[0] v2.ap...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[List[int], List[int]] Output Type: Tuple[float, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[List[int], List[int]]) -> Tuple[float, int]: v2 = 0 v3 = 0 v4 = 0 v5 = 0 for v6 in range(len(v1[1])): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> str: v3 = [] for v4 in v1: while v3 and v3[-1] > v4 and (v2 > 0): v3.pop() v2 -= 1 if not ...
Imports: ```python import zipfile import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): with zipfile.ZipFile(v1, 'r') as v2: return sum((f.file_size for v3 in v2.infolist())) ```
Imports: ```python import typing ``` Type definitions: ```python class v0(BoundedEntity, ABC): v1 = Point3D.create(0, 0, 0) v2 = Vector3D.create(0, 0, 0) v3 = Vector3D.create(1, 0, 0) v4 = Vector3D.create(0, 1, 0) v5 = Vector3D.create(0, 0, 1) 'The name of the Component.\n \n When this Com...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator[str]: v1 = os.path.join(self.configs.data_path, 'multi.idx') if not os.path.exists(v1): raise FileNotFoundError(f'Canno...
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, **v3): v4 = '\nimport network\nwlan = network.WLAN({})\nwlan.active({})\n'.format(v1, str(v2)) self.execute(v4, **v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: commands.Command Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: commands.Command): v2 = await self.filter_commands([v1]) if v2: self.paginator.add_command(self.clean_prefix, v1, self.get_co...
Imports: ```python import numpy as np import cv2 import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: ```python def v0(v1: 'npt.NDArray', v2: int=50, v3: Any=255): v4 = np.repeat(v3, v1.shape[1]) v4 = np.array(v4, dtype=np.uint8) return np.conc...
Imports: ```python from qiskit.utils import algorithm_globals from qiskit.utils.deprecation import deprecate_arguments import typing ``` Type definitions: Input Types: int, Callable[[np.ndarray], float], Optional[Callable[[np.ndarray], float]], Optional[List[Tuple[float, float]]], Optional[np.ndarray] Output Type: Tup...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not self.on_focus: return self.add_child(self.credits) self.current_focus = self.credits self.credits.popup() self.on_focus = ...
Imports: ```python import typing ``` Type definitions: Input Types: list, dict Output Type: Tuple[bool, dict, dict] Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: dict) -> Tuple[bool, dict, dict]: v3 = False (v4, v5) = (dict(), dict()) for v6 in v1: for (v7, v8) in v2.ite...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.Set[float] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Set[float]: v1 = super().transition_times() v1.update(self.inside_temp.transition_times) v1.update(self.outside_temp.transition_tim...
Imports: ```python import typing ``` Type definitions: Input Types: MutableMapping[str, Any] Output Type: Mapping[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: MutableMapping[str, Any]) -> Mapping[str, Any]: for (v2, v3) in list(v1.items()): if v2.startswith('_'): v4...
Imports: ```python import typing ``` Type definitions: Input Types: nx.Graph Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: nx.Graph) -> bool: v2 = v1.edges v3 = v1.order() return len(v2) == v3 * (v3 - 1) / 2 ```
Imports: ```python import typing ``` Type definitions: Input Types: cairo.Context, symbols.Polyline Output Type: None Dependencies: ```python def v0(v1: cairo.Context, v2: Tuple) -> None: if len(v2) == 4: (v3, v4, v5, v6) = v2 v1.set_source_rgba(v3 / 255.0, v4 / 255.0, v5 / 255.0, v6 / 255.0) e...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[torch.Tensor, torch.Tensor] Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[torch.Tensor, torch.Tensor]) -> torch.Tensor: self.optim.zero_grad() v2 = self.backprop(v1) self.optim....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = v1.split('or') if len(v2) == 1: return v1 v2 = [pt.strip() for v3 in v2] if len(v2) == 2: if v2[0] == 'None': ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: if not str(v1).startswith('http') and (not str(v1).startswith('s3')) and (not str(v1).startswith('ftp')): return False v2 = r...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, *v2, **v3): logger.info(f"Executing command: {' '.join(v1)}") subprocess.run(v1, *v2, **v3) ``` Function Name: v4 Function: ```python def v4(self, v5: str=None): if ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): nonlocal header if not v1: return False if len(v1) == 3 and (not header): v2 = True elif len(v1) == 3: return (0, 0, f...
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.getGeneratedRandomEffects() assert v1 in v2, 'Group {} not found in generated random effects: {}'.format(v1, v2) if not self.hasComp...
Imports: ```python import typing ``` Type definitions: Input Types: datetime Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime=None): if v1 is None: v1 = self.client.now return {v1: self.client.hourlykWhPrice(v1, self.mpid)} ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): assert type(v1) is str return v1 in self.classlist ```
Imports: ```python import typing ``` Type definitions: Input Types: typing.Dict Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: typing.Dict) -> int: try: return v1['pull_request']['number'] except Exception: raise RuntimeError('pull_request.number not found in G...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Any, Union[str, Path], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: Union[str, Path], v3: bool=False) -> None: v2 = Path(v2) if v2.exists() and (not v3): raise File...
Imports: ```python import sqlite3 from datetime import datetime from pathlib import Path from torch.utils.tensorboard import SummaryWriter import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict={}): v2 = datetime.now() s...
Imports: ```python import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor) -> torch.Tensor: v3 = self.sample_action(v1).ar...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str, Optional[dict] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[dict]=None) -> dict: v3 = self.__get_header() v4 = v2 v5 = requests.delete(url=v1, headers=v3, pa...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4, v5: str=''): v1.subheader('[Discrete-time SIR modeling](https://mathworld.wolfram.com/SIRModel.html) of infections/recovery') ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, list, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: list, v3: int): v4 = np.empty((v3, v1.shape[1])) for v5 in range(v3): v6 = np.where(v2 == np.max(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = [str(self.validation_information)] for v2 in self.validated_constraints: v1 += v2.report() return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> list: v2 = [] for v3 in self.s_space.dim_keys: v2.append(v1[v3]) return v2 ```
Imports: ```python import inspect from inspect import signature import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Any) -> str: v2 = inspect.getdoc(v1) return v2 if v2 else '' ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Tuple[str, str]: v1 = '' v2 = '' for v3 in self.__records: v1 += v3.groupName + ':x:' + str(v3.groupID) + ':' + ','.jo...
Imports: ```python import torch from torch import nn import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, bool Output Type: Tuple[torch.Tensor, Optional[torch.Tensor]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: torch.T...
Imports: ```python import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Circle from matplotlib.projections import register_projection from matplotlib.projections.polar import PolarAxes import typing ``` Type definitions: Input Types: np.ndarray, matplotlib.axes.Axes, List...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> list: v3 = [] v4 = v1 + v2 for v5 in range(v1, v4): v3.append(self.hex_array[v5]) return v3 ```
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 = [wire.split(',') for v3 in v1.splitlines()] (v4, v5) = [self._build_path(path) for v6 in v2] v7 = set(v4).intersection(set(v5)) ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> dict: v2 = v1.loc[:, 'Value labels (vls)'] v3 = [] for v4 in v2: if v4 is np.nan: v3.app...
Imports: ```python import json, logging, os from datetime import timedelta import typing ``` Type definitions: Input Types: df.DurableOrchestrationContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: df.DurableOrchestrationContext): v2 = os.getenv('OnCallPhoneNumber') v3 = {...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Tuple[Tensor, Tensor]] Output Type: Optional[List[Tuple[Tensor, Tensor, float]]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[Tuple[Tensor, Tensor]]=None) -> Optional[List[Tuple[Tensor, Tensor, float]]]: if v1 ...
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: self.body.reset_pose(position=[0.0, 0.0, 0.0]) v1 = np.random.uniform(-1.0, 1.0, size=3) v2 = np.random.uniform(-1.0, 1.0, siz...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> List[int]: v2 = [] for v3 in range(len(v1))[::-1]: if not v2 or v1[v3] > v1[v2[-1]]: v2.append(v3) ret...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, bool Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: bool) -> bytes: if not isinstance(v1, int): v1 = int(v1) return bytes([i for v4 in v1.to_bytes(v2, 'little', signed=v3)...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, str, str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str, v4: str, v5: str, v6: str, v7: str): self._load_movie_data(v1) self._load_link_data(v2) self._l...
Imports: ```python import typing ``` Type definitions: Input Types: types.ModuleType, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: types.ModuleType, v2: str, v3: Any) -> Any: if v2 == '': return v1 v4 = v1 v5 = v2.replace('/', '.').split('.') v6 = v5...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int, bool, str, str Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: int, v3: bool, v4: str, v5: str=None) -> dict: v6: dict = {'days': v2, 'compute_prune_count': v3, 'include_roles': v4, 'reas...
Imports: ```python import typing ``` Type definitions: Input Types: List[Union[List[Union[int, None, str]], None]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Union[List[Union[int, None, str]], None]]): if not v1: return for v2 in v1: if not v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): v2 = [] for (v3, v4) in v1.items(): v2 += list(v4.columns) v5 = set(v2) return v5 ```
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: Input Types: 'Player', int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Player', v2: int): self.subs.append((v1, v2)) self.combine_scores(v1) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: 'wavelength np.array' Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1: 'wavelength np.array', *v2: 'amplitude, peak position, peak width, constant') -> np.array: v3 = len(v2) // 3 v4 = v2...
Imports: ```python import typing ``` Type definitions: Input Types: 'SyncConfig' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: 'SyncConfig'): if v1.sync_to_driver is None: v1.sync_to_driver = not bool(v1.upload_dir) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: object Dependencies: Function Name: v0 Function: ```python def v0(self) -> object: if self.strategy is None: raise AttributeError('TreeNode has no Strategy') else: return self.strategy.can_classify() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, **v2) -> Dict[str, Any]: self._check_keys(v1, v2) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> str: if v1 is not None and len(v1) > 0: return ';'.join(v1).replace('/', '\\') + ';' return '' ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0() -> None: _renderables.extend(_renderables_add) _renderables_add.clear() for v1 in _renderables_remove: _renderables.remove(v1) _renderables_remove.clear() if False: ...
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._task_def.label_vocab if v2 is not None: return v2[v1] else: return int(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor): v2 = v1[..., 0, 0] * (v1[..., 1, 1] * v1[..., 2, 2] - v1[..., 1, 2] * v1[..., 2, 1]) - v1[..., 0, 1] * (v1[..., 1, 0] * v1[..., 2, 2] - v1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: print('\t' + str(self)) print(f'\tdelta: {self.delta}') if self.solutions: print(f'\tSolutions: {self.solutions}') else: prin...
Imports: ```python import logging import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4): self.id = v1 self.event_name = v2 self.body = v4 self.receipt_handle = v3 ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v5 Function: ```...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> bool: if len(v1) != len(v2): return False if v1 == v2: return True v3 = len(v1) v4 = [[[False] * (v3 + 1)...
Imports: ```python import torch from torch import nn import typing ``` Type definitions: Input Types: np.ndarray Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> List[str]: v2 = self.preprocess_input(v1) v3 = torch.softmax(self.backbone(v2), axis=-1) ...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: ChpSimulator v2: float = 0.0 v3: Dict[Loc, int] = field(default_factory=dict) v4: Dict[int, Loc] = field(default_factory=dict) v5: Dict[SpaceTimeLocation, MeasureResult] = field(default_factory=dict) def v...
Imports: ```python import json import typing ``` Type definitions: Input Types: argparse.Namespace Output Type: None Dependencies: ```python def v0(v1: str) -> Optional[BugoutResource]: v2 = get_subscription_type(v1) if v2 is None: return None v2 = bc.delete_resource(token=MOONSTREAM_ADMIN_ACCESS_T...