text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(*v1): v2 = [] v2.extend(list(v1)) return runner.invoke(app, v2) ``` Function Name: v3 Function: ```python def v3(v4: str): v5 = v0(v4, 'build', '--debug') assert v5.exit_code == 0...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: Union[str, PathLike], bool Output Type: Iterable[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, PathLike], v2: bool) -> Iterable[Any]: with open(v1, 'rb') as v3: v4 = pickle.load(v3) y...
Imports: ```python import numpy as np import pandas as pd from pandas import DataFrame from scipy.stats import chi2_contingency, pointbiserialr import typing ``` Type definitions: Input Types: DataFrame, str, list Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: DataFrame, v2: str, v3...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._addrs_rr.clear() self._timestamps.clear() ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Callable[[str], bool] Dependencies: ```python def v0(v1): v2 = v1.split(':', 1)[1] v3 = self.asic_db.wait_for_entry('ASIC_STATE:SAI_OBJECT_TYPE_ACL_RANGE', v2) for (v4, v5) in v3.items(): if v4 == 'SAI_ACL_RAN...
Imports: ```python import typing ``` Type definitions: Input Types: 'FlaskExpress', Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: 'FlaskExpress', v2): @v1.get('/test-set-status-201') def v3(v4, v5): return v5.send_status(201).end() @v1.get('/test-set-status-...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list[tuple[int, int]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> list[tuple[int, int]]: v1 = [] for ([v2, v3], v4) in self.heat_map.items(): v5 = all((self.heat_map[v2, v3] < self.heat_map[neighb...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> str: if v1 >= 330: return 'N' if v1 >= 300: return 'NW' if v1 >= 240: return 'W' if v1 >= 210: return 'SW' ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: tp.ArrayLike, bool Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tp.ArrayLike, v2: bool=True) -> np.ndarray: v3 = self.unbounded_transform.forward if v2 else self.unbounded_transfo...
Imports: ```python import json import os import typing ``` Type definitions: Input Types: bool, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool, v2: list): v3 = {'mode': 'train' if v1 else 'test', 'num_trained_episodes': self.test_episodes, 'epsilons': self.eps_hist...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> str: if len(v1) < len(v2): (v1, v2) = (v2, v1) if not v2: return v1 if v1[:len(v2)] != v2: return '' ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True): self._for_update = v1 return self ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, float Output Type: Any Dependencies: ```python def v0(v1, v2) -> float: if v2.transform is None: return np.nan v3 = v1.transform.matrix v4 = v1.crs.localframe(v3.mulp(v2.center)) v5 = v4 * v3 * v2.transf...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, int Output Type: Tuple[int, bool] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> Tuple[int, bool]: assert self.state == 0 v3 = re.match('[0-9a-zA-Z_$.]+:', v1[v2:]) if v3 is None: ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list=None): if v1 is not None: for v2 in v1: self.create_client(v2['name'], v2['uri']) return self.__instance ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self._id_counter is None: self._id_counter = 0 if len(self._id_set) > 0: v1 = max(self._id_set) self._id_counter = max(self....
Imports: ```python from functools import partial import typing ``` Type definitions: ```python class v0(NamedTuple): v1: str v2: str v3: Optional[int] ``` Input Types: v0 Output Type: Any Dependencies: ```python def v4(v5, v6, v7): if v7 == 0: return v6() else: return [v4(v5, v6, v7 ...
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: v1 = v1.replace('-', '')[::-1] v3 = '' v4 = 0 for (v5, v6) in enumerate(v1): if v4 == v2: if v5 <...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, List[int] Output Type: Tuple[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: List[int]) -> Tuple[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.re.compile('/manga/.+?\\d/c(\\d+(?:\\.\\d)?(?:-v\\d)?)') return v1.search(self.chapter).group(1).replace('.', '-') ```
Imports: ```python import pandas as pd import typing ``` Type definitions: ```python v0 = Union[DataFrame[SPADLSchema], DataFrame[AtomicSPADLSchema]] ``` ```python v1 = List[v0] ``` Input Types: v0, int Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(v3: v0, v4: int=3) -> v1: v5 = [v3] ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int): self.val = v1 self.prev = None self.next = None ``` Input Types: v0 Output Type: None Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0) -> None: v4 = v3 wh...
Imports: ```python import json import subprocess import typing ``` Type definitions: Input Types: List[str] Output Type: Dict[str, str] Dependencies: ```python def v0(v1: List[str]) -> str: return subprocess.check_output(['buck'] + v1).decode('utf-8') ``` ```python def v2(v3: List[str]) -> List[str]: return ['...
Imports: ```python import typing ``` Type definitions: Input Types: 'np.ndarray', 'np.ndarray' Output Type: 'np.ndarray' Dependencies: Function Name: v0 Function: ```python def v0(v1: 'np.ndarray', v2: 'np.ndarray') -> 'np.ndarray': v2 = v2.reshape(2, 2) v3 = v1[:, 0] > v2[0, 0] v4 = v1[:, 0] < v2[1, 0] ...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: Output Type: {} Dependencies: Function Name: v0 Function: ```python def v0(self) -> {}: v1 = cv2.VideoCapture(self._id) v2 = {'brightness': v1.get(cv2.CAP_PROP_BRIGHTNESS), 'gamma': v1.get(cv2.CAP_PROP_GAMMA), 'gain': v1.get(cv2.C...
Imports: ```python import typing ``` Type definitions: Input Types: list, bool Output Type: None Dependencies: ```python def v0(v1: list) -> bool: if type(v1) is not list: print('Error: array is not a list') return False for v2 in v1: if type(v2) is not list: print('Error: r...
Imports: ```python import argparse import sys from pathlib import Path import typing ``` Type definitions: Input Types: Path, str, Optional[str] Output Type: Dict Dependencies: ```python def v0(v1: Dict, v2: str, v3: Any): (v4, v5) = v2.split('.', maxsplit=1) if v4 not in v1: v1[v4] = {} if '.' in ...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[Tuple[Path, str]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[Tuple[Path, str]]): for (v2, v3) in v1: print(f'+++ {v2}') print(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> list: v1 = self._replace_basic(v1) v1 = self._url_decode(v1) v1 = self._repl_regex(v1) v1 = self._tokenize(v1) return self._remove_commo...
Imports: ```python import warnings import torch import torch.nn.functional as F from torch import Tensor, nn import typing ``` Type definitions: Input Types: Tensor, Tensor, Sequence[int], Any Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Tensor, v3: Sequence[int...
Imports: ```python import numpy as np import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots import typing ``` Type definitions: Input Types: int, float Output Type: Any Dependencies: ```python def v0(v1, v2): (v3, v4) = (np.linspace(-1.2, 2, v1), np.random.normal(0, v2, si...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.__click_div_python3_notebook.is_enabled() and self.__click_div_python3_notebook.element_to_be_clickable(): self.__click_div_python3_noteb...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None) -> torch.Tensor: v3 = v1.to(self.device) v3 = self.model(v3) v3 = self.last_linear(v3) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[types.MessageEvent], Union[types.Message] Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Union[types.MessageEvent], v2: Union[types.Message]): if v2.reply_to and self.is_reply: return {'r...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: str): try: v1[v2] return True except: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: list): v4 = locals() v5 = {'tags': ['switch', 'configure', 'devices'], 'operation': 'cloneOrganizationSwitchDevices'} v...
Imports: ```python import typing ``` Type definitions: Input Types: MPParser.LhsContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: MPParser.LhsContext): if v1.indexExpression(): return self.visit(v1.indexExpression()) else: return self.visit(v1.identi...
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = re.compile('^(?P<letters>\\w*?)(?P<numbers>\\d*)$') v2 = [] for v3 in [parent for v4 in self.__sheet_xml() if self.__tag(v4, 'shee...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any, Any Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2=None, v3=None, v4=None) -> Dict[str, Any]: self.debug('Making Hassio request: ' + v1) return self._validateHassioReply...
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): v2 = os.path.dirname(v1) self.generate_frames(v2) self.plot_trajectory(v2) self.compile_frames(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str) -> Dict: v4 = self.graph_session.make_request(method='post', endpoint='/users/{user_id}/messages/{message_id}/move'.format...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if v1 not in self._id2token: raise ValueError(f'Index {v1} is not present in the Vocabulary') else: return self._id2token[v1] ```
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, Optional[torch.Tensor] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: Optional[torch.Tensor]=None) -> float: v4 = self.predict_on_batch(v1) ...
Imports: ```python import signal import termios import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: try: if not self.exit_event.is_set(): signal.signal(signal.SIGWINCH, signal.SIG_DFL) self._d...
Imports: ```python import typing ``` Type definitions: Input Types: qiskit.QuantumCircuit, np.ndarray, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: qiskit.QuantumCircuit, v2: np.ndarray, v3=0): if v1.num_qubits - v3 < len(v2): raise Exception('Number of parameters mu...
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=True, v3: bool=True): v4 = 'from' if v2 else 'to' v5 = self.edges_df if v3 else self.edges_df[self.edges_df['from'] != self.edges_d...
Imports: ```python from datetime import datetime import re import typing ``` Type definitions: Input Types: str Output Type: datetime Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> datetime: v2 = '.{1,}(\\d{2})(\\d{2})(\\d{2}).{1}\\d{8}' v3 = re.search(pattern=v2, string=v1) v4 = '...
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): (v2, v3) = v1.shape v4 = np.array([np.einsum('i, j -> ij', v1[i], v1[i])[np.tril(np.ones([v3, v3])) == 1] for v5 in ran...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, **v2) -> dict: v3: str = v2['_index'] if v3 == 'book': if v1.get('publish_date'): if v1['publish_date'].lowe...
Imports: ```python from fractions import Fraction import typing ``` Type definitions: Input Types: int Output Type: Fraction Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> Fraction: v2 = v3 = v4 = 1 while v4 < v1: v3 += 1 v4 += 1 if v4 == v1: break ...
Imports: ```python import typing as t import typing ``` Type definitions: Input Types: t.Any, t.Any Output Type: t.Any Dependencies: Function Name: v0 Function: ```python def v0(v1: t.Any, v2: t.Any) -> t.Any: if isinstance(v1, t.Sequence) and v2 is None: return v1 elif isinstance(v2, t.Sequence) and ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(**v1) -> None: self.assertEqual(len(v1.keys()), 1) self.assertTrue(v1.get('key', False)) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> str: if self.mapping is None: return str(v1) return str(self.mapping[v1]) ```
Imports: ```python import typing ``` Type definitions: ```python @unique class v0(Enum): v1 = 'N' v2 = 'E' v3 = 'S' v4 = 'W' ``` Input Types: Tuple[Tuple[int, int], v0], Tuple[Tuple[int, int], v0], int Output Type: Any Dependencies: Function Name: v5 Function: ```python def v5(self, v6: Tuple[Tuple[int...
Imports: ```python import re import typing ``` Type definitions: Input Types: version.Version, version.Version Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: version.Version, v2: version.Version): with open('library.properties', 'r+') as v3: v4 = v3.read() (v5, v6)...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Union[int, bytes], Sequence[int] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[int, bytes], v2: Sequence[int]) -> np.ndarray: if isinstance(v1, int): v3 = np.random.default...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = len(self.items) - 1 self.selected_index = min(v1, self.selected_index + 1) ```
Imports: ```python import requests import crypt import typing ``` Type definitions: Input Types: int Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bytes: v2 = crypt.sign_list([bytes([v1]), self.salt], private_key=self.private_key) v3 = {'pubkey_id': self.pubke...
Imports: ```python import gzip import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: ```python def v0(v1: str) -> bool: if v1.endswith('.gzip') or v1.endswith('.gz'): return True else: return False ``` ```python def v2(v3: str) -> Generator[str, None, None]: v4...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: ```python def v0(v1) -> None: nonlocal out if not v1: return v0(v1.left) v2 = v1.get_key() v3 = v1.get_value() out.append([v2, v3]) v0(v1.right) ``` Function Name: v4 Function: ```py...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, t.List[t.Any], str Output Type: Any Dependencies: ```python def v0(v1, v2) -> t.Dict: v3 = {} for (v4, v5) in enumerate(v1.description): v3[v5[0]] = v2[v4] return v3 ``` Function Name: v6 Function: ```python async def v6(...
Imports: ```python import typing ``` Type definitions: Input Types: float, 'Callable[..., None]' Output Type: None Dependencies: ```python @functools.wraps(callback) async def v0() -> None: await self.sleep(delay) callback(*args) ``` Function Name: v1 Function: ```python def v1(self, v2: float, v3: 'Callable[....
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str) -> None: if not isinstance(v2, str): raise TypeError("stdout received as '{}': only str instances allowed".format(type(v2).__nam...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.label self.label = self.label + 1 return 'L' + str(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: self.queue.append(v1) self.d[v1] += 1 if len(self.queue) > self.maxLen: v2 = self.queue.popleft() self.d[v2] -= 1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.token: Token = self.api.login(self.username, self.password) self.token.pin = self.pin v1 = self.api.get_vehicles(self.token) for v2 in v...
Imports: ```python from collections import namedtuple import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = v1.click_environment_button() assert v2, 'Could not click Environment tab' v3 = v1.get_package_bod...
Imports: ```python from asyncio import Queue, QueueEmpty import typing ``` Type definitions: Input Types: Queue Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Queue) -> None: while True: try: v1.get_nowait() except QueueEmpty: break ```
Imports: ```python import typing ``` Type definitions: Input Types: QtCore.QModelIndex, QtCore.QModelIndex Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: QtCore.QModelIndex, v2: QtCore.QModelIndex): self.savePresetToolButton.setEnabled(v1.isValid()) self.loadPresetToolBu...
Imports: ```python import os import shlex import typing ``` Type definitions: Input Types: Output Type: tuple[str, ...] Dependencies: Function Name: v0 Function: ```python def v0() -> tuple[str, ...]: v1 = os.getenv('PROMPT').format(**os.environ) v2 = input(v1) v3 = shlex.split(v2) return tuple(v3) `...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: if v1 <= 0: return 0 if v1 == 1: return 1 return self._lastRemaining(v1) ```
Imports: ```python from typing import Type, Dict import typing import typing ``` Type definitions: Input Types: str, str, Type[type] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: Type[type]) -> str: v1 += ' @Expose(serialize = false)\n' if v3 == int...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array, v2: int, v3: int): self.fast_feature_detector.setThreshold(50) v4 = [] for v5 in range(v3, v1.shape[1] -...
Imports: ```python import math import numpy as np from scipy.spatial import transform import scipy.special import typing ``` Type definitions: Input Types: np.random.RandomState Output Type: Any Dependencies: ```python def v0() -> List[np.ndarray]: v1 = [[0, 0, 0], [0, 0, -45], [0, -45, 0], [-45, 0, 0]] return...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: tuple, tuple Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: tuple, v2: tuple) -> int: (v3, v4) = v1 (v5, v6) = v2 return int(np.sqrt((v3 - v5) ** 2 + (v4 - v6) ** 2)) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> List[int]: v2 = [0] return v2 ```
Imports: ```python import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: namedtuple, float, float Output Type: torch.Tensor Dependencies: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3: float, v4: float) -> torch.Tensor: if not isinstance(v3, torch.Tensor): ...
Imports: ```python import os import shutil import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = [self.parent_frame.listWidget_projects_delivery.currentItem(), self.parent_frame.listWidget_projects_visualizations.c...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[CachedResponse, bytes, str, None] ``` Input Types: v0 Output Type: Optional[bytes] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0=None) -> Optional[bytes]: if isinstance(v2, bytes): return v2 return sel...
Imports: ```python import typing ``` Type definitions: Input Types: 'stellata.model.Model', Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'stellata.model.Model', v2, v3=None): v4 = True v5 = {} if not v3: v3 = v1.__table__ for v6 in v1.__fields_...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> list: v3 = len(v1) v4 = [0] * v2 for v5 in range(v3): v4[v1[v5]] += 1 print(v4) for v5 in range(1, v2): v4[v5] = v4[v...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: if v1: for (v2, v3) in v1.items(): self.client.message_callback_add(v2, v3) self.subscription.add(v2) ...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, pathlib.Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: pathlib.Path): with open(v2, 'w') as v3: json.dump(obj=v1, fp=v3, indent=4, sort_keys=False) ```
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: int v2: Dict[int, int] v3: Dict[int, int] v4: Optional[Union[Tuple[str, ...], List[str]]] v5: bool v6: Optional[List[str]] v7: List[Callable[['VMState'], None]] v8: bool = False v9: int = 0 ...
Imports: ```python import typing ``` Type definitions: Input Types: ast.Constant Output Type: ast.Constant Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Constant) -> ast.Constant: if self._in_type_checking_block(v1): return v1 elif self._in___all___declaration(v1): s...
Imports: ```python import torch from torch import nn, Tensor import torch.nn.functional as F import typing ``` Type definitions: Input Types: Tensor, float Output Type: Any Dependencies: ```python def v0(v1: Tensor, v2: float=1e-10): (v3, v4, v5) = torch.svd(v1 + v2 * torch.eye(n=v1.shape[0], m=v1.shape[1]), some=...
Imports: ```python import typing ``` Type definitions: ```python v0 = typing.Callable[[], typing.Tuple[int, typing.Mapping[str, str], str]] ``` Input Types: str, str, v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str, v3: str, v4: v0): assert v2 in ('GET', 'POST', 'SUBSCR...
Imports: ```python import typing ``` Type definitions: Input Types: np.array, int, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: int, v3: int) -> bool: v4 = v1[v2, v3] v5 = [v1[v2, v3 - 1], v1[v2, v3 + 1]] v6 = [v1[v2 - 1, v3], v1[v2 + 1, v3]] v7 = ...
Imports: ```python import typing ``` Type definitions: Input Types: str, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: list): v3 = '' for v4 in v2: v3 += v4[0] + ' ' + v4[1] if not v4 == v2[-1]: v3 += ', ' v5 = 'CREATE TABLE...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: ```python def v0(v1: str, v2: int, v3: int): v4 = len(list(v1[:v2].split())) v5 = len(list(v1[v2:v3].split())) return (v4, v5) ``` ```python def v6(v7: str, v8: str): v7 = remove_w...
Imports: ```python import typing ``` Type definitions: Input Types: str, Callable[..., Any] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Callable[..., Any]) -> None: if v1 not in self.monitors: self.monitors[v1] = set() self.monitors[v1].add(v2) ```
Imports: ```python from io import BytesIO, BufferedReader import typing ``` Type definitions: Input Types: Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self) -> bytes: v1 = BytesIO(self.body_bytes) return v1.read() ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> List[int]: v2 = len(v1[0]) * [0] for v3 in v1: for v4 in range(len(v3)): v2[v4] += -1 if v3[v4] == '0' else 1 ...
Imports: ```python import json import subprocess import typing ``` Type definitions: Input Types: dict, int, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: int=60 * 5, v3: bool=False) -> None: if v3: print(f'Creating Kubernetes object from:\n{json.dum...
Imports: ```python import typing ``` Type definitions: Input Types: np.array Output Type: Tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array) -> Tuple[int, int]: v2 = (v1.shape[1], v1.shape[0]) return v2 ```
Imports: ```python import math import typing ``` Type definitions: Input Types: int, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int, v4: int): if v2 > 1: v5 = [math.floor(v3 / 2), math.floor(v3 / 2)] else: v6 = math.floor((v1...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: List[np.ndarray] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[np.ndarray]): v2 = [var.assign(v1[i]) for (v3, v4) in enumerate(tf.trainable_variables())] self.sess.run(v2) `...
Imports: ```python import logging, sys, json, locale, datetime, base64, re import requests import typing ``` Type definitions: Input Types: str, str Output Type: Optional[dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> Optional[dict]: logging.info(f'getVolumesByVolumeID...
Imports: ```python import logging import os import pickle import sys import numpy as np import torch import torch.nn.functional as F from torch.utils.data import DataLoader, _utils import typing ``` Type definitions: Input Types: str, int Output Type: dict Dependencies: ```python def v0(v1: List[np.ndarray], v2: int, ...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: Any, bool Output Type: Any Dependencies: ```python def v0(v1, v2: bool=False): v3 = cv2.COLOR_BGR2HSV if v2 else cv2.COLOR_RGB2HSV v4 = cv2.cvtColor(v1, v3) v5 = np.array([0, 100, 70]) v6 = np.array([10, 2...