text
stringlengths
190
325k
Imports: ```python import argparse import typing ``` Type definitions: Input Types: Output Type: argparse.Namespace Dependencies: Function Name: v0 Function: ```python def v0() -> argparse.Namespace: v1 = argparse.ArgumentParser(description=__doc__) v1.add_argument('requirements', nargs='+', help='Requiremen...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, str, str, str, str, str, Any Output Type: Any Dependencies: ```python def v0(v1: str, v2: str, v3: str, v4: str, v5: str, v6=None): v7 = Selenzy.readTaxonomy(v2, fileLineage) v8 = Selenzy2.superTax2(v7) if v4 == str(): ...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): v2 = next(iter(v1.items()))[1] while v2.parent: v2 = v2.parent return v2 ```
Imports: ```python from decimal import Decimal import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> List[str]: v2: int = int(Decimal('1e35')) v3: int = int(Decimal('1e36')) v4: List[int] = [erc20_token.cont...
Imports: ```python import argparse import pathlib import shutil import typing ``` Type definitions: Input Types: list[str] Output Type: argparse.Namespace Dependencies: ```python def v0(v1: argparse.ArgumentParser, v2: str, v3: str=None, *, v4: bool=True, v5: str=None, v6: str=None) -> None: v7 = v2.replace('_', '...
Imports: ```python import requests from requests.exceptions import Timeout import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0() -> list: v1 = requests.get(url='https://xyquadrat.ch/polyring/data/members.json').json() return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if self.geometry is not None: v2 = self.ndim * self.natoms return self.geometry[v1 * v2:(v1 + 1) * v2] else: return self.t...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Union[List[str], None] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=10) -> Union[List[str], None]: v2 = None try: self._command_proc.join(timeout=self._timeout) if self._command...
Imports: ```python import pandas as pd import scipy.stats as stats import typing ``` Type definitions: Input Types: str, str, str, Any Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str='spearman', v4=True) -> pd.Series: v5 = self.get_cats() v6 = ...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Path, str Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, v2: str=None) -> Path: if v2 is None: v2 = self.get_sub_lang_short(v1) v3 = Path(self.media_path.parent, s...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: Union[int, None] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int]) -> Union[int, None]: if not v1: return None v2 = {} for v3 in v1: if v3 not in v2: v2[v3] = 0 ...
Imports: ```python import torch from torch import nn, Tensor import typing ``` Type definitions: Input Types: Tensor, Optional[Dict[str, Tensor]] Output Type: Tuple[Tensor, Optional[Dict[str, Tensor]]] Dependencies: ```python @torch.jit.unused def v0(v1: Tensor) -> float: return v1 ``` ```python @torch.jit.unused ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): for v2 in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31): if v1[v2] != '\x7f': return False return True ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> None: v3 = ['azcopy', 'sync', v1, v2] self.logger.info('copying base setup') subprocess.check_output(v3) ``...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: typing.List[int] Output Type: Any Dependencies: ```python def v0(v1: str, v2: typing.List[int]=None): if v2: v2 = [str(id) for v3 in v2] v2 = ','.join(v2) v4 = f'-i {v2}' if v2 else '' v5 = subprocess.chec...
Imports: ```python import math import numpy as np from skimage.metrics import structural_similarity import cv2 import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: float Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: str): v4 = f'Cannot calculate {v3}. Input shap...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: dict, list Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: list) -> pd.DataFrame: v3 = [] for (v4, v5) in v1.items(): if type(v5) != pd.DataFrame: v5 =...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Any: v2 = 1 for v3 in v1: v2 += 2 + len(v3) v4 = np.zeros(v2, np.uint8) v4[0] = len(v1) v5 = 1 for v3 in v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str], Iterable[Optional[str]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Optional[str], v3: Iterable[Optional[str]]) -> None: if v2 not in v3: v4 = ', '.join(['<None>' if v is N...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): print('Exiting BetaKnuff...') exit() ```
Imports: ```python import typing ``` Type definitions: Input Types: ndarray, ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ndarray, v2: ndarray): v3: str = 'Outer fold\t\t\tANN\t\t\tLinear regression\t\t\tBaseline\n' v3 += 'i\t\thᵢ\tEᵢ Test\t\tλᵢ\tEᵢ Test\t\t\tEᵢ Test...
Imports: ```python import tensorflow as tf from tensorflow.keras import backend from tensorflow.keras.metrics import Mean from tensorflow.keras.metrics import get as get_metric import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor, Optional[tf.Tensor], int Output Type: tf.Tensor Dependencies: Function...
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Callable, **v2): v3 = await self.bind(v1, **v2) await v3() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Optional[int], Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2=0, v3: Optional[int]=None, v4=None, v5=False): if isinstance(v4, str): v4 = {v4} v6 = v1.byte_size(v4, v5) return...
Imports: ```python 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 = [int(t) for v4 in v2[1:]] return v3 ```
Imports: ```python from cvxpy.atoms.affine.affine_atom import AffAtom import cvxpy.utilities as u import cvxpy.lin_ops.lin_utils as lu import typing ``` Type definitions: Input Types: Any, Tuple[int, ...], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: Tuple[int, ...], v...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[transport.PTransportSettings] Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[transport.PTransportSettings]=None) -> bytes: v1 = self.encode_path_param(v1) v3 = self.get(...
Imports: ```python import matplotlib.pyplot as plt import numpy as np from numpy.polynomial.polynomial import Polynomial import typing ``` Type definitions: Input Types: float, float, int, int, Any, Any Output Type: Any Dependencies: ```python def v0(v1: float, v2: float, v3: int): v4 = v2 / v1 return v3 * pi_...
Imports: ```python import os import typing ``` Type definitions: Input Types: Union[str, Path], str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path], v2: str) -> str: (v1, v3) = os.path.splitext(v1) return v1 + v2 + v3 ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, Optional[torch.Tensor], Optional[torch.Tensor], Optional[torch.Tensor], Optional[bool], Optional[Tuple[Dict[str, torch.Tensor], Dict[str, torc...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = v1.count('"') if v2 not in (0, 2, 4): raise ValueError('The format of the input relation is incorrect.') if v2 == 4: v3 = (v1.s...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str='') -> List[str]: v2 = ['somepath.txt', 'abc/someotherpath.txt', 'abc/def/anotherpath.txt'] if len(v1) > 0: return [u for v3 in v2 if v3.sta...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('ClientParam', ['name', 'type', 'mechanism']) ``` Input Types: List[v0] Output Type: str Dependencies: ```python def v1() -> str: return f'const {stub_ptr_alias()}& stub' ``` ```python def v2(): return 'StubPtr' ``` ```python def v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = 1 if v1 == 'm': v2 = 60 elif v1 == 'h': v2 = 60 * 60 elif v1 == 'd': v2 = 60 * 60 * 24 return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: list, list Output Type: (float, float) Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list) -> (float, float): (v1, v2) = (np.array(v1), np.array(v2)) v3 = np.mean(np.abs(v1 - v2)) v4 = np.mean...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, (int, int) Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: (int, int)) -> np.ndarray: if v2 == (1, 0): return v1.copy() elif v2 == (0, 0): return v1[::-1, :].c...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.set_models({'meeting/1': {'is_active_in_organization_id': 1}, 'group/7': {'name': 'group_LxAHErRs', 'user_ids': [], 'meeting_id': 1}, 'mediafile/110...
Imports: ```python import io from contextlib import redirect_stderr, redirect_stdout import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: Union[PathLike, str], v2: JsonLike=None, v3: bool=True) -> str: with io.StringIO() as v4, redirect_stderr(v4): runmany(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self.cached_count is None: self.cached_count = self.provide_count() return self.cached_count ```
Imports: ```python import json, os import typing ``` Type definitions: Input Types: Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(self) -> List: with open(self.file_path, 'r+', encoding='utf-8') as v1: v2 = json.loads(v1.read()) return v2 ```
Imports: ```python from numbers import Integral import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: ```python def v0(v1: int) -> int: if v1 not in cache: cache[v1] = v0(v1 - 2) + v0(v1 - 1) return cache[v1] ``` Function Name: v2 Function: ```python def v2(v3: int) -> int...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[Event, List[Event]] ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> v0: for v3 in v2: self._enrich_event_metadata(v3) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: bytes, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes, v2): if v2 not in self.clients: self.clients.append(v2) if v1 in (b'Hello UDP', b"I'm not a dead client"): return for ...
Imports: ```python import heapq import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: self.count += 1 heapq.heappush(self.max_heap, (-v1, v1)) (v2, v3) = heapq.heappop(self.max_heap) heapq.heappush(self...
Imports: ```python 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 = ['depth', 'vertical_uncertainty', 'horizontal_uncertainty'] for v4 in v3: v5 = self._return_all_surface_tiles(v1, v...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: ```python def v0(v1: str) -> GitConfig: if not os.path.exists(v1): return None v2 = {} v3 = [] v4 = [] with open(v1, 'rb') as v5: v6 = None v7 = [] v...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: State, v2: Dict) -> None: self._channels: Dict[int, GuildChannels] = {} self._members: Dict[int, Member] = {} self._roles: Dict[int, Role] = {} self._emojis: Dict[int, Emoji] = {} ...
Imports: ```python import typing ``` Type definitions: Input Types: 'OrderedDict[str, str]' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'OrderedDict[str, str]'): self.classes = v1 self._mid_to_idx = {mid: idx for (v2, v3) in enumerate(self.classes)} ```
Imports: ```python import getopt import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.assertTrue(getopt.short_has_arg('a', 'a:')) self.assertFalse(getopt.short_has_arg('a', 'a')) self.assertError(getopt.short_has...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str='/', v2: bool=True) -> None: self.path = v1 self.array = () self.args = () self.size = 0 self.isExist = False self.isFolder = False self.isFile = False ...
Imports: ```python import typing ``` Type definitions: Input Types: caffe2_pb2.NetDef, str, str, int, List[Tuple[List[Tuple[str, int]], List[Tuple[str, int]]]], Dict[str, int], Dict[str, int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: caffe2_pb2.NetDef, v2: str, v3: str, v4: int, ...
Imports: ```python from math import log import typing ``` Type definitions: Input Types: Iterable[Number], bool Output Type: Generator Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[Number], v2: bool=False) -> Generator: v3 = iter(v1) v4 = next(v3) for v5 in v3: yield (log...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> bool: for v3 in self.docker.services.list(): if v3.name == v1: v4 = v3.attrs['Spec']['Labels'] v4['tr...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Optional[List[int]] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: Optional[List[int]]=None) -> np.ndarray: v3 = self.get_coefficient_history() v4 = ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, int, str Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: int=5, v3: str='replicate') -> torch.Tensor: v4 =...
Imports: ```python import torch from sklearn.metrics.pairwise import cosine_similarity import typing ``` Type definitions: Input Types: str, List[str], List[str], str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: List[str], v3: List[str], v4: str): (v5, v6) = self....
Imports: ```python import typing ``` Type definitions: Input Types: commands.Context, discord.TextChannel Output Type: discord.Message Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: commands.Context, v2: discord.TextChannel) -> discord.Message: v3 = await self._source.get_page(self.cur...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]): v2 = [] v3 = [] for v4 in v1: with open(v4, 'rb') as v5: try: while True: ...
Imports: ```python import pickle import numpy as np from gensim.models import FastText import typing ``` Type definitions: Input Types: str, str Output Type: Union[Dict, Any] Dependencies: ```python def v0(v1: str, *v2: np.array) -> Tuple[str, np.array]: return (v1, np.asarray(v2, dtype='float32')) ``` Function Na...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[cv2.KeyPoint] Output Type: cv2.KeyPoint Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[cv2.KeyPoint]) -> cv2.KeyPoint: v2 = None v3 = None for v4 in v1: (v5, v6) = self._get_keypo...
Imports: ```python import string import typing ``` Type definitions: Input Types: bytes Output Type: Any Dependencies: ```python def v0(v1: bytes, v2: str): assert v1 == decrypt(encrypt(v1, v2), v2) ``` Function Name: v3 Function: ```python def v3(v4: bytes): for v5 in ['', 'testpassword', string.printable]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, acme_specs.Array] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, acme_specs.Array]: v1 = {} for v2 in self._agents: v1[v2] = self._agent_specs[v2].observations.observation ret...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict, v2: int) -> str: v3 = ' ' * v2 v4 = ' {}"{}": {},' v5 = [v4.format(v3, key, self.format_metadata(value, v2 + 4, key)) for (v6, v7) in...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> bool: if 'token' not in v1 or not v1['token']: return False if 'data_interval' not in v1 or not v1['data_interval']: return F...
Imports: ```python import typing ``` Type definitions: Input Types: int, float, float, bool, float, float, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: float, v3: float, v4: bool, v5: float, v6: float, v7: float) -> None: self.pad_compound.set(v1 + 1) s...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Dict Output Type: Dict Dependencies: ```python def v0(v1: Dict, v2) -> Dict: v3 = {} v4 = sorted(v1.items(), key=lambda _s: (_s[0] in PACKAGES_SECTIONS, _s)) for (v5, v6) in v4: if v5 not in PACKAGES_SECTIONS: v3[...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: ```python v0 = TypeVar('A') ``` ```python v1 = TypeVar('B') ``` Input Types: Dict[v0, v1] Output Type: Dict[v1, List[v0]] Dependencies: Function Name: v2 Function: ```python def v2(v3: Dict[v0, v1]) -> Dict[v1, List[v0]]: v4...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: Path) -> str: return v1.as_posix() ``` Function Name: v2 Function: ```python def v2(self) -> None: def v3(v4: Path) -> str: return v4.as_posix() v5 = [...
Imports: ```python import torch as th import torch.distributions as td import typing ``` Type definitions: Input Types: th.Tensor Output Type: th.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: th.Tensor) -> th.Tensor: v2 = self._action_sigma if self._is_train_mode else 0.0 v3 = th...
Imports: ```python from functools import reduce import typing ``` Type definitions: ```python v0 = TypeVar('S') ``` ```python v1 = TypeVar('T') ``` Input Types: Callable[[v0, List[v1]], v0], List[v1], v0, int Output Type: Any Dependencies: ```python def v2(v3: List[v1], v4: int) -> Generator[List[v1], None, None]: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = {'A': 'U', 'T': 'A', 'G': 'C', 'C': 'G'} v3 = '' for v4 in v1: v3 = v3 + v2[v4] return v3 ``` Function Name: v5 Function: ```python def v5(v6: str) -> st...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> dict: v3 = v1.get('NEMSPDCaseFile').get('NemSpdInputs').get('PeriodCollection').get('Period').get('InterconnectorPeriodCollection').get('Interconnect...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> None: for v2 in self.plugins: await v2.on_cache_miss(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.Series, pd.Series Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.Series, v2: pd.Series) -> None: v3 = -v2.amount / v1.amount self._wallet.add(v1.asset, amount=v1.amount, price=v3, fee=v2.fee) ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor) -> torch.Tensor: v3 = F.c...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Union[List[v0], Tuple[v0, ...]], Callable[[v0], str] Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: Union[List[v0], Tuple[v0, ...]], *, v3: Callable[[v0], str]=str) -> List[v0]: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> str: v2: int = 0 v3: str = str() while v2 != len(str(v1)): v3 += str(v1)[v2] if not v2 + 1 >= len(str(v1)): if int(str...
Imports: ```python import typing ``` Type definitions: Input Types: Quotecast.Request Output Type: Optional[bool] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Quotecast.Request) -> Optional[bool]: v2 = self.connection_storage.session_id v3 = self.session_storage.session v4 = self.l...
Imports: ```python import urllib from urllib.parse import quote, urlencode import typing ``` Type definitions: Input Types: str, str Output Type: Tuple[str, str, Optional[str], Optional[str], Optional[dict]] Dependencies: ```python def v0(v1: str) -> Tuple[Optional[str], Optional[int], Optional[dict]]: v2 = self._...
Imports: ```python import typing ``` Type definitions: Input Types: datetime Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime) -> List[int]: (v2, v3, v4, v5, v6, v6, v6, v6, v6) = v1.timetuple() return [v2, v3, v4, v5] ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1: List[int] = [] with open('input.txt', 'r') as v2: for v3 in v2: v1.extend([int(s) for v4 in v3.split(',')]) for v5 in range(80)...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0() -> dict: v1 = {'kafka': ['pykafka==2.8.*'], 'couchbase': ['couchbase==2.5.*'], 'postgres': ['sqlalchemy==1.3.*', 'psycopg2==2.8.*'], 'mssql': ['pyodbc==4.0.*', 'sqlal...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: for (v2, v3) in iter(tuple({':aqua;': ':#0ff;', ':blue;': ':#00f;', ':fuchsia;': ':#f0f;', ':yellow;': ':#ff0;'}.items())): v1 = v1.replace(v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> tuple: self.fw('\x08' * len(v1)) self.console.print(f'[white]{v1}[/white]', end='') return (False, '') ```
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[int, int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[int, int]): self.window_resolution = v1 self.ui_window_stack.window_resolution = v1 self.root_container.set_dimensions(v1) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: Union[str, None] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Union[str, None]: v1 = re.match('data:[a-zA-Z]+/[a-zA-Z0-9]+;base64,(?P<contents>.+)', self.contents) return v1 and v1.groupdict()['c...
Imports: ```python import random import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1=settings.SHORT_URL_LENGTH, v2=None, v3=settings.ALPHABET) -> str: if v2: return v2 return ''.join((random.SystemRandom().choice...
Imports: ```python from scipy.optimize import minimize, LinearConstraint from scipy.interpolate import interp1d import pandas as pd import numpy as np import typing ``` Type definitions: Input Types: int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=11, v2: bool=True)...
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 v1.lower().startswith(self._strategies_light): v2 = ':'.join(v1.split(':', 2)[:2]) return len(v2) return v1.find(':') ``...
Imports: ```python import io from matplotlib import figure import matplotlib.pyplot as plt import numpy as np from PIL import Image from matplotlib.animation import FFMpegFileWriter from matplotlib import collections as mc import matplotlib.patches as patches from matplotlib.patches import Circle, Wedge import scipy.st...
Imports: ```python import typing ``` Type definitions: Input Types: int, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: list): if v2[v1] != -1: return v2[v1] if v1 < 2: v2[v1] = 1 else: v2[v1] = self.fib(v1 - 1, v2) + self.fib(v1...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: (float, float) Dependencies: Function Name: v0 Function: ```python def v0(v1: float) -> (float, float): v2 = 0 while v1 >= 10: v2 += 1 v1 /= 10 while v1 < 1: v2 -= 1 v1 *= 10 return (...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self._fetched = True self.related_objects = v1 ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Optional[tf.distribute.InputContext] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[tf.distribute.InputContext]=None): if self._shards: v2 = tf.data.Dataset.from_tens...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame): v2 = self.col_tf.transformers_[0][1].inverse_transform(v1[self.non_nominal_col]) v3 = pd.DataFrame(v2, colum...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str) -> str: v2 = v2.replace('"', '\\"') v2 = v2.replace("'", "\\'") return ' <!-- {} -->\n <string name="{}">{}</...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if v1.startswith('#'): return '' v2 = v1.rsplit('#', 1)[0] if v2.count('"') % 2 == 0 and v2.count("'") % 2 == 0: return v2.st...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: super().read_wire_out(v1) v2 = self._simulated_response_queues['wire_outs'] v3 = v2[v1] v4 = v3.get_nowait() if not isinstance(...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: while True: try: self.queue.put(json.loads(self._read_payload())) except ValueError: break ex...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): v2 = v1['name'] v3 = v1['value'] if v2 == 'cmap_min': self.set_low(v3) elif v2 == 'cmap_mid': self.set_mid(v3) elif ...