text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False): if v2: print() print('[def] is_video(') print(' filename : str = {}'.format(str(v1))) print(' ...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[int, int, int], Tuple[int, int, int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[int, int, int], v2: Tuple[int, int, int]): if v2 is not None and v2 != v1: raise ValueError(f'When setting`in...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> int: if v1 == v2: return 0 v3 = len(v1) v4 = len(v2) if v3 == v4 + 3 and v4 >= 19 and (v1[v4] == '+'): v1 ...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: if self._ender.done(): return None self._ender.set_result(None) await self._sender_task await self._send() i...
Imports: ```python import shutil import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: self.logger.debug('== Writing Zip File ==') v1 = 'panel_frame_overlay' v2 = self.out_path.parent / 'panel_frame_overlay.zip' shut...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Union[str, PathLike[str]] Output Type: List[Path] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, PathLike[str]]) -> List[Path]: v2 = Path(v1) if v2.is_file(): return [v2] else: ...
Imports: ```python import polars as pl from polars import testing from polars.datatypes import Float64, Int32, Int64, UInt32, UInt64 import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: v1 = pl.Series('a', ['a, b', 'a', 'ab,c,de'...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: str): v3: str = f'def {v2}' for (v4, v5) in enumerate(v1): v6: bool = v3 in v5 if not v6: continue ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self) -> torch.Tensor: assert len(self.shape) == 2 self.coalesce_() v1 = self.values.new_zeros(size=self.shape) v1[self.indices[0], self.indices[1]]...
Imports: ```python import typing ``` Type definitions: Input Types: str, 'BaseExecutor' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: 'BaseExecutor'): assert v1 not in self self._queue.append((v1, v2)) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: int=10): v3 = f'api/investigate/v2/orgs/{self.organization_key}/enriched_events/search_jobs/{v1}/results?rows={v2}' return self._http...
Imports: ```python import random from skimage import data, exposure, io from skimage import transform as sk_tf from skimage.util import crop, pad import skimage import typing ``` Type definitions: Input Types: np.ndarray, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Lowerable, metaclass=_ArrayMeta): v1 = 1.0 @classmethod def v2(cls, v3: IntoArray, v4: Optional[DType]=None, v5: Optional[int]=None) -> 'Array': """Cast a value to an :class:`Array`. Parameters ---------- value :...
Imports: ```python import typing ``` Type definitions: Input Types: list[int], int Output Type: int Dependencies: ```python def v0(v1, v2): if v1 > v2: return v1 v3 = (v1 + v2) // 2 if nums[v3] == target: return v3 elif nums[v3] < target: return v0(v3 + 1, v2) else: ...
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('\n') v3 = 1 while v3 < len(v2): v2.insert(v3, '<br>') v3 += 2 return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '[TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed estimation of user story **UserStory**.' self.send_and_test_stream_message('users...
Imports: ```python from re import findall import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Path): with open(v1, 'r') as v2: v3 = v2.read().split('\n') v4 = [] for v5 in v3: (v6, v7) = v5.split(' ') ...
Imports: ```python import plotly.graph_objects as go import plotly.express as px import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): v2 = list(v1.columns)[1] v3 = v1['model'].values[0] v4 = px.scatter(...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str): with open(v1, 'r') as v4: v5 = v4.read() v6 = list(re.finditer(v3, v5)) if not v6: ...
Imports: ```python import typing ``` Type definitions: Input Types: Type[policy.Policy] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Type[policy.Policy]): v2 = None v3 = self while v2 is None and v3 is not None: v2 = v3.policies.get(v1, None) v3 = v...
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self.__run_cmd(['shell', 'wm', 'size']) for v2 in v1: if v2.startswith('Physical size'): self.size = tuple(map(int...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Any, *v2, **v3): OneOf(self.allowed)(v1) return super().deserialize(v1, *v2, **v3) ```
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: np.ndarray, float, int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: float, v3: int) -> list: v4 = [] (v5, v6) = v1.shape[:2] (v7, v8) = (int(v5 * v2), int(v6 * v2)) ...
Imports: ```python import json import logging import os import typing ``` Type definitions: Input Types: Dict[str, dict] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, dict]): if v1 == {}: raise ValueError('No scraped job data to filter') if os.path.isf...
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._strToClassList(reversed(self.__buffer)) v1 = len(v2) - v1 v3 = v2[v1] if v3 == 'd': v3 == 'x' while True: v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[Dict, List] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[Dict, List]: for v1 in self._directories: v2 = v1 / 'ansible_collections' if v2.exists(): self._one_path(v2) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.source = v1 self.index = 0 self.linenumber = 1 self.columnnumber = 1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Tuple[bool, list] Dependencies: Function Name: v0 Function: ```python def v0(self, v1=True) -> Tuple[bool, list]: v2 = list() v2.extend(self.log_multimodal_module()) v2.extend(self.log_bad_paths()) v2.extend(self.log_...
Imports: ```python import torch.nn.functional as F from torch import Tensor from torch.nn.modules.loss import _WeightedLoss import typing ``` Type definitions: Input Types: Tensor, Tensor, Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Tensor, v3: Tensor) -...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> int: v2 = 1 while os.path.exists(v1 % v2): v2 = v2 * 2 (v3, v4) = (v2 // 2, v2) while v3 + 1 < v4: v5 = (v3 + v4) //...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: Any, Any, Any, Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4, v5, v6) -> None: v7 = v2.insert().values(username=v3, password=v4, enabled=v6, salt=v5, create...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = str(v1) v2 = v2.replace('&', '&amp;') v2 = v2.replace('<', '&lt;') v2 = v2.replace('>', '&gt;') return v2 ```
Imports: ```python from bisect import bisect_left, bisect_right import typing ``` Type definitions: Input Types: 'data.Location', int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'data.Location', v2: int=0, v3: int=...) -> int: if v3 is ...: v3 = len(self.loca...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = {'username': self.username, 'subject': self.subject, 'body': self.body, 'type': self.type} return json.dumps(v1, indent=None) ```
Imports: ```python import traceback import pandas as pd import numpy as np import typing ``` Type definitions: Input Types: list, str, Union[list, str, None] Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: str, v3: Union[list, str, None]=None, *v4, **v5) -> pd.DataFr...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): self._j_function = self._j_function.setStartFromTimestamp(v1) return self ```
Imports: ```python import torch import torch.nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, Tuple[torch.Tensor, torch.Tensor] Output Type: torch.Tensor Dependencies: ```python def v0(v1: torch.Tensor, v2: Optional[int]) -> torch.Tensor: return torch....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List['MobNode'] Dependencies: Function Name: v0 Function: ```python def v0(self, *v1) -> List['MobNode']: v1 += ('_mob',) v2 = set.intersection(*[set(self.get_memids_by_tag(t)) for v3 in v1]) return [self.get_mob_by_id(memid...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Sequence[str]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[Sequence[str]]=None) -> int: print('Loafang: https://Adwaith-Rajesh.github.io/loafang') return 0 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, float, str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: float, v3: str=None) -> float: v1 = v1.upper() if not self._started: self.start() v4 = self.get_exchange_rate(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> None: v3 = self._get_config_parser() v4 = v3['plugin-definitions'] v4[v1] = v2 with open(self.file_path_dir, 'w') as v5: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = None if v2 == None: for v3 in self.logic_handler.available_importer_types: if v3.__name__ == v1: v2 = v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Tuple[Tensor, Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Tuple[Tensor, Tensor]: (v2, v3) = self.sample_initial_condition() return self.simulate(v2, v3, v1) ```
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._json['name'] is None: return None else: return f"{self._json['name']}___{v1}" ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Any Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> List[str]: v2 = re.compile('(\\#+\\s.+\n)') v3 = re.compile('(\\#\\s.+)') if '\n' not in v1: v4 = re.findall(v3, v1) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {} if self.code is not None: v1['code'] = self.code v1['features'] = self.features if len(self.contents) > 0: v1['conten...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: v2 = ['{0}'.format(i) for v3 in range(v1)] return v2 ```
Imports: ```python import os import shutil import subprocess as sp from tempfile import TemporaryDirectory import typing ``` Type definitions: Input Types: 'Ligand' Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Ligand') -> str: v2 = os.getcwd() v3 = os.path.abspath(f'{...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: str Output Type: Set[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Set[int]: assert isinstance(v1, str) if not hasattr(self, '_script_to_output_idx'): v2 = defaul...
Imports: ```python import re import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: None Dependencies: ```python def v0(v1: str, v2=False, v3=False, v4=sys.stdout) -> None: v5 = Proposition(True) v6 = Proposition(False) v1 = v1.strip() v7 = getEvalExpression(v1) v8 = True ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional['Project'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional['Project']: v2 = self while v2: v3 = v2.sub_projects.get(v1) if v3: return v3 v2 = ...
Imports: ```python import typing ``` Type definitions: Input Types: AST.Cond, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: AST.Cond, v2: dict): v1.metadata.update(v2) self.visit(v1.expr, v2) self.visit(v1.trueBlock, v2) self.visit(v1.falseBlock, v2) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` ```python v1 = TypeVar('U') ``` Input Types: Output Type: 'RDD[Tuple[T, int]]' Dependencies: ```python def v2(v3: int, v4: Iterable[v0]) -> Iterable[v1]: return f(v4) ``` Function Name: v5 Function: ```python def v5(self: 'RDD[T...
Imports: ```python from collections import defaultdict, deque import typing ``` Type definitions: Input Types: Output Type: defaultdict Dependencies: ```python def v0(): return False ``` Function Name: v1 Function: ```python def v1() -> defaultdict: def v2(): return False return defaultdict(v2) `...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: np.array, float Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: float) -> np.array: v1 = cv2.cvtColor(v1, cv2.COLOR_RGB2HSV) v1 = v1.astype(np.float32) v1[:,...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict) -> torch.Tensor: if not self.hparams.mixup: self.compute_metrics(v1, 'train') ```
Imports: ```python import json import os from collections import Counter from os.path import join import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str, v2=''): return os.path.exists(join(v2, v1) + '.mp3') ``` ```python def v3(v4: str, v5='', v6=True): ...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: ```python def v0() -> List[str]: v1 = [] for v2 in os.listdir(CI_PATH): if re.search('e2e_.*\\.yml', v2): v3 = utils.open_file(os.path.join(CI_PATH, v2), 'r').read()...
Imports: ```python import configparser import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: ```python def v0(v1): v2 = configparser.ConfigParser() v3 = v1.pop() print('Writing to config...') v2['WORKING_DIR'] = {'Directory': v3} with open(APP_LOCATION + '/' + 'config...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[str], Dict[str, Optional[str]] Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[str], v2: Dict[str, Optional[str]]={}) -> Dict[str, str]: v3 = {} for v4 in v1: if v4 in...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): v3 = [[8, 1, 0], [11, 2, v1], [11, 3, v2]] v4 = self.generateDummyProtocol('respondE2EEKeyExchange', v3, 4) return self.postPack...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Dict, Tuple[str], bool, Any Output Type: Any Dependencies: ```python def v0(v1: List[str]) -> List[List[str]]: v2 = [] while v1: v2.append(v1) v1 = v1[:-1] return v2[::-1] ``` Function Name: v3 Function: ```python def...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str): self.name = v1 self.neighbors = [] def __repr__(self): return f'{str(self.name)} ({len(self.neighbors)})' def v2(self, v3): self.neighbors.append(v3) def v4(self): ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self.create_context() as v1: (v2, v3) = v1.driver.run_synthesis() self.assertTrue(v2) for v4 in range(1, 5): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.get_state(self.entity) == 'on': return True else: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3) -> None: v4 = 0 for (v5, v6) in v1.items(): if v4 > 0 and v4 < len(v1): print(' -------------------------------')...
Imports: ```python from requests.auth import HTTPBasicAuth from datetime import datetime, timedelta import requests import json import typing ``` Type definitions: Input Types: str, str, dict, HTTPBasicAuth, list, int, int, int Output Type: dict Dependencies: ```python def v0() -> dict: v1 = {'ts': {}, 'summary': ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: ```python @dataclass class v0: v1: List[str] v2: List[str] @classmethod def v3(cls, v4: str) -> v0: (v5, v6) = v4.split(' (contains ') v6 = v6[:-1] v7 = v5.split() v8 = v6.split(',...
Imports: ```python import typing ``` Type definitions: Input Types: str, Iterable[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Iterable[str]): for v3 in v2: if v1.startswith(v3): return v3 return None ```
Imports: ```python import typing ``` Type definitions: ```python class v0(TimeStampedModelMixin, Model): v1 = ForeignKey(User, on_delete=PROTECT) v2 = CharField(max_length=80, validators=text_validators) v3 = TextField(blank=True, null=True, validators=text_validators) v4 = BooleanField() v5 = Integ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Dict[str, int]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Dict[str, int]]: v1 = min(self._current_user_count + self._user_count_per_dispatch_iteration, self._target_user_count) for v...
Imports: ```python import glob import subprocess from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: Optional[Path] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[Path]: v2 = {'LANG': 'C.UTF-8'} try: v3 = subprocess.check_ou...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> dict: v3 = self._make_query(v1, v2) v4 = [self._bs4_contents(self.url['naver'], selectors=[self.CSS['new_everyday']], q...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[Any]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[Any]]) -> bool: if not isinstance(v1[0], list): return False try: if isinstance(v1[0][0], list): return Fal...
Imports: ```python import typing ``` Type definitions: Input Types: List, List Output Type: Any Dependencies: ```python def v0(v1: List, v2: List): if not v1 or not v2: return [] v2.sort() v1.sort(key=lambda x: x[0]) v3 = 0 v4 = [] for (v5, v6) in v1: v7 = [] for v8 in r...
Imports: ```python import datetime import numpy as np import torch import typing ``` Type definitions: Input Types: dict, datetime.datetime Output Type: Any Dependencies: ```python def v0(v1: List): if len(v1) == 0: return {'offsets': np.array([0])} v2 = {} for v3 in v1[0].keys(): if isinst...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> dict: v1['TaskName'] = v1['task'] v2 = ['RepetitionTime', 'EchoTime'] for v3 in v2: v1[v3] = float(v1[v3]) return v1 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, int, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: int, v3: int) -> np.ndarray: v2 = v2 if v2 >= 0 else v1.ndim + 1 + v2 for v4 in range(v3): ...
Imports: ```python import typing ``` Type definitions: Input Types: pathlib.Path, bool Output Type: Iterable[Tuple[str, pathlib.Path]] Dependencies: ```python def v0(v1: pathlib.Path, v2: bool=False) -> Iterable[pathlib.Path]: for v3 in sorted(v1.iterdir()): if not v3.is_file(): continue ...
Imports: ```python import os import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> list: v2 = [{*os.listdir(d)} for v3 in v1] v4 = set() for v3 in v2[1:]: v4 = v4 | v2[0].symmetric_difference(v3) return l...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: type Dependencies: Function Name: v0 Function: ```python def v0(cls: type, v1: str='Copied') -> type: if cls.__name__.startswith(v1): raise ValueError('Could not copy a copied class.') v2 = v1 + cls.__name__ if cl...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): self.help_messages[v1] = v2 return ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list[str]: v2 = ['HGamEventInfoAuxDyn.yybb_btag77_cutFlow', 'HGamEventInfoAuxDyn.isPassed', 'HGamAntiKt4PFlowCustomVtxHggJetsAuxDyn.DL1r_FixedCutBEf...
Imports: ```python import typing ``` Type definitions: Input Types: int, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: bool=False, v3: bool=False): self.index += v1 if v2: self.index -= 1 if v3 is False: self.name = f'{self.index:...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.callmakervisitor.keywords self.print() with self.indent(): if not v1: self.print('_keywords: Set[str] = set()') ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int) -> int: v1 = v1 & ~(1 << v3) v1 = v1 | v2 << v3 return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: cosem_db.MongoCosemDB, Dict[str, Any], int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: cosem_db.MongoCosemDB, v2: Dict[str, Any], v3: int=500000) -> bool: v4 = v2.copy() v4['metric'] = 'mean_false_distance...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0() -> dict: v1 = {'displayName': 'Attach IAM Role', 'description': 'Attaches an IAM role to an Instance', 'resourceTypes': ['EC2 Instance'], 'params': [{'name': 'Role', ...
Imports: ```python import asyncio from random import shuffle import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: with self._progress as v1: v2 = {proto: v1.add_task(f'[yellow]Checker [red]:: [green]{proto.upper...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: ClassVar[Dict[Tuple[int, int], 'CalcNode']] = {} @classmethod def v2(cls, v3: Node): if v3.as_tuple() not in cls.cache: cls.cache[v3.as_tuple()] = v0(v3) return cls.cache[v3.as_tuple()] ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, str Output Type: Union[Dict[str, str], List[str], str] Dependencies: ```python def v0(v1: str, v2: str) -> Optional[Union[Dict[str, str], List[str]]]: v3 = re.match(v1, v2) if v3: if v3.groupdict(): return v3...
Imports: ```python import enum import typing ``` Type definitions: Input Types: object Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: object) -> bool: try: return issubclass(v1, enum.Enum) except TypeError: return False ```
Imports: ```python import hashlib from hashlib import md5 import typing ``` Type definitions: Input Types: str, str, str, str Output Type: bool Dependencies: ```python def v0(v1: str, v2, v3: str) -> str: v4: str = 'device_id=' + str(v1) + '&timestamp=' + str(v2) + '&version=' + str(v3) v4 += salt v5 = md5...
Imports: ```python from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if v1.find('.') != -1: v2 = v1.split('.')[0] v1 = v2 v1 = v1.replace('T', ' ') if v1.find...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2, v3) -> bool: if isinstance(v1, str): v4 = self.matcher.constraint_vars.get(v1, []) else: v4 = v1 v5 = set(self.s...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str, v2: str) -> str: if isinstance(v1, AnnotatedStr): if not isinstance(v2, AnnotatedStr): v2 = AnnotatedStr(v2) v2.optional = v1.optional v2.exists = v1....
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2=True) -> dict: v1 = v1 if not v2 else f'{self.base_url}/{v1}' async with self.session.get(v1) as v3: return await v3.json() ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[List[bytearray]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[List[bytearray]]: v1 = list(self._iter_key(10)) return v1 ```
Imports: ```python import shutil import typing ``` Type definitions: Input Types: int, str Output Type: Any Dependencies: ```python def v0(v1: int, v2: str='#') -> str: v3 = '' for v4 in range(v1): v3 += v2 return v3 ``` Function Name: v5 Function: ```python def v5(v6: int, v7: str='#'): v8 = s...
Imports: ```python import typing ``` Type definitions: Input Types: PlSqlParser.General_element_partContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: PlSqlParser.General_element_partContext): if v1.char_set_name() is None and v1.link_name() is None and (v1.function_argu...