text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: List, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List, v2=0.5): if v1: return [{'text': v1[0], 'confidence': 0.5}] else: raise ValueError('Empty payload provided') ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float) -> Tuple[float, float]: self.x += v1 self.y += v2 return (self.x, self.y) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str], Optional[stix2.Identity], Optional[int], Optional[List[stix2.MarkingDefinition]] Output Type: List[stix2.IntrusionSet] Dependencies: ```python def v0(v1: str, v2: Optional[stix2.Identity]=None, v3: Optional[datetime]=None, v4: Optional[date...
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 not (np.all(self.__low <= self.__param) and np.all(self.__param <= self.__high)): v1 = f'{self.__name} must be between {sel...
Imports: ```python import typing ``` Type definitions: Input Types: dict, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: int, v3: int): v4 = 0 v5 = 0 if v2 != 0: if v2 > 0: v4 = 1 else: v4 = -1 if v3 != 0...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str): try: if '.whl' in v1: return pkginfo.Wheel(v1) else: return pkginfo.SDist(v1) except Exception: return None ``` F...
Imports: ```python import random import typing ``` Type definitions: Input Types: Iterable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable) -> Any: self._items = list(v1) random.shuffle(self._items) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> None: (v2, v3, v4) = (0, 0, len(v1)) for v3 in range(v4): if v1[v3]: v1[v2] = v1[v3] v2 += 1 fo...
Imports: ```python import math import typing ``` Type definitions: Input Types: nx.DiGraph, Tuple[float, float, int], Tuple[float, float, int] Output Type: Any Dependencies: ```python def v0(v1, v2): return abs(v1 - v2) < 0.001 ``` ```python def v3(v4: float, v5: int) -> int: return round(v4 / v5) * v5 ``` Fun...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> None: if self._drop_path_prob and self._droppath_module is not None: v3 = self._drop_path_prob * v1 / v2 v4 = self.mo...
Imports: ```python import typing ``` Type definitions: Input Types: Tensor, Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: Tensor, v2: Tensor) -> Tensor: (v3, v4, v5, v6) = v1.shape v7 = v1.flatten(start_dim=1) * (v2 + 1.0) v7 = v7.view(-1, v4, v5, v6).clamp(min=...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: str v3: str v4: str v5: str v6: str v7: str v8: str v9: int v10: bool v11: str v12: List[Image] v13: str v14: Dict[str, Localization] v15: str v16: str v17: s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: bytes, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes, v2: int) -> None: v3 = self.op2 v3.nonlinear_factor = np.nan v3.is_table_1 = False v3.is_table_2 = True v4...
Imports: ```python import typing ``` Type definitions: Input Types: Union[DatasetReader, DatasetWriter, WarpedVRT, MemoryFile] Output Type: Dict Dependencies: ```python def v0(v1: Tuple[float, float, float, float]) -> Dict: return {'type': 'Polygon', 'coordinates': [[[v1[0], v1[3]], [v1[0], v1[1]], [v1[2], v1[1]],...
Imports: ```python import typing ``` Type definitions: Input Types: pd.core.series.Series, int, str, str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.core.series.Series, v2: int=10, v3: str=None, v4: str=None) -> dict: if self.imputer is None: raise ValueError(...
Imports: ```python import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib import dates as md from matplotlib.axes import Axes from matplotlib.collections import PathCollection from matplotlib.figure import Figure import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: int): self.txt = v1 self.id = v2 def v3(self) -> str: return self.txt ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v0...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = Tuple[int, int] ``` Input Types: v0, v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0) -> v0: v2 = np.array(v2) (v4, v5) = np.array(v2) + np.clip(np.array(v3) - v2, -1, 1) re...
Imports: ```python import os from os import listdir, remove, makedirs, chmod from os.path import join, isfile, getsize, basename, isdir, realpath, expandvars, expanduser from shutil import copy import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```pyt...
Imports: ```python import logging import typing ``` Type definitions: Input Types: logging.LogRecord Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: logging.LogRecord): if v1.levelno == logging.FATAL: v2 = 'FATAL' v3 = 'red' elif v1.levelno == logging.CRIT...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> int: v2 = self.matchadb.cursor(dictionary=True) v2.execute('SELECT COUNT(phid) as count FROM photo_compare WHERE uid = %s', (v1,)) v3 = v2.fetcho...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Mapping[str, Any], Mapping[str, Any] Output Type: Iterable[Mapping[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping[str, Any], v2: Mapping[str, Any]=None) -> Iterable[Mapping[str, Any]]: v3 = {'s...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseClient): def v1(self, v2: str=None, v3: str=None, v4=None, v5: str=None, v6=None, v7: str=None, v8: str=None, v9=None, v10=None, v11=None, v12: str=None, v13: str=None, v14=None, v15: str='50'): v16 = assign_params(created_at__gt...
Imports: ```python from dataclasses import fields, MISSING, is_dataclass, Field, dataclass, field as dc_field from typing import Dict, Any, TypeVar, Type, Union, Callable, List, Collection, Optional, Set, Mapping, Tuple, get_type_hints import typing ``` Type definitions: Input Types: Type Output Type: bool Dependencie...
Imports: ```python import re import typing ``` Type definitions: Input Types: dict, git.GitCommit Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: git.GitCommit) -> dict: v3 = '^(?P<change_type>feat|fix|refactor|perf|mile|task)(?:\\((?P<scope>[^()\\r\\n]*)\\)|\\()?(...
Imports: ```python import torch from torch import nn, Tensor import typing ``` Type definitions: Input Types: Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor) -> Tensor: (v2, v3) = v1.shape[-2:] v4 = v1.device v5 = max(0, self.stride // 2) v6 = to...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1 = super().to_dict() for (v2, v3) in inspect.getmembers(self, inspect.ismethod): if hasattr(v3, 'include...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any]) -> bool: v2 = v1['files'] return all((file.get('raw', False) is False for v3 in v2)) and v2[0]['name'] == 'reads_1.fastq' and (v1[...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = u'Flock notifications' v2 = u'This is a reply to Todo notification.' self.send_and_test_stream_message('reply_todo', v1, v2, content_type='a...
Imports: ```python import typing ``` Type definitions: Input Types: v0, datetime.datetime Output Type: 'TradeInstruction' Dependencies: ```python @property def v0(self) -> v0: return self.__order_state ``` Function Name: v1 Function: ```python def v1(self, v2: v0, v3: datetime.datetime=datetime.datetime.utcnow()) ...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1: Optional[v0], v2: int, v3: trajectories.TimeStep, v4: Stats, v5: List[Tuple[int, np.ndarray]], v6: List[Tuple[int, float]]) -> None: self.parent = v1 self.children = {} self.player = v2...
Imports: ```python from typing import Any from typing import Dict from typing import List from typing import Optional from typing import TextIO from typing import Tuple from typing import cast import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```pyth...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: v2 = [] for (v3, v4) in v1.items(): if v3 == 'history': for v5 in v4: v2.append(v5['corporation_id'...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: v2 = v1['executionContextId'] v3 = self._frameManager.executionContextById(v2) v4: List[JSHandle] = [] for v5 in v1.get('args',...
Imports: ```python import sys from os import path 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) -> pd.DataFrame: if not path.exists(v1): sys.exit('File not found!') if v1.endswith('...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = self.__filenames.index(v1) self.setCurrentIndex(v2) ```
Imports: ```python from datetime import datetime, time, tzinfo, timezone import typing ``` Type definitions: Input Types: Optional[str] Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Optional[str]=None) -> None: v2 = datetime.utcnow() v3 = await self._next_outgoin...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, float Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor, v2: tf.Tensor, v3: float) -> tf.Tensor: if v3 == 0.0: return tf.convert_to_tensor(v1) ...
Imports: ```python from .enum import RelayGroup, ControlOperation import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: if v1 < 0 or v1 > 255: raise ValueError('Timeout must be in range 0..255, got {}'.form...
Imports: ```python from dataclasses import dataclass, replace import typing ``` Type definitions: ```python @dataclass(frozen=True) class v0: v1: int ``` Input Types: int, List[int], List[int], v0 Output Type: List[int] Dependencies: Function Name: v2 Function: ```python def v2(v3: int, v4: List[int], v5: List[int...
Imports: ```python import sqlite3 import typing ``` Type definitions: Input Types: str Output Type: sqlite3.Connection Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> sqlite3.Connection: v2 = sqlite3.connect(f'cache/{v1}/posts.db') v3 = 'CREATE TABLE IF NOT EXISTS posts (\n i...
Imports: ```python import re import sys import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = re.compile('^rstudio-') v1 = v2.sub('', v1) v3 = re.compile('-preview$') v1 = v3.sub('', v1) v4 = re.compil...
Imports: ```python import numpy as np import numpy import typing ``` Type definitions: Input Types: int, int, numpy.ndarray[numpy.complex128][315, 1], numpy.ndarray[numpy.complex128][1, 315], numpy.ndarray[numpy.complex128][32, 10000], int, numpy.ndarray[numpy.complex128][32768], int Output Type: numpy.ndarray[numpy.c...
Imports: ```python import warnings import typing ``` Type definitions: Input Types: Output Type: Any Dependencies: ```python def v0(v1): def v2(self): return getattr(self._container, v1) def v3(self, v4): return setattr(self._container, v1, v4) return (v2, v3) ``` ```python def v5(self):...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: tuple[int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int) -> tuple[int, int, int]: (v3, v4, v5, v6) = (1, 0, 0, 1) while v2: (v7, v8) = divmod(v1, v2) (v3, v4) = (v...
Imports: ```python import typing ``` Type definitions: ```python class v0(Protocol): def __call__(self, v1: xarray.DataArray, **v2) -> xarray.DataArray: ... ``` Input Types: v0 Output Type: xarray.DataArray Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0, **v5) -> xarray.DataArray:...
Imports: ```python from io import BytesIO from zipfile import ZipFile import typing ``` Type definitions: Input Types: bytes Output Type: List['NamedFile'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes) -> List['NamedFile']: with ZipFile(BytesIO(v1), 'r') as v2: v3 = {filename...
Imports: ```python import requests from requests.exceptions import RequestException import typing ``` Type definitions: ```python v0 = Union[str, List[str]] ``` Input Types: Optional[v0], Optional[int], Optional[str] Output Type: Dict Dependencies: ```python def v1(v2): return {k: v for (v3, v4) in v2.items() if v4...
Imports: ```python import typing ``` Type definitions: Input Types: messages.Layout Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: messages.Layout) -> None: if self.is_root_view: v1.stop() await self.refresh_layout() self.app.refresh() ```
Imports: ```python import numpy as np from itertools import combinations import typing ``` Type definitions: Input Types: pd.DataFrame, list, str, str, Any Output Type: Any Dependencies: ```python def v0(v1: dict, v2: list, v3: list, v4: str): v5 = [] v6 = [] v7 = [] v8 = [] for v9 in list(combinat...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, str, str, str, str, str, Any, Any, Any, Any, Any, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int=None, v3: str=None, v4: str=None, v5: str=None, v6: str=None, v7: str=None, v8=Annotate, v9=H...
Imports: ```python import typing ``` Type definitions: Input Types: entity_factory.EntityFactoryImpl, typing.Dict[str, typing.Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: entity_factory.EntityFactoryImpl, v2: typing.Dict[str, typing.Any]): v3 = v1.deserialize_thread_m...
Imports: ```python import pandas as pd from sklearn.preprocessing import OneHotEncoder import typing ``` Type definitions: Input Types: dict Output Type: pd.DataFrame Dependencies: ```python def v0(v1: pd.DataFrame, v2: dict) -> pd.DataFrame: v1 = v1[v1[v2['is_app']]] v1 = v1[v1.ssp_id != 5335] v1 = v1[v2[...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: int, v3: str, v4: int, v5: int=1) -> None: self.from_location = v1 self.from_index = v2 self.to_location = v3 self.to_index = v4 self.move_depth = v5 v6 = {'boa...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch, v2: int=2049): if v1.ndim > 1: raise ValueError('Stable sort only works on 1d tensors') v3 = v1.numel() if v2 - v3 > 0:...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: Optional[float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[float]: if v1 in self._intensity: return self._intensity[v1]['mean'] else: return np.nan...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.node is not None: self.node.stop(v1) ```
Imports: ```python import numpy as np import scipy.integrate as integrate import typing ``` Type definitions: Input Types: float, float, float Output Type: Any Dependencies: ```python def v0(v1): v2 = 2 * np.arctan(wc / omega - a1 / omega * np.tan(0.5 * a1 * v1 - a2)) return np.sin(v2) ``` Function Name: v3 Fu...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> str: v2 = self.video_api.list(id=v1, part='snippet', fields='items/snippet/description') return v2.execute()['items'][0]['snippet']['description'] ``...
Imports: ```python import typing ``` Type definitions: ```python v0 = t.Union[str, t.Callable[[], str]] ``` Input Types: bool, v0 Output Type: None Dependencies: ```python def v1(v2: v0) -> str: if isinstance(v2, str): return v2 else: return v2() ``` Function Name: v3 Function: ```python def v3(...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int) -> int: if v1 < v2: return v2 elif v1 > v3: return v3 else: return v1 ```
Imports: ```python import numpy as np import io from PIL import Image import typing ``` Type definitions: Input Types: Any Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1) -> np.array: v2 = np.array(Image.open(io.BytesIO(v1))) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._intermediate_values[self._batch_idx] = {} self._intermediate_counts[self._batch_idx] = {} ```
Imports: ```python from collections import defaultdict, OrderedDict import typing ``` Type definitions: Input Types: List[List[Dict[Text, List['Features']]]] Output Type: Dict[Text, List[List[List['Features']]]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[Dict[Text, List['Features']]]]) -...
Imports: ```python import random from string import ascii_letters, digits import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int=8) -> str: v2 = ascii_letters + digits return ''.join((random.choice(v2) for v3 in range(v1))) ```
Imports: ```python import typing ``` Type definitions: Input Types: Set[str], Dict[Tuple[str, Pattern[str]], int], List[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Set[str], v2: Dict[Tuple[str, Pattern[str]], int], v3: List[str]) -> List[str]: v4 = [] for v5 in v...
Imports: ```python import csv import typing ``` Type definitions: Input Types: Any, List[dict], dict, List[str], set, List Output Type: None Dependencies: ```python def v0(v1: str): if v1 in _exclude: return True for v2 in _regex_exclude: if v2.match(v1): return True return Fals...
Imports: ```python import torch from torch.utils import tensorboard import typing ``` Type definitions: Input Types: torch.nn.Module Output Type: tuple[torch.nn.Module, torch.device] Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.nn.Module) -> tuple[torch.nn.Module, torch.device]: if torch.c...
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 = self.__items[v1] del self.__items[v1] self.notify_remove_item(self.__key if self.__key else 'items', v2, v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self._get_devices() for v2 in v1: self.remove(getattr(v2, 'Address')) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.total_lines_cleared = 0 self.update_lines_cleared_counter(0) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Dict[str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Dict[str, int]: v2: Dict[str, int] = dict() v2['<blk>'] = 0 v2['<sos/eos>'] = 1 v2['<unk>'] = 2 v3 = re.compile('([ \...
Imports: ```python import typing ``` Type definitions: Input Types: str, typing.TrackedCPEFilterDict Output Type: 'abstract.ACVEMatcher' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: typing.TrackedCPEFilterDict) -> 'abstract.ACVEMatcher': v3: typing.TrackedCPEMatchingFilterDict = d...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Generator[Tuple[str, ...], None, None] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Generator[Tuple[str, ...], None, None]: for v1 in self.gen_flat_decoded_field_dicts(): if self.options.exclude_messag...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Union[int, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> Union[int, np.ndarray]: assert np.min(v1) >= 0.0 assert np.max(v1) < self._value[1] v2 =...
Imports: ```python import typing ``` Type definitions: Input Types: 'TcEx' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'TcEx'): v2 = v1.v2.batch(owner='TCI', halt_on_error=False) v2._batch_max_chunk = 2 v3 = {'pytest-adversary-i1-001': {'additional_data': {}, 'des...
Imports: ```python import typing ``` Type definitions: Input Types: str, Callable[['pandas.DataFrame'], 'pandas.Series'], Optional[str] Output Type: 'Dataset[T]' Dependencies: ```python def v0(v1): if isinstance(v1, list): return [row for v2 in v1 if random.random() <= fraction] if isinstance(v1, pa.Ta...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: v3 = f'https://auth.docker.io/token?scope=repository:{v1}:pull&service=registry.docker.io' v4 = requests.get(url=...
Imports: ```python import typing ``` Type definitions: Input Types: 'IrcProtocol', 'Message' Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: 'IrcProtocol', v2: 'Message'): v3 = v2.parameters[1:-1] for v4 in v3: if v4[0] == '-' and v4.upper() in v1.server.isupport_...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: pd.DataFrame): v4 = v1.replace('raw', 'interim') v5 = v2.replace('raw', 'interim') if not os.path.exists(v5...
Imports: ```python import typing ``` Type definitions: Input Types: list, str, bool Output Type: (np.ndarray, list) Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: str, v3: bool=False) -> (np.ndarray, list): v4 = [] self.reset_init(len(v1)) for (v5, v6) in enumerate(v1): ...
Imports: ```python import textwrap import typing ``` Type definitions: Input Types: str, Any, Optional[str], Optional[str], int Output Type: None Dependencies: ```python def v0(v1: Collection[Any]) -> str: if len(v1) < 3: return ' and '.join(v1) return f"{', '.join(v1[:-1])}, and {v1[-1]}" ``` Function...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, int, int, int Output Type: Any Dependencies: ```python def v0(v1: NDArray[Any,], v2: int) -> NDArray[Any, Any]: v3 = np.zeros((v2, v2)) for v4 in range(v2): v5 = v1[v4] v6 = [j for v7 in range(v2) if v...
Imports: ```python import base64 import typing ``` Type definitions: Input Types: str Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bytes: with open(v1, 'rb') as v2, open('result.txt', 'wb') as v3: v4 = v2.read() v5 = base64.b64encode(v4) v3.writ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, int, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: np.ndarray): v4 = self.weights[v1][v2] if v4 is None: self.weights[v1][v2] = v3 else: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: ```python def v0(v1: int) -> int: v2 = v1 // 2 for v3 in range(10 ** (v2 - 1), 10 ** v2): v4 = str(v3) for v5 in range(10): yield int(v4 + str(v5) + v4[::-1]) ``` ```python def v6(...
Imports: ```python import numpy as np from sklearn.cluster import KMeans from numpy.linalg import eig from sklearn.decomposition import PCA import typing ``` Type definitions: Input Types: list, str Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.array] Dependencies: Function Name: v0 Function: ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, list, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: list, v3: list): self.reset() self.schedule = v1['Schedule'] self.clearanceTimes = v2 self.phaseRings = v3 for v4 in ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Any=None) -> Any: if v1 in self._dict: v3 = self._dict[v1] elif v2 is not None: v3 = v2 else: raise ValueError...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> Response: v3 = {'username': v1, 'password': v2} v4 = self._post(endpoint='auth-token', data=v3) v5 = v4['token'] self...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[CargoCrate, FileCrate, TempCrate] ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0): self.flush() self.cur_crate = v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Callable, *v2: Any) -> None: if not self._loop: raise ValueError('Channel not connected!') return await self._loop.run_in_executor(s...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str Output Type: json Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> json: v2 = requests.get(v1, headers={'Authorization': 'Bearer ' + self.user}) if v2.status_code != 200: raise Exception...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> str: if len(v1) > 0: return '{0}, {1}'.format(v1, v2) return '{0}'.format(v2) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[str, Optional[List[Any]]] ``` ```python v1 = List[int] ``` Input Types: Callable[[v1, v0], bool], Optional[v1], Optional[v0] Output Type: List[v1] Dependencies: Function Name: v2 Function: ```python def v2(self, v3: Callable[[v1, v0], bool], v...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, *v2, **v3): super().__init__(*v2, **v3) self._name = v1 @property def v4(self): return NodeRef @property def v5(self): """Node name - must not be changed once nod...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None) -> List[str]: v2 = [] v3 = None v4 = None if v1 is None: v5 = self._sm_client.list_feature_groups() else: v4...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=None, v3=None): self.val = v1 self.left = v2 self.right = v3 ``` Input Types: v0 Output Type: int Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v0) -> int: if v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='', v3: int=None) -> str: if v1 in self._template: return v2.join(self.get(v1, v3)) else: return '' ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable, str Output Type: Callable[[Callable], Callable] Dependencies: ```python def v0(v1: Callable) -> Callable: self.register(v1.__name__ if name is None else name, v1) return v1 ``` Function Name: v2 Function: ```python def v2(self, v3: C...