text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'PagureIssue' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'PagureIssue': v1 = {'status': 'Closed'} self.project._call_project_api('issue', str(self.id), 'status', data=v1, method='POST') self.__dirty ...
Imports: ```python from typing import cast import torch import torch.nn.functional as F from torch.nn.modules import Module 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...
Imports: ```python import typing ``` Type definitions: Input Types: [str, list] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: [str, list]) -> str: if isinstance(v1, str) or isinstance(v1, list): self.meta['@graph']['scidata']['dataset']['scope'] = v1 return self...
Imports: ```python import typing ``` Type definitions: Input Types: Receive Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Receive): while True: v2 = await v1() if v2['type'] == 'http.disconnect': break ```
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: typing.Dict[typing.AnyStr, typing.List[typing.Dict]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Dict[typing.AnyStr, typing.List[typing.Dict]]: v1 = self._get_all_hearbeat_info_partition_by...
Imports: ```python import typing ``` Type definitions: ```python class v0(DialogueStateTracker): def __init__(self, v1, v2, v3=None, v4=None, v5=False, v6=UserMessage.DEFAULT_REQUEST_ID, v7=UserMessage.DEFAULT_USER_ID): super(v0, self).__init__(v1, v6, v7, v2, v3) self._states = None self.d...
Imports: ```python import typing ``` Type definitions: Input Types: 'Decimal' Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: 'Decimal') -> str: v2 = max(0, -v1.as_tuple().exponent) return format(v1, f'.{v2}f') ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str='arg{i}: {Ts}', v3: int=0, v4: int=LIMIT) -> None: print() for v5 in range(v3, v4): v6 = ', '.join(('T{i}'.format(i=j + 1...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: for v2 in self.vars['ignore_command_regexp']: if re.search(v2, v1): return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: list, list, list, int, bool Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: list, v3: list, v4: int, v5: bool) -> tuple: (v6, v7) = self.__get_graph_and_data_manager() (v8, v9) = v7.split_data...
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/222': {'name': 'meeting_222', 'is_active_in_organization_id': 1}}) v1 = self.request('motion.create_forwarded', {'title': '...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[int]=None): super().reset(v1) self.sampler_init.reinit(self._env, self.init_expl_policy) self.sampler.reinit(self._env, self._exp...
Imports: ```python import math from math import copysign import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.horizontal: self.bcb_body.angle = 0 v1 = self.bar_loc * self.bcb_range self.bcb_bod...
Imports: ```python import itertools import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: list, v2: int=1) -> list: v3 = len(v1) for v4 in range(0, v3, v2): yield v1[v4:min(v4 + v2, v3)] ``` Function Name: v5 Function: ```python def v5(self: object, v6...
Imports: ```python 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 = False (v4, v5) = v2[0] for v6 in self.components.values(): if v6.check_device_type(v4): ...
Imports: ```python import math import typing ``` Type definitions: Input Types: float, float, float, float, float, float Output Type: float Dependencies: ```python def v0(v1: float) -> float: return v1 * (math.pi / 180) ``` Function Name: v2 Function: ```python def v2(v3: float, v4: float, v5: float, v6: float, v7...
Imports: ```python import typing ``` Type definitions: Input Types: 'Any', str, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Any', v2: str, v3: int, v4: int): v5 = [(field, getattr(v1, field)) for v6 in dir(v1) if not (v6.startswith('_') or v6 in ['metadata', 're...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> float: v1 = self.__cast_to_float(v1) self.__raise_value_error_if_albedo_is_unphysical(v1) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if not isinstance(v1, str): return False if len(v1) < 6 or len(v1) > 20: return False return True ```
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float): (v2, v3, v4) = self.grid.rasterize(v1) return self._raster(v2, v3, v4) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> Any: v3 = self.block_path(v1, v2) return self.load_pickle(v3) ```
Imports: ```python import os from matplotlib import pyplot as plt import typing ``` Type definitions: Input Types: str, bool, str, list, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: bool=True, v3: str='png', v4: list='auto', v5: bool=True): if v1 is None...
Imports: ```python import typing ``` Type definitions: Input Types: Optional['EntryPoint'], Dict[str, Any] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional['EntryPoint'], v2: Dict[str, Any]) -> str: if v1 is None: return '' return v1.compute_command(v2) ```
Imports: ```python import gzip 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: with gzip.open(v1, 'wb') as v3: v3.write(self.data) else: with op...
Imports: ```python import typing ``` Type definitions: Input Types: 'Imports' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Imports') -> None: assert not self._package and (not v1._package) for (v2, v3) in v1.items(): self.__setitem__(v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1 = {'cluster_name': self.cluster_name, 'database_name': self.database_name, 'parsed_conn': self.obfuscate_parsed_conn()} v2 = s...
Imports: ```python import re import numpy as np import typing ``` Type definitions: Input Types: Union[str, bytes, Pattern, Any], int, bool Output Type: Union[Pattern, Any] Dependencies: ```python def v0(*, v1: Callable, v2: Any, v3: Union[str, np.dtype, Type]=None, v4: Union[list, tuple]=((),), v5: Mapping[Any, int]=...
Imports: ```python from statistics import mean, stdev import typing ``` Type definitions: Input Types: List[float] Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: List[float]) -> float: if len(v1) == 0: return 0 elif len(v1) == 1: return 0 return stdev(v1)...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> str: v3 = f'{v1} in (' v4 = self.DEFAULT_PLACEHOLDER for v5 in range(v2): v3 += f'{v4}' v4 = f', {self.DEFAULT...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> Tuple[float, float]: v3 = 0.01 * np.eye(v1.shape[-1]) v4 = np.linalg.solv...
Imports: ```python import pathlib from pathlib import Path from PIL import Image from PIL import ImageOps import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: Union[str, None], v3: str): self.filename = v1 if v1[-4:-1] == '.tif': self.filename += '.tif...
Imports: ```python import typing ``` Type definitions: Input Types: JavaParserLabeled.ClassBodyDeclaration2Context Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: JavaParserLabeled.ClassBodyDeclaration2Context): if self.is_source_class is True: self.nested_level += 1 ...
Imports: ```python import pandas as pd from collections import defaultdict, Counter 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 = defaultdict(dict) for (v4, v5) in zip(v...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: str): v3 = self._get(f'workflows/{v2}') self._assert_status_code_is(v3, 200) v4 = v3.json()['steps'] return sorted((step for v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = self.private_cursor.edition_states_ if v2: v3 = v2.find(v1) if v3 and v3 == v2.current(): self.private_c...
Imports: ```python import typing ``` Type definitions: Input Types: object Output Type: object Dependencies: Function Name: v0 Function: ```python def v0(v1: object) -> object: try: v1 = ('%f' % v1).rstrip('0').rstrip('.') return v1 except TypeError: return v1 ```
Imports: ```python import numpy as np from scipy.optimize import linear_sum_assignment import typing ``` Type definitions: Input Types: Any, Any, Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: Optional[int]=None): if v3 is None: v3 = max(v2.max(), v1....
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> int: if len(v1.shape) < 4: return 1 else: return v1.view(-1, *v1.shape[-3:]).shape[0] ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, int, int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int, v3: int, v4: bool): if v2 < 0 or v2 >= self.width or v3 < 0 or (v3 >= self.height): raise ValueError('x %d, y %d out of ran...
Imports: ```python from scipy.sparse import csr_matrix, lil_matrix import typing ``` Type definitions: Input Types: Any, Any, Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=[], v3: Callable=None): v4 = v1[:, v2].toarray() if not v3: v3: Callable = sel...
Imports: ```python import typing ``` Type definitions: Input Types: arxiv.Result Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: arxiv.Result): self.assert_nonempty(v1.entry_id) self.assertIsNotNone(v1.updated) self.assertIsNotNone(v1.published) self.assert_nonemp...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> bool: (v3, v4, *v5) = v2.split(' ') v4: str v3: str = v3.lower() v5 = ' '.join(v5) if not v5: return False ...
Imports: ```python import numpy as np import scipy as sp import pandas as pd import typing ``` Type definitions: Input Types: List[np.ndarray], int Output Type: pd.DataFrame Dependencies: ```python def v0(v1: np.ndarray, v2: float=0.0001) -> Tuple: if v1.shape[0] != v1.shape[1]: raise ValueError('Transitio...
Imports: ```python import torch import typing ``` Type definitions: ```python class v0: v1 = {'has_video': bool, 'video_timebase': Timebase, 'video_duration': float, 'video_fps': float, 'has_audio': bool, 'audio_timebase': Timebase, 'audio_duration': float, 'audio_sample_rate': float} v2 = ['has_video', 'video_...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str=''): global charm_of_hummingbirds if v1 == '': global current_hummingbird_slot v1 = current_hummingbird_slot return charm_of_hummingbirds[v1] ``` Function Name: v2...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: int Dependencies: ```python def v0(v1: str) -> Tuple[int, int]: return (int(v1[:4]), int(v1[4:])) ``` Function Name: v2 Function: ```python def v2(v3: str, v4: str) -> int: assert v4 >= v3 (v5, v6) = v0(v3) (v7, v...
Imports: ```python from datetime import date, datetime, timedelta from polars.utils import _timedelta_to_pl_duration from polars import internals as pli from polars.datatypes import DataType, Date, Datetime, Float64, Int32, Object, UInt32, py_type_to_dtype import typing ``` Type definitions: ```python class v0: de...
Imports: ```python import operator import numpy as np from skimage.transform import resize import typing ``` Type definitions: Input Types: np.ndarray, Optional[Tuple[int]] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: Optional[Tuple[int]]) -> np.ndarray:...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: with self.lock: return v1 in self.v_tx ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> None: if self.big_endian == 1: v3 = self.flip_bit_order(v1, v2) self.m_bits |= v3 << self.count else: sel...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: if self.get('wallet_path'): return os.path.join(self.get('cwd'), self.get('wallet_path')) return None ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int, List[float], List[float], List[float] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: List[float], v3: List[float], v4: List[float]) -> Any: (v5, v6, v7) = self.space.get_acti...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> int: v2 = [str(n) for v3 in v1] v2 = int(''.join(v2)) return v2 ```
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.moodle.post('mod_workshop_get_submission_assessments', submissionid=v1) return v2 ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: str, int, Any, bool, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3=True, v4: bool=False, v5: str=None): with tf.variable_scope(v1): v6 = self.__network.g...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: dict) -> None: v2 = self._mx_handlers.get(str(v1.type), [self._on_mx_unhandled_event]) for v3 in v2: await v3(v1) ```
Imports: ```python import dataclasses import typing ``` Type definitions: Input Types: Optional[str] Output Type: dataclasses.Field Dependencies: Function Name: v0 Function: ```python def v0(*v2: Any, v1: Optional[str]=None) -> dataclasses.Field: v2 = list(v2) v3 = {'choices': v2, 'default': v2[0]} if v1 ...
Imports: ```python from numpy import array, ndarray from numpy.linalg import norm import typing ``` Type definitions: Input Types: int, int Output Type: tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> tuple[int, int]: v3: ndarray = array(self.tile_size) * self...
Imports: ```python from math import pi, sqrt import typing ``` Type definitions: Input Types: float, float, float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float) -> float: if v1 < 0 or v2 < 0 or v3 < 0: raise ValueError('area_triangle_three_si...
Imports: ```python import random import typing ``` Type definitions: Input Types: str, str, float Output Type: Tuple[str, str, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: float) -> Tuple[str, str, float]: v4 = self.dag v5 = self.hypernyms(v2) - self.hypernyms(...
Imports: ```python import typing ``` Type definitions: Input Types: Any, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: float) -> None: v3 = v1.n v4 = v2 - v3 v1.update(v4) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: v2 = '[。!!??οΌ›;ο½žβ€¦β—†β˜…]+' v3 = re.split(v2, v1) v4 = re.findall(v2, v1) v4.append('') v5 = [''.join(x) for v6 in zip(v3, v4)] ...
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1: int = random.randint(3, 10) v2: str = '' for v3 in range(v1): v2 += self.gen_random_sentence() + ' ' return v2 ```
Imports: ```python import numpy import typing ``` Type definitions: Input Types: Output Type: numpy.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self) -> numpy.ndarray: if self.it == 0 or self.jacobian is None: self.reset_jacobian() v1 = numpy.reshape(self.dx, (self.dim, 1)) ...
Imports: ```python import matplotlib as mpl import matplotlib.cm as cmx import matplotlib.colors as colors import matplotlib.patches as mpatches import matplotlib.path as mpath import matplotlib.pyplot as plt import numpy as np from PIL import Image from matplotlib import patheffects import typing ``` Type definitions:...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = {0: 1, 1: -1} v2: List[str] = ['GPS GPSAltitude', 'EXIF GPS GPSAltitude'] v3: List[str] = ['GPS GPSAltitudeRef', 'EXIF GPS GPSAltitudeRef'...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[Union[str, Tuple[None, str]], str] ``` Input Types: v0, str Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: str) -> v0: if (None, 'class') not in v2: v2[None, 'class'] = '' v2[None, 'class'...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[object], Any], object Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Callable[[object], Any], v2: object) -> Any: if v2 is None: return None return v1(v2) ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: int, int, str, list, list Output Type: Any Dependencies: ```python def v0(v1: str, *v3, v2=False): v4 = subprocess.check_output(['which', v1]).decode('utf-8')[:-1] v5 = [v4] v5.extend(v3) if v2: return subproc...
Imports: ```python import copy import typing ``` Type definitions: ```python v0 = Union[None, bool, int, float, Text, List[Any], Dict[Text, Any]] ``` Input Types: Text Output Type: v0 Dependencies: ```python def v1(v2: Text) -> None: if v2 in _REGISTERED_NAMES: raise JwtInvalidError('registered name %s cann...
Imports: ```python import pandas as pd from pandas.tseries.frequencies import to_offset import typing ``` Type definitions: Input Types: xr.DataArray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: xr.DataArray): if isinstance(v1.get_index(self._time_dim), pd.DatetimeIndex): ...
Imports: ```python import asyncio from asyncio.queues import Queue from asyncio.tasks import Task import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python async def v0(v1: models.Queue) -> Task: v2 = await get_first_incomplete_job(v1) if v2: v3 = proces...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: int Dependencies: ```python def v0(v1, v2): res.append(v2) for v3 in range(v1, len(nums)): if v3 > v1 and nums[v3] == nums[v3 - 1]: continue v0(v3 + 1, v2 + [nums[v3]]) ``` Function Name: v4 Fu...
Imports: ```python import pickle from sklearn import preprocessing from sklearn.model_selection import train_test_split import typing ``` Type definitions: Input Types: str, float, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: float=None, v3: int=None) -> None: ...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: ```python def v0(v1: List[str]) -> str: v2 = [] for v3 in v1: if v3.find(' ') == -1: v2.append(v3) else: v2.append('"' + v3 + '"') return ' '.join(v2) ``` Fun...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: Union[pd.DataFrame, ks.DataFrame] Output Type: Union[pd.DataFrame, ks.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[pd.DataFrame, ks.DataFrame]) -> Union[pd.DataFrame, ks....
Imports: ```python import logging import typing ``` Type definitions: ```python @total_ordering class v0(collections.abc.Sequence): def __init__(self, *v1): self._data: list = v1 @classmethod def v2(cls, v3): """Optimized shortcut to generate a path from an existing tuple""" if isi...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]] Output Type: BatchEncoding Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[str]]) -> BatchEncoding: v2: BatchEncoding = self.tokzer(v1, is_split_into_words=True, return_tensors='pt', padding=True, ad...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], int Output Type: Dict[int, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: int=0) -> Dict[int, Any]: v3 = {} v4: Callable[[Any, int], Any] if v2 < 2: v4 = self._convert...
Imports: ```python import sys from traceback import format_exception import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: BaseException=None, v2: TracebackType=None) -> Generator[Any, None, None]: if not v1 or v2: (v3, v4, v5) = sys.exc_info() v1 = ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: str=None, v3: str=None, **v4): v5 = self.process_message(v1, v2) self.data = {'msg': v5, 'qq': v3} return self.data ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> None: self.select_all = v1 for v2 in range(self.__listwidget.count()): v3 = self.__listwidget.item(v2) v4 = self.__listw...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: 'Grammar', *v2: Symbol): self.grammar: Grammar = v1 self.sequence: Tuple[Symbol, ...] = v0.combine_terminals(v2) self.has_terminals: bool = any((isinstance(t, Terminal) for v3 in self.sequence)...
Imports: ```python import numpy as np import shapely.geometry as geom from shapely.ops import nearest_points, unary_union, clip_by_rect from skimage import draw, filters from skimage.graph import MCP_Connect from skimage.filters import apply_hysteresis_threshold, sobel from skimage.measure import approximate_polygon, s...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: if self._logger is not None: self._logger.debug(f'Loading neighbors of {v1}') ```
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 = {'.csv': 'text/plain', '.gif': 'image/gif', '.jpeg': 'image/jpeg', '.jpg': 'image/jpeg', '.json': 'application/json', '.log': 'text/pl...
Imports: ```python from scipy.ndimage import label, measurements import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray): (v1, v2) = label(v1) if len(self.imageObjects) == 0: for v3 in range(v2): ...
Imports: ```python import typing ``` Type definitions: ```python v0 = FrozenSet[Tuple[str, Tuple[int, int]]] ``` Input Types: str Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: str) -> v0: v3 = [] with open(v2) as v4: v5 = v4.readlines() for v6 in v5: ...
Imports: ```python import typing ``` Type definitions: ```python v0 = typing.Union[_R, typing.Awaitable[_R]] ``` Input Types: Any, Any, Any, typing.List[dict] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2, v3, v4, v5: typing.List[dict]) -> v0: v6 = {'permissions': v5} retu...
Imports: ```python import typing ``` Type definitions: Input Types: list, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list=[], v2=False): v3 = self.coco.getCatIds(catNms=v1) v4 = self.coco.getImgIds(catIds=v3) if not v2: print(len(v4), 'Pictures with c...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.Series Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.Series) -> str: if isinstance(v1.dtype, pd.DatetimeTZDtype): return 'datetime' elif isinstance(v1.dtype, pd.StringDtype) ...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[Tuple[str]]] Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[Tuple[str]]]) -> dict: v2 = [] for v3 in v1: v4 = dict(v3) v2.append({'form': list(v4.keys()), 'upos': list(v4.v...
Imports: ```python import pandas as pd from torch import long, tensor from torch.utils.data.dataset import Dataset import torch import torch.nn.init as init from sklearn.metrics import accuracy_score, f1_score, roc_auc_score from sklearn.model_selection import train_test_split from torch import Tensor from torch.nn imp...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Set[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> Set[str]: v2 = self.client.pin.ls(type='recursive' if v1 else 'all') return set(v2['Keys']) ```
Imports: ```python import typing ``` Type definitions: ```python class v0(int): @staticmethod def v1(v2: str) -> v0: return v0('ABCD'.find(v2)) def v3(self) -> str: return 'ABCD'[self] @property def v4(self) -> int: return 10 ** self @staticmethod def v5() -> Iter...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[int, int, int]: if self._column_left: v1: int = self.place - self.start[1] else: v1 = self.place - self.start[2] ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = super().ask_raw(v1) if v2 == v1: v2 = self.visa_handle.read() if v2.startswith('OK'): return if v2.startswit...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str): v3: list = [str('zone "' + v2 + '.in-addr.arpa" IN {'), ' type master;', str(' file "/var/named/reverse.' + v1 + '.hosts";'), '}...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {self.args[i].replace('-', ''): self.args[i + 1] for v2 in range(0, len(self.args) - 1, 2)} v1 = self.validate_args(v1) v1['cmd'] = self.cmd...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> str: v2 = '' for v3 in v1: v2 += f'{v3} ' return v2[:-1] ```