text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: ```python class v0(str): def __repr__(self): return f'StyleSheetId({super().__repr__()})' ``` Input Types: v0, str Output Type: Generator[dict, dict, Optional[str]] Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: str) -> Generat...
Imports: ```python import numpy as np from pandas._config import config, get_option from pandas._libs import lib, writers as libwriters from pandas._libs.tslibs import timezones from pandas.compat._optional import import_optional_dependency from pandas.errors import PerformanceWarning from pandas.util._decorators impor...
Imports: ```python import typing ``` Type definitions: Input Types: str, Dict[str, Any] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict[str, Any]) -> str: v3 = sorted(v2.keys(), reverse=True) for v4 in v3: if isinstance(v2[v4], (int, float)): ...
Imports: ```python import typing ``` Type definitions: ```python class v0(collections.abc.Mapping): v1: Optional[str] def __init__(self, v2: Dict[str, Any], v3: Optional[str]=None) -> None: self.delegate = v2 self.default_namespace = v3 try: self.gvk self.name ...
Imports: ```python import itertools import random import pandas as pd import typing ``` Type definitions: Input Types: int Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: int=20) -> dict: v2 = list(itertools.combinations('ABCD', 2)) v3 = random.choices(v2, k=v1) v4 = {'tot...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> list: v2: list = await self.server.getaddresshistory(v1) for v3 in v2: v3['tx'] = await self.get_tx(v3['tx_hash']) return v2 ...
Imports: ```python import math import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> None: global log2k v2 = math.log(v1, 2) ```
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(): v5 = v3.split('.')[0] if v5 in v2: v2[v5].append(v4) else: v2.setd...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[Dict] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[Dict]: v1 = 'get_all_installed_rpm_dicts' if v1 not in self._cache: v2: Dict[str, Dict] = dict() for v3 in self.get_image_archiv...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): v1 = Path(v1) v3 = None if v1.exists(): v3 = v1.read_text() if v2 != v3: v1.write_t...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> dict: v2 = f'/ecomm/v2/payments/{v1}/details' return self._make_call(method='get', endpoint=v2, headers=self.headers) ```
Imports: ```python import json from urllib.request import urlopen import typing ``` Type definitions: Input Types: str Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str='0ba2a203045bc94d165d52e56c87ceaa463f4284') -> Dict[str, str]: v2 = 'raw.githubusercontent.com' ...
Imports: ```python import shutil import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3 = ['enclave.signed.so', 'key.txt', 'spid.txt', 'substratee-worker'] [shutil.copy(f'{v1}/{f}', f'{v2}/{f}') for v4 in v3] ...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseArr): def __init__(self, v1, v2): super().__init__(data=v2) self._sonarr = v1 self.name = util.parse(self._data, attribute='name') self._name = self.name self.id = util.parse(self._data, attribute=...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = re.findall('[1-9]\\d{5}(?!\\d)', v1) if v2: return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> list: with v1.open('r') as v2: v3 = [line for v4 in v2.read().splitlines() if not v4.startswith('#')] return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Union[float, 'Datum'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False) -> Union[float, 'Datum']: v3 = self.pc[v1.lower()] if v2: return v3 else: return float(...
Imports: ```python import os from pathlib import PurePath from typing import Iterable, Optional, cast import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: SourceRootRequest) -> OptionalSourceRoot: return cast(OptionalSourceRoot, run_rule_with_mocks(get_optional_sou...
Imports: ```python from operator import attrgetter import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: AsyncIterable[v0] Output Type: Optional[v0] Dependencies: Function Name: v1 Function: ```python async def v1(v2: AsyncIterable[v0], /, **v3: Any) -> Optional[v0]: v4 = all v5 = at...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> list: v2 = [] v3 = v1 while True: v4 = list(self.graph.successors(v3)) if len(v4) != 1: break v3 = v4[0...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self._is_highlighted.is_set(): return 'click' if self._is_clicked.is_set() else 'hover' return 'normal' ```
Imports: ```python import datetime import typing ``` Type definitions: Input Types: str, Union[float, int, datetime.timedelta], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[float, int, datetime.timedelta], v3=None) -> None: if isinstance(v2, datetime.ti...
Imports: ```python import base64 import typing ``` Type definitions: Input Types: Any, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str) -> str: v3 = base64.b64encode(v1.read()) return f'{v2};base64,' + v3.decode('utf-8') ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float): v3 = 1.163965505e-20 return v3 * v2 ** 3.0 * v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if not self.hasNext(): return ' ' if not self.pairs: self.pairs = self.queue.popleft() v1 = self.pairs[0] self.pairs[1] -= 1 ...
Imports: ```python import io import typing ``` Type definitions: Input Types: typing.Union[io.BytesIO, str], str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: typing.Union[io.BytesIO, str], v2: str=None, v3: str=None, v4: str=None): if isinstance(v1, str): ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0 Output Type: bool Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> bool: try: for v3 in self._real_buckets.get(hash(v2), []): if v2 == v3: return Tru...
Imports: ```python import typing ``` Type definitions: Input Types: 'AbstractConfigModel' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'AbstractConfigModel'): for (v2, v3) in self.__dict__.items(): v4 = getattr(v1, v2, None) if v4: if isinstance...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1='Success', v2='text/plain') -> None: print('Content-Type: {}\n'.format(v2)) print(v1) exit(0) ```
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 = v3 = 0 for (v4, v5) in enumerate(v1): if v5 != v1[v3]: v2 += (v4 - v3 + 1) * (v4 - v3) // 2 v3 = v4 ...
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): if self.__data_mgr__.has_group(v1): self.push_svr.notifyGrpEvt(v1, 'stop') if v2 and self._sink_: v3 = self.__data...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: int): v2 = self._autoresponse_cache.get(v1) if not v2: v2 = await self.update_autoresponse_cache(v1) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1: dict = dict() v1['autorole_id'] = self.asString(self.autorole_id) v1['blacklist_ban_links'] = self.asBoolean(self.blacklist_ban_links) v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int=0, v3: int=-1) -> list: v4 = self._get_key(v1) return self.client.lrange(v4, v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable, v2): v2[0] = self.to_device(v2[0]) return v1(*v2) ```
Imports: ```python import inspect import typing ``` Type definitions: Input Types: bool Output Type: List[operation_base.Operation] Dependencies: ```python def v0() -> List[operation_base.Operation]: v1 = inspect.getmembers(python_operations, lambda x: inspect.isclass(x) and (not inspect.isabstract(x))) return...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Tuple[Callable, int, np.ndarray, Tuple, Dict] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[Callable, int, np.ndarray, Tuple, Dict]) -> np.ndarray: (v2, v3, v4, v5, v6) = v1 re...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, **v2: dict) -> dict: for (v3, v4) in v2.items(): if v3 in v1: v1[v4] = v1[v3] del v1[v3] return v1 ```
Imports: ```python import re from datetime import datetime, tzinfo import typing ``` Type definitions: ```python v0 = Union[str, float, datetime] ``` ```python v1 = Union[str, tzinfo, None] ``` Input Types: v0, str, bool, v1 Output Type: int Dependencies: ```python def v2(v3: Union[str, None, tzinfo]) -> Optional[tzinf...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Dict[Any, pd.Series] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Dict[Any, pd.Series]: v2 = 15 v3 = ['test_key_' + str(x) for v4 in range(v2)] v5 = {key: self._get_series(v1) for v6 in v3}...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: dict): """ will create an new placeholder WARNING: must be send to shared.dimension_handler :param name: the dimension name :param config: the config for it """...
Imports: ```python import typing ``` Type definitions: ```python class v0(Operation): v1: str = '/platform/admin/namespaces/{namespace}/items/locale/byIds' v2: str = 'GET' v3: List[str] = [] v4: List[str] = ['application/json'] v5: Optional[str] = 'bearer' v6: str = None v7: str v8: str ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = [] while True: v2 = input('Author: ') if not v2: break v1.append(v2.title()) return ' and '.join(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: print('[bold green]>>> Downloading from your playlists >>>[/bold green]\n') for v1 in self._fetch_items('https://api.spotify.com/v1/me/tracks'): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, **v1: Any) -> Dict[str, Any]: v2 = super().get_context_data(**v1) print(v2) v2['list_type'] = self.request.GET.get('type', 'all') return v2 ...
Imports: ```python import torch from torch.nn import functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, bool, float, bool Output Type: tuple[torch.Tensor, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v0(v1: to...
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 v3 = 0 (v4, v5) = (None, None) v6 = False v7 = set() for v8 in ...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: 'Word', requests.Response, 'Config' Output Type: 'Iterator[WordPronPair]' Dependencies: ```python def v0(v1: requests.Response, v2: 'Config') -> 'Iterator[Pron]': for v3 in v1.html.xpath(_PRON_XPATH_TEMPLATE): yield from y...
Imports: ```python import typing ``` Type definitions: Input Types: optuna.trial.Trial, dict, int Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: optuna.trial.Trial, v2: dict, v3: int) -> dict: if self.optimization_search_space is None: self.optimization_search_space...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str]: v2 = re.search('(.+)(\\[.+\\])', v1) if v2: return (v2.group(1), v2.group(2)) else: return ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Union[None, tuple] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Union[None, tuple]: v2 = re.match('^(#+)(.+)', v1) if v2: v3 = len(v2.group(1)) v4 = v2.group(2) retu...
Imports: ```python import random import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None) -> None: v2 = ['KILL ALL HUMANS', 'MORSE CODE IS FOR NERDS', 'HONEYBADGER DONT CARE', 'GLHF'] if v1 is None: v3 = rando...
Imports: ```python import typing ``` Type definitions: ```python v0 = bool ``` Input Types: v0, v0 Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0=False, v3: v0=True) -> None: v4 = getattr(self, '_cacher', None) if v4 is not None: v5 = v4[1]() if v5 is ...
Imports: ```python import numpy as np import numpy.typing as npt from scipy import fftpack from scipy.signal import hilbert from scipy.interpolate import interp1d import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> Non...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List[List[int]]: v2 = [[0] * v1 for v3 in range(v1)] (v4, v5, v6, v7) = (0, v1 - 1, 0, v1 - 1) v8 = 1 while v4 < v5 and v6 <...
Imports: ```python import argparse from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = argparse.ArgumentParser(prog='add_content_hash_to_sessions', description='Add content hash to all existing ...
Imports: ```python import typing ``` Type definitions: Input Types: models.Resource Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: models.Resource): v2 = super().to_representation(v1) v2['circle'] = {'id': v1.circle.id, 'name': v1.circle.name} return v2 ```
Imports: ```python import os from argparse import ArgumentParser, Namespace import typing ``` Type definitions: Input Types: list Output Type: Namespace Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> Namespace: v2 = ArgumentParser(description='A tool to combine multiple merge tools') ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Set[str] Dependencies: ```python def v0(v1: str) -> str: return os.path.join(v1, 'package_index') ``` Function Name: v2 Function: ```python def v2(v3: str) -> Set[str]: with open(v0(v3)) as v4: return {p.stri...
Imports: ```python import json from astropy.io import fits import typing ``` Type definitions: Input Types: str Output Type: typing.List[fits.Header] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> typing.List[fits.Header]: v2 = [] with open(v1, 'rb') as v3: for v4 in json.loads...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Pipeline, pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Pipeline, v2: pd.DataFrame): v3 = v1.named_steps['preprocessor'].transformers_ v4 = v3[0][1].named_steps['scaler'] loggi...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int, v2: int, v3: int): self.width = v1 self.height = v2 self.length = v3 @property def v4(self) -> int: v5 = 2 * self.length * self.width + 2 * self.width * self.height + 2 * ...
Imports: ```python import typing ``` Type definitions: Input Types: float, int Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: int) -> float: if v2 > 0: if v2 == 1: return v1 else: return v1 * self.myPow(v1, v2 - 1) eli...
Imports: ```python import typing ``` Type definitions: Input Types: Collection['Revision'], Any Output Type: List[str] Dependencies: ```python def v0(v1): return {r.revision for v2 in self._get_ancestor_nodes([id_to_rev[v1]])} ``` Function Name: v3 Function: ```python def v3(self, v4: Collection['Revision'], v5: A...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.__file: self.__file.close() self.__file = None ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, pd.DataFrame Output Type: pd.DataFrame Dependencies: ```python def v0(v1: str, v2: str) -> int: return lev.ratio(v1, v2) ``` Function Name: v3 Function: ```python def v3(v4: str, v5: pd.DataFrame) -> pd.DataFrame: v6 =...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: await super().async_added_to_hass() self.update_device_data() ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2: dict = {'q': 0, 'f': 0, 's': 0, 'qf': 0, 'qs': 0, 'fs': 0, 'qfs': 0} for v3 in v1: if v3['type'] == 'qfs': v2['qfs'] += 1 ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> int: v2 = 0 if v1 is not None: v2 = len(v1[0]) if v2 != 1: raise ValueError('Not expected single record') return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: self.endpoint = 'apiMessages' self.params = {'id': v1} self.payload = {} return super().get() ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict): for (v2, v3) in self.inputs.items(): if v2 not in v1 and 'default_value' in v3: v1[v2] = v3['default_value'] ```
Imports: ```python import json import logging import typing ``` Type definitions: Input Types: Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self) -> tuple: try: with open('final_ticker_symbols.json', 'r+', encoding='utf-8') as v1: v2 = json.load(v1) ...
Imports: ```python import os import stat import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: if not os.path.exists(v1): if os.path.islink(v1): raise Exception('Dangling link: ' + v1) os.mkdi...
Imports: ```python import collections import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = len(v1) v3 = collections.Counter(v1) v4 = sum((count & 1 for v5 in v3.values())) if v2 & 1: retur...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: Optional['FqeData'], 'Nparray', 'Nparray', 'Nparray' Output Type: Tuple['Nparray', 'Nparray', 'Nparray'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional['FqeData']=None, v2: 'Nparray'=None, v3: 'Nparray'=Non...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.repaint() return super().moveEvent(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: ArgumentParser Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ArgumentParser): v1.add_argument('template', help='the name of the template to use') v2 = v1.add_subparsers(title='action', dest='action', help='wh...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.__app.ask_directory() if v1: self.__directory = v1 self.__update() ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: list, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: list): v3 = np.dot(v1, v2) v4 = sum([k ** 2 for v5 in v1]) ** 0.5 v6 = sum([v5 ** 2 for v5 in v2]) ** 0.5 re...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> np.ndarray: v2 = np.zeros_like(v1[0], dtype=np.uint8) v3 = v1.shape[0] if self.mask2show is not None...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0() -> pd.DataFrame: v1 = {'NYBOT-棉花': 'CT', 'LME镍3个月': 'NID', 'LME铅3个月': 'PBD', 'LME锡3个月': 'SND', 'LME锌3个月': 'ZSD', 'LME铝3个月': 'AHD', 'LME铜3个...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Optional[int], Optional[int], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None, v3: Optional[int]=20, v4: Optional[int]=0, v5='US'): v6 = self.route('GET', '/artists/{spotify_id}/albums',...
Imports: ```python import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: dict): if isinstance(v1, str): v3 = v1 for (v4, v5) in v2.items(): if isinstance(v5, str) and v5 != v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Any: try: v2 = self.split_f(v1) for v3 in self.actions: v2 = v3(v2) if self.need_map: v2 = self.map(...
Imports: ```python from pathlib import Path, PosixPath import typing ``` Type definitions: Input Types: str or PosixPath, str or PosixPath, str or PosixPath Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str or PosixPath, v2: str or PosixPath, v3: str or PosixPath): v4 = Path(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> None: for v2 in self.__waiters: if v2.done(): continue v2.set_result(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: ```python def v0(v1: str) -> bool: return v1.isnumeric() and int(v1) >= 150 and (int(v1) <= 193) ``` ```python def v2(v3: str) -> bool: return v3.isnumeric() and int(v3) >= 59 and (int(v3) <= 76) ``` Functio...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Tuple[Optional[int], Optional[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Tuple[Optional[int], Optional[int]]: v2 = self._config.model v3 = v2.query.with_entities(v2.id).order_by(v2.id).filte...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: bool Dependencies: ```python def v0(v1): for v2 in v1.values(): if isinstance(v2, dict): yield from v0(v2) else: yield v2 ``` Function Name: v3 Function: ```python def v3(v4: Dict) -> bool:...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[float], float], float, float, int Output Type: Generator[float, None, None] Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable[[float], float], v2: float, v3: float, v4: int) -> Generator[float, None, None]: v5 = v2...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = os.path.basename(v1) v3 = str(v2.split('.apk')[0]) + '.apk' return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> dict: v2 = f'{self.SANDBOXES_PATH}/{v1}' v3 = self._get(v2) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: if v1 in self.hash: return False else: self.hash[v1] = len(self.history) self.history.append(v1) return T...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[int] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[int]) -> List[str]: v1 = sorted(v1) return [self.tokens[i] for v2 in v1] ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int) -> Optional[str]: with self.conn.cursor() as v4: v4.execute('SELECT tt.value FROM text_tags tt JOIN texts...
Imports: ```python import typing ``` Type definitions: Input Types: Mapping[str, Any] Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping[str, Any]) -> List[List[int]]: (v2, v3, v4) = (v1['M'], v1['N'], v1['K']) if self.trA: return [[v4, v2], [v4, ...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> Path: v1 = v1 / 'packages' / 'swift' if not v1.is_dir(): v1.mkdir(parents=True) return v1 ```
Imports: ```python import math import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Any, Any, Any, Any Output Type: Union[float, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2=10, v3=1, v4=300, v5=False) -> Union[float, np.ndarray]: if len(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = {} for (v2, v3) in self._widgets.items(): v1[v2] = ''.join((self._widget_state.get(w, '') for v4 in v3)) return self._out_fmt.render(v...
Imports: ```python from typing import Dict, Optional, Union, List, Tuple, TYPE_CHECKING, cast, Iterable import warnings import typing ``` Type definitions: Input Types: 'np.ndarray', 'Dataset', int, bool Output Type: 'np.ndarray' Dependencies: ```python def v0(v1: 'np.ndarray', v2: 'Dataset', v3: int=0) -> 'np.ndarray...