text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[str], str] Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(*v2: str, v1: Callable[[str], str]) -> Iterator[str]: for v3 in v2: yield v1(v3) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Any, bool Output Type: Any Dependencies: ```python def v0(v1, v2=0.65, v3=100): v4 = 78 / (v2 * v3) * np.power(2.0, v1) return np.clip(1.0 / v4, 1e-07, None) ``` Function Name: v5 Function: ```python def v5(v6: n...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int=0, v2: int=0): self.key: int = v1 self.val: int = v2 self.freq: int = 0 self.pre: Optional[v0] = None self.next: Optional[v0] = None ``` Input Types: Optional[v0] Output Typ...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self._cwd = str(Path(self._cwd).joinpath(v1).resolve()) if self._context.auto_cd: self._vim.command('sil...
Imports: ```python from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense from tensorflow.keras.losses import MeanSquaredError, CategoricalCrossentropy from tensorflow.keras.metrics import RootMeanSquaredError from tensorflow.keras.models import Sequential from tensorflow.keras.optimizers import Adam ...
Imports: ```python import hashlib import hmac import typing ``` Type definitions: Input Types: Union[str, bytes, bytearray, memoryview], bytes Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, bytes, bytearray, memoryview], v2: bytes=b'') -> str: if isinstance(v1, str): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: self._display('grade') return self.score ```
Imports: ```python import cv2 as cv import typing ``` Type definitions: Input Types: np.array Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array): (v2, v3) = v1.shape[:2] (v4, v5) = cv.getOptimalNewCameraMatrix(self.camera_parameters['mtx'], self.camera_parameters['...
Imports: ```python import typing ``` Type definitions: Input Types: Any, torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: torch.Tensor): v3 = self.compute_convolution_result_and_apply_mask(v1, v2) return self.split_convolution_result_subtensor_into_output_...
Imports: ```python import typing ``` Type definitions: Input Types: discord.AutocompleteContext Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: discord.AutocompleteContext): v2 = self.cg.get_symbols() return [s for v3 in v2 if v3.startswith(v1.value.upper())] ```
Imports: ```python import math import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if not self.n_gram_frequencies: return 1 for (v1, v2) in self.n_gram_frequencies.items(): v3 = 0 for v4 in self.n_g...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any, Optional[str], Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3: Optional[str]=None, v4=True, *v5, **v6): if v3 is not None: v1.drawIntoFile(v2, os.path.abspath(v3)) return v7 = v1.drawIntoByte...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[Dict[str, Any], List[Dict[str, Any]]] ``` Input Types: str, Optional[v0], Optional[v0] Output Type: Any Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: str, v3: Optional[v0]=None, v4: Optional[v0]=None) -> Any: a...
Imports: ```python import typing ``` Type definitions: Input Types: Text Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Text, **v2: Any) -> None: if self.thread_id: await self.client.chat_postMessage(channel=v1, **v2, thread_ts=self.thread_id) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, None or str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: None or str) -> str: while True: if v3 is not None: v1 += f' [default: {v3}]' v4 = input(v1).strip() ...
Imports: ```python from operator import gt, lt import typing ``` Type definitions: ```python v0 = collections.namedtuple('CallbackEnv', ['model', 'params', 'iteration', 'begin_iteration', 'end_iteration', 'evaluation_result_list']) ``` Input Types: Output Type: Callable Dependencies: ```python def v1(v2: v0) -> None: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, int, Optional[int] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: Optional[int]=None) -> dict: v4 = self.dataset.scenes[v1]['frame_index_interval'] v5 = self.da...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, str Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> Path: v3 = Path(v1).name return Path(v2).joinpath(v3) ```
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = TypeVar('PredtT', bound=np.ndarray) ``` ```python v1 = Any ``` Input Types: v1, Optional[int], bool, Optional[v1], Optional[Tuple[int, int]] Output Type: np.ndarray Dependencies: ```python def v2(v3: int, v4: v0, v5: Callable) -> v...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: float = 120 v2: float = 1 v3: float = 33000 v4: float = 16500 v5: float = 0.001 v6: float = 1.8 v7: float = 0 def v8(self) -> float: return self.m - self.n def v9(self) -> bool: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: self.text = self._build_input(v1) self._translate(0) self._wide(0) return self._output() ```
Imports: ```python import json import typing ``` Type definitions: Input Types: ET.ElementTree, str Output Type: List Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ET.ElementTree, v2: str) -> List: with open(v2) as v3: v4 = json.load(v3) v5 = self.parse_tree(v1, v4) v6 = {} ...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], int Output Type: Tuple[List[str], int] Dependencies: ```python def v0(v1) -> bool: return not v1.strip() ``` Function Name: v2 Function: ```python def v2(self, v3: List[str], v4: int) -> Tuple[List[str], int]: if v4 >= len(v3): ...
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: v2 = os.path.basename(v1) return v2.split('.')[1] ```
Imports: ```python from re import findall, DOTALL, VERBOSE, escape, compile, MULTILINE import typing ``` Type definitions: Input Types: str, str, str, int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='e', v3: str='\\r\\n\\x1b\\[4maggressor\\x1b\\[0m>', v4: in...
Imports: ```python import typing ``` Type definitions: Input Types: Any, '依第幾個attri切割', '劃分特徵的值', Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: '依第幾個attri切割', v3: '劃分特徵的值', v4='L'): v5 = [] v6 = [] if v4 == 'L': for v6 in v1: if float(v6[...
Imports: ```python import typing ``` Type definitions: Input Types: dict, dict Output Type: str Dependencies: ```python def v0(v1: dict, v2: list): for v3 in v2: if isinstance(v1, dict): v1 = v1.get(v3, '') else: return '' return v1 ``` Function Name: v4 Function: ```pyt...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, List[int], List[List[int]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: List[int], v4: List[List[int]]): if len(v2) - 1 in v3: v4.append(v3) return for v5 in v2[v1]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, int Output Type: List[str] Dependencies: ```python def v0(v1: Any, v2: Any, v3: str, v4: str, v5: int) -> List[str]: if v3 in v1 and v3 not in v2: return [remove(f'Removed {v4}: {v1[v3]} -> None', v5)] elif v3 in v2 and v3 no...
Imports: ```python import os import typing ``` Type definitions: Input Types: Text Output Type: Text Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Text) -> Text: v2 = os.path.basename(v1) with open(v1, 'rb') as v3: self.s3_client.upload_fileobj(v3, self.bucket_name, v2) retu...
Imports: ```python from subprocess import call, PIPE, Popen, check_output, CalledProcessError import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = Popen(v1, shell=True, stdout=PIPE, stderr=PIPE, encoding='utf8') while v...
Imports: ```python import operator as op import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, Any Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2=None) -> pd.Series: if v2 is None: v3 = v1.index else: v3 = v1[...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1): return v1 ``` Function Name: v2 Function: ```python def v2(self, v3: str): v4 = self.__df_doc.select(v3).collect() v5 = self.__spark.sparkContext.parallelize([(self.__file_name, v4)]...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> str: if self.level <= v1 or self.isroot: return self.name return '/'.join([self.parent.get_name(v1), self.name]) ```
Imports: ```python import warnings import typing ``` Type definitions: ```python class v0(DataWithCoords, DatasetArithmetic, Mapping): v1: dict[Hashable, Any] | None v2: dict[str, Any] v3: set[Hashable] v4: dict[Hashable, int] v5: dict[Hashable, Any] | None v6: Callable[[], None] | None v7: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.link = v1 self.draw_labels() ```
Imports: ```python import typing ``` Type definitions: Input Types: list, str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: str) -> list: if len(v1) == 0: return ['None'] return ['{}: {} (default)'.format(index, value) if value == v2 else '{}: {}'.format(in...
Imports: ```python import re import requests import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Optional[str]: v2 = f'https://wt.social/u/{v1}' v3 = requests.get(v2) v4 = re.search('(https.*?--profile_pic\\...
Imports: ```python import geopandas as gpd import numpy as np import pandas as pd from pandas._libs.missing import NAType from shapely import ops from shapely.geometry import LineString, MultiLineString, Point import typing ``` Type definitions: Input Types: LineString, int, float, float, Union[str, pyproj.CRS] Output...
Imports: ```python import os import typing ``` Type definitions: Input Types: 'IRunner' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'IRunner') -> None: if v1.loader_key not in self.loggers: v2 = os.path.join(v1.logdir, f'{v1.loader_key}_log') os.makedirs(...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str): for v3 in self._client.users.find_by_workspace(v1): if v3['name'] == v2: return v3 return 'null' ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: guestfs.GuestFS Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: guestfs.GuestFS): logging.info('Installing virtio drivers.') for v2 in v1.ls('/lib/modules'): v1.command(['dracut', '-v', '...
Imports: ```python import requests import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: ```python @lru_cache() def v0(v1: str, v2: str, v3: str=None, v4=None): del ttl_hash if v3 is None: v3 = '' v5 = sublime.load_settings('Avrae.sublime-settings').get('token') ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, Any Output Type: Any Dependencies: ```python def v0(v1: dict): v2 = list(v1.items()) for (v3, v4) in v2: if type(v4) is dict: v0(v4) if v4 is None: v1.pop(v3) ``` Function Name: v5 Function: ```pyt...
Imports: ```python import math import typing ``` Type definitions: Input Types: Counter, Counter Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: Counter, v2: Counter) -> float: v3 = 0.0 for (v4, v5) in v1.items(): v3 += v5 * math.log(v5 / v2[v4]) return v3 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, float, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: float=0, v3: bool=True): v4 = np.linspace(0, 1, v1, dtype=np.float32) v5 = v4 * np.sin(2 * np.pi * v4) v6 = v4 * ...
Imports: ```python from datetime import datetime import os import typing ``` Type definitions: Input Types: str Output Type: Optional[datetime] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> Optional[datetime]: if os.path.exists(v1): return datetime.fromtimestamp(os.pat...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray): v2 = np.zeros((v1.size - 1, 2)).astype(int) v2[:, 0] = v1[:-1] v2[:, 1] = v1[1:] return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, int], Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, int], v2=False): if v1 in self._objects: v3 = self._objects[v1] if v3.tags: for v4 in v3.tags: ...
Imports: ```python import numpy as np from scipy.stats import chisquare import typing ``` Type definitions: Input Types: pd.Series, pd.Series Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.Series, v2: pd.Series) -> float: v3 = list((set(v1) | set(v2)) - {np.nan}) v4 = {**...
Imports: ```python import os import sys import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = '' for v2 in sys.path: if 'envs' in v2: v3 = v2.split(os.sep) v1 = v3[v3.index('envs') + 1] ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.continuationKey: self.response = None self.responseSource = None self.resultComponents = [] self._makeRequest() ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = self.electrodes.index(v1) if v2 < 0: raise ValueError(f'Requested electrode ({v1}) not found.') self.setCurrentChannel(v2) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float, float, str Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: float=0.5, v3: float=0.5, v4: str='none') -> np.ndarray: if v4 == 'sigmoid': return v1...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: dict, **v3): v4 = v3.get('verbose', False) if v4: print('Input events =', len(v1)) v5 = v1.copy() v6 = list(v...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: Optional[Path] Dependencies: ```python def v0(v1: Path) -> Optional[Path]: v2 = None while v1 != v2: v3 = v1 / '.jlm' if v3.exists(): return absolutepath(v3) v2 = v1 ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[Number, List[str], Dict[str, str]] ``` Input Types: str Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str) -> v0: if self.test_config.access_settings.cbcollect: v3 = self._parse_ycsb_latency_c...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: self.set_checkpoint_path(self.force_checkpoint_name) return os.path.exists(self.get_checkpoint_file_path(v1)) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = tuple[int, typing.Literal[b'EXISTS']] ``` Input Types: v0 Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> None: assert v2[1] == b'EXISTS' v3 = v2[0] v4 = self._message_count for v5 in sel...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): try: return float(v1) except: return 1 if v1 != '' else 0 ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int, v2: int): self.depth = v1 self.size = v2 self.scanner = 0 self.dir = UP def v3(self) -> None: if self.dir == UP: self.scanner += 1 elif self.dir ==...
Imports: ```python import typing ``` Type definitions: Input Types: type, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: type, v2=False): if v2: pass return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = 0 for v3 in v1: if v3 != '/': break v2 += 1 return 'gs://' + v1[v2:] ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: assert 0 <= v1 < self.num_memory v2 = self.forward(v1).view(-1) v3 =...
Imports: ```python import pandas from scipy.sparse import hstack import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = self.__features.transform(pandas.DataFrame(v1).cover_sentence.tolist()) v3 = self.__dict_feat...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, *, v1: int=-1, v2: Optional[v0]=None, v3: Optional[v0]=None, v4: Optional[v0]=None) -> None: self.value = v1 self.left = v2 self.right = v3 self.parent = v4 @property def v5(self) ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v1.strip() v2 = v1.split() return ' '.join(v2[::-1]) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> bool: v2 = v1.lower().replace(' ', '') return v2 == v2[::-1] ```
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int) -> int: v3 = dict() for v4 in range(v2): if v1[v4] in v3.keys(): v3[v1[v4]] += 1 else: v3[v1[v4]]...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: bool Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> np.ndarray: if v1: if self.update_matrix_count > 0: return self.global_matrix self.upd...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> str: v2: List[int] = [] for v3 in v1: if v3 == self.end_idx: break elif v3 != self.start_idx: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.text: v1 = self.history.get_strings() if not len(v1) or v1[-1] != self.text: self.history.append_string(self.text) ``...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int) -> int: v4 = 0 while v2 != v3: v2 *= v1 v2 %= 20201227 v4 += 1 return v4 ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Literal): def __init__(self, v1: Predicate, v2: Sequence[Union[Term, int, float]]): self._predicate = v1 self._args: Sequence[Union[Term, int, float]] = v2 def v3(self) -> Predicate: return self._predicate d...
Imports: ```python import os import json import typing ``` Type definitions: Input Types: disnake.Message Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(v1: disnake.Message): for v2 in os.listdir('./responses'): v3 = json.load(open('./responses/' + v2)) for v4 in...
Imports: ```python from enum import Enum import typing ``` Type definitions: Input Types: str, Union[str, Enum], str, str, str, Union[str, Enum] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Union[str, Enum], v3: str=None, v4: str=None, v5: str=None, v6: Union[str, En...
Imports: ```python import typing ``` Type definitions: Input Types: types.ModuleType Output Type: Callable Dependencies: ```python def v0(v1: types.ModuleType) -> Callable: v2 = type(v1.lax.Precision.DEFAULT) def v3(v4: v1.ShapedArray, v5: v1.ShapedArray, v6: v2, v7: int=2) -> v1.ShapedArray: """ ...
Imports: ```python import numpy as np from scipy.spatial.distance import cdist import typing ``` Type definitions: Input Types: List[bool] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[bool]) -> List[int]: v1 = np.array(v1) print(f'A={v1!r}') v2 = np.argwhere(v...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: List[str] @classmethod def v3(cls, v4: str) -> 'CircuitFunction': """Parse a function call. parses a function into a function call. :param func_str: The function call string. ...
Imports: ```python import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: ndarray, ndarray, Callable, ndarray Output Type: None Dependencies: ```python def v0(v1: ndarray, v2: ndarray, v3: Callable, v4: ndarray, v5: int=2) -> None: plt.xlabel('Time') plt.ylabel('Brightness [mag]') ...
Imports: ```python import subprocess import sys import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.__requests: int = 0 self.__process = subprocess.Popen(self.__command, stdin=subprocess.PIPE, stdout=subprocess.PIPE...
Imports: ```python import typing ``` Type definitions: Input Types: ast.Attribute Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Attribute) -> Any: self.attr_stack.append(v1.attr) self.generic_visit(v1) self.attr_stack.pop(-1) ```
Imports: ```python from PIL import Image, ImageDraw import typing ``` Type definitions: Input Types: Image, int, int, List[List], Any, Any, Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4, v5=-1, v6=-1, v7=True): v5 = v2.width if v5 == -1 else v5 v6 = v2.height if v6 == -1 else v6 v...
Imports: ```python import asyncio import random import string from asyncio.events import AbstractEventLoop from typing import cast import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0() -> ClientSession: v1 = aiohttp.TCPConnector(limit_per_host=30) v2 = ListRetry...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.follow_cursor: self._show_cursor() ```
Imports: ```python import typing ``` Type definitions: Input Types: xlrd.sheet.Sheet Output Type: Any Dependencies: ```python def v0(v1: xlrd.sheet.Sheet): return [[cell.value for v2 in row] for v3 in v1.get_rows()] ``` Function Name: v4 Function: ```python def v4(v5: xlrd.sheet.Sheet): v6 = v0(v5) v7 = []...
Imports: ```python import multiprocessing import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = [multiprocessing.Process(target=self.get_data, args=(self.queue_raw, self.ftc)), multiprocessing.Process(target=self.calcFeat...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> list: v2 = self.explorer_url + 'address.summary.dws?coin={net}&id={addr}'.format(net=self.format_name(self.net), addr=v1) v3 = self.block_req(v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, bool, bool, Dict[str, Dict[str, str]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, /, v2: str, *, v3: str, v4: bool, v5: bool, v6: Dict[str, Dict[str, str]]): if v5: self.contex...
Imports: ```python import os import pandas as pd import typing ``` Type definitions: Input Types: list, Union[Callable, None] Output Type: dict Dependencies: ```python @st.cache(allow_output_mutation=True) def v0(v1: str) -> dict: with open(os.path.join(PROCESSED_PATH, v1), 'r') as v2: v3 = yaml.load(v2, L...
Imports: ```python import os from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = '' if '__init__.py' in os.listdir(Path(v1)): v2 = Path(v1).name + '.' for v3 in Path(v1).pare...
Imports: ```python import typing ``` Type definitions: ```python v0 = Any ``` Input Types: Tuple[int, ...], Optional[Any], Optional[int] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: Tuple[int, ...], v3: Optional[Any]=None, v4: Optional[int]=None) -> v0: if v4: self.t...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): assert isinstance(v1, str) if v1 is None: raise Exception('No error message specified for required option: ' + str(self)) self.__requi...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: set[str] | None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> set[str] | None: for v2 in self.hue_groups: if v2.name == v1: return v2.lights.value return None ```
Imports: ```python from tqdm import tqdm import typing ``` Type definitions: Input Types: List[str], bool Output Type: List[str] Dependencies: ```python def v0(v1: Tag) -> str: v2 = VERBALIZERS[v1.kind] v3 = [f(v1.data) for v4 in v2] v3 = [x for v5 in v3 if v5] if not v3: return v1.text els...
Imports: ```python import functools import operator import typing ``` Type definitions: ```python v0 = NewType('Allergen', str) ``` ```python @dataclass class v1: v2: set[Ingredient] v3: set[v0] @classmethod def v4(cls, v5: str) -> v1: v6 = RECIPE_RE.fullmatch(v5) v7 = {Ingredient(i) fo...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: 'pl.Trainer', pl.LightningModule Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'pl.Trainer', v2: pl.LightningModule) -> None: if not self._ema_state_dict_ready and v2.global_rank ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: dict): v3 = v1() return self.update_object(v3, v2) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List[np.ndarray] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[np.ndarray]): assert all([v1[0].shape == img.shape for v2 in v1]), 'The resolution/depth of all images in this function...
Imports: ```python from rdkit.Chem import Descriptors from rdkit.Chem import rdMolDescriptors from rdkit.Chem import RDConfig from rdkit.Chem import Lipinski import typing ``` Type definitions: Input Types: str Output Type: Callable Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Callable: ...