text
stringlengths
190
325k
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, str, str Output Type: Any Dependencies: ```python def v0(v1): v2 = dict() for v3 in v1: v4 = v3[0] v4 = v4.strip() if v4 == '': continue if len(v3) == 2: v5 = v3[0] ...
Imports: ```python from datetime import date, timedelta import typing ``` Type definitions: Input Types: date, int Output Type: List[Tuple[date, int]] Dependencies: Function Name: v0 Function: ```python def v0(v1: date, v2: int=10) -> List[Tuple[date, int]]: v3 = date.today() v4 = v3.year - v1.year return...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: ```python def v0(v1: str) -> tuple: v2 = [x in shift_key_codes or x in modifier_codes or x in codes for v3 in v1] v4 = [] if False not in v2: for v5 in v1: if v5 in shift_key_codes: ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if 'If' in v1: v1 = re.sub('If\\((.*?),(.*?),(.*?)\\)', '(\\g<2> if \\g<1> else \\g<3>)', v1) if 'And' in v1: v1 = re.sub('And...
Imports: ```python from itertools import permutations import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: int v3: int v4: int v5: int v6: int ``` Input Types: Iterable[str], int, bool Output Type: int Dependencies: ```python def v7(v8: Iterable[str]) -> list[v0]: v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: print('Edit client account') print('=' * 40) v1 = input('Add funds? (y,n) ') if v1 == 'y': v2 = input('Which client id number? ') ...
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 = v1 >= -180 and v1 <= 180 v4 = v2 >= -90 and v2 <= 90 v5 = v3 and v4 if not v5: return False else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self) -> pd.Series: if self.target == self.cv_target_sf_column: return self.train_y else: v1 = self.load_x_train(all_cols=True) return ...
Imports: ```python import re import typing ``` Type definitions: ```python @dataclass class v0: v1: UserType v2: str v3: str ``` ```python @dataclass class v4: v5: str v6: UserType v7: str v8: str v9: str ``` ```python @dataclass class v10: v11: UserType v12: str v13: str ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> dict: v2 = '' for v3 in v1: v2 += v3 return {'level': self.find_level_in_text(v2), 'name': self.find_name_in_text(v2), 'version':...
Imports: ```python from requests import get from contextlib import closing import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> None: with open(v2, 'wb') as v3: with closing(get(v1)) as v4: v3.write(v4...
Imports: ```python import math import typing ``` Type definitions: Input Types: int, int Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> float: v3 = int(v1 / 2 ** self.LUT_input_V_min_log2_uV) v4 = int(v2 / 2 ** self.LUT_input_I_min_log2_nA) v5 = in...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> str: v2 = v1.pop('in_file') v3 = v1.pop('tensor_file') return f'dwi2tensor' + self.set_configuration_by_keys(v1) + f' {v2} {v3}' ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: str Dependencies: ```python def v0(v1, v2, v3, v4): if v3 == v1: return v5 = factorial[v1 - 1 - v3] for v6 in range(1, v1 + 1): if used[v6]: continue if v5 < v2: v2 -= v...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self) -> pd.DataFrame: if not hasattr(self, 'results'): raise AttributeError('Model outputs not yet calculated: call `.run()` first....
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[int, int, int] ``` Input Types: v0, v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0) -> v0: (v4, v5, v6) = v2 (v7, v8, v9) = v3 return (v4 + v7, v5 + v8 + v6 * v7, v6 + v9) ```
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: float, Path Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(v1: float, v2: Path) -> None: await asyncio.sleep(v1) try: v2.unlink() except Exception: pass ```
Imports: ```python import typing ``` Type definitions: ```python v0 = NamedTuple('Rule', [('path', str), ('allowed', bool)]) ``` Input Types: str Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str) -> List[v0]: v3 = self.agents_rules.get(v2, self.agents_rules.get('*', []...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: int Dependencies: ```python def v0(v1, v2): v3 = 0 for v4 in v2: v3 += v4 // v1 if v4 % v1: v3 += 1 return v3 > H ``` Function Name: v5 Function: ```python def v5(self, v6, v7: int) -> int:...
Imports: ```python import typing ``` Type definitions: Input Types: Union[pd.DataFrame, np.ndarray], Union[None, list[str]] Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[pd.DataFrame, np.ndarray], v2: Union[None, list[str]]=None) -> pd.Series: v3 = self._preproc...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('DT') ``` ```python v1 = TypeVar('T') ``` Input Types: Callable[[v1, float], v0], v1, float, float, Callable[[v1, v0, float], v1] Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(v3: Callable[[v1, float], v0], v4: v...
Imports: ```python import numpy as np import numpy.typing as npt import typing ``` Type definitions: ```python v0 = npt.NDArray[np.float64] ``` Input Types: int Output Type: None Dependencies: ```python def v1(v2: 'Traffic', v3: Optional[int], v4: List[str], v5: Union[None, 'crs.Projection', pyproj.Proj]=None, v6: int=...
Imports: ```python import os, sys, re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v1 = re.sub('([^\\n\\d, \\.])((?:\\d+\\.?\\d*|\\.\\d+))', '\\1 \\2', v1) v1 = re.sub('([\\+\\-]?(?:\\d+\\.?\\d*|\\.\\d+))([^\\n...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: for (v2, v3, v4) in os.walk(v1): for v5 in v4: v6: str = os.path.abspath(os.path.join(v2, v5)) if v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, list, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: list, v3: int=3): v1 = v1.copy() v1.append_column(v2) v1 = v1.triangulate_to_ones() if v3 < 3: yield {'Этап': 'Закончился первы...
Imports: ```python import typing ``` Type definitions: ```python class v0(Generic[T]): def __init__(self, v1: T): self.value = v1 def v2(self, v3: any) -> int: if self.value >= v3.value: return 1 else: return -1 def v4(self) -> str: return str(self....
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> None: assert not (v1 / 'schema_doc.html').exists() assert not (v1 / 'schema_doc.min.js').exists() ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, list, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: list, v4: list): if v3[v1] > v3[v2]: (v1, v2) = (v2, v1) for v5 in range(20, -1, -1): if v3[v2] - v3[v1] >=...
Imports: ```python import re import typing ``` Type definitions: Input Types: Any, discord.Interaction, str Output Type: Any Dependencies: ```python def v0(v1): v2 = 'Invalid operators/operations specified.' if v1 == '': v3 = '\u200b' elif not v1.isdigit() and re.search('[\\+\\-\\*\\/%()\\.]', v1) ...
Imports: ```python import os import pandas as pd import typing ``` Type definitions: Input Types: str, Optional[str] Output Type: Dict[str, pd.Series] Dependencies: ```python def v0(v1: pd.Series, v2: int) -> pd.DataFrame: v3 = v1.copy() for v4 in v1.columns: v3[v4] = v3[v4].mode().values[0] return...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2=None) -> bool: if not hasattr(self, v1): return False if not v2: v3 = v1.replace('action_', 'standard_', 1) if has...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> list: if self.pos + v1 >= len(self.tokens): return [None, ['', '']] return self.tokens[self.pos + v1] ```
Imports: ```python import calendar import datetime import typing ``` Type definitions: ```python @dataclasses.dataclass class v0: v1: Optional[datetime.datetime] = None v2: Optional[datetime.datetime] = None v3: Optional[str] = None v4: bool = False v5: Optional[str] = None v6: Optional[str] = N...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: v1 = self.entity_description.key v2 = self.entity_description.write_value return await self.async_put_characteristics({v1: v2}) ```
Imports: ```python import typing ``` Type definitions: Input Types: int, bool Output Type: int Dependencies: ```python def v0(v1: str) -> bool: return not v1 or v1.isspace() ``` Function Name: v2 Function: ```python def v2(self, v3: int=1, v4: bool=False) -> int: def v5(v6: str) -> bool: return not v6...
Imports: ```python from pathlib import Path import numpy as np import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(v1: np.array=None, v2: int=10, v3: str=None, v4: str=None): (v5, v6, v7) = plt.hist(v1, v2, density=True) plt.titl...
Imports: ```python import transformers from transformers import CamembertTokenizer import typing ``` Type definitions: Input Types: str Output Type: transformers.PreTrainedTokenizerFast Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> transformers.PreTrainedTokenizerFast: v2 = CamembertToken...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: structures.ComponentSpec Dependencies: ```python def v0(v1) -> structures.ComponentSpec: v2 = _yaml_utils.load_yaml(v1) v3 = structures.ComponentSpec.from_dict(v2) import hashlib v4 = v1 if isinstance(v1, bytes) else v...
Imports: ```python import pandas as pd import ast import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame=None) -> pd.DataFrame: v2 = [] v3 = 'crowd-entity-annotation.entities' v4 = ['dataObject', '...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: ```python def v0(v1: int, v2: int=BASE_SUBJECT_NUMBER) -> int: return v1 * v2 % DIVIDER ``` Function Name: v3 Function: ```python def v3(v4: int, v5: int) -> int: v6 = 1 while v5: v5 -= 1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, int, int, Any, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1): clog.debug(v1) return v1 ``` Function Name: v2 Function: ```python def v2(v3, v4, v5: int=3600, v6: int=1, v7=False, v8='bash_login', v9=True, v10=Fals...
Imports: ```python from datetime import time, datetime, timedelta import typing ``` Type definitions: Input Types: time, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: time, v2: str): if v2 not in self.TIME_MAPPING.keys(): raise ValueError(f'注意你的flag是不被接受的,我们仅仅支持...
Imports: ```python import typing ``` Type definitions: Input Types: AnyStr Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: AnyStr) -> bool: if not self.ends_with_path_separator(v1): return False return self.isfile(self._path_without_trailing_separators(v1)) ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: Path): v2.mkdir(exist_ok=True) v1.to_csv(v2.joinpath('uniprot_results.tsv'), sep='\t', index=False) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> List[int]: if not isinstance(v1, str): raise ValueError('conversion unsuccessful, please input a string') if ',' in v1: ...
Imports: ```python import base64 import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = base64.b64encode(bytes(v1, 'utf-8')) v2 = v2.decode('utf-8') v2 = v2.replace('/', '_').replace('+', '-').rstrip('=') return f...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float Output Type: str Dependencies: ```python def v0(v1: float) -> Tuple[int, int]: v2 = is_approx_int(v1 * np.arange(1, 100), atol=_naming_tol) if not v2.any(): raise ValueError v2 = np.arange(1, 100)[v2][0] ...
Imports: ```python import shlex import subprocess import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2): v3 = 'convert -density 600 {} -quality 100 {}'.format(v1, v2) subprocess.check_output(shlex.split(v3)) print...
Imports: ```python from ..logging import raise_if_not, get_logger, raise_log, raise_if import typing ``` Type definitions: Input Types: Tuple, Tuple Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple, v2: Tuple): (v3, v4) = v1[:2] (v5, v6) = v2[:2] raise_if_not(v3.shape[...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0() -> Dict: v1 = {} v1['api_key_id'] = os.environ.get('VERACODE_API_KEY_ID', None) v1['api_key_secret'] = os.environ.get('VERACODE_API_KEY_SECRET', Non...
Imports: ```python import logging import typing ``` Type definitions: Input Types: singer.CatalogEntry, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: singer.CatalogEntry, v2, v3): v3.set_level(logging.DEBUG) for (v4, v5) in v2: assert v1.metadata._breadcrumb_...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=-1, v2: int=0): v3 = v2 + self.pos return self.source[v3:v3 + v1] ```
Imports: ```python import numpy as np import os import subprocess import typing ``` Type definitions: Input Types: str, list, str, np.ndarray, int, float, np.ufunc, list, mp.Pool, bool Output Type: tuple Dependencies: ```python def v0(v1: str, v2: str, v3: str, v4: float=2.7) -> np.ndarray: if os.path.exists(os.pa...
Imports: ```python import heapq import math import typing ``` Type definitions: ```python v0 = TypeVar('K') ``` Input Types: Dict[v0, Iterable[Tuple[int, v0]]], v0, v0 Output Type: int Dependencies: Function Name: v1 Function: ```python def v1(v2: Dict[v0, Iterable[Tuple[int, v0]]], v3: v0, v4: v0) -> int: v5 = []...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Set[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Set[str]: v1 = self.service.watcher_config(self._name) if v1: v2 = v1.get('symbols', []) else: v2 = [] return set(v2) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid', 'st_gid', 'st_size', 'st_atime', 'st_mtime', 'st_ctime', 'st_atime_ns', 'st_mtime_ns', 'st_ctime_ns') def __init__(self, v2: AnyStr, v3: int=S_IFREG | PERM_DEF_FILE, v4: Optiona...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, bytes Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes, v2: bytes): v3 = bytearray(len(v1)) for v4 in range(len(v1)): v3[v4] = v2[int.from_bytes(v1[v4].encode(), 'big')] return v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4, v5, v6: bool): if v6: return v1 @ v5 + v3 else: return v2 @ v5 + v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.client_get('/') self.assertEqual(v1.status_code, 302) self.assertEqual(v1.url, '/login/') v1 = self.client_post('/', {'prefers_web_...
Imports: ```python import typing ``` Type definitions: ```python v0 = Type[AbcStream] ``` Input Types: v0, Union[str, Iterable[str]] Output Type: 'Streams' Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: Union[str, Iterable[str]]=None, **v4) -> 'Streams': v3 = v3 or v2.supported_schema...
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 < 0 or v1 >= self.num_stacks: raise Exception('Index out of bounds') if self.num_stacks == 1: return self.pop() v2 = sel...
Imports: ```python import typing ``` Type definitions: Input Types: int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: bool=True): v3 = self._data[v1] if v2: return v3.get() else: return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Dict, List, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: Dict, v3: List=None, v4: str='Metrics'): v1.info(v4 + ':') v1.info('=' * (len(v4) + 1)) if v3 is not None: v5 = ' | '.join(['...
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: object Dependencies: ```python def v0(v1: list, v2: int) -> object: v3 = partition(v1, 0, len(v1) - 1) if v3 == v2: return v1[v3] elif v3 > v2: return v0(v1[0:v3], v2) else: return v0(v1[v...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: ```python def v0() -> dict: v1 = str(Path(__file__).resolve().parents[2] / 'autoscaler' / 'kuberay' / 'ray-cluster.complete.yaml') return yaml.safe_load(open(v1).read()) ``` Function Na...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False) -> None: if v2 and v1 != '443': v3 = f'{v1} https' else: v3 = v1 v4 = [self.parser.get_arg(x) for v5 in ...
Imports: ```python import typing ``` Type definitions: ```python v0 = t.TypeVar('T') ``` Input Types: v0, t.Sequence[t.Tuple[t.Sequence[t.Union[int, str]], object]] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: t.Sequence[t.Tuple[t.Sequence[t.Union[int, str]], object]]) -...
Imports: ```python import numpy as np from functools import reduce import typing ``` Type definitions: Input Types: Any Output Type: Dict Dependencies: ```python def v0(v1, v2, v3=' '): return [str(p1) + v3 + str(p2) for v4 in v1 for v5 in v2] ``` Function Name: v6 Function: ```python def v6(self, v7) -> Dict: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: socket.socket, v2: AddrType) -> None: print('Got connection from ', v2) self.alive = True self.client_socket = v1 self.send_lock = threading.Lock() self.message_callbacks = {Net...
Imports: ```python import os import os.path import shlex import subprocess import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2=False): if v2: v3 = os.popen(v1) print(v3.read()) else: v4: list[...
Imports: ```python import os from os.path import join, exists, split, abspath import logging import json import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str=None): if v1 is not None: with open(v1, 'r') as v2: v3 = json.load(v2) self.elevati...
Imports: ```python import typing ``` Type definitions: ```python class v0(Operation): v1: str = '/platform/admin/namespaces/{namespace}/users/{userId}/iap' v2: str = 'GET' v3: List[str] = [] v4: List[str] = ['application/json'] v5: List[List[str]] = [['BEARER_AUTH'], ['BEARER_AUTH']] v6: str = N...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> Dict[str, Any]: v3 = self._post('/tokens', json={'email': v1, 'password': v2}) self._token = v3['token'] self._user...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('AgentPool') ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> v0: self._ensure_agentpool(v2) (v3, v4, v5, v6, v7) = self.context.get_update_enable_disable_cluster_autosca...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): v1 = ('mcq_invalidating', 'render', 'negate', '_query', '_hash') def __init__(self, v2: Dict, v3: bool, v4: bool, v5: bool, v6: str=None): self.mcq_invalidating = v5 self.render = v4 self.negate = v3 ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> torch.Tensor: v2 = torch.diagonal(v1, dim1=1, dim2=2) ...
Imports: ```python import io import typing ``` Type definitions: Input Types: str, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: list): with io.open(v1, 'w', encoding='utf8') as v3: v3.write('\nmsgid ""\nmsgstr ""\n') for (v4, v5) in v2.metadata.item...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.assertPathNotExists(self.predict_out_file) self.assertPathNotExists(self.sliding_window_out_file) self.assertPathNotExists(self.invalid_out_...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = len(v1) for v3 in self.query_table.keys(): v4 = v3.split(' ') if len(v4) != v2: continue v5 = True ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = self._get_total_food_count(v1 + '1') self._enter_update_time_and_count(self._get_total_food_count(v1 + '1')) if self._new_total_...
Imports: ```python import logging import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: if v1: logging.info(v1) self.open_app(self.dict_info['app_package'], self.dict_info['activity_login']) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int, float, int, float, int, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int=1, v3: float=1.0, v4: int=-1, v5: float=-1, v6: int=4, v7: float=1.0, **v8): v9 = False if v4 != -1 or ...
Imports: ```python from tensorflow import keras import typing ``` Type definitions: Input Types: tuple, int Output Type: keras.Model Dependencies: ```python def v0(v1, v2: int, v3: int, v4: int, v5: int, v6: bool, v7: str, v8=1.0): v9 = keras.backend.int_shape(v1) v10 = v1 v1 = _conv_bn(v1, v5, 1, 1, v7) ...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float) -> str: if v1 == 0.0: return '%8s' % '0.' v2 = '%8.11e' % v1 (v3, v4) = v2.strip().split('e') v5 = int(v4) v6 = '-' if abs(v1) < ...
Imports: ```python import random from functools import partial from multiprocessing.pool import ThreadPool import pandas as pd from tqdm import tqdm import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3=True...
Imports: ```python import typing ``` Type definitions: ```python class v0(cmd.Cmd): v1 = '\n\nWelcome to the sidechain shell. Type help or ? to list commands.\n' v2 = 'SSX> ' def v3(self: v0) -> None: """Clear the screen before the REPL starts up.""" _clear_screen() def __init__(self...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame, pd.Index, int Output Type: Tuple[pd.DataFrame, pd.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame, v3: pd.Index=pd.Index([]), v4: int=0) -> Tuple[pd.DataFrame, pd.Da...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str): v4 = '' return v4 ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, Any Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2=None) -> np.ndarray: if not isinstance(v1, pd.DataFrame): raise TypeError('input must be a pd.Da...
Imports: ```python import typing ``` Type definitions: Input Types: mpf.ImageLocation, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: mpf.ImageLocation, v2: int) -> None: v3 = self._get_region_of_interest(v2) v1.x_left_upper += v3.x v1.y_left_upper += v3.y ```
Imports: ```python import typing ``` Type definitions: Input Types: list, list, int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list, v3: int) -> list: v4 = [[0 for v5 in range(v3)] for v6 in range(v3)] for v7 in range(len(v1)): for v8 in range(len(v2[0])...
Imports: ```python import typing ``` Type definitions: Input Types: List[bs4.element.Tag] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: List[bs4.element.Tag]) -> str: if len(v1) > 0: v2 = v1[0] if len(v2.contents) == 0: return '' else: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Dict[str, str]: v2 = {} with open(v1, 'r') as v3: for v4 in v3: v5 = v4.strip() if not v5: ...
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python @memoized def v0() -> Dict[str, Any]: return current_app.config.get('JINJA_CONTEXT_ADDONS', {}) ``` ```python def v1(v2: Dict[str, Any]) -> Dict[str, Any]: for v3 in v2: v4 = typ...
Imports: ```python import typing ``` Type definitions: Input Types: qlast.GroupQuery Output Type: None Dependencies: ```python def v0(v1: str) -> str: if _module_name_re.match(v1): return v1 else: return ident_to_str(v1) ``` ```python def v2(v3: str) -> str: return edgeql_quote.quote_ident(...
Imports: ```python import asyncio import queue import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Callable[[queue.Queue], v0], Any Output Type: Awaitable[v0] Dependencies: ```python def v1(): q.put_nowait(end_element) ``` ```python def v2(): return thread_main(q) ``` ```python asyn...
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 = self.__get_req__(f'watchlists/show/{v1}') return [str(x['symbol']) for v3 in v2['watchlist']['symbols']] ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> int: v2 = [] (v3, v4) = v1[0] if v3 in v1[1]: return v3 else: return v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[Any] Output Type: Iterable[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[Any]) -> Iterable[Any]: for v2 in v1: yield (list(v2[1]) + [v2[0]]) ```
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': {'committee_id': 1}, 'user/111': {'username': 'username_srtgb123', 'number_$1': '', 'number_$': ['1'], 'default_number': '1...