text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: str v2: str v3: int v4: Dict v5: List[File] v6: List[EnvVar] def __init__(self, v7: str, v8: str, v9: int): self.id = v7 self.name = v8 self.level = v9 self.children: Dict[str, v0]...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str=None) -> None: if v1 is None: return if v2 is None: v2 = self.id self.io.create_task(super()...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.special_checkbox.setChecked(True) self.numbers_checkbox.setChecked(True) self.uppercase_checkbox.setChecked(True) self.lowercase_checkbo...
Imports: ```python import os import os.path import typing ``` Type definitions: Input Types: Text, Text Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Text, v2: Text) -> None: os.makedirs(os.path.dirname(v1), exist_ok=True) with open(v1, 'w+') as v3: v3.write(v2...
Imports: ```python import typing ``` Type definitions: Input Types: List[numpy.ndarray] Output Type: List[numpy.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[numpy.ndarray]) -> List[numpy.ndarray]: v2 = [] for v3 in v1: if v3[20:60, 20:60, 2].min() > 100: con...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self._plot_range return v1[0] <= self._y_min <= v1[1] and v1[0] <= self._y_max <= v1[1] ```
Imports: ```python import re import subprocess import multiprocessing import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(v1: str): try: (v2, v3) = split_name(v1) v4 = '{}.gem'.format(v1) v5 = 'https://rubygems.org/downloads/{}.gem'.format(v...
Imports: ```python import json from tqdm import tqdm 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: self.load_reviews(v1) v3 = {title: None for v4 in self.titles} for (v4, v5) in tqdm(s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, float, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: int): v4 = v1 v5 = v1 + v2 (v6, v7) = ([], []) v8 = self._config.angle_start + np.pi / 2....
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> int: if v1 == 0: return 1 elif v1 == 1: return 2 elif v1 == 2: return 4 else: return v1 + 4 ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = v1 if ' family member ' in v1: v2 = v2.replace(' family member ', ' ') v2 = re.sub('[,]? kDa$', '', v2) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self._element_name is None: v1 = self.get_last() if v1 == self.WILDCARD: v1 = self._path[-2] self._element_name = v1...
Imports: ```python import typing ``` Type definitions: Input Types: Any, bytes Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any, v2: bytes) -> None: assert self._is_open del self._db[self._encode_key(v1, v2)] ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = self._load_db_metadata() if v1 in self._table_name: return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int, int, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int, v4: int, v5: int, v6: int, v7: int): v8 = 'jump {} {} {} {} {} m{} m{}'.format(v1, v2, v3, v4, v5, v6, ...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, Any, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tf.Tensor, v2, v3, v4): v5 = tf.reduce_sum(v1, axis=1) v6 = tf.tensordot(v2, v5, [1, 0]) v7 = tf.expand...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list[int]: v2 = open('input/' + v1 + '.txt') return [int(line.strip()) for v3 in v2.readlines()] ```
Imports: ```python from scipy.spatial.distance import pdist from scipy.spatial.distance import squareform import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> pd.DataFrame: v2 = squareform(pdist(v1, ...
Imports: ```python import typing ``` Type definitions: Input Types: int, Any, int, Any Output Type: Any Dependencies: ```python def v0(): v1 = webdriver.ChromeOptions() v1.add_argument('--headless') v1.add_argument('--window-size=1920,1080') v1.add_argument('--no-sandbox') v1.add_argument('--disabl...
Imports: ```python from selenium import webdriver from selenium.webdriver.common.by import By import typing ``` Type definitions: Input Types: Any, Any Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> List: v3 = [] v4 = [] v5 = v1.find_elements(By.CLASS_NAME, 'prod_l...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1: str = self.edit.toPlainText() return v1 ```
Imports: ```python import typing ``` Type definitions: ```python class v0(ABC): def __init__(self, v1: Optional[Union[List[ClassifierMixin], Dict[str, ClassifierMixin], List[RegressorMixin], Dict[str, RegressorMixin]]]=None, v2: Optional[Union[str, Dict[str, Callable], List[str]]]=None, v3: bool=True, v4: Optional...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3, v4) -> bool: v5 = abs(v1 - v2) if len(v5) <= 0: pass v6 = max(v5) v7 = False v8 = 0.0 v9 = 0 if v6 >...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: PDB.Residue Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: PDB.Residue) -> np.ndarray: v2 = np.empty((3, len(v1.child_list))) for (v3, v4) in enumerate(v1.get_atoms()): v2[:, ...
Imports: ```python import typing ``` Type definitions: Input Types: Text Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Text) -> None: v2 = [table for v3 in self.lookup_tables if v3['name'] == self.current_title] if not v2: self.lookup_tables.append({'name': sel...
Imports: ```python from PIL import Image from io import BytesIO import os import zipfile import typing ``` Type definitions: Input Types: int Output Type: Image.Image Dependencies: ```python def v0(v1): global ZIPS if v1 not in ZIPS: v2 = zipfile.ZipFile(v1, 'r') ZIPS[v1] = v2 return ZIPS[v...
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: v3 = len(v1) v4 = v5 = v6 = v7 = 0 for v8 in range(v3): if v1[v8] == 'R': v4 += 1 if v2[v8]...
Imports: ```python import typing ``` Type definitions: Input Types: [str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: [str]) -> str: v2 = '' for v3 in v1: v2 += v3 + ' ' v2 = v2.strip() return v2 ```
Imports: ```python from importlib import import_module import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): try: return super().compiler(v1) except AttributeError: pass if self._compiler_cache is No...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = {')': '(', '}': '{', ']': '['} v3 = [] for v4 in range(len(v1)): v5 = v1[v4] if v5 in v2: if len(v3)...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, dict, str Output Type: 'pandas.DataFrame' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='', v3: dict=None, v4: str='MEMORY', **v5) -> 'pandas.DataFrame': v6 = len(self._io._log) if self.sascfg.pan...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = v1.lower() v2 = re.sub(self.__repeated_character, '\\1\\1', v2) v2 = re.sub(self.__laugh, '\\1\\2\\1\\2', v2) v2 = r...
Imports: ```python import warnings import numpy import numpy.random import pandas import typing ``` Type definitions: Input Types: Optional[int], Optional[int], Any, Any Output Type: List[Dict[str, List[int]]] Dependencies: ```python def v0(*, v1: int, v2: int, v3) -> List[Dict[str, List[int]]]: """randomly split ...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: str = 'content/' v2: Dict[str, Course] def __init__(self): if not os.path.isdir('content/'): os.makedirs('content/') self.courses = {} for v3 in next(os.walk('content/'))[1]: try: ...
Imports: ```python import typing ``` Type definitions: ```python @enum.unique class v0(enum.Enum): v1 = 'PENDING' v2 = 'RUNNING' v3 = 'OK' v4 = 'TIMEOUT' v5 = 'INTERRUPT' v6 = 'SKIP' v7 = 'FAIL' v8 = 'EXPECTEDFAIL' v9 = 'UNEXPECTEDPASS' v10 = 'ERROR' @staticmethod def v1...
Imports: ```python import torch import torch.nn.functional as F from torch import Tensor import typing ``` Type definitions: Input Types: Tensor, int Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: int) -> Tensor: (v3, v4) = v1.shape v5 = v4 - 2 * v2 v6...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('_T') ``` Input Types: Any Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Any) -> v0: if self._basetypes and (not any((isinstance(v2, t) for v3 in self._basetypes))): raise TypeError(f'Cannot...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> int: v3 = self.get_balance(v1) v4 = v3 + v2 return self.set_balance(v1, v4) ```
Imports: ```python import base64 import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = 't1' v2 = 't2' self.set_models({'organisation/1': {'name': 'test_organisation1', 'resource_ids': [1]}, 'resource/1': {'organis...
Imports: ```python import csv import json import pathlib import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: pathlib.Path, v2: str) -> None: v3 = [] with open(v1 / '{0}.csv'.format(v2), 'r', encoding='utf-8') as v4: v5 = csv.DictReader(v4) for ...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: int v2: List[int] ``` Input Types: IO Output Type: int Dependencies: ```python def v3(v4: List[Tuple[int, int]]) -> int: v5 = 0 v6 = len(v4) v7 = 1 for v8 in range(v6): v7 *= v4[v8][0] for v8 in...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], int Output Type: Iterable[Dict[str, Dict]] Dependencies: ```python def v0(v1): v2 = v1.get('_size') if v2 is None: v2 = sum(map(_str_size, v1['content'])) v1['_size'] = v2 return v2 ``` ```python def v3(v4, ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: 'np.ndarray' Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> 'np.ndarray': f'\n calls(and sends hierarchical I/O) the backProp method of all the layers\n :param _delta: delta for {self.OUTPUT...
Imports: ```python import json import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str=None, v2: str=None): if v1 is None: return False if v2 is None: return False else: v3 = get_stdout('{AWS} ecr list-images --region {region...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Dict[str, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, str]): for (v2, v3) in self._scannerParams.items(): if v3 not in self._bullPutStrategyScreenerAvailParameters: ...
Imports: ```python import asyncio import queue import typing ``` Type definitions: Input Types: asyncio.AbstractEventLoop, concurrent.futures.Executor Output Type: Any Dependencies: ```python async def v0(v1: asyncio.AbstractEventLoop, v2: concurrent.futures.Executor, v3, *v4): v5 = [v1.run_in_executor(v2, v3, *v4...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.cache = {} self.episode_data = {} self.step_data = {} ```
Imports: ```python import typing ``` Type definitions: Input Types: List[Tuple[str, Any]], bool Output Type: List[Tuple[str, Any, bool]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[Tuple[str, Any]], v2: bool) -> List[Tuple[str, Any, bool]]: v3 = [] v4 = False for (v5, v6) in ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str) -> dict: v2 = mlflow.get_run(v1) v3 = eval(v2.data.to_dictionary()['tags']['mlflow.log-model.history']) for v4 in v3: if v1 == v4['run_id']: return v4 rai...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[Tuple[str, str, Union[int, float]]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[Tuple[str, str, Union[int, float]]]: v1 = self.pair_sampling(0, [], self.get_blocks(), self.all_test_pairs_flag) r...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> int: if not v1.is_file(): v2 = f'Cannot query size of: {str(v1)}. File does not exist' raise FileNotFoundError(v2) return v1.stat()....
Imports: ```python import math import typing ``` Type definitions: Input Types: float, float, float, float, float, bool, bool Output Type: Tuple[Union[float, None], Union[float, None]] Dependencies: ```python def v0(v1: float, v2: float, v3: float): return (v1 - v3) / v2 ``` Function Name: v4 Function: ```python d...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): with open('sblpy/__init__.py') as v2: return re.search(f"""^__{v1}__\\s*=\\s*[\\'"]([^\\'"]*)[\\'"]""", v2.read(), re.MULTILINE).group(1) ...
Imports: ```python import os import subprocess import typing ``` Type definitions: Input Types: str, str, int, str Output Type: Any Dependencies: ```python def v0(v1: str): if not os.path.exists(v1): return None v2 = subprocess.check_output(["(eval $(blkid {} | awk ' {{ print $3 }} '); echo $TYPE)".for...
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 = min(self._quantity + v1, self._item.get_max_stack_size()) - self._quantity self._quantity += v2 return v2 ```
Imports: ```python import json import typing ``` Type definitions: ```python v0 = typing.Dict[str, typing.Any] ``` Input Types: v0 Output Type: typing.Dict[str, str] Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> typing.Dict[str, str]: v3 = {} v4 = v2.pop('classes', set()) if v4: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._copy_pulumi_code() self._change_directory('test') self.project.write() self.stack.write() self.state.write() self._select_curre...
Imports: ```python import torch from torch.utils.data import Dataset, DataLoader from torch import Tensor import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int=-1): if v2 < 0: v2 = self.protocol.n_tasks ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[ThreadPoolExecutor] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[ThreadPoolExecutor]=None) -> None: global executor v2 = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = [route[0] for v3 in self.routes] try: for v3 in v1.routes: if v3[0] in v2: raise KeyError('Urls endpo...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: ```python def v0(v1): (v2, v3) = (0, 0) while v1 < n and s[v1] == ' ': v1 += 1 while v1 < n and s[v1].isdigit(): v2 = 1 v3 = v3 * 10 + int(s[v1]) v1 += 1 if v2 == 0 and...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1): if not v1.isdigit(): raise ValueError('bad serial %r' % serial) return '%04i' % int(v1) ``` ```python def v2(v3: str) -> str: return v3.upper().replace('-', '').strip() ``` F...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: Any) -> bool: return '/api/changed HTTP' not in v1.msg ``` Function Name: v2 Function: ```python def v2() -> None: logging.basicConfig(level=logging.INFO, format='%(message)s...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> int: v3 = self.getStackData(copy=False).shape[v2] if v1 < 0: v1 += v3 v1 = numpy.clip(v1, 0, v3 - 1) ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = os.path.join(self.mount, 'hello') with open(v1, 'r+') as v2: self.assertEqual('hola\n', v2.read()) v3 = os.lstat(v1) s...
Imports: ```python import typing ``` Type definitions: Input Types: int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: bool): if v2: v3 = '\n#include "component{toplevel_component}.h"\n\n#include <ctime>\n#include <iostream>\n#include <cstdlib>\n#include <io...
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 = self.request(method='GET', url=self.routes.projects(), params={'projectName': v1, 'teamId': v2}, print_error=False) return v3.j...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str, str, Optional[Dict[str, Any]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: Optional[Dict[str, Any]]=None): if v3 is None: v3 = {} v4 = {'ref': 'master', 'inputs...
Imports: ```python import typing ``` Type definitions: Input Types: np.array, (int, int), (int, int) Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array, v2: (int, int), v3: (int, int)) -> bool: (v4, v5) = v3 (v6, v7) = v2 for v8 in range(v6, v6 + v4): f...
Imports: ```python import torch as _torch import typing ``` Type definitions: Input Types: _torch.FloatTensor, _torch.LongTensor, float, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: _torch.FloatTensor, v2: _torch.LongTensor, v3: float=-float('inf'), v4: bool=False): v5 = _t...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v2, **v3) -> None: self._get_container_client(v1).delete_blobs(*v2, **v3) self.log.info('Deleted blobs: %s', v2) ```
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.Namespace Dependencies: Function Name: v0 Function: ```python def v0() -> argparse.Namespace: v1 = argparse.ArgumentParser(description='Restore TheCombine database and backend files from a file in AWS S3.', ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: int) -> bool: v4 = {} if len(v1) != len(v2): return False for v5 in range(len(v1)): v6 = ord(v2[v5]) - ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2='') -> str: v1 = re.sub('\\[\\[([^\\]\\n]+)\\]\\]', f'[\\1](<{v2}\\1.md>)', v1, flags=re.MULTILINE) v1 = re.sub('#([a-zA-Z-_0-9]+)', f'...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame): v2 = self.estimatorPool.predict(v1) return pd.concat((v1, v2), axis=1) ```
Imports: ```python from torch import nn from torch.utils.data import DataLoader, Dataset import typing ``` Type definitions: Input Types: Dataset, Dataset, int, int Output Type: Tuple[DataLoader, DataLoader] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dataset, v2: Dataset, v3: int=64, v4: int=4) ->...
Imports: ```python import typing ``` Type definitions: Input Types: web.Application Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: web.Application): if 'tags' not in v1._state['swagger_dict']: v1._state['swagger_dict']['tags'] = [] v1._state['swagger_dict']['tags'].app...
Imports: ```python import typing ``` Type definitions: Input Types: ast.alias Output Type: ast.alias Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.alias) -> ast.alias: v2 = v1.asname or v1.name if v2 and v2 in self.scope: v1.asname = self._assign_later(v1, v2) return sel...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self.tags.copy() self.tags.clear() self.tags.update({int(k): v for (v2, v3) in v1.items()}) return {self.id: self.tags} ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, int, int, int, int, int, bool, bool, float, float, int, bool, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int, v3: int, v4: int, v5: int, v6: int, v7: bool, v8: bool, v9: float, v10: float, ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: (List[List[int]], List[str]) Dependencies: ```python def v0(v1: int, v2: int) -> List[List[int]]: v3: List[List[int]] = [] for v4 in range(0, v1): v5 = [] for v6 in range(0, v2): v7 = [] ...
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[str, ...], FrozenSet['cirq.MeasurementKey'] Output Type: 'cirq.Condition' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[str, ...], v2: FrozenSet['cirq.MeasurementKey']) -> 'cirq.Condition': v3 = self for v4 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='fm1'): v2 = {'type': 'PostPrognosisRequest', 'connection': f'ea1.2018-06.localhost:{v1}.2', 'values': [-300, -300, -300, 0, 0, -300], 'start': '2021-01-01T00...
Imports: ```python import typing ``` Type definitions: Input Types: object, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: object, v2: str) -> Any: v3 = type(v1) v4 = getattr(v3, v2) try: v5 = v4.__get__ except AttributeError: return v4 else: ...
Imports: ```python from sys import exit, argv, stdin import typing ``` Type definitions: Input Types: Output Type: [bool, bytes] Dependencies: Function Name: v0 Function: ```python def v0() -> [bool, bytes]: if stdin.isatty() == True: return [False, b''] return [True, ''.join([i for v1 in stdin]).enc...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if not (v1.isalpha() and v1.islower()): raise ValueError('Invalid word character found: ' + v1) ```
Imports: ```python import math import numpy as np import torch import torch.nn.init as init from torch import Tensor import typing ``` Type definitions: Input Types: Tensor, float, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Tensor, v2: float=0.0, v3: str='fan_in', v4: str...
Imports: ```python import json import logging import shlex import subprocess import typing ``` Type definitions: Input Types: Output Type: List[Mapping[str, Any]] Dependencies: ```python def v0(v1: List[str], v2: bool=True) -> 'subprocess.CompletedProcess[str]': logging.debug('Running %s', ' '.join((shlex.quote(a...
Imports: ```python import typing ``` Type definitions: ```python v0 = tuple[Loc, ...] ``` ```python v1 = tuple[int, int] ``` Input Types: str Output Type: tuple[int, str] Dependencies: ```python def v2(v3: v1, v4: int, v5: int, v6: int) -> v1: v7 = list(v3) v7[v4] += 1 if v7[0] >= v5 or v7[1] >= v6: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[str]) -> bool: v3 = [] v4 = [] for v5 in v2: if v5.startswith('*'): v4.append(v5.replace('*', '')) ...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, bool Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False) -> pd.DataFrame: v3 = [f for v4 in self.data.columns if v4 != v1] v5 = [self.significance_test(f...
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: Union[dict, list] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Union[dict, list]: with open(v1, 'r') as v2: v3 = v2.read() return json.loads(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.Series, pd.Series, list Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.Series, v2: pd.Series, v3: list=None) -> pd.Series: v4 = v2.copy() for v5 in v3: v4[v5] = v1[v5] return v4 ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Any, Any Output Type: List[str] Dependencies: ```python def v0(v1: List[str], v2: np.ndarray, v3: int) -> List[str]: assert len(v1) == len(v2) v4 = range(len(v2)) v5 = sorted(v4, key=lambda i: v2[i], reverse=True) v6 = v5[:v3...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Sequence[str]] Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Optional[Sequence[str]]=None): v1 = v1 or await self.get_setting_names() v2 = {'setting_names': v1, 'context_features_options'...
Imports: ```python import typing ``` Type definitions: Input Types: sublime.View, str Output Type: 'Optional[str]' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: sublime.View, v2: str) -> 'Optional[str]': v3 = v1.settings().get('lsp_language') return v3.get(v2) if v3 else None ```
Imports: ```python import typing ``` Type definitions: Input Types: str, List[ElementTree.Element] Output Type: List[Dict[Any, Any]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[ElementTree.Element]) -> List[Dict[Any, Any]]: v3: List[Dict[Any, Any]] = [] for v4 in v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: try: del self._fields[v1] except (AttributeError, IndexError): pass ```
Imports: ```python import pickle from numbers import Number import numpy as np import typing ``` Type definitions: Input Types: int, 'Trial', Dict Output Type: Any Dependencies: ```python def v0(v1: Any): if isinstance(v1, dict): return {k: v0(v) for (v2, v3) in v1.items()} elif isinstance(v1, list): ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: str v3: str v4: str v5: str def v6(self, v7: str) -> v0: self.transaction_id = v7 return self def v8(self, v9: str) -> v0: self.xbox_product_id = v9 return self ...