text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: str, v4=2): v5 = [] v6 = set() for (v7, v8) in v1.knowledge_graph.edges.items(): if hasattr(v8, 'edge_attributes'): ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): assert v1 > 1 and isinstance(v1, int), 'change "n" to be an integer greater than +1!' self.string = f'{self.string}{{{v1}}}' return self ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[List[str]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[List[str]]: if not isinstance(v1, str): return None return self.cpe_to_cve_ids_lookup.get(v1, None) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._cover_from_content('.mainimg01') if not v1: v1 = self._cover_from_content('.image01 > img', 'data-original') return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any]) -> Tuple: if v1.get('multiValueHeaders'): v2 = {k.lower(): ', '.join(v) if isinstance(v, list) else '' for (v3, v4) in v1.get...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, *v1, **v2) -> None: self.calculate_ticket_price_and_total() super().save(*v1, **v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: AnyStr Dependencies: Function Name: v0 Function: ```python async def v0(self) -> AnyStr: v1 = await self._receive_queue.get() if isinstance(v1, Exception): raise v1 else: return v1 ```
Imports: ```python from contextlib import closing from contextlib import contextmanager import sqlite3 import typing ``` Type definitions: Input Types: str, str Output Type: int Dependencies: ```python def v0(v1: str) -> List[str]: v2 = "--\n SELECT\n name\n FROM\n sqlite_master\n WHERE\n ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str], Optional[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str]=None, v2: Optional[str]=None) -> str: v3 = {} if v1 is not None: v3['encoding'] = v1 if v2 is not Non...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> str: v2 = self._to_send_data() v2['action_type'] = 'ma-type:user-generated-message' v2['sticker_id'] = v1 return await self.sessio...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.csfw_client.get_network_objects_list(filter='nameOrValue:unittest-network-') if v1: [self.csfw_client.delete_network_object(obj.id)...
Imports: ```python import hashlib import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = hashlib.sha256() v2.update(bytes(v1, 'utf8')) return v2.hexdigest() ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str], Optional[str] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: Optional[str]) -> List[str]: v3 = ['@mode/' + v2] if v2 is not None else [] return ['query', '--json', *v3, 'kind("p...
Imports: ```python from configparser import ConfigParser, NoOptionError, NoSectionError import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: ConfigParser, v2: str, v3: str, v4=None) -> str: try: v5 = v1.get(v2, v3) except (NoOptionError, NoSec...
Imports: ```python import typing ``` Type definitions: Input Types: ir.Fun, Any, List, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4): v5 = MangleFun(v1) v6 = len(v1.output_types) if v6 == 0: v7 = '' elif v6 == 1: v7 = f'{v5}_result' else: v7 = f'{v5}_re...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: Optional[Union[Text, List[Text]]] Output Type: Tuple[Set[Text], Set[Text]] Dependencies: ```python def v0(v1: Text) -> bool: v2 = '.*##.+' return re.match(v2, v1) is not None ``` ```python def v3(v4: Text) -> Tuple[Set[Text...
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 elif v2 == 1: if v1 > 2 ** 31 - 1: return 2 ** 31 - 1 elif v1 < -2 *...
Imports: ```python import os import shutil from tqdm import tqdm import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1) -> List[Tuple[str, int]]: v2 = os.path.join(v1, 'GT-final_test.csv') with open(v2, 'r') as v3: v4 = [] for (v5, v6) in e...
Imports: ```python import typing ``` Type definitions: Input Types: str, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='#ffffff', v2: float=1.0): if self.color != v1 or self.opacity != v2: self.color = v1 self.opacity = v2 self.run_command(...
Imports: ```python import typing ``` Type definitions: Input Types: Union[float, int], Union[float, int], Union[float, int] Output Type: Union[float, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[float, int], v2: Union[float, int]=..., v3: Union[float, int]=...) -> Union[float, int]: i...
Imports: ```python import typing ``` Type definitions: ```python v0 = 'Entity' ``` Input Types: v0, List[v0] Output Type: Mapping[str, v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: List[v0]) -> Mapping[str, v0]: v4 = {} for v5 in v3: v6 = v2.attrs.get(v5.type_, v5.type_) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for (v1, v2, v3) in self._items_per_interval(): v3 = self._format_items(v3) print('{} - {} -> {}'.format(v1, v2, v3)) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[int, int, list, set, set] Dependencies: Function Name: v0 Function: ```python def v0() -> Tuple[int, int, list, set, set]: (v1, v2) = (int(x) for v3 in input().split()) v4 = input().split() v5 = set(input().split()) ...
Imports: ```python import typing ``` Type definitions: ```python class v0(dict): def __init__(self, *v1, **v2): super(v0, self).__init__(*v1, **v2) assert _ID in self @staticmethod def v3(v4, v5) -> int: if v4 is None and v5 is None: return 0 elif v4 is None and...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: v2 = v1 v3 = os.path.isdir(v2) if not v3: os.makedirs(v2) print('created folder : ', v2) else: print(...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: bool) -> None: global _UPDATE_TESTS v2 = v1 ```
Imports: ```python import argparse import typing ``` Type definitions: ```python class v0: def __init__(self) -> None: self._names: Set[str] = set() self._shortnames: Dict[str, Set[ParserArgument]] = {} def v1(self, *v2: str) -> None: for v3 in v2: self._names.add(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: List[Tuple[str, int]], List[Tuple[str, int]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[Tuple[str, int]], v2: List[Tuple[str, int]]) -> bool: if len(v1) != len(v2): return False for (v3...
Imports: ```python import socket import ssl import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.socket = socket.socket() self.socket.settimeout(600) if self.use_ssl: self.socket = ssl.wrap_socket(self.so...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> str: v2 = [str(origin['origin_id']) for v3 in v1['origins'] if v3['data_source_id'] == self.data_source.id] if len(v2) > 1: raise Exce...
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: argparse.ArgumentParser Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: argparse.ArgumentParser) -> None: v1.add_argument('animdata_d2', help='AnimData.D2 file to decompile') v1.add_argument('target', help='JS...
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: sc2.unit Dependencies: Function Name: v0 Function: ```python async def v0(self) -> sc2.unit: if len(self.known_enemy_structures) > 0: v1 = random.choice(self.known_enemy_structures) await self.attack_un...
Imports: ```python import ast import os import typing ``` Type definitions: Input Types: Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1, v2=None) -> bool: v3 = os.environ.get(v1, v2) if isinstance(v3, str) and v3: try: return bool(ast.literal_eval(...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[pd.DataFrame] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[pd.DataFrame]) -> None: if v1 is None and self.uses_background_dataset: raise ValueError('a background dataset is requi...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List[models.Model] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List[models.Model]: v2 = list() v3 = self.active_wars() for v4 in v3: if v4.aggressor_id == v1: v2.append...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: Any, Any Output Type: Any Dependencies: ```python def v0(v1: Any, v2: Any) -> list[str]: v3 = [] for (v4, v5) in enumerate(v2): v6 = v1[v4] if not v6: v3.append(v6) continue v7 = ...
Imports: ```python from itertools import chain, combinations import pandas as pd import typing ``` Type definitions: Input Types: list, list Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list) -> pd.DataFrame: v3 = [] v4 = combinations(v1, 2) for v5 in ...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str) -> None: if v1 not in self._marked: self.total_curated += 1 if v2 not in {'correct', 'incorrect', 'unsure'}: raise V...
Imports: ```python from torch.functional import Tensor import torch from torch.utils import data from torch.utils.data import TensorDataset, Dataset, DataLoader, Subset from torch.utils.data import random_split from torch.utils.data.dataset import ConcatDataset import typing ``` Type definitions: Input Types: Dataset,...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False) -> None: v1 = self._resolve_workspace_dir(v1) self.workspace_manager.delete_workspace(v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self) -> tuple: v1: tuple = self.__controller.position return v1 ```
Imports: ```python import math import typing ``` Type definitions: Input Types: pd.DataFrame, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: float=0.3, v3: float=0.85) -> Any: v4 = v1.copy(deep=True) v1 = v1[(v1.precision >= v2) & (v1.recall >= v...
Imports: ```python import typing ``` Type definitions: Input Types: str, datetime.datetime Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: datetime.datetime): assert v2.tzinfo is not None if v1 in self.records: self.records[v1].append(v2) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: self.currentIndex -= v1 self.currentIndex = 0 if self.currentIndex < 0 else self.currentIndex return self.history[self.currentIndex] ``...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1): self.source = v1 self.msgs: List[couchbaseConstants.BATCH_MSG] = [] self.bytes: int = 0 self.adjust_size: int = 0 def v2(self, v3: couchbaseConstants.BATCH_MSG, v4: int): ...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: List[str], List[float] Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: List[float]) -> List[str]: v3: List[List[str]] = [[f'{field}^{weight}' for v4 in v2] for v5 in v1] re...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: assert v1 in os.environ, f'{v1} should be set in the environ' return os.environ[v1] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str) -> None: v4 = f'{v1}/{v2}.{v3}' self.live[v4] = True ```
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray=None): self.source_equals_target = v2 is None if self.source_equals_target: self.source_index = se...
Imports: ```python import numpy as np from scipy.sparse import vstack from scipy.sparse import csr_matrix from sklearn.linear_model import LogisticRegression import typing ``` Type definitions: Input Types: Tuple[Union[csr_matrix, List]], Tuple[str] Output Type: None Dependencies: Function Name: v0 Function: ```pytho...
Imports: ```python import typing ``` Type definitions: Input Types: Any, np.ndarray, Dict[str, Any] Output Type: List[Tuple[int, int]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: np.ndarray, v3: Dict[str, Any]) -> List[Tuple[int, int]]: v4 = dict(checks=v3['flann_checks']) (v5, v6)...
Imports: ```python import typing ``` Type definitions: Input Types: Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor): for v2 in self._stats: v2.update(v1) ```
Imports: ```python import urllib import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v1 = v1.encode('utf-8') return urllib.parse.quote(v1) ```
Imports: ```python import random import os import linecache import typing ``` Type definitions: Input Types: str, int Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> Tuple[str, str]: v3 = os.listdir(v1) v4 = v2 v5 = v3[v4] v6 = os.path...
Imports: ```python import typing ``` Type definitions: ```python class v0(Generic[_T], AbstractDocumentQuery[_T]): def __init__(self, v1: Type[_T], v2: InMemoryDocumentSessionOperations, v3: str, v4: str, v5: bool, v6: List[DeclareToken]=None, v7: List[LoadToken]=None, v8: str=None, v9: bool=None): super()...
Imports: ```python import datetime import os import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list: v2 = [] for v3 in os.listdir(v1): v4 = os.path.join(v1, v3) if os.path.isfile(v4): v5 = o...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=None): v2 = self.control.get_price(v1) if float(v2) > 0: return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, **v2): v3 = self.autoencoder['encoder'](v1, **v2) v4 = self.autoencoder['decoder'](v3) v5 = self.classifier(v3) return v5 ```
Imports: ```python import typing ``` Type definitions: Input Types: T.Union[str, T.List[str]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: T.Union[str, T.List[str]]) -> bool: if not v1: return False if isinstance(v1, list): v2 = v1[0] else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: """ Do not return anything, modify matrix in-place instead. """ v2 = len(v1) if not v2: return [] v3 = len(v1[...
Imports: ```python import geopandas import pandas import typing ``` Type definitions: Input Types: geopandas.GeoDataFrame, geopandas.GeoDataFrame, int Output Type: geopandas.GeoDataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: geopandas.GeoDataFrame, v2: geopandas.GeoDataFrame, v3: int) -> geop...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = deepcopy(self.bombs) for v2 in range(1, self.rows + 1): for v3 in range(1, self.cols + 1): if v1[v...
Imports: ```python import os import glob import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import tensorflow.keras.layers.experimental.preprocessing as preprocessing import tensorflow.keras.layers as layers import typing ``` Type definitions: Input Types: str Output Type: tf.data...
Imports: ```python import json import requests import typing ``` Type definitions: Input Types: Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> dict: v2 = f'{self.original_url}/api/user/checkin' v3 = f'{self.original_url}/console/checkin' v4 = {'token': 'glado...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedObj): def __init__(self, v1: Network, v2: str, v3: str): super().__init__(v2) self._network: Network = v1 self._vlink: VirtualLink = None self._frame: Frame = None self._host_node: Node = v1[v3] ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int, dict Output Type: int Dependencies: ```python def v0(v1): v2 = 256 * 256 * 256 v3 = v1 % v2 if v3 < 32768: v3 *= 256 v4 = v3 * pow(2, 8 * (v1 // v2 - 3)) return v4 ``` Function Name: v5 Function: ```python de...
Imports: ```python import typing ``` Type definitions: ```python class v0(Enum): v1 = 0 v2 = 1 ``` Input Types: v0 Output Type: nn.ModuleDict Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0) -> nn.ModuleDict: v5 = self._compression_module_type_to_attr_name(v4) if v4 not in self....
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0 Output Type: None Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: v0) -> None: if self._latest == v2: return self._latest = v2 await self._observer.asend(v2) ```
Imports: ```python from dataclasses import dataclass, field import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '_' if self.new_field_prefix.endswith('_') else '' for v2 in self.fields: if v2.known or not v2...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> list: v2 = [] for v3 in v1: if self._if_analyze: self._vocabs[v3] += 1 v2.append(0) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = [r.split(' = ') for v3 in v1.split('\n')] v4 = {} (v5, v6) = ('skip', None) for (v7, v8) in v2: if v7 == 'mask': v4[v5]...
Imports: ```python import os import json import typing ``` Type definitions: Input Types: str, str, list Output Type: int Dependencies: ```python def v0(): if not os.path.exists('data'): os.makedirs('data') if not os.path.exists('data/json'): os.makedirs('data/json') if not os.path.exists('...
Imports: ```python import typing ``` Type definitions: Input Types: float, Optional[List[str]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: Optional[List[str]]=None) -> None: if v2: for v3 in v2: self.name_mapping[v3].update_animation(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: if self.current_size >= self.maxsize: return False self.queue.appendleft(v1) self.current_size += 1 return True ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Mapping[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str=',') -> Mapping[str, str]: v3: Mapping[str, str] = {} with open(v1, 'a+') as v4: v4.seek(0) for v5 in v4: ...
Imports: ```python import typing ``` Type definitions: Input Types: 'User' Output Type: dict Dependencies: ```python def v0(v1: RoleAssignmentDomain) -> list: v2 = getattr(beer_garden.db.mongo.models, v1.scope) v3 = v2.objects.filter(**v1.identifiers) return [str(object_id) for v4 in v3.values_list('id')] ...
Imports: ```python import math import numpy as np import typing ``` Type definitions: Input Types: List[List[float]], int, int Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: ```python def v0(v1: int) -> Optional[Tuple[np.ndarray, np.ndarray]]: if math.floor(math.sqrt(v1)) ** 2 != v1: print('order...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._enum_all_paths.cache_clear() self._enum_allowed_paths.cache_clear() self.get_d_matrix.cache_clear() ```
Imports: ```python import copy import typing ``` Type definitions: Input Types: int, str, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, v3: Any) -> None: with self._lock: v4 = self._get_cached_trial(v1) if v4 is not None: self....
Imports: ```python from statistics import median import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = (self.check_line(line) for v2 in self.lines) return median((self.autocomplete_score(output.missing_chars) for v3 in ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: str Dependencies: ```python def v0() -> str: v1 = os.path.abspath('../') if v1.split('/')[-1] != 'src': v1 = os.path.abspath(os.path.join('.', 'src')) return v1 ``` Function Name: v2 Function: ```python def ...
Imports: ```python import typing ``` Type definitions: Input Types: str, AsyncIterator[bytes] Output Type: str Dependencies: ```python async def v0(v1: AsyncIterator[bytes]) -> AsyncIterator[bytes]: v2: bytes = b'' async for v3 in v1: v2 += v3 if len(v2) >= _MIN_PART_SIZE: yield v2 ...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseReport, shorthand='BR', file_type='yaml'): def __init__(self, v1: Path) -> None: super().__init__(v1) with open(v1, 'r') as v2: v3 = yaml.load_all(v2, Loader=yaml.CLoader) v4 = VersionHeader(next(v...
Imports: ```python from urllib.request import urlopen, urlretrieve from urllib.parse import urlparse from traceback import print_exc import json import sys import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: ```python def v0(v1: str): return f'https://dev.azure.com/yuliu20...
Imports: ```python import os import shutil import tempfile import typing ``` Type definitions: Input Types: str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str='argoverse_tracking') -> None: if not os.path.exists(v2): os.makedirs(v2) v4 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: with self.lock: with v1.lock: self.stats.update(v1.stats) ```
Imports: ```python import sqlite3 import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = 'select COUNT(*) from TEST_METRICS where SESSION_H = ?;' try: v3 = self.__cnx.execute(v2, (v1,)).fetchone() ...
Imports: ```python import typing ``` Type definitions: Input Types: xr.DataArray Output Type: xr.DataArray Dependencies: ```python def v0(v1: xr.DataArray) -> xr.DataArray: for v2 in attributes_to_clear: v1.attrs.pop(v2, None) v1.encoding.pop('grid_mapping', None) return v1 ``` Function Name: v3 Fu...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], List[str], List[str], List[str] Output Type: List[Dict] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: List[str], v3: List[str], v4: List[str]) -> List[Dict]: v5 = [] for (v6, v7, v8, v9) in zip(v1, v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = v1.lower() if v1.endswith('logger'): v1 = v1[:-6] return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: v2 = v1.split('-') (v3, v4, v5) = (int(v2[0]), int(v2[1]), int(v2[2])) v6 = v3 % 4 == 0 and v3 % 100 != 0 or v3 % 400 == 0 v7 = [31...
Imports: ```python import logging import typing ``` Type definitions: Input Types: pathlib.Path Output Type: Tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pathlib.Path) -> Tuple[int, int]: (v2, v3) = (0, 0) for v4 in v1.rglob('*'): if v4.is_dir(): v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.get_system() v2 = self.get_uptime() v3 = self.get_cpu_data() v4 = self.get_ram_data() v5 = self.get_disk_data() return f'{v1}...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[Number, List[str], Dict[str, str]] ``` Input Types: Any, Any Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2, v3) -> v0: v4 = '{}_avg_query_requests'.format(self.test_config.name) v5 = 'Avg. Query Th...
Imports: ```python import typing ``` Type definitions: Input Types: SupportsIndex, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: SupportsIndex, v2) -> None: v2 = self._check_value(v2) return list.insert(v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3=None, v4=None): print(f'role: {v1}, command: {v2}, key: {v3}, value: {v4}') if v2 == 'Get': return self.__getEnv...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> List[Any]: v2 = self.trainer.lightning_module.truncated_bptt_steps if v2 == 0: return [v1] v3 = self.trainer.lightning_module ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = super().as_dict() if self.name: v1['name'] = self.name if self.value: v1['value'] = self.value if self.strand: v...
Imports: ```python 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 = v1.split() v3 = ['' for v4 in range(len(max(v2, key=len)))] for v5 in range(len(v2)): v6 = 0 for v7 in...