text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('_TState') ``` Input Types: typing.RelativeTime, typing.ScheduledAction[v0], Optional[v0] Output Type: abc.DisposableBase Dependencies: Function Name: v1 Function: ```python def v1(self, v2: typing.RelativeTime, v3: typing.ScheduledAction[v0...
Imports: ```python import cv2 import numpy as np from numpy import ndarray as NDArray import torch import typing ``` Type definitions: ```python v0 = Tuple[int, int, int, int] ``` Input Types: Any, float Output Type: Any Dependencies: ```python def v1(v2): (v3, v4, v5, v6, v7) = v2 return (v3, v4, v5 - v3, v6 -...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: try: return json.loads(self.extra) except (TypeError, json.JSONDecodeError): return {} ```
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.compile('(where|and) \\(select volt_tt_[a-z0-9]+\\.fl[i|o]p as fl[i|o]p from volt_tt_[a-z0-9]+\\) = 1( and)?', re.MULTILINE | re.IG...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Dict[str, list] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Dict[str, list]: v2: Dict[str, list] = {} if v1.plot_fitness_density: v2['fitnesses'] = [] if v1.plot_fitness_accuracy: v2[...
Imports: ```python import torch from torch.utils.data import DataLoader import typing ``` Type definitions: Input Types: Any Output Type: torch.BoolTensor Dependencies: Function Name: v0 Function: ```python def v0(v1) -> torch.BoolTensor: v2 = v1.get_json(force=True) v3 = v2['mask'] v4 = torch.BoolTensor(...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: str, v3: dict, v4: BaseGeometry, v5: List[float], v6: Optional[dt.datetime], v7: Optional[dt.datetime], v8: dict, v9: List[ProductFile], v10: List[ProductFile], v11: List[ProductFile], v12: List[ProductFile])...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '\n from typing import Literal\n\n class MyCM:\n def __enter__(self) -> None:\n pass\n\n ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: v2: int v3: Transient self.next_free = v1 v3 = self.root if v1 == v3.id: self.root = v3.next self.size -= 1 ...
Imports: ```python from selenium.common.exceptions import WebDriverException, TimeoutException, ElementNotInteractableException, ElementClickInterceptedException, NoSuchElementException from selenium.webdriver import Chrome, ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.common.keys im...
Imports: ```python from requests.exceptions import ConnectionError import typing ``` Type definitions: Input Types: float, str Output Type: None Dependencies: ```python def v0(v1: str=LOCATION, v2: str=LOCATION_TYPE) -> dict: v3 = [f'areaType={v2}', f'areaName={v1}'] v4 = {'areaName': 'areaName', 'areaCode': '...
Imports: ```python from itertools import permutations from fractions import Fraction import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: ```python def v0(v1, v2, v3, v4) -> str: return str(v1) + OPERATOR[v2] + str(v3) + ' = ' + str(v4) ``` ```python def v5(v6, v7) -> tuple: v8 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[float, float, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Tuple[float, float, float]: v2 = self.__get_url('accounts/' + v1 + '/balance?instType=BROKERAGE&realTimeNAV=true') v3 = s...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Text, v2: Node, v3: int, v4: Optional[Node]=None, v5: Optional[int]=None) -> None: """Create an Edge. Args: name: Name of the edge. Used primarily for debugging. node1: One of the nodes edge c...
Imports: ```python from .trace import TraceElement, trace_append_element, trace_path, trace_path_get, trace_stack_cv, trace_stack_pop, trace_stack_push, trace_stack_top import typing ``` Type definitions: ```python v0 = Callable[[HomeAssistant, TemplateVarsType], bool] ``` Input Types: v0 Output Type: v0 Dependencies: ...
Imports: ```python import logging, os, pandas as pd import typing ``` Type definitions: Input Types: Any, Optional[str], bool Output Type: Iterable[str] Dependencies: ```python def v0(v1): if isinstance(v1, str): return v1.replace('"', '\\"') return str(v1) ``` ```python def v2(v3: dict, v4: str, v5: s...
Imports: ```python from itertools import chain, product import typing ``` Type definitions: ```python v0 = TypeVar('K') ``` ```python v1 = TypeVar('V') ``` Input Types: Mapping[v0, Union[v1, List[v1], Set[v1], Tuple[v1]]] Output Type: Iterable[Dict[v0, v1]] Dependencies: Function Name: v2 Function: ```python def v2(v3...
Imports: ```python import numpy as np from tensorflow.keras import backend as K from tensorflow.keras.layers import Layer from tensorflow.keras.utils import get_custom_objects import typing ``` Type definitions: Input Types: Any, Any, int, int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python ...
Imports: ```python import typing ``` Type definitions: Input Types: sg.Window, subprocess.Popen Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: sg.Window, v2: subprocess.Popen): v1.write_event_value('-THREAD-', (v2, '===THEAD STARTING===')) v1.write_event_value('-THREAD-', (v2,...
Imports: ```python import decimal import typing ``` Type definitions: Input Types: str, str, Optional[str], Optional[Dict[str, Any]], Optional[Union[Dict[str, Any], Sequence[Any]]], bool Output Type: Tuple[int, Optional[Union[Dict[str, Any], List[Any]]]] Dependencies: ```python def v0(v1, v2, v3, v4, v5): v6 = '' ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.stream_id = None self._delete_alerts_by_id(self.alert_widgets.keys()) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[int, list] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[int, list]: v2 = open(v1, 'r').read().splitlines() return (int(v2[0]), v2[1].split(',')) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._version = self._version.clear(post=True) return ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if len(self.indent) < 4: raise SyntaxError('Unexpected end of block.') self.indent = self.indent[:-4] ```
Imports: ```python import typing ``` Type definitions: Input Types: 'Cyclist', int, int, bool Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Cyclist', v2: int, v3: int, v4: bool=False) -> int: v5 = self.sections[v3].min_speed v2 = v2 if not v4 or v5 is None else max(v2,...
Imports: ```python import typing ``` Type definitions: Input Types: list, int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int, v3: int) -> str: v4 = '' v5 = [(v2 - 1, v3 - 1), (v2 - 1, v3), (v2 - 1, v3 + 1), (v2, v3 - 1), (v2, v3), (v2, v3 + 1), (v2 + 1, v3 -...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Tuple[np.ndarray, List[np.ndarray]] Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> Tuple[np.ndarray, List[np.ndarray]]: v2 = v1.groupby('groups').mean()['log2_bootstrap_CS_mean'].values ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Tuple[List[str], Optional[str], Optional[str]] Dependencies: ```python def v0(v1): if v1 is None or v1.strip() == '': return DELIM if v1[0] != DELIM: v1 = DELIM + v1 if v1[-1] != DELIM: v1...
Imports: ```python import os import tempfile import typing ``` Type definitions: Input Types: str, str, str, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str, v4: float): with tempfile.NamedTemporaryFile(mode='w+t', dir='.') as v5: v5.write(...
Imports: ```python from datetime import datetime from datetime import timedelta from datetime import timezone import numpy as np import typing ``` Type definitions: Input Types: datetime, float, bool Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dateti...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[int]]) -> int: v2 = sorted({x for (v3, v4) in v1}) return max((v2[i] - v2[i - 1] for v5 in range(1, len(v2)))) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if 'bin' in self.__ls_unformatted(): self.rmdir('bin') self.mkdir('bin') ```
Imports: ```python import numpy as np from sklearn.model_selection import train_test_split from sklearn.cluster import KMeans import torch as th import typing ``` Type definitions: Input Types: int, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0, v2: bool=True, ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str, int Output Type: list Dependencies: ```python def v0(v1: dict) -> tuple: v2 = sorted([(float(mass), float(intensity)) for (v3, v4) in v1.items() if v3 not in NON_MASS_KEYS], key=lambda x: x[1]) return (float(v1['retention_time']),) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> bool: if v2.name in ['MissileTurret', 'SporeCrawler', 'SpineCrawler', 'PhotonCannon', 'Bunker']: return True v3 = self.towardsDirec...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor): v2 = torch.ones_like(v1, dtype=torch.int) v2[v1 <= 1 / 3] = 0 v2[v1 >= 5 / 3] = 2 return v2 ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.val = v1 self.left = None self.right = None ``` Input Types: v0, int Output Type: int Dependencies: ```python def v2(v3: v0, v4): if v3: v2(v3.right, v4) v4.append(v3....
Imports: ```python import typing ``` Type definitions: Input Types: Tensor, Tensor, bool Output Type: Union[Tuple, Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor, v2: Tensor=None, v3: bool=False) -> Union[Tuple, Tensor]: (v4, v5, v6) = self._network(v1) if v3: retu...
Imports: ```python from .dataclasses import Station, TidalEvent, TidalHeight import typing ``` Type definitions: Input Types: str Output Type: Station Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> Station: v2 = self._base_url + '/' + v1 v3 = await self._async_get_data(v2) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._change_set_arn is None: return v1 = self._session.client('cloudformation') if self.change_type == 'CREATE': v1.delete_st...
Imports: ```python from random import choice, random, shuffle import typing ``` Type definitions: ```python class v0(object): v1: List[str] = ['unconnected', 'fs_neat_nohidden', 'fs_neat', 'fs_neat_hidden', 'full_nodirect', 'full', 'full_direct', 'partial_nodirect', 'partial', 'partial_direct'] def __init__(se...
Imports: ```python import numpy import logging import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = numpy.sum(self.board == numpy.array(None)) logging.debug(f'{v1} / {self.boardlen ** 2} board positions empty') r...
Imports: ```python import typing ``` Type definitions: ```python class v0(namedtuple('Location', ['direction', 'degrees', 'minutes', 'seconds'])): def v1(self): return '%d°%d"%d\'%s' % (self.degrees, self.minutes, self.seconds, self.direction) ``` Input Types: datetime, Any, Any Output Type: Any Dependenci...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, dict, int, int, str, str Output Type: dict Dependencies: ```python def v0(v1: bytes, v2: int, v3: int): v4 = 0 v5 = (1 << 8 - v2) - 1 v6 = 255 ^ v5 v7 = [] while v4 < (v3 - 1) // 8 + 1: v8 = (v1[v4] & v5) << v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Tuple[Optional[str], Optional[str]] Dependencies: ```python def v0(v1: dict, v2: str) -> Optional[Union[str, List[str]]]: for (v3, v4) in v1.items(): if isinstance(v4, dict): v5 = v0(v4, v2) if v5 ...
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=DEFAULT_MSG_ENCODE_TYPE): v2 = self.socket.recv(4096) if v2 is None: return None v3 = json.loads(v2.decode(v1)) return v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._row_idx += 1 if self._row_idx == len(self._plate_type.rows()): self._row_idx = 0 self._col_idx += 1 if self._col_idx ==...
Imports: ```python 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: if v1 == 0: return 0 v3 = self.gf_mult(v1, v1, v2) v3 = self.gf_mult(v1, v3, v2) v3 = self.gf_mult(v3, v3, v2...
Imports: ```python import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import BatchSampler import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.state.seed = int(torch.randint(0, int(1000000...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], List[Tuple[str, ...]], Optional[str] Output Type: List[Tuple[str, ...]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: List[Tuple[str, ...]], v3: Optional[str]=None) -> List[Tuple[str, ...]]: ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): v2 = v1.fillna(v1.mean()) return v2 ```
Imports: ```python import numpy as np 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 v1 not in self.vdict or v2 not in self.vdict: return False v3 = self.graph.shortest_paths(sel...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.execute(v1) self.commit() self.populate_tables_dict() ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: 'tasks.ClassyTask' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'tasks.ClassyTask') -> None: if len(v1.config.MODEL.TEMP_FROZEN_PARAMS_ITER_MAP) == 0: return v2 = {} for v3 ...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1=None, v2=None): self.item = v1 self.next = v2 def v3(self, v4): if v4 == None: return False return self.item == v4.item ``` Input Types: v0, int, v0 Output Type:...
Imports: ```python import typing ``` Type definitions: Input Types: Exception Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Exception): self.stop(exc=v1) self.exceptions.append(v1) ```
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3) -> None: v4 = inspect.signature(v1) v5 = list(v4.parameters.keys())[v2 - 1] v6 = v4.parameters[v5] if v6.annotation ...
Imports: ```python 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._libs.tslibs import IncompatibleFrequency, OutOfBoundsDatetime, Timestamp from pandas._libs.tslibs.timezones import tz_compare ...
Imports: ```python import math import typing ``` Type definitions: Input Types: float, float, float Output Type: float Dependencies: ```python def v0(v1: float, v2: float) -> float: if v2 < 0: raise ValueError('Partial pressure of water vapor in moist air cannot be negative') v3 = v2 / GetSatVapPres(v1...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.shuffle_type == 'per_mini_epoch' or (self.shuffle_type == 'per_epoch' and self.state_i == 0): if self.data_len >= self...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> None: (v3, v2) = (len(v1), v2 % len(v1)) v4 = v5 = 0 while v5 < v3: (v6, v7) = (v4, v1[v4]) while...
Imports: ```python import typing ``` Type definitions: Input Types: str, [dict] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: [dict]) -> dict: v3 = v1[:-5] for v4 in v2: if v3 in v4.get('timestamp'): return v4 return None ```
Imports: ```python import typing ``` Type definitions: Input Types: Mapping[str, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Mapping[str, str]): assert v1 == {'service_name': 'my-service'} return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> str: if not v1: return '' if len(v1) == 1: return v1[0] v2 = [] v3 = len(v1) for v4 in zip(*v1): print...
Imports: ```python import typing ``` Type definitions: Input Types: 'Flow', bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Flow', v2: bool=None) -> None: for v3 in v1.tasks: if v3 not in self.tasks: self.add_task(v3) for v4 in v1.edges: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.num_cols != self.num_rows: return False else: v1 = True for v2 in range(self.num_rows): for v3 in range(s...
Imports: ```python import typing ``` Type definitions: Input Types: 'Dihedron' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Dihedron'): v2 = 1.53363 if hasattr(self, 'scale'): v2 *= self.scale (v3, v4, v5, v6) = (self.rak('N'), self.rak('CA'), self.rak('C'...
Imports: ```python import os import json import typing ``` Type definitions: Input Types: Optional[str] Output Type: dict Dependencies: ```python def v0(v1: Optional[str]=None) -> str: v2 = os.path.dirname(__file__) if v1: v2 = v1 return os.path.join(v2, 'version.json') ``` Function Name: v3 Functi...
Imports: ```python import os import glob import typing ``` Type definitions: Input Types: str Output Type: List[Dict[str, Union[str, List[Dict]]]] Dependencies: ```python def v0(v1) -> int: for (v2, v3) in enumerate(sentences): if v1[0] >= v3['span'][0] and v1[1] <= v3['span'][1]: return (v2, v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.check('x = y = z = 1 # type: int', 'x = y = z = 1 # type: int') self.check('x, y, z = [], [], [] # type: (List[int], List[int], List[str])', 'x...
Imports: ```python import torch from torch.nn import Module import typing ``` Type definitions: Input Types: Output Type: Module Dependencies: Function Name: v0 Function: ```python def v0(self) -> Module: self.__update_properties(dtype=torch.double) return super().double() ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.number = v1 + 1 self.index = v1 self.reporting = None self.connection = None self.address = None self.queue = Queue(maxsize=2) self.host = '' self....
Imports: ```python import typing ``` Type definitions: Input Types: float, Any Output Type: dict Dependencies: ```python def v0() -> dict: return {'count': 0, 'mean': 0, 'M2': 0} ``` Function Name: v1 Function: ```python def v1(v2: float, v3=10) -> dict: assert 0 <= v2 <= 1 v4 = v0() v4.update({'rho': ...
Imports: ```python from collections import defaultdict import numpy as np import typing ``` Type definitions: Input Types: Output Type: List[Tuple[int, int, int, int]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[Tuple[int, int, int, int]]: self.log.info('start get_free_faces') v1...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: try: if self.i[v1] == 're' and self.i[v1 - 1] == 're': return 10 elif self.i[v1] == 're' and self.i[v1 - 1] == 'o':...
Imports: ```python import typing ``` Type definitions: ```python v0 = List[Tuple[int, int]] ``` Input Types: List[str] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: List[str]) -> v0: v3 = [] for v4 in v2: v5 = v4[0] v6 = int(v4[1:]) if v5 == 'R': ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float, float, Tuple[int, int] Output Type: Tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float, v4: float, v5: Tuple[int, int]) -> Tuple[int, int]: v6 = ((v4 - v3) / v5[0], (v4 ...
Imports: ```python import glob import re import os import typing ``` Type definitions: Input Types: List[str] Output Type: List[Dict[str, str]] Dependencies: ```python def v0(v1: str): if not v1: return '' v2 = re.sub('^.', v1[0].upper(), v1) v2 = re.sub('([A-Z]+)([A-Z])([a-z0-9])', '\\1 \\2\\3', v...
Imports: ```python import numpy as np from scipy.ndimage import gaussian_filter, convolve import typing ``` Type definitions: Input Types: np.ndarray, float, float, str, str, float Output Type: [np.ndarray, np.ndarray, np.ndarray] Dependencies: ```python def v0(v1: np.ndarray, v2: str='gradient') -> [np.ndarray, np.nd...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[int, int], Callable[[], int], Callable[[int], None] Output Type: None Dependencies: ```python def v0(v1: int, v2: int) -> int: v3 = v1 // 10 ** (v2 + 1) % 10 if v3 == 0: return prog[prog[pc + v2]] elif v3 == 1: return ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray, v3: float) -> float: v4 = 2.0 * np.pi * v3 * v1 return np.arctan2(np.sum(v2 *...
Imports: ```python import numpy as np from sklearn.metrics import explained_variance_score, mean_squared_error import typing ``` Type definitions: Input Types: List[float], List[float] Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(v1: List[float], v2: List[float]) -> Dict: v3 = dict...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: str v3: List[ModelsRule] v4: str v5: int v6: str v7: str def v8(self, v9: str) -> v0: self.configuration_code = v9 return self def v10(self, v11: str) -> v0: self.d...
Imports: ```python import pandas as pd import requests import typing ``` Type definitions: Input Types: str Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str='2019') -> pd.DataFrame: v2 = 'http://fund.eastmoney.com/Company/home/HistoryScaleTable' v3 = {'year': v1} ...
Imports: ```python import typing ``` Type definitions: Input Types: Sequence[float], 'Lattice' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[float], v2: 'Lattice'): for (v3, v4) in zip(self.free_parameters, v1): for v5 in v2.search(v3.element): ...
Imports: ```python import typing ``` Type definitions: Input Types: ArgumentParser Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ArgumentParser) -> None: super().add_parser_arguments(v1) v1.add_argument('--nested', help='Will report data in the newer nested format, rat...
Imports: ```python from urllib.parse import unquote_plus import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Any: v1 = unquote_plus(v1) if v1 == 'true': return True if v1 == 'false': return False t...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T', bound='SdkParser') ``` Input Types: str Output Type: str Dependencies: Function Name: v1 Function: ```python def v1(self: Type[v0], v2: str) -> str: if v2 in self.value_tranlation_table: return self.value_tranlation_table[v2...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=DatabaseUtils.sqlitedb_dump) -> None: with open(v1, 'w') as v2: for v3 in self._connection.iterdump(): v3 = v3.encode('utf8') ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float, np.ndarray, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: float, v3: np.ndarray, v4: float) -> None: v5 = self._calculate_sigma_points(v4) v6...
Imports: ```python from collections import defaultdict import numpy as np import typing ``` Type definitions: Input Types: list or np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list or np.ndarray): v1 = np.array(v1).flatten() v2 = defaultdict(int) v3 = list(np....
Imports: ```python from selenium.common.exceptions import StaleElementReferenceException, ElementClickInterceptedException, TimeoutException, NoAlertPresentException, NoSuchElementException from selenium.webdriver.chrome.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from seleniu...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]], List[int] Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[int]], v2: List[int]) -> List[List[int]]: if not v1: return [v2] v3 = False v4 = [] for v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> List[List[int]]: v2 = [] v1.sort() v3 = len(v1) for v4 in range(v3): if v4 > 0 and v1[v4] == v1[v4 - 1]:...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: trdb2py.trading2_pb2.PNLAssetData, Any, bool, str, Any Output Type: dict Dependencies: ```python def v0(v1, v2: trdb2py.trading2_pb2.PNLAssetData, v3: bool=True) -> int: if v3: for v4 in range(0, len(v2.values...
Imports: ```python import numpy as np from pandas._config import get_option from pandas._libs import lib import pandas._libs.missing as libmissing from pandas._libs.tslibs import NaT, iNaT from pandas._typing import ArrayLike, DtypeObj from pandas.core.dtypes.common import DT64NS_DTYPE, TD64NS_DTYPE, ensure_object, is_...
Imports: ```python import typing ``` Type definitions: Input Types: Sequence['jina_pb2.Document'] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence['jina_pb2.Document'], *v2, **v3): for v4 in v1: if getattr(v4, self.target) and (not self.override): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1=POSITION.FIRST, v2=None): v3 = {} if v1 == POSITION.AFTER_MEDIA: v3 = {'position': v1, 'relativeMediaItemId': v2} elif v1 == POSITION.AFTER_ENRICHMENT: v...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: str, int, int, int Output Type: Any Dependencies: ```python def v0(v1) -> str: v2 = ('⠀', '⠁', '⠂', '⠃', '⠄', '⠅', '⠆', '⠇', '⠈', '⠉', '⠊', '⠋', '⠌', '⠍', '⠎', '⠏', '⠐', '⠑', '⠒', '⠓', '⠔', '⠕', '⠖', '⠗', '⠘', '⠙', '⠚', '⠛', '⠜', '⠝', '...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, Dict[str, tf.io.FixedLenFeature] Output Type: Dict[str, Tuple[tf.Tensor, ...]] Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor, v2: Dict[str, tf.io.FixedLenFeature], **v3: Dict[str, List[int...