text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> bytes: v2 = v1.bit_length() v3 = v2 // 8 + 1 v4 = v1.to_bytes(v3, byteorder='big') v5 = len(v4).to_bytes(1, byteorder='big') return b'\x...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(*, v1: str='', v2: str) -> None: v3 = self._parse(flags=v1) assert v3.for_global_scope().implicit_valuey == v2 ``` Function Name: v4 Function: ```python def v4(self) -> None: def v5(*, v6:...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): if not v1 and (not v2): return 1.0 if not v1: return 0.0 if not v2: return 0.0 return self.compute_s...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = datetime.datetime.now() v3 = datetime.datetime.strftime(v2, '%Y-%m-%d %H:%M:%S') print('[消息] %s : %s' % (v3, v1)) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, **v2: Any) -> None: if 'klass' in v2: v2['class'] = v2['klass'] del v2['klass'] v3 = {v1: v2} self.make_request('post', self.u...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[str] Output Type: Set[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable[str]) -> Set[str]: v2 = set() for v3 in v1: if v3.endswith('/'): v3 += 'index.html' v2.add(v3.lstrip('/'))...
Imports: ```python import typing ``` Type definitions: Input Types: Text Output Type: Any Dependencies: ```python def v0(cls: Type[Any]): def v1(*v2, **v3): """This is the function that the user calls.""" def v4(v5: types.TensorTypeMaybeDict, v6: types.TensorTypeMaybeDict, v7: types.TensorTypeMay...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: str): if self.caption is not None or self.label is not None: if self.caption is None: v3 = '' else: v3 = '\...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Union[np.ndarray, pd.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> Union[np.ndarray, pd.DataFrame]: self.ensure_has_executed() ...
Imports: ```python import typing ``` Type definitions: Input Types: bytearray, bytearray, int Output Type: bytearray Dependencies: ```python def v0(v1: int, v2: int, v3: int) -> int: return (v1 + v2) % v3 ``` Function Name: v4 Function: ```python def v4(v5: bytearray, v6: bytearray, v7: int) -> bytearray: v8 =...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[List], int, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[List], v2: int, v3=None): try: return v1[v2] except (TypeError, IndexError): return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[int], Optional[str], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool] Output Type: Awaitable[Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[int]=None, v3: Optio...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> str: if len(v1) == 1: return 'UNSET {}'.format(list(v1)[0]) return 'UNSET {{{}}}'.format(', '.join(('{}'.format(key) for v2 in v1)...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1) -> bool: for v2 in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]: if str(v2) in v1: return False return True ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: Any): if self.scope is None: raise ValueError("Can't access variables on unbound modules") return self.scope.put_var...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self.youtube.channels().list(part='snippet', forUsername=self.username) v2 = v1.execute() return v2 ```
Imports: ```python from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA import typing ``` Type definitions: Input Types: np.ndarray, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: int) -> np.ndarray: v1 = StandardScaler(...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, str, str, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: str, v4: str, v5: float=10): v6 = v1.produce(topic=v2, key=v3, value=v4) v1.flush(v5) return v6 ```
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]: if v1 == 'temperature': return ['°C', '0C'] elif v1 == 'irradiance': return ['kW/m²', 'kW/m2'] elif v1 == 'wind s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[Tensor], List[Tensor], Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Tensor], v2: List[Tensor], v3: Callable): v4 = len(v1) v5 = len(v1[0]) v6 = np.ndarray((v4, v5)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = self.root for v3 in v1: v2 = v2.children[v3] if not v2: return False if v2.is_word: retur...
Imports: ```python import typing ``` Type definitions: Input Types: bytes, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bytes, v2: int): assert isinstance(self.format_code, int), self.format_code if self.thermal == 0: v3 = self._read_oes1_loads(v1, v2) ...
Imports: ```python import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as functional import numpy as np import typing ``` Type definitions: Input Types: List[Tensor], List[Tensor], Any Output Type: List[Tuple[float, int]] Dependencies: Function Name: v0 Function: ```python def v0(v1...
Imports: ```python import argparse import typing ``` Type definitions: ```python class v0(PlotWindow): def __init__(self, v1: Flowchart, v2: Optional[QtWidgets.QMainWindow]=None, v3: bool=False, v4: Union[float, None]=None, v5: Optional[str]=None, **v6: Any): super().__init__(v2, fc=v1, **v6) self....
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, *v2: Any) -> None: for v3 in v2: self.add_component(v1, v3) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.val = v1 self.next = None ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0) -> v0: if v3 is None: return None else: ...
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 = len(v1) if v2 < 2: return 0 v3 = [0 for v4 in range(v2)] v5 = v1[0] for v6 in range(1, v2): v3...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> bool: if not hasattr(self, 'validation'): raise ValueError('Please call transform() first') v2 = v1.groupby(['fiscal_...
Imports: ```python import os import tempfile import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: if os.name == 'nt': return tempfile.mkdtemp() else: return f'ram://{tempfile.mkdtemp()}' ```
Imports: ```python import typing ``` Type definitions: ```python class v0(enum.Enum): v1 = 1 v2 = 2 v3 = 3 ``` Input Types: v0 Output Type: int Dependencies: Function Name: v4 Function: ```python def v4(self, v5: v0) -> int: if self.stacks[v5.name].size == 0: raise IndexError('Stack is empty') ...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Path): if not v1.is_dir(): v1.mkdir(mode=448, parents=True) ```
Imports: ```python import typing ``` Type definitions: Input Types: elffile.ELFFile Output Type: Any Dependencies: ```python def v0(v1: elffile.ELFFile): for v2 in v1.iter_sections(): if isinstance(v2, elffile.SymbolTableSection): yield v2 ``` Function Name: v3 Function: ```python def v3(v4: el...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: np.intp Dependencies: Function Name: v0 Function: ```python def v0(self) -> np.intp: if self.__rank_cache is None: if self.__rank is not None: self.__rank_cache = self.__rank() else: ...
Imports: ```python import random import colorsys import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: v2 = [(x / 80, 1.0, 1.0) for v3 in range(80)] v4 = list(map(lambda x: colorsys.hsv_to_rgb(*v3), v2)) v4 = l...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = '\n "/foo/{bar}":\n post:\n parameters:\n - name: bar\n in: path\n ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[date] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[date]=None) -> bool: self.source = None if not v1 or v1 == self.raw: return False self.raw = v1 self....
Imports: ```python import typing ``` Type definitions: Input Types: int, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str, v3: str='PAPI_thread_id()'): v4 = self.perf_counter_string() return 'dace::perf::{counter_str} __perf_{id};\nauto& __vs_{id} = _...
Imports: ```python from base64 import b64encode import json import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._get_session() v1 = b64encode(self.username.encode('utf-8')) v2 = b64encode(self.password.encode('u...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2=None): v3 = v1.ravel() v4 = list(np.where(np.less(v3, np.roll(v3, 1)))[0]) if len(v4) == 2: (v...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): for (v2, v3, v4) in os.walk(v1): v3[:] = [d for v5 in v3 if not v5[0] == '.'] v4 = [f for v6 in v4 if not v6[0] == '.' and v6.ends...
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: if v2: self.headers['ETag'] = f'W/"{v1}"' else: self.headers['ETag'] = f'"{v1}"' ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any]): if v1['offset'] >= self.max_len: self.cur_idx = 0 else: self.cur_idx = v1['offset'] ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: if os.path.exists(v1 + '_flag'): return True else: return False ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = subprocess.run([self._apxs, '-q', v1], capture_output=True, text=True) if v2.returncode != 0: return '' ...
Imports: ```python import numpy as np import numpy.linalg import typing ``` Type definitions: Input Types: List[str] Output Type: Tuple[np.ndarray, dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> Tuple[np.ndarray, dict]: v2 = self.analysis_object.normalized_name v3 = s...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=1 / 60): if self._is_hit: if self._red_color_ticks >= self._red_color_duration: self._is_hit = False self.color = (2...
Imports: ```python import torch import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): self.PATH_IOU_DEFAULT = self.PATH_IOU_DEFAULT.replace('<TRACKER>', v1).replace('<NUMBER>', v2) self.PATH_IOU_BORDER = s...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None) -> dict: if self.zoho_user_cache is None: v1 = 'AllUsers' or v1 v2 = self.base_url + f'users?type={v1}' v3 = {'Authorizat...
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 = self.get_running_tasks(v1) v3 = 0 print(v2) for v4 in v2['resources']: v3 += v4['memory_in_mb'] return v3 ```
Imports: ```python from multiprocessing import Pool, cpu_count import math from tqdm.auto import tqdm import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int, int, int, int Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: int, v4: int, v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: float) -> None: with self._lock: v4 = (v1, v2) if v4 in self._visual_map: self._visual_map[v4].tr...
Imports: ```python import os import pandas as pd import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str): v3 = os.path.split(v2)[-1] return pd.DataFrame(data={'publications': v1, 'domain': len(v1) * [v3]}) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2=None, v3=None): self.left = v2 self.right = v3 self.data = v1 ``` Input Types: v0 Output Type: bool Dependencies: Function Name: v4 Function: ```python def v4(v5: v0) -> bool: if v5 is ...
Imports: ```python import math import typing ``` Type definitions: Input Types: List[List[int]], int Output Type: List[List[int]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[int]], v2: int) -> List[List[int]]: v3 = {} v4 = 0 for v5 in v1: v6 = round(math.sqrt(v5[0] ** ...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0(object): v1: Path def v2(self) -> int: return self.path.__hash__() ``` Input Types: v0 Output Type: str Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0) -> str: if self.use_hash: re...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: if len(v1['notes']) > 0: v1['link'] = v1['link'] + ' Bundle' v1['notes'] = 'Bundle includes: ' + ', '.join(v1['notes']) else:...
Imports: ```python import typing ``` Type definitions: Input Types: ShExJ.ShapeDecl Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ShExJ.ShapeDecl) -> List[str]: v2 = [] if v1.abstract: v2.append('ABSTRACT') v2.append(self.shapeExprLabel(v1.id)) if ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int=1000): v2 = np.linspace(0, v1 - 1, v1) v3 = np.pi * (3.0 - np.sqrt(5.0)) v4 = 1 - v2 / float(v1 - 1) * 2 v5 = np.sqrt(1 - v4 * ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = open(self.setup_file_path).read() v1 = self._remove_outdated_classifiers(v1) v1 = self._add_new_classifiers(v1) self._write_data_to_file...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, dict, int Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: dict, v3: int) -> dict: v4 = [] v5 = len(v1) for v6 in range(v3): v7 = v1[v1['label'] == v6] v4.app...
Imports: ```python import os import typing ``` Type definitions: Input Types: Path Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> bool: if v1.is_dir(): try: os.listdir(v1) except OSError: return False else: try: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: await self._credential.refresh(self._request) self._token = self._credential.token ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame): if len(v1) == 1: v2 = 'Er is 1 nieuwe excursie!' else: v2 = f'Er zijn {len(v1)} nieuwe excursies!' v3 = '' ...
Imports: ```python import os import subprocess import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = [self._get_hugo_bin()] v2 += ['--destination', os.path.abspath(v1)] subprocess.check_call(v2, cwd=se...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Tuple[float, float], int Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[float, float], v2: int) -> Tuple: (v3, v4) = v1 v5 = 6371 v6 = v2 / (1000 * v5) * (180 / np.pi) v7 = v...
Imports: ```python import numpy as np import torch import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: (v1, v2) = (0, np.zeros(self.env.n_envs)) v3 = [] v4 = self.env.reset() while True: if self.off_polic...
Imports: ```python import typing ``` Type definitions: Input Types: List[Dict[str, Dict[str, Any]]], str Output Type: Dict[str, List[Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Dict[str, Dict[str, Any]]], v2: str) -> Dict[str, List[Any]]: v3 = {} for v4 in v1: if v2 not i...
Imports: ```python import typing ``` Type definitions: Input Types: npt.NDArray[float] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: npt.NDArray[float], **v2: Any) -> int: v3 = self.src.meta.copy() v4 = v3['count'] + 1 with self.modifying_raster(count=v4) as v5: ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Exception] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Exception]=None) -> None: self._log.debug('song end') if not self._loop.is_closed(): self._loop.call_soon_threadsafe(s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[Any] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[Any]) -> None: if self.config.USE_YOLO: ((v2, v3, v4, v5), v6) = self.yolo_trainer.validation_epoch_end() v7 ...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[], bool] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable[[], bool]) -> None: v2 = v1() if v2: self.root.after_idle(lambda : self.start_worker(v1)) ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: int, argparse.Namespace Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: argparse.Namespace) -> None: v1 = v1 - 10 * v2.verbose + 10 * v2.quiet logging.basicConfig(level=v1) logging....
Imports: ```python import json import pathlib import traceback import typing ``` Type definitions: Input Types: argparse.Namespace Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: argparse.Namespace) -> int: try: v2 = pathlib.Path(v1.directory) for v3 in v2.glo...
Imports: ```python import typing ``` Type definitions: Input Types: List[Tuple[int, str, object]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Tuple[int, str, object]]): nonlocal warns v2 = v1 ```
Imports: ```python from itertools import chain import typing ``` Type definitions: Input Types: Optional[Union[type, str]] Output Type: dict[str, Any] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Optional[Union[type, str]]=None, **v2) -> dict[str, Any]: v3 = self._parse_multi_dict(ch...
Imports: ```python import plistlib import typing ``` Type definitions: ```python v0 = Union[str, Tag] ``` ```python @dataclass(frozen=True) class v1: v2: str v3: Color = field(default=Color.NONE, compare=False) def v4(self) -> str: return f'{self.name}\n{self.color}' @classmethod def v5(se...
Imports: ```python import typing ``` Type definitions: Input Types: List Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List) -> int: v2 = v1[0].col v3 = v1[0].col v4 = v1[0].row for v5 in v1: if v4 != v5.row: break v3 = v5.col ret...
Imports: ```python import typing ``` Type definitions: Input Types: list[int] Output Type: list[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[int]) -> list[int]: v2 = -1 for (v3, v4) in reversed(list(enumerate(v1))): v1[v3] = v2 v2 = max(v2, v4) return v1 `...
Imports: ```python import json import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2=lambda x: x): with open(v1, 'r') as v3: v4 = v3.read() if v2: v4 = v2(v4) return json.loads(v4) ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: ```python def v0() -> int: return ATOM_FDIM + EXTRA_ATOM_FDIM ``` ```python def v1(v2: bool=False) -> int: return BOND_FDIM + (not v2) * v0() ``` Function Name: v3 Function: ```python def v3(self, v4: bool=F...
Imports: ```python import tensorflow as tf from tensorflow.keras.optimizers import Adam, Optimizer from tensorflow.compat.v1.train import get_global_step import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3) -> float: ...
Imports: ```python from datetime import datetime import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = datetime.now() v3 = v2.strftime('%H:%M:%S') v4 = '{0}: {1}'.format(v3, v1) self.log += v4 + '\n' if...
Imports: ```python from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast import typing ``` Type definitions: Input Types: Output Type: int Dependencies: ```python def v0(v1: LoggingTransaction) -> int: v1.execute('SELECT COUNT(*) AS users FROM users where user_type is null') v2 = sel...
Imports: ```python import typing ``` Type definitions: Input Types: 'TreeNode' Output Type: 'TreeNode' Dependencies: ```python def v0(v1): if not v1: return None if v1.left: v2 = v0(v1.left) while v2.right: v2 = v2.right v2.right = v1 v1.left = v2 if v1.r...
Imports: ```python from torch import Tensor import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Tensor): v2 = v1.size(1) v3 = (torch.triu(torch.ones(v2, v2)) =...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: Generator Dependencies: ```python def v0(v1: Iterable) -> bool: return len(set(v1)) <= 1 ``` Function Name: v2 Function: ```python def v2(*v3: Tuple[Array]) -> Generator: assert v0((a.shape for v4 in v3)), 'Arr...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: int v2: float v3: float v4: int v5: int v6: np.int32 v7: int ``` Input Types: w.AgentWrapper, Any, Any, Any, Any, v0 Output Type: Any Dependencies: Function Name: v8 Function: ```python def v8(self, v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self.get_num_of_internal_links() + self.get_num_of_external_links() assert v1 == len(self._soup.find_all('a')) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: while '//' in v1: v1 = v1.replace('//', '/') return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[Any] Output Type: Union[Tuple[Any], None] Dependencies: ```python def v0(v1: Iterable) -> Iterator: if isinstance(v1, dict): return iter(v1.items()) return iter(v1) ``` Function Name: v2 Function: ```python def v2(v3: Iterable...
Imports: ```python import typing ``` Type definitions: Input Types: list, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2): v3 = '' v4 = None for (v5, v6) in enumerate(v1): if v6['step'] == v2: v4 = v6['val'] elif v6['step'] > v2: ...
Imports: ```python import os from datetime import datetime import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = None if self._no_prefix: v2 = os.path.abspath(v1) else: v3 = datetime.now(...
Imports: ```python import typing ``` Type definitions: Input Types: Path, str, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path, v2: str, v3: int) -> None: v1 = str(v1).lower() self._conn.execute(f"REPLACE INTO hash VALUES ('{v1}', '{v2}', {v3})") ```
Imports: ```python import typing ``` Type definitions: ```python v0 = list[Point] ``` Input Types: v0 Output Type: bool Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> bool: assert len(v2) == 2 return v2[0][0] != v2[1][0] and v2[0][1] != v2[1][1] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2, v3, **v4): if not self.owner: self.owner = v1 if not getattr(self, 'starttime', None): self.starttime = v3 v5 = s...
Imports: ```python import ast import inspect import marshal import textwrap import typing ``` Type definitions: ```python class v0(abc.ABC): @abc.abstractproperty def v1(self) -> base.WorkerBase: ... ``` Input Types: bool Output Type: typing.Callable[..., typing.Any] Dependencies: ```python @functools....
Imports: ```python from random import sample, randrange, random import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): for v2 in v1: v3 = random() < self.mutation_rate if v3: v4 = len(v2.chromos...
Imports: ```python import typing ``` Type definitions: Input Types: nx.DiGraph Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: nx.DiGraph): v2 = [] for v3 in v1.edges: v2.append(v3) v2.append(tuple(reversed(v3))) v1.add_edges_from(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._root_id = 0 self._objects.clear() self._library_map.clear() self._reference_parents.clear() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Optional[str], int Output Type: Any Dependencies: ```python def v0(v1: int) -> str: v2 = '0123456789abcdef' v3 = len(v2) return v2[v1 % v3] + v0(v1 // v3) if v1 > 2 * v3 else '' ``` Function Name: v4 Function: ```python def ...