text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: tuple[float, list, bool] Dependencies: Function Name: v0 Function: ```python def v0(self) -> tuple[float, list, bool]: v1 = self.step_reward v2 = list() if 'camera' in self.observation: v2.append(self.camera.capture_...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0(VerificationResult): v1: exceptions.VerificationError def __init__(self, v2: str, v3: List[VerificationResult], v4: llvm.Contract, v5: exceptions.VerificationError) -> None: self.server_name = v2 self.assumptio...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='') -> None: self.cursors = {} self.widget_ids_this_run = set() self.form_ids_this_run = set() self.query_string = v1 self._set_page_co...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, pd.Series Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.Series): v3 = np.concatenate((v1.to_numpy(), v2.to_numpy().reshape(-1, 1)), axis=1...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: dict[str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: float) -> dict[str, int]: v2 = dict(seconds=0, minutes=0, hours=0, days=0) v2['days'] = int(v1 / 86400) v2['hours'] = int(v1 % 86400 / 3600) ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[bytes] Output Type: bytes Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: Optional[bytes]=None) -> bytes: if v2 is not None and (not isinstance(v2, bytes)): raise ValueError(f'raw_body {ty...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: self.send_action(v1) retu...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Tensor, Any], Optional[Union[Tensor, Any]] Output Type: Union[Tensor, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Tensor, Any], v2: Optional[Union[Tensor, Any]]=None) -> Union[Tensor, Any]: if v2 is None:...
Imports: ```python import typing ``` Type definitions: Input Types: html.Element Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: html.Element) -> str: if v1.tag == 'table': return '' if v1.tag == 'iframe': return '' if len(self.elem) == 0: v2 =...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None): v2 = {} if v1 is not None: v2['symbol'] = v1 v3 = self.get('ticker/price', params=v2, api_version='v3') return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: pytest.TestReport Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pytest.TestReport) -> None: v2: Optional[RichTerminalReporter.Status] = None if v1.when == 'setup': v2 = 'running' elif v1.wh...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.dt.group_milestone_events(type='changed_milestone') self.assertIsNot(v1, None) ```
Imports: ```python import json import os from tqdm import tqdm import typing ``` Type definitions: Input Types: Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict: for v1 in tqdm(self.sample_tokens, disable=not self.verbose): v2 = self.nusc.get('sample', v1) ...
Imports: ```python import numpy as np import random import typing ``` Type definitions: Input Types: Any, Union[str, List[str]], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: Union[str, List[str]], v3=1): v4 = v1.split() for v5 in range(v3): if isinstance(v2, ...
Imports: ```python import json from pathlib import Path import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> pd.DataFrame: v2 = Path(v1).read_text().split('\n') v3 = [json.loads(o, encoding='ut...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Type['ParameterStore'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> Type['ParameterStore']: v2 = self.__class__() for (v3, v4) in self._params: v2.add(v4) for (v3, v4) in se...
Imports: ```python import torch from torch.fx.graph import Graph, Node import torch.overrides from torch._prims.utils import TensorMeta, torch_function_passthrough import torch._refs as refs import torch._refs import torch._refs.nn import torch._refs.nn.functional import torch._refs.special import torch._prims import t...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: Optional[Dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[Dict[str, Any]]: v1 = f'{self.BASE_API_URL}/manga/{self.id_onpage}' v2 = self.get_html(v1) if v2: pass...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[Text, np.ndarray] ``` Input Types: Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self) -> v0: if self._current_node > 0: v2 = self._sorted_node_indices[self._current_node - 1] v3 = self._macro_i...
Imports: ```python import gzip import logging from tqdm import tqdm import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> dict: v2 = dict() logging.info('Making uniprot name to id map') with gzip.open(v1, mode='rb') as...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, Path] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, Path]): v2 = self.get_from_cache(v1) if v2: return v2 v3 = self.vpk_archive.find_file(full_path=v1) if v3: ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.Series, Any, Any, Any, Any, Any Output Type: pd.Series Dependencies: ```python def v0(v1: pd.Series, v2: pd.Series, v3=100, v4=0.005) -> pd.Series: v1 = v1.loc[v2.index] v5 = v1[v2].iloc[::2] v6 = v1[v2].iloc[1::2] v5 = v5.iloc[:v6....
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('Element') ``` Input Types: [v0] Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(v2: [v0]): for v3 in v2: print(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: List, List, int Output Type: Iterable[List] Dependencies: Function Name: v0 Function: ```python def v0(v1: List=ANALYTICS_FIELDS_V2, v2: List=BASE_ANALLYTICS_FIELDS, v3: int=FIELDS_CHUNK_SIZE) -> Iterable[List]: v4 = list((v1[f:f + v3] for v5 in ...
Imports: ```python from scipy.stats import norm from scipy.spatial.distance import cdist from numpy import array as np_array from numpy import ndarray as np_ndarray from numpy import empty as np_empty from numpy import zeros as np_zeros from numpy import uint32 as np_uint32 from numpy import float64 as np_float64 from ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self: QtWidgets.QMainWindow) -> None: self.cam1.emgain = self.emgain1.value() self.cam2.emgain = self.emgain2.value() self.update_plot() ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: ```python def v0(v1: str) -> t.Optional[t.Tuple[str, str]]: v2 = v1.split('_') return tuple(v2) if len(v2) == 2 else None ``` Function Name: v3 Function: ```python def v3(v4: str, v5: str) -> bool: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any]) -> str: if v1.get('teamMain'): return f"[TEAM] {v1['name']}" elif v1.get('t') == 'l': return v1['fname'] else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, list, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: list, v3: str): try: v1[v3].insert_many(v2) except: print('Error!') ```
Imports: ```python import threading import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '%(asctime)s: %(message)s' logging.basicConfig(format=v1, level=logging.INFO, datefmt='%H:%M:%S') v2 = threa...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.__engine is None: raise AttributeError('Engine is not initialized') self.__connection = self.__engine.connect() v2 = [row[1] f...
Imports: ```python import typing ``` Type definitions: Input Types: list, dict, dict Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: dict, v3: dict) -> list: v4 = ['Diff', 'DiffRelative', 'L1', 'L2', 'MAPE', 'SMAPE', 'SSIM'] v5 = [] for v6 in v4: v7...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array) -> float: if not np.any(v1): return 1.0 v2 = np.mean(v1) if v2 >= 0: v3 = sum(v1 < 0) else: ...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: sqlite3.Cursor Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: sqlite3.Cursor) -> pd.DataFrame: v1.execute("SELECT name FROM actor\n JOIN casting ON actor.id = casting.ac...
Imports: ```python import matplotlib.pyplot as plt import typing ``` Type definitions: ```python v0 = Tuple[float, float] ``` Input Types: v0, v0, v0, v0, v0, v0, v0, v0, v0, v0, v0, v0, bool, float Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0, v4: v0, v5: v0, v6: v0, v7:...
Imports: ```python import collections import re import typing ``` Type definitions: Input Types: Union[str, dict, Iterable], str Output Type: Any Dependencies: ```python @cache def v0(): from airflow.configuration import conf v1 = DEFAULT_SENSITIVE_FIELDS.copy() v2 = conf.get('core', 'sensitive_var_conn_na...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v2: typing.Any, **v3: typing.Any) -> None: v4 = getattr(self, v1, None) if v4: v4(*v2, **v3) ```
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str=None, v2: str=None, v3: str=None, v4: str=None, v5: str=None) -> None: v6 = ['--runner=DirectRunner'] if v1 is not None and (v3 is not None or v4 is not None): v...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Dict[str, Any] Dependencies: ```python async def v0(v1: str, v2: bool=False) -> Dict[str, Any]: v3 = {} if v2: v3 = get_auth_header() try: v4 = State.get_session() async with v4.get(v1, headers...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: for v2 in self.entity_map.accessories: for v3 in v1: if (v2.aid, None, None) in self.entities: continue ...
Imports: ```python import collections import pathlib import typing ``` Type definitions: Input Types: list[pathlib.Path] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[pathlib.Path]) -> None: v2 = self.get_image_root(relative_to='fsroot') v3: dict[str, set[pathlib....
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> None: v2 = [] for v3 in v1: for v4 in v3.tags.analytic_story: if v4 == self.story.name: v2.append(str('ES...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Tensor] Output Type: Dict[str, Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Tensor]) -> Dict[str, Tensor]: v2 = self.preprocess_sample(v1) v3 = [] for v4 in self.modality_keys: v...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: int v3: str v4: int v5: int v6: Dict[str, Any] v7: str v8: str v9: str def v10(self, v11: str) -> v0: self.currency_code = v11 return self def v12(self, v13: int) -...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = 0 for v2 in self.tests: if not v2['selected']: continue v1 += self.num_cases_for_test(v2) return v1 ```
Imports: ```python import logging from pathlib import Path import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: ```python def v0(v1: str): v2 = boto3.resource('s3', region_name=Config.AWS_REGION_NAME, aws_access_key_id=Config.AWS_ACCESS_KEY_ID, aws_secret_access_key=Config....
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor): self._optimizer.zero_grad() v3 = self._classifier(v1) v4 = self._criterion(v3, v2) v4.ba...
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, v3) = (0, 1) while v1 >= v3: v4 = v1 // (v3 * 10) * v3 v5 = max(v1 % (v3 * 10) - v3 + 1, 0) v5 = min(v5, v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: str, np.ndarray Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: np.ndarray) -> None: if v1 not in self.parameters_dict: raise KeyError(v1) else: self.parameters_dict[v1] = v2.tol...
Imports: ```python import os import os.path import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.prompt() self.run_sanity_checks() print('Temporary target directory: {}'.format(self.target_dir)) self.git_clon...
Imports: ```python from urllib.parse import urljoin from qiskit import QuantumCircuit, execute from qiskit.providers import JobStatus from qiskit.providers.ibmq.job import IBMQJob from qiskit.providers.ibmq.runtime import RuntimeJob from qiskit.qobj import PulseQobj, QasmQobj from qiskit.opflow import PauliSumOp from q...
Imports: ```python import typing ``` Type definitions: Input Types: int, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: float): v2 = max(v2, 0) v2 = min(v2, 1) v1 = max(v1, 0) v3 = int(1023 * v2) super().setPWMOutput(v1, v3) ```
Imports: ```python import torch import torch.nn as nn import torch.sparse as sparse import torch.nn.init as init from torch.nn.parameter import Parameter import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> Iterator[str]: yield from self.write_key(v1) yield from self.write_value(v1, v2) ```
Imports: ```python from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: Output Type: datetime Dependencies: Function Name: v0 Function: ```python def v0(self) -> datetime: v1 = self.current_curve_generator.get_next_schedule() if v1 is None: print("I don't have mor...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self) -> NoReturn: if self._io is not None: raise ValueError('IO is already opened') self._io: IO = v0(self._file, 'rb') ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.lexer.input(v1) while True: v2 = self.lexer.token() if not v2: break yield v2 ```
Imports: ```python import subprocess import os import os.path import typing ``` Type definitions: Input Types: str, str, str, int Output Type: Any Dependencies: ```python def v0(v1: str, *v2): v3 = os.getenv('INSTALLNAMETOOL', 'install_name_tool') subprocess.check_call([v3, '-' + v1] + list(v2)) ``` Function N...
Imports: ```python import os import os.path as path import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Path): v1 = v1.resolve() if not any((p in {'hydra_utils', 'hydra-zen', 'hydra_zen'} for v2 in v1.parts)): raise Valu...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('R') ``` ```python v1 = TypeVar('T') ``` ```python v2 = TypeVar('U') ``` ```python v3 = TypeVar('V') ``` ```python v4 = TypeVar('W') ``` Input Types: Callable[[v1], v2], Callable[[v2], v3], Callable[[v3], v4], Callable[[v4], v0] Output Type: ...
Imports: ```python import json import logging from requests import get from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: logging.debug('getting channels data') v1 = self.__load_...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: Optional[bytes] Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> Optional[bytes]: v4 = self.prefix_db.claim_to_channel.get(v1, v2, v3) if v4: return v4.signing_hash ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3 = sorted(v2.split(',')) v4 = ','.join(v3) if v4 != v1: return False return True ```
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseModel): v1: Union[List['JsonSchemaObject'], 'JsonSchemaObject', None] v2: Optional[bool] v3: Union[str, List[str], None] v4: Optional[str] v5: Optional[str] v6: Optional[int] v7: Optional[int] v8: Optional[floa...
Imports: ```python import hashlib import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = hashlib.sha256() v2.update((self._prefix + v1).encode()) v3 = ''.join((bin(i)[2:].zfill(8) for v4 in v2.digest())...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: List['Step'], v2: float): self.steps = v1 self.cost = v2 def v3(self: 'Path') -> int: return len(self.steps) def v4(self: 'Path') -> 'Step': return self.steps[-1] def v5(...
Imports: ```python import astropy.coordinates as coord from astropy.table import QTable from astropy.utils.data import get_pkg_data_filename import typing ``` Type definitions: Input Types: slice Output Type: np.ndarray Dependencies: ```python def v0() -> TableType: v1: str = get_pkg_data_filename(os.path.join('da...
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int=1) -> int: v3 = False while not v3: if v2 in v1: v2 += 1 else: return v2 return v2 + 1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[dict, list] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[dict, list]) -> None: v2 = {'delete': v1} self.make_request('post', self.url, data=v2, params=self.params, headers=self.headers) ``...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in self.collected_data.keys(): self.collected_data.update({v1: []}) ```
Imports: ```python from torch import autograd, Tensor from torch.cuda.amp import autocast from torch.cuda.amp.grad_scaler import GradScaler from torch.nn import Flatten, GELU, Linear, Module, Sequential, Sigmoid, Unflatten from torch.optim import Optimizer from torch.utils.data import DataLoader import torch import typ...
Imports: ```python import uuid import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: if self.session.has_root_transaction is False: self.session.has_root_transaction = True self.is_root = True self.co...
Imports: ```python import torch from torch import nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, Dict[str, torch.Tensor], int Output Type: Tuple[torch.Tensor, Dict[str, torch.Tensor]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, ...
Imports: ```python import typing ``` Type definitions: Input Types: List[types.LocalizedObjectAnnotation] Output Type: Any Dependencies: ```python def v0(v1: Union[str, float]) -> float: return round(float(v1) * 100, 1) ``` ```python def v2(v3: List[types.LocalizedObjectAnnotation], v4: str): v5 = [v0(obj.scor...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, str, str, str, int, int, bool Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray, v3: str='', v4: str='', v5: str='', v6: int=0, v7:...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Optional[str]=None): v2 = {} v3 = self._enabled_features if v1 is None else v1 for v4 in v3: v2[v4] = {} for...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Optional[Tuple[None, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> Optional[Tuple[None, str]]: if v1.startswith(v2): return (None, v1[len(v2):]) return None ```
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._elb.describe_target_groups(LoadBalancerArn=v1) assert 'TargetGroups' in v2 for v3 in v2['TargetGroups']: if v3['Port...
Imports: ```python import typing ``` Type definitions: Input Types: apsw.Connection Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: apsw.Connection) -> None: v1.cursor().execute('create table if not exists torrent_meta (infohash text primary key collate nocase, generation int not ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: (str, str) Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> (str, str): v2 = ['', 'encoder', 'decoder'] (v3, v4) = super().resolve_adapter_module_name_(v1) if v3 not in v2: raise ValueE...
Imports: ```python import typing ``` Type definitions: Input Types: List[Set[str]] Output Type: List[Set[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Set[str]]) -> List[Set[str]]: v2 = [set('') for v3 in range(10)] for v4 in v1: if len(v4) == 2: v2[1] = v4 ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> float: if v1.sum() == 0 or v2.sum() == 0: return 0 return v1.dot(v2) / np.linal...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.set_models({'meeting/1': {'is_active_in_organization_id': 1}, 'motion_workflow/110': {'name': 'name_Ycefgee', 'state_ids': [111, 112, 113], 'meeting...
Imports: ```python import os import shutil from pathlib import Path import typing ``` Type definitions: Input Types: Optional[Path], Path Output Type: Any Dependencies: ```python def v0(v1: Path) -> None: v2: Keychain = Keychain() v3 = v2.get_all_private_keys() if len(v3) == 0: print("No keys are p...
Imports: ```python import typing ``` Type definitions: Input Types: sublime.View, int, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: sublime.View, v2: int, v3: list): for v4 in v3: if v1.match_selector(v2, v4): return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: QtGui.QWheelEvent Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: QtGui.QWheelEvent): self.camera.zoom(v1.delta()) self.update() ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, int]): v1 = v1 or {} v1 = {position.upper(): num_of_players for (v2, v3) in v1.items()} for (v4, v5) in v1.items(): sel...
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = [] v2 = random.randint(1, 100) % 2 == 0 v1.append(self.get_timeline_feed([v2 and 'is_pull_to_refresh'])) v1.append(self.ge...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.openDatabase(): self.execute("DELETE FROM TMSwitchModel WHERE uid = '%s';" % v1, None) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> list[str]: v2 = list() for v3 in v1: v4 = self.generate_name(v3) while v4 in v2: v4 = self.generate_name(v3.removes...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1) -> str: if v1.endswith('.scala') or v1.endswith('.tribble'): return 'parse' else: return 'unmarshal' ```
Imports: ```python import numpy as np from collections import defaultdict import typing ``` Type definitions: Input Types: Any, bool Output Type: Any Dependencies: ```python def v0(v1, v2) -> np.ndarray: (v1, v2) = np.floor(np.divide((v1, v2), 3)).astype(int) return sudoku[v1 * 3:(v1 + 1) * 3, v2 * 3:(v2 + 1) ...
Imports: ```python import typing ``` Type definitions: Input Types: DataFrame, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: DataFrame, v2: str) -> bool: if v1['volume'].dtype != v1[v2].dtype: return False if 'volume' in v2: return True return F...
Imports: ```python import plotly.express as px import plotly.graph_objs as go from plotly.io import templates as pio_templates from plotly.offline import plot import typing ``` Type definitions: Input Types: DataFrame, Dict, str, str, str, Dict, str, Dict, Tuple, Path, bool Output Type: Any Dependencies: Function Nam...
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='0.1', v2: str, v3: str) -> str: v4 = self.base_url(version=v1) + f'/apps/{v2}/{v3}' self.log.debug(f'Generated URL: {v4}') return ...
Imports: ```python from pathlib import Path import sys import typing ``` Type definitions: ```python v0 = ply.lex.LexToken ``` Input Types: Optional[v0], str Output Type: NoReturn Dependencies: ```python def v1(v2: str) -> str: if args.error_filename_basename: return Path(v2).name else: return v...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> bool: for v2 in range(len(self.and_expression)): if not self.and_expression[v2].evaluate(v1): return False return True ``...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: plt.Axes, str, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1: np.ndarray, v2: str, v3=True): if v2 == 'xy': v4 = 0 if v3 else 2 elif v2 == 'xz': ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Decimal], Optional[Decimal] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[Decimal], v2: Optional[Decimal]) -> bool: if v1 is None and v2 is None: return True if v1 is None and v2 is...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: str Output Type: Tuple[Set[str], Dict[str, List[str]]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[Set[str], Dict[str, List[str]]]: v2: Dict[str, List[str]] = defaultdict(list) ...