text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: str): for v4 in v3: v1.keyPress(v2, v4) ```
Imports: ```python import typing ``` Type definitions: Input Types: 'Service' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: 'Service'): v2 = f'# BentoML Service "{v1.name}"\n\n' v2 += 'This is a Machine Learning Service created with BentoML. \n\n' if v1._apis: v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False): print('-' * 80) print('These are the commands you need to execute to fully reproduce the run') print('-' * 80) print(self.env['BUI...
Imports: ```python from itertools import chain from scipy.sparse import spmatrix, csr_matrix, isspmatrix_csr, SparseEfficiencyWarning from scipy.spatial import Delaunay from sklearn.neighbors import NearestNeighbors from sklearn.metrics.pairwise import cosine_similarity, euclidean_distances import numpy as np import ty...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: List[str]): for v3 in v2: if v1[v3].hasnans: print(f'{v3}: {v1[v3].isna().sum() / len(v1) * 100:.2f} %')...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._listbox.insert(self._listbox.size(), self._combo_var.get()) self._combo_var.set('') self._configure_combo_box() ```
Imports: ```python from tqdm import tqdm import typing ``` Type definitions: Input Types: LogRecord Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: LogRecord) -> None: try: v2 = self.format(v1) tqdm.write(v2, file=self.stream) self.flush() except ...
Imports: ```python import dask import dask.array as da import dask.dataframe as dd import numpy as np from dask.dataframe import DataFrame from xarray import Dataset import typing ``` Type definitions: Input Types: Dataset, Hashable, float, Optional[Hashable] Output Type: Dataset Dependencies: ```python def v0(v1: Arr...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> None: self.restore_count += 1 self.restore_migration_directory = v1 ```
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, float Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: float=0.05) -> torch.Tensor: with torch.no_grad(): v1 = v1.permute(1, 0, 2).flatten(1) (v3...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, af.Result, Any, bool Output Type: Any Dependencies: ```python def v0(v1): for v2 in v1.galaxies: del v2.hyper_model_image del v2.hyper_galaxy_image return v1 ``` ```python def v3(v4: af.Collection) -> bo...
Imports: ```python import typing ``` Type definitions: Input Types: List[NamedTuple] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[NamedTuple]): if v1 is not None and isinstance(v1, list): for v2 in v1: self._output_df.put_dict(v2._asdict()) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self._get_result_for('toto = 0x00 + 0x00') self.assertEqual([('assign', 'toto', '0x00 + 0x00')], v1.ast) ```
Imports: ```python import os import binascii import hashlib import json import csv import typing ``` Type definitions: Input Types: mmap, int Output Type: Any Dependencies: ```python def v0(v1: mmap): v2 = {} v3 = v1.read(4) v4 = getCountBytes(v1) v5 = getCount(v4) if v5 == 0: v6 = bool(int...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]=None): if v1: return self.risk_exp.loc[v1, :].values else: return self.risk_exp.values ```
Imports: ```python import typing ``` Type definitions: Input Types: str, pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: pd.DataFrame) -> pd.DataFrame: v2['population_label'] = None v3 = self.list_downstream_populations(v1) for v4 in v3:...
Imports: ```python from typing import TYPE_CHECKING, Any, Callable, Hashable, Literal, Sequence, TypeVar, cast, final, overload import numpy as np from pandas._libs import algos as libalgos, index as libindex, lib import pandas._libs.join as libjoin from pandas._libs.lib import is_datetime_array, no_default from pandas...
Imports: ```python import torch from torch import Tensor from torch import nn from torch.multiprocessing import set_start_method import typing ``` Type definitions: Input Types: Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> Tensor: self._populate_defaults(v2) ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: List[str] Output Type: int Dependencies: ```python def v0(v1): if maxLens[v1]: return maxLens[v1] v2 = 0 for v3 in g[v1]: v2 = max(v2, v0(v3)) maxLens[v1] = v2 + 1 return maxLens[...
Imports: ```python import copy import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None) -> None: v1 = v1 or {} self._stop_criteria = {'price': v1.get('price'), 'amount': v1.get('amount'), 'counts': copy.deepcopy(v1....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.z.default_zone = self.old self.v.delete() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = len(v1[0]) v3 = (self.w - v2) // 2 for v4 in range(self.h): for v5 in range(len(v1[0])): self.arr[v4][v5 + v3] = ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: if len(v1) >= 1 and len(v1) <= 15: v2 = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} v3 = v2[v1[len(v1) - ...
Imports: ```python import sys import typing ``` Type definitions: ```python class v0(QtWidgets.QMainWindow): def __init__(self, v1: str, v2): super().__init__(v2) self.object = None self.__closed = False self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True) self.setDockOptions...
Imports: ```python import matplotlib.pyplot as plt import matplotlib.ticker import typing ``` Type definitions: Input Types: Output Type: object Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> object: v2 = v1.get('plot_type', 'absolute') v3 = self._convert_analysis_to_df(v1) if ...
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: if self.Wfb is not None and self.output_values is None: raise RuntimeError('Missing a fe...
Imports: ```python import typing ``` Type definitions: ```python v0 = Optional[Tuple[int, int]] ``` Input Types: v0 Output Type: str Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> str: if v2 is None: return 'open' (v3, v4) = v2 return f'[{v3},{v4}]' ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Union[int, None] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Union[int, None]: if self.console is not None: return self.console.id return None ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> None: v2 = ' '.join((argument.lower() for v3 in v1)) eval(v2) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list: v2 = v1.split(',') v3 = list() for v4 in v2: v5 = int(re.sub('[^0-9]', '', v4)) v3.append(v5) return v3 ```
Imports: ```python import timeit import typing ``` Type definitions: Input Types: int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int=10, v2=globals()): v3 = {} v4: list = timeit.repeat(stmt=f"programlogic.logiccontroller.generate_names ('first', {v1})", number=1, glob...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: State, v2: Dict, v3: Channels): self._channel = v3 self._state = v1 self._data = v2 def __repr__(self) -> str: return f'<Message id={self.id}>' async def v4(self, **v5) -> v0:...
Imports: ```python import spacy import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: ```python def v0(v1: str): assert v1.strip() != '', 'string must not be an empty string' ``` ```python def v2(v3): assert v3 is not None, 'doc must not be None' for v4 in v3: if v4.d...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self._current_op.output v2 = self._get_value(self._current_op.inputs[0]) v3 = self._set_value(v1, v2) self._statements.append(v3) ```
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 = 0 while v3 < len(v2): try: v4 = v2.index(v1, v3) v5 = self._special_str_index_bag.setdefault(v1...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> None: try: self.__dict[v2] = self.__dict.pop(v1) if v1 == self.__working_list: self.__working_list = v2 except ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: (dict, str) Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> (dict, str): v2 = [val[0] for v3 in v1] v4 = [v3[1] for v3 in v1] v5 = {word.upper(): value for (v6, v7) in zip(v2, v4)} retur...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Union[List[str], Tuple[List[str], str]] Dependencies: Function Name: v0 Function: ```python def v0(self, *v2, v1=False) -> Union[List[str], Tuple[List[str], str]]: (v3, v4) = self._keys.get(v2, (None, [])) return (v4, v3.name...
Imports: ```python import pandas from pathlib import Path import typing ``` Type definitions: Input Types: List[PathLike], PathLike Output Type: None Dependencies: ```python def v0(v1: PathLike) -> pandas.DataFrame: v2 = pandas.read_table(v1, sep=',', index_col=False, header=None).T v2.columns += 1 return ...
Imports: ```python from logging import info from pickle import dump, load import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: v2 = str(self._save_dir() / ('experiment-' + str(v1) + '.txt')) with open(v2, 'rb'...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._context_manager.__exit__(None, None, None) return None ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if os.path.isfile(v1): return v1 raise FileNotFoundError(f'{v1} does not point to a file') ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, Optional[bool], Optional[bool] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: str, v3: Optional[bool], v4: Optional[bool]=False) -> str: v5 = '' if v1: if isinstance(v1, str): ...
Imports: ```python import numpy as np import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: List, int, int, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: List, v2: int, v3: int, v4=False) -> None: v5 = np.array(v1) v5 *= 100 plt.hist(v5, bi...
Imports: ```python import sys import os import typing ``` Type definitions: Input Types: wx.SysColourChangedEvent Output Type: Any Dependencies: ```python def v0(): v1 = wx.SystemSettings.GetAppearance() v2 = wx.svg.SVGimage.CreateFromFile(image('data/icons/refresh-dark.svg')) if v1.IsDark(): v2 = ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Union[List[int], np.ndarray], Union[List[int], np.ndarray] Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[List[i...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> bool: v1.sort() for v2 in range(0, len(v1)): v3 = self.bin_src(v1, v1[v2] * 2, 0, len(v1) - 1) if v3 != -1 and v3 !...
Imports: ```python import typing ``` Type definitions: Input Types: Optional['PrinterConfigurationModel'] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional['PrinterConfigurationModel']) -> None: if self._configuration != v1: self._configuration = v1 se...
Imports: ```python import csv import os import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str) -> str: with open(v1, 'rb') as v2: v3 = v2.read() v4 = detect(v3)['encoding'] return v4 ``` Function Name: v5 Function: ```python def v5(v6: str...
Imports: ```python from nltk import ParentedTree import nltk import typing ``` Type definitions: Input Types: Any, List Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any, v2: List): if type(v1) == ParentedTree: return self.transform_node(v1, v2) elif type(v1) ==...
Imports: ```python import numpy as np from scipy import interpolate, integrate import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: dict, v2: np.arange) -> interpolate.interp1d: v3 = {} v4 = 0 v5 = 0 v6 = 0 if not v1: v7 = [i / 1000 for v8 i...
Imports: ```python import typing ``` Type definitions: Input Types: GrammarParser.Alt_elemContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: GrammarParser.Alt_elemContext): if len(v1.parentCtx.children) > 1: self.cur_right += '| ' ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = dict(self.config.items('Optimiser Objectives')) if 'Optimiser Objectives' in self.config else {} if v1: v1['ConnectionPointCost'] = self...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: v2 = [] v3 = {node: 0 for v4 in v1} for v5 in v1.values(): for v4 in v5: v3[v4] += 1 v6 = [v4 for (v4, v7) in v3.items()...
Imports: ```python from urllib.parse import urljoin, urlparse import re import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: try: v2 = urlparse(v1) return all([v2.scheme in ['http', 'https'], v2.netloc a...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0() -> pd.Series: v1 = pd.date_range(start='2017-06-01', end='2021-06-01', freq='MS') v2 = len(v1) v3 = 2 v4 = np....
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = self.get_original_label_category_type(v1) if np.issubdtype(v2, np.integer): v3 = self.get_original_labels_f...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=False): v1 = self.global_pool(v1) if self.drop_rate > 0.0: v1 ...
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = False v2 = list(range(self.SIZE)) v3 = list(range(self.SIZE)) random.shuffle(v2) random.shuffle(v3) for v4 in v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: ```python def v0(v1: str) -> Iterator[str]: global archive_endings for v2 in archive_endings: yield f'blender-{v1}-{v2}' ``` Function Name: v3 Function: ```python def v3(v4: str, v5: str) -> str:...
Imports: ```python from typing import List, Any, Dict, FrozenSet, Callable, Iterable, Iterator, Optional, Sequence, Union, Type, Tuple, cast, TypeVar, overload import numpy as np import typing ``` Type definitions: ```python class v0(ops.ParameterizableEffect): def __init__(self, v1: Iterable[Moment]=(), v2: devic...
Imports: ```python import typing ``` Type definitions: Input Types: IO Output Type: Dict[str, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: IO) -> Dict[str, Dict]: v2 = {} for v3 in v1.readlines(): v2.update(self._parse(v3.decode('utf-8'))) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Iterator[dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='train') -> Iterator[dict]: if self.version == 1: return self._read_samples_v1(v1, v2) return self._read_samples_v2...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: Path Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> str: v2 = subprocess.run(['git', 'rev-parse', 'HEAD'], cwd=v1, check=True, encoding='utf-8', capture_output=True) return str(v2.st...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> str: if not v1: return 'DocumentDB Cluster Parameter Group' else: return 'DocumentDB Cluster Parameter Groups' ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> None: nonlocal first_failure_code assert isinstance(v1, int) if v1 != 0 and first_failure_code is None: v2 = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: print('####################') print('### test_when_malform_gh_branch_exist') print('###') self.sh.git('checkout', '-b', 'gh/ezyang/malform') ...
Imports: ```python import matplotlib as mlp import matplotlib.dates as mdates import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, **v2): if 'transparent' not in v2.keys(): v2['tran...
Imports: ```python import typing ``` Type definitions: Input Types: 'NNF' Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'NNF') -> bool: if self == v1: return True return not (self & v1.negate() | self.negate() & v1).satisfiable() ```
Imports: ```python from random import shuffle, choice import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): if self.selection_function_name in {'ROULETTE', 'ROULETTE_SELECTION'}: v2 = self.roulette_selection e...
Imports: ```python import pathlib import matplotlib.pyplot as plt import pandas as pd from seaborn.matrix import heatmap from sklearn.metrics import classification_report, confusion_matrix, precision_recall_curve, roc_curve import typing ``` Type definitions: Input Types: Tuple[np.ndarray], Tuple[np.ndarray], ht.confi...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Dict[str, np.ndarray] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, np.ndarray]) -> None: with self.graph.as_default(): v2 = [] with tf.name_scope('restore...
Imports: ```python import typing ``` Type definitions: Input Types: Union[int, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[int, str]): if isinstance(v1, int): return self.filegroups[v1] if isinstance(v1, str): v2 = [fg for v3 in self.filegro...
Imports: ```python import json import requests import typing ``` Type definitions: Input Types: str, List[str] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[str]) -> Dict[str, Any]: v3 = self._get_json(v1, v2) v4 = requests.post(url=self._url(),...
Imports: ```python import typing ``` Type definitions: Input Types: set, set, dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: set, v2: set, v3: dict) -> dict: v4 = self.__get_info_dict(v1, v3) v5 = self.__get_info_dict(v2, v3) v6 = v4.copy() for v7 in v6.key...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, int], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, int], v2, *v3, **v4): if isinstance(v1, str): v1 = self.check_level(v1) return super().log(v1, v2, *v3, **v4) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = t.TypeVar('T') ``` ```python v1 = t.TypeVar('To') ``` Input Types: t.Callable[[v0], v1] Output Type: 'Params[To]' Dependencies: Function Name: v2 Function: ```python def v2(self, v3: t.Callable[[v0], v1]) -> 'Params[To]': v4 = tuple((v3(a) for v...
Imports: ```python import logging import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> None: v3 = logging.getLogger(v1) v4 = logging.getLevelName(v2.upper()) v3.setLevel(v4) for v5 in v3.handlers: ...
Imports: ```python from datetime import datetime import fileinput import re import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: ```python def v0(v1: str) -> int: v2 = 0 with open(v1) as v3: for v4 in v3: v4 = v4.strip('\n') v2 += 1 retur...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self) -> None: self._prefix: str self._header: Dict[str, Any] = copy.deepcopy(defaults.HEADER) self._compile_options: Dict[str, Any] = copy.deepcopy(defaults.COMPILE_OPTIONS) self._run_options: p...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict) -> Any: self.value = self.extract_data(v1) v2 = self.to_python(self.value) return self.run_validators(v2) ```
Imports: ```python from collections import OrderedDict from pathlib import Path import typing ``` Type definitions: Input Types: Union[str, Path] Output Type: Dict[str, List[Path]] Dependencies: ```python def v0(v1: Path, v2: Set[str]={'.ts', '.tsx', '.py'}, v3: Set[str]={'tests', 'test', 'node_modules', 'lib', '.git'...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self._parent_strand.domains v2 = v1.index(self) v3 = sum((prev_domain.dna_length() for v4 in v1[:v2])) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=''): if len(v1) == 0: v1 = self.gameServerRef v2 = {'server': v1} return v2 ```
Imports: ```python import numpy as np import tensorflow.compat.v1 as tf import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, int Output Type: tf.Tensor Dependencies: ```python def v0(v1, v2=0, v3=False): tf.logging.info('--------fancy cumsum---------') v4 = v1.shape.as_list() v5 = len(v4)...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, float, str, int, bool Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: float, v3: str, v4: int, v5: bool) -> torch.Tensor: v6 = torch.randn_like(v1) v7...
Imports: ```python import typing ``` Type definitions: Input Types: acb.CallbackFunc, bool Output Type: t.Callable[[acb.CallbackFunc], acb.Callback] Dependencies: ```python def v0(v1: acb.CallbackFunc) -> acb.Callback: v2 = acb.create(inherit=inherit)(v1) self.callbacks.add(v2) return v2 ``` Function Name:...
Imports: ```python import requests import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str='SZ000665') -> pd.DataFrame: v2 = 'https://emappdata.eastmoney.com/stockrank/getFollowStockRankList' v3 = {'a...
Imports: ```python import typing ``` Type definitions: Input Types: datetime Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime): self.statement_status['last'] = v1 self.statement_status.sync() ```
Imports: ```python from urllib.parse import urlencode from urllib.request import Request, urlopen import typing ``` Type definitions: Input Types: str, int Output Type: Union[dict, str] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: int=ResultMode.dict) -> Union[dict, str]: se...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: None Dependencies: ```python def v0(v1: list, v2: int) -> int: v3 = v2 v4 = len(v1) for v5 in range(v2 + 1, v4): if v1[v5] < v1[v3]: v3 = v5 return v3 ``` Function Name: v6 Function: ```python def ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[str, tuple[str]] ``` Input Types: list[OrderedDict[v0, float]] Output Type: list[list[float]] Dependencies: ```python def v1(v2: OrderedDict[v0, float]) -> list[float]: return [dist for (v3, v4) in v2.items()] ``` Function Name: v5 Function...
Imports: ```python import glob import os.path as path import typing ``` Type definitions: Input Types: List, Any Output Type: Any Dependencies: ```python def v0(v1: List) -> List: return [m.groups() for v2 in filter(None, map(DAP_REGEX.match, v1))] ``` Function Name: v3 Function: ```python def v3(v4: List, v5): ...
Imports: ```python import logging import logging.handlers import typing ``` Type definitions: Input Types: T.Text, logging.Formatter, int Output Type: logging.Handler Dependencies: Function Name: v0 Function: ```python def v0(v1: T.Text, v2: logging.Formatter, v3: int) -> logging.Handler: v4 = logging.handlers.Ro...
Imports: ```python import os import typing ``` Type definitions: Input Types: Path Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path) -> None: if v1 and v1.absolute() != v1.cwd().absolute(): os.chdir(v1.absolute()) ```
Imports: ```python import os import sys import typing ``` Type definitions: Input Types: int, float Output Type: None Dependencies: ```python def v0(v1): sys.stderr.write(v1 + '\n') ``` Function Name: v2 Function: ```python def v2(v3: int, v4: float) -> None: def v5(v6): sys.stderr.write(v6 + '\n') ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: ```python def v0(v1, v2, v3): if v1 > v2: return 0 if v1 == v2: return 1 if v3[v1] > 0: return v3[v1] else: v3[v1] = v0(v1 + 1, v2, v3) + v0(v1 + 2, v2, v3) ret...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.auto_handshake = True self.list_nodes() ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> bool: (v3, v4, v5, v6) = self return v3 + v5 > v1 >= v3 and v4 + v6 > v2 >= v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '1' v2 = '1' if self.debug: print('\twaiting for reset to finish') self.lte.reset() self.lte.init() self.set_function_le...