text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[bool] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[bool]) -> bool: for v2 in v1: if not v2: return False return True ```
Imports: ```python import datetime import typing ``` Type definitions: ```python class v0: v1 = '%Y-%m-%d %H:%M:%S' def __init__(self, v2: datetime.datetime, v3: int): self.dt = v2 self.ns = v3 return def v4(self) -> str: v5 = str(self.ns) return self.dt.strftime(v0...
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str], praw.models.Redditor Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[str], v3: praw.models.Redditor) -> None: self.logger.debug('Sending Error PM "%s" to %s', v1, v3) self._...
Imports: ```python import sys import numpy as np import typing ``` Type definitions: Input Types: Output Type: typing.NoReturn Dependencies: ```python def v0(v1: int, v2: np.ndarray) -> typing.NoReturn: (v3, v4, v5) = v2.T v6 = scipy.sparse.coo_matrix((v5, (v3, v4)), shape=(v1, v1), dtype=np.int64) print(...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], str, bool, int, str, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: str, v3: bool=False, v4: int=22, v5: str=None, v6: bool=False, v7: bool=True): if v5: v8 = ['scp', '...
Imports: ```python import typing ``` Type definitions: Input Types: dict, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2): v3 = {'jsonrpc': '2.0', 'method': v2, 'id': 1234} if v1: v3['params'] = v1 return v3 ```
Imports: ```python import os from os.path import abspath, dirname import typing ``` Type definitions: ```python v0 = Tuple[str, Result, Result, Result, Result] ``` Input Types: str, int, List[v0], List[v0], List[v0] Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(v2: str, v3: int, v4: List[...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, int Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame, v2: int=40) -> pd.DataFrame: if self.flow_ == 'train': v3 = (v1.isnull().sum() / v1.shape[0] * 100).sort_values...
Imports: ```python from math import acos, sin, cos, floor, ceil import typing ``` Type definitions: Input Types: 'Vector3' Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Vector3') -> float: v2 = (self.length_sq() * v1.length_sq()) ** 0.5 v3 = self.dot(v1) / v2 ret...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = 'bold blue' v2 = 'yellow' v3 = 'cyan' return f'[{v1}]{self.title}[/{v1}]' + '\n' + f'[{v2}]{self.info}[/{v2}]' + '\n'.join((f'[{v3}]{sub}[...
Imports: ```python import os import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): for v2 in v1: os.system('adb install -r ' + v2) ```
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 = self.pose.pdb_info().pdb2pose(chain=v2, res=int(v1[1:-1])) if v3 == 0: return False if self.pose.residue(v...
Imports: ```python import asyncio import typing ``` Type definitions: ```python v0 = TypeVar('T', bound=Hashable) ``` Input Types: Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python async def v1(self) -> List[v0]: self._flush_event.clear() (v2, v3) = await asyncio.wait({asyncio.create_t...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, bool Output Type: pd.DataFrame Dependencies: ```python def v0(v1: str) -> Dict[str, List[str]]: v2 = {'TRA': [], 'TRB': []} for v3 in v1.split(';'): (v4, v5) = v3.split(':') v2[v4].append(v5) if not...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> List[int]: v2 = [] for v3 in range(pow(10, v1) - 1): v2.append(v3 + 1) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str=None) -> None: if v1.get('namespace', None): return v1['namespace'] elif v2: return v2 else: return '' ```
Imports: ```python import math import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: int, v2: int, v3: int, v4: int) -> float: return math.sqrt((v3 - v1) ** 2 + (v4 - v2) ** 2) ``` Function Name: v5 Function: ```python def v5() -> None: v6 = int(input()) v7 ...
Imports: ```python import re import typing ``` Type definitions: Input Types: TextIO Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: TextIO): v2 = v1.readline() if not v2: return (None, None, None) v3 = v1.readline().strip() v4 = v1.readline() v5 = v1.readli...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: datetime.datetime, float, float Output Type: List[datetime.datetime] Dependencies: Function Name: v0 Function: ```python def v0(v1: datetime.datetime, v2: float, v3: float) -> List[datetime.datetime]: v4 = [] v5 = datetime.tim...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: int): v2 = await self.list(v1) if v2.status != 200: return return [self.make_embed_with_info(heliotrope_list) for v3 in v2.list] ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> bool: if not self.payment: self.__set_transaction_data(data=v1) return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[int], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[int], v2: bool=False) -> None: v3 = [] v4 = -1 if v2 else 1 for (v5, v6) in enumerate(v1): if v6: v3.a...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: Input Types: List[List[int]] Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[int]]) -> List[List[int]]: v2 = defaultdict(int) for v3 in v1: v2[v3] += 1...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: float): v3 = v1 + '/unsup' v3 += '/{model:s}_{model_size:s}_{lr:0.6f}/'.format(model='graphsage', model_size=self.model_size, ...
Imports: ```python from torch import Tensor, nn import typing ``` Type definitions: ```python class v0(nn.Module): v1: int = 1 def __init__(self, v2: int, v3: int, v4: int=1, v5: Optional[nn.Module]=None, v6: int=1, v7: int=64, v8: int=1, v9: Optional[Callable[..., nn.Module]]=None) -> None: super().__...
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable, *v2): try: while True: v3 = v1(*v2) if v3: v2 = v3 except KeyboardInterrupt: pass ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str, Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2) -> int: v3 = pd.concat((feed['df'] for v4 in v2)) v5 = v3.loc[v3['value'] == v1] return len(v5.index) ```
Imports: ```python from smtplib import SMTP, SMTP_SSL, ssl from smtplib import SMTPConnectError, SMTPNotSupportedError, SMTPServerDisconnected import typing ``` Type definitions: Input Types: str, str, str, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: str=No...
Imports: ```python import torch from torch import nn import torch.nn.functional as F from torch.autograd import Variable import typing ``` Type definitions: Input Types: torch.FloatTensor, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.FloatTensor, v2=None, v3: b...
Imports: ```python from argparse import ArgumentParser, SUPPRESS, HelpFormatter import typing ``` Type definitions: Input Types: str, str, str, Optional[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str, v4: Optional[str]='None') -> None: if v1 is no...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, Union[str, Path], Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: Union[str, Path], v3=True) -> None: with open(v2, 'w') as v4: json.dump(v1, v4, indent=2, sort_keys=v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2: list = [] for v3 in v1: if v2.count(v3) == 0: v2.append(v3) return v2 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[tf.Variable, tf.Tensor] ``` Input Types: v0, float, float Output Type: Tuple[float, float] Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: float, v4: float=1e-12) -> Tuple[float, float]: v3 = v3 * self._exponen...
Imports: ```python import requests import typing ``` Type definitions: Input Types: object Output Type: object Dependencies: ```python def v0(v1: str='An error has occurred. Check your payloads and try again.', v2: int=500) -> dict: return Result()(status_code=v2, headers={}, body={'errors': [{'message': f'{v1}'}]...
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='AP2101') -> pd.DataFrame: v2 = f'https://finance.sina.com.cn/futures/quotes/{v1}.shtml' v3 = requests.get(v2...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator[str]: for (v1, v2, v3) in self.gcsfs.walk('.'): for v4 in v3: if v4.name != '/': yield v4.name ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int): v3 = f'routeridrange {v1} {v2}' self.send_command(v3) self._expect_command_output() ```
Imports: ```python from re import findall from requests import get import typing ``` Type definitions: Input Types: Output Type: Dict[str, List[Dict[str, list]]] Dependencies: ```python def v0(v1: str) -> BeautifulSoup: v2 = get(v1).text return BeautifulSoup(v2, 'html.parser') ``` Function Name: v3 Function: ...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = None try: v2 = cv2.VideoCapture(v1) (v3, v4) = v2.read() v2.release() except: v3 = False if v2 i...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Output Type: requests.status_codes Dependencies: Function Name: v0 Function: ```python def v0(self) -> requests.status_codes: v1 = self._institution.__login_form__(self._identification, self._password) v2 = requests.post(self...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Union[tf.Tensor, tf.Variable], Optional[Union[float, Tuple[float]]] Output Type: Union[tf.Tensor, tf.Variable] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[tf.Tensor, tf.Variable], v2: Optional[Union[fl...
Imports: ```python from sys import exit, stdout import typing ``` Type definitions: Input Types: str, bool, int, bool Output Type: Union[None, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='AB:CD:EF:AB:CD:EF', v2: bool=False, v3: int=30, v4: bool=False) -> Union[None, str]: try: ...
Imports: ```python import typing ``` Type definitions: Input Types: Mapping[str, Any], Mapping[str, Any] Output Type: MutableMapping[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping[str, Any]=None, v2: Mapping[str, Any]=None, **v3) -> MutableMapping[str, Any]: v4 = super().re...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False) -> None: v3 = os.path.join(v1, '__init__.py') if os.path.isfile(v3) and (not v2): print(f'{v3} file already exis...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.to_remove: for v1 in self.to_remove: self.result.add_command(f"no vlan {v1['vlan-id']}") ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: dict Dependencies: ```python def v0(v1): v2 = 'external_caches.ideal_tag_parents_lookup_cache_{}'.format(v1) v3 = 'external_caches.actual_tag_parents_lookup_cache_{}'.format(v1) return (v2, v3) ``` Function Name: v4 Functi...
Imports: ```python import copy import typing ``` Type definitions: ```python class v0(Vehicle): v1: float ' Desired velocity.' v2 = 0.6 v3 = 0.2 v4 = 0.5 * v3 v5 = 1 / v2 v6 = 1 / v3 v7 = 1 / 3 * v6 v8 = np.pi / 3 v9 = 5 def __init__(self, v10: Road, v11: Vector, v12: float=...
Imports: ```python import numpy as np import cv2 from scipy.spatial import distance from scipy.ndimage.filters import convolve from scipy.sparse import diags, csr_matrix from scipy.sparse.linalg import spsolve import typing ``` Type definitions: Input Types: np.ndarray, float, float, np.ndarray, float Output Type: Any...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: for v1 in self._block_types: self._logger.debug(f"Filling '{v1}' block") v2: typing.List[typing.Dict] = [] if v1 not in self: ...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: List[Dict[Tuple[str, str], Any]], List[Tuple[str, str]], bool Output Type: Tuple[List[Dict[str, Any]], List[str]] Dependencies: ```python def v0(v1: Any) -> Any: if v1 is None or isinstance(v1, (int, float)): return v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Tuple[str, str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Tuple[str, str]) -> str: (v3, v4) = v2 return f"<u>{v1}</u> - <b>type</b> {self.FORMAT_TYPES.get(v3, '')}\n<b>default</b> {v4}...
Imports: ```python from astropy.units import Quantity from astropy import units as u import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.magnitude_range is not None: v1 = self.magnitude_range.min_magnitude ...
Imports: ```python import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import ListedColormap import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: ```python def v0(v1: int=1, v2: int=1) -> tuple: plt.style.use('dark_background') (v3, v4) = plt.subplots(nrows...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.arg_parser_created: raise RuntimeError('Cannot create the argument parser multiple times') self.arg_parser = argparse...
Imports: ```python import subprocess import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: subprocess.Popen(['ffmpeg', '-f', 'concat', '-safe', '0', '-i', 'ts_list.txt', '-c', 'copy', f'{v1}.ts'], stdout=subpro...
Imports: ```python import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import typing ``` Type definitions: Input Types: int, int, int, int, int, Any Output Type: nn.Conv2d Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int=3, v4...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List[int]: v2 = [1] while len(v2) < v1: v2 = [x * 2 - 1 for v3 in v2] + [v3 * 2 for v3 in v2] return [v3 for v3 in v2 if v3 <=...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: str Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Dict[str, Any]: if v1.lower() not in self.available_lr_schedulers(): raise KeyError(f'Please provide a ...
Imports: ```python import pathlib import typing ``` Type definitions: Input Types: str, bool Output Type: pathlib.Path Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool) -> pathlib.Path: if v2: return pathlib.Path(v1).joinpath(pathlib.Path('Data/features_3_sec.csv')) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: mido.Message, serverconfiguration.ServerConfiguration, project.Project Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: mido.Message, v2: serverconfiguration.ServerConfiguration, v3: project.Project): if v1.ty...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> str: if '(' in v1: return v1.replace(v2, '(*{})'.format(v2)) else: return v1.replace(v2, '*{}'.format(v2)) ```
Imports: ```python import typing ``` Type definitions: Input Types: concurrent.futures.Future[None] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: concurrent.futures.Future[None]) -> None: if len(self._devices): self._display_scan_success_results() else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self) -> bytes: v1: bytes = self.channel.recv(65535) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: (int, ..., str) Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> (int, ..., str): v2 = v1.split('.') for (v3, v4) in enumerate(v2): try: v2[v3] = int(v4) except ValueError: ...
Imports: ```python import hashlib import os import typing ``` Type definitions: Input Types: dict, str Output Type: bool Dependencies: ```python def v0(v1, v2): (v3, v4) = v2.split(':') v5 = hashlib.md5(v2.encode('utf-8')).hexdigest() v6 = v5[0:2] v7 = v5[2:4] return os.path.join(v1, v3, v6, v7, v4...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, float], Dict[str, int] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, float], v2: Dict[str, int]) -> Dict[str, Any]: v3 = dict() v4 = list() v5 = list() v6 = dict() v...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Union[Path, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Path, str]): print('`Oso.load_file` has been deprecated in favor of `Oso.load_files` as of the 0.20 release.\n\n' + 'Please se...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> float: v2: Optional[float] = self._metric_weights.get(v1, None) v3 = self._metric_weights.get('default', 1.0) if v2 is None else v2 return...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('PathIEToken', ['text', 'text_lower', 'text_before', 'text_after', 'index', 'charStart', 'charEnd', 'pos', 'lemma']) ``` Input Types: [v0] Output Type: str Dependencies: Function Name: v1 Function: ```python def v1(v2: [v0]) -> str: v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: if not v1.startswith(self._dn_prefix) or not v1.endswith(self._dn_suffix): return None v2 = v1[len(self._dn_pre...
Imports: ```python import numpy as np import cv2 import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> np.ndarray: v2 = np.zeros(v1.shape, np.uint8) for v3 in range(v1.shape[2]): v2[..., v3] = c...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame Output Type: List[tuple] Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame) -> List[tuple]: v3 = list(v1.columns.intersection(v2.columns)) v4 = pd.merg...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> int: if not v1: return 0 v2 = sorted(v1) v3 = v4 = -1 v5 = -1 ' iterate and compare between input and sorted arr...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> torch.Tensor: (v2, v3, v4, v5) = v1.shape assert v5 == 2 return v1.permute(0, 3, 1, 2) ```
Imports: ```python import numpy import numpy as np import typing ``` Type definitions: Input Types: numpy.ndarray, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: numpy.ndarray, v2: int): (v3, v4, v5) = v1.shape (v6, v7, v8) = v1 v9 = v7[v2 + 2::2,] v10 = v8[v...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = ['git', 'rev-parse', '--verify', v1] v3 = subprocess.run(v2, check=True, stdout=subprocess.PIPE, text=True) return v3....
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: self._viewport_width = v1 self._viewport_height = v2 for v3 in self._render_passes: v3.setSize(v1, v2) ```
Imports: ```python from scipy import stats import typing ``` Type definitions: Input Types: Any, str, Any Output Type: Any Dependencies: ```python def v0(v1: xr.DataArray, v2: Union[str, tuple]=('tau', 'phi'), v3: bool=False, v4: bool=True, v5: str='propagate'): assert isinstance(v2, str) or isinstance(v2, tuple),...
Imports: ```python import re import math import pandas as pd from pandas import DataFrame import typing ``` Type definitions: Input Types: pd.Index, DataFrame, DataFrame, List[Union[float, str, None]], List[str] Output Type: Tuple[List[Union[float, str]], List[str]] Dependencies: ```python def v0(v1): v1 = v1.spli...
Imports: ```python from tensorflow.keras import layers, Model import typing ``` Type definitions: Input Types: Any, str, float, str, int, int, int, int, int, bool, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str='swish', v3: float=0.0, v4: str='', v5: int=32, v6: int=16, ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> int: v2 = v1[0] v3 = 0 v4 = v2 for v5 in range(1, len(v1)): v6 = v3 + v1[v5] v7 = max(v2, v3) v2 = v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple: v1 = [[0.0, 0.0, self.object_size / 2] + self.np_random.uniform(self.obj_range_low, self.obj_range_high) for v2 in range(len(self.obj_colors))] ret...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Optional[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> Optional[int]: if not self.linked_list: return None v3 = self.linked_list.head while v3 and v3.time < v2: ...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: list): v1 = v1.copy() for (v4, v5) in zip(v2, v3): cv2.circle(v1, (v4[0], v4[1]), ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: self.value += v1 while self.events: (v1, v2) = self.events[0] if self.value >= v1: self.events.pop(0) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Tuple[str, str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Tuple[str, str, int]: v2 = v1.split('.') v3 = v2[0] v4 = v2[1].split('seq')[1] v5 = int(v2[2].split('frame')[1]) return (v3, v...
Imports: ```python import typing ``` Type definitions: Input Types: Mapping[str, Any], str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Mapping[str, Any], v2: str, v3: str) -> str: v4 = self._start_date if v1 and v1.get(v2, {}).get(v3, {}).get(self.cursor_field): ...
Imports: ```python import geopandas as gpd from shapely.geometry import LineString, Point import typing ``` Type definitions: Input Types: nx.classes.graph.Graph, dict Output Type: gpd.GeoDataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: nx.classes.graph.Graph, v2: dict) -> gpd.GeoDataFrame: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if 'license' in self._parsed_metadata: v1 = list(self._parsed_metadata['license'])[0] v2 = ['Apache-2.0', 'BSD-3-Clause', 'BSD-2-Clause',...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> str: v1 = abs(v1) for v2 in ('', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi'): if v1 < 1000.0: return '%3.1f%sB' % (v1, v2) v...
Imports: ```python from selenium.common.exceptions import InvalidSessionIdException from selenium.webdriver.common.action_chains import ActionChains from selenium.common.exceptions import StaleElementReferenceException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from sele...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Sequence[Any]] Output Type: Iterator[Dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Sequence[Any]]) -> Iterator[Dict[str, Any]]: for (v2, v3) in v1.items(): if isinstance(v3, str): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = 0 for v2 in self.housePayments.keys(): if v2.isOnMarket(): v1 += 1 return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, discord.Member, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2, v3: discord.Member, v4): v5 = f'INSERT INTO warnings (WarnID, GuildID, User, Reason) VALUES ("{v1}","{v2}","{v3.name}","{...
Imports: ```python import typing ``` Type definitions: Input Types: pathlib.Path, int, int Output Type: Any Dependencies: ```python def v0(v1: pathlib.Path, v2: int, v3: int) -> dict: v4 = TextDocumentPositionParams(TextDocumentIdentifier(to_uri(v1)), Position(v2, v3)) return util.to_dict(v4) ``` ```python def...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> Any: super().ret(v1) if self.in_generator(): return self.ret_generator(v1) v2 = None for v3 in self.last_read: if v3.sta...
Imports: ```python import typing ``` Type definitions: Input Types: Callable, bool, bool, Optional[Union[str, List[str]]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable, v2: bool, v3: bool, v4: Optional[Union[str, List[str]]], *v5): if v2: v6 = v1(*v5) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: ast.FutureExpression Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: ast.FutureExpression) -> Any: v2 = await self._eval_expr(v1.expr) return self._client.submit(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1): return ([m.state for v2 in analyze_function(v1)], [MessageType.POST_FAIL]) ``` ```python def v3(v4: List[object], v5: List[int]) -> List[object]: ... ``` Function Name: v6 Function: ```pyt...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.example_user('othello') self.create_test_emoji('my_emoji_1', v1) self.login_user(v1) v2 = self.client_delete('/json/realm/emoji/my_...