text
stringlengths
190
325k
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: ArgumentParser Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ArgumentParser): v1.add_argument('--model-mask', '--models-mask', '-m', type=str, default='*.pth', help='Pattern for models to...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict, v2: Dict) -> bool: if v1.get('xmin') < v2.get('xmin'): v3 = v1.get('xmax') v4 = v2.get('xmin') else: v3 = v2.get('...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._destroyed = True self.volumes.clear() self.chapters.clear() self.scraper.close() self.executor.shutdown(False) ```
Imports: ```python import typing ``` Type definitions: Input Types: list, list, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: list, v3: list): for (v4, v5, v6) in zip(v1, v2, v3): print('\n') print(v4) print('INPUT') print(len(v5)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Callable Output Type: Tuple[Dict, Dict] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict, v2: Callable) -> Tuple[Dict, Dict]: (v3, v4) = ({}, {}) if v1: for (v5, v6) in v1.items(): (v7, v8) = v2(v6...
Imports: ```python import typing ``` Type definitions: Input Types: list, list, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list=[], v2: list=[], v3: dict={}): self.label_to_class_dict = self.label_to_class_dict_original.copy() self.class_to_label_dict = self.cla...
Imports: ```python import typing ``` Type definitions: Input Types: vcy.SegmentMatch Output Type: int Dependencies: ```python def v0(v1: vcy.Feature) -> vcy.Feature: if v1.transcript_model.chromstrand[-1] == '+': v2 = v1.exin_no * 2 else: v2 = len(v1.transcript_model.list_features) - 2 * (v1.ex...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int, v3: int, v4: int, v5: int): v6 = v1.split('\n')[v2:v3 + 1] if len(v6) == 1: return v6[0][v4:v5] v6[0] = v6[0][v4...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('_T') ``` Input Types: v0 Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0) -> None: v3 = self._function(v2) if v3 is not None: self._arguments.put(v3) with self._lock: if ...
Imports: ```python import typing ``` Type definitions: Input Types: List[list], pd.DataFrame, str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: List[list], v2: pd.DataFrame, v3: str='item_id') -> float: v4 = v2[v3].unique().tolist() v5 = [p for v6 in v1 for v7 in v6] v8...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: str, **v3): with open(v2 + '.json', 'w') as v4: json.dump(v1, v4, **v3) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = ['node', 'index', 'left_side_remaining', 'right_side_remaining'] def __init__(self, v2: 'RadixNode', v3: int, v4: str, v5: str): self.node = v2 self.index = v3 self.left_side_remaining = v4 self.righ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, str, str, str, str, str, str, str, str, str, str Output Type: dict Dependencies: ```python def v0(v1: str, v2: str, v3: str, v4: str, v5: str, v6: str, v7: str) -> dict: v8 = {'project_id': v1} v9 = {'project_id': v1, 'expt_id':...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: int) -> int: assert v1[v2] == '(' v3 = 1 v4 = v2 + 1 while v3 > 0 and v4 < len(v1): v5 = v1[v4] if v5 == '('...
Imports: ```python from .selectors import Selector, PerpendicularDirSelector, NearestToPointSelector, StringSyntaxSelector import typing ``` Type definitions: Input Types: Any, Optional[Union[Selector, str]], Optional[str] Output Type: 'Workplane' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: A...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, Any, int Output Type: Any Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: int): v4 = np.argsort(v2) v5 = v1[v4[-v3:]] return v5.mean() ``` Function Name: v6 Function: ```python ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v1 = v1[1:-1] v1 = v1.replace('(Acetyl (Protein N-term))', 'a') v1 = v1.replace('M(Oxidation (M))', 'oxM') v1 = v1.replace('C', 'cC') ...
Imports: ```python from io import StringIO import pandas as pd from pandas.core.common import apply_if_callable, is_bool_indexer from pandas.core.computation.eval import eval from pandas.core.dtypes.common import is_list_like from pandas.core.indexing import check_bool_indexer from pandas.io.common import _expand_user,...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Dict[int, float], int, float, float Output Type: None Dependencies: ```python def v0(v1: Dict[int, float], v2: int) -> Dict[int, float]: v3 = {v2 - 1: 1 / v1[v2 - 1]} for v4 in list(v1.keys())[:-1]: v3[v4 - 1] = v3[v...
Imports: ```python import typing ``` Type definitions: Input Types: list, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2): if len(v1) == 2: v3 = v1[0] / v2 v4 = v1[1] / v2 return (v3, v4) else: return (None, None) ```
Imports: ```python from numpy import ndarray, sin, pi import typing ``` Type definitions: Input Types: ndarray Output Type: ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ndarray) -> ndarray: v2 = sin(2.0 * pi * v1) return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float) -> float: assert v1 < v2 return 20 * (v1 - 0.98) ** 2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Optional[dict], Optional[dict], int Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str, v3: Optional[dict]=None, v4: Optional[dict]=None, v5: int=0): if v3 is None: v3 = {} ...
Imports: ```python import typing ``` Type definitions: Input Types: list[list[int]], set[tuple[int, int]], PriorityQueue, callable Output Type: int Dependencies: ```python def v0(v1: tuple[int, int]) -> Iterator[tuple[int, int]]: (v2, v3) = v1 if v2 > 0: yield (v2 - 1, v3) if v2 < len(grid) - 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: try: return self.cookie_manager(method='getAll', key=self._key + '_getall') except: return None ```
Imports: ```python import itertools import random import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, v2=0, v3=1): random.seed(v2) v4 = [] for v5 in itertools.repeat(None, v3): v6 = v1 for (v7, v8) in zip([GREETINGS_REGEX, SPECIAL_GREETIN...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: aiohttp.ClientResponse Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str, *v3, **v4) -> aiohttp.ClientResponse: if not self.session: self.session = await self._create_session() ...
Imports: ```python import os import platform import warnings import typing ``` Type definitions: Input Types: Tuple[int, int] Output Type: Tuple[int, int] Dependencies: ```python def v0() -> Optional[Tuple[int, int]]: v1 = _ioctl_GWINSZ(0) or _ioctl_GWINSZ(1) or _ioctl_GWINSZ(2) if not v1: try: ...
Imports: ```python from pandas import DataFrame import typing ``` Type definitions: Input Types: Dict[str, List] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, List]): v2 = DataFrame(v1) v2 = v2[self.columns] for v3 in self.columns_to_encode: v2[v3]...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = [True] * v1 v2[0] = v2[1] = False for (v3, v4) in enumerate(v2): if v2[v3]: yield v3 for v5 in range(v3 ** 2, v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> bool: v4 = v1.get_position_after_move(v2) for v5 in v4: if v5.x > v3 or v5.x < 1 or v5.y > v3 or (v5.y < 1): r...
Imports: ```python import asyncio import typing ``` Type definitions: ```python class v0(Redis): def __init__(self, v1: Union[aioredis.ConnectionsPool, aioredis.RedisConnection], v2: Optional[Serializer]=None, v3: Optional[Deserializer]=None, **v4: Dict[str, t.Any]) -> None: self.job_serializer = v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'Workplane' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'Workplane': v1 = self.wire(forConstruction=False) v2 = v1.consolidateWires() v3 = self.plane.mirrorInPlane(v2.wires().vals(), 'Y') for v4 i...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Union[str, Path], Union[str, bytes], bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path], v2: Union[str, bytes], v3: bool=False) -> bool: v4 = isinstance(v2, bytes) i...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, str Output Type: Optional[List[dict]] Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: str) -> Optional[List[dict]]: if v2 not in v1: return v4 = v1[v2].ca.items v5 = [] for (v6, v7) in enu...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> int: v3 = [float('inf') for v4 in range(v2 + 1)] v3[0] = 0 for v5 in range(1, v2 + 1): for v6 in v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: List[Tuple[int, int, int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> List[Tuple[int, int, int]]: self.identifier = v2 (v3, v4, v5, v6, v7) = v1 v8 = (v5, 0, sel...
Imports: ```python import concurrent.futures as futures import typing ``` Type definitions: Input Types: threading.Event Output Type: futures.Future Dependencies: Function Name: v0 Function: ```python def v0(self, v1: threading.Event) -> futures.Future: v2 = futures.ThreadPoolExecutor(max_workers=1) return v2...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): self.current_rpm = 0 self.estop = v1 if self.estop: print('EMERGENCY STOP') else: print('EMERGENCY STOP RESET') ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]) -> bool: self._gui_to_parser() return self._parser.write_tags(v1) ```
Imports: ```python import os from textwrap import dedent import typing ``` Type definitions: ```python v0 = Iterable[bytes] ``` Input Types: Dict[str, str] Output Type: 'WSGIApplication' Dependencies: ```python def v1(v2: str) -> str: return dedent('\n <!DOCTYPE html>\n <html>\n <body>\n {}\n ...
Imports: ```python import datetime import re import typing ``` Type definitions: ```python class v0(DefaultDialect, ABC): v1: str = 'dataapi' v2 = True v3 = True v4 = 255 v5 = 64 v6 = False v7 = True v8 = False v9 = True v10 = True v11 = True v12 = True v13 = True ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = int(input()) v3 = input().split() v3 = list(map(int, v3)) v4 = 0 v5 = [] (v6, v7) = (0, 1) v8 = v3[v7] - v3[v6] v5.append(v...
Imports: ```python import typing ``` Type definitions: Input Types: Optional['Packet'] Output Type: 'Packet' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional['Packet']) -> 'Packet': self.link = None if v1 is None: return self else: v2: Optional['Packet'] = v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1=False) -> str: v2 = '' for v3 in self._rtabs: v4 = self._rtabs.get(v3) if not v4.is_empty(): v2 += v3[0] + str(v4.version) ...
Imports: ```python import os from os.path import join, dirname, abspath, getmtime, isfile import typing ``` Type definitions: ```python class v0: def __init__(self): self.targets = {} self.test_targets = [] self.targets_graph = None self.last_modified = {} self.last_run_test...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, TextIO, List[str]], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, TextIO, List[str]], v2: bool=False) -> None: if isinstance(v1, str): v2 |= v1.endswith('.json') ...
Imports: ```python import torch import torch.jit import torch.jit.quantized from torch import Tensor, nn import typing ``` Type definitions: Input Types: List[torch.Tensor], List[torch.Tensor], torch.Tensor, int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[torch.Ten...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> bool: self.bot.sql.cursor.execute('SELECT userid FROM whitelist WHERE serverid=? AND userid=?', (v2, v1)) v3 = self.bot.sql.cursor.fetchone...
Imports: ```python from PIL import Image, ImageEnhance import typing ``` Type definitions: Input Types: Image, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Image, v2): v3 = ImageEnhance.Brightness(v1) v4 = v3.enhance(v2) return v4 ```
Imports: ```python import typing ``` Type definitions: Input Types: pygame.Surface Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pygame.Surface): if self._hold: self._sprite_active.draw(v1, (self.rect().x, self.rect().y)) else: self._sprite_inactive.draw...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = [] for v3 in v1: if '0' <= v3 <= '9': v2.append(ord(v3) - ord('0')) elif 'a' <= v3 <= 'z': v2.append(ord(v3...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=None) -> Any: self._fillcache(v1) if not v1: if self._cache[0] == self.sentinel: raise StopIteration if v1 is None: ...
Imports: ```python import numpy as np import math import typing ``` Type definitions: Input Types: np.ndarray, float, float, np.ndarray Output Type: Any Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray=None): v4 = np.zeros(v1.shape) for (v5, (v6, v7)) in enumerate(zip(v1, v2)): ...
Imports: ```python import os from os.path import join as join_path import json import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str='kaggle.json') -> None: with open(v1, 'r') as v2: v3 = json.load(v2) os.environ['...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> str: if v1 == 2: return 'Ještě jednu otázku a zítra se ti body násobí 2x\n' elif v1 == 0: return 'Když dáš dnes 3 správné odpovědi, zí...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python class v0(Circle): def __init__(self, v1: float, v2: float, v3: float, v4: float, v5: float, v6: float): super().__init__(v1, v2, v3) self.aMin = v4 self.aMax = v5 self.aRot = v6 self.aRotOrig...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: ```python def v0(v1, v2): if v2.get_is_word(): return if len(v2.get_children()) > 0: return if len(v1) == 1: self._root.remove_child(v1[0:1]) return v3 = self._root ...
Imports: ```python import os import sys import shutil import re import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str, v2: bool=True) -> bool: try: if os.path.isdir(v1): return True else: raise Exception except...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> bool: for v2 in v1.values(): if v2 is None: break return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1) -> float: v1 = float(v1) v2 = float(1024) v3 = float(v2 ** 2) return float('{0:.5f}'.format(v1 / v3)) ```
Imports: ```python import typing ``` Type definitions: Input Types: Tuple[int, int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[int, int]) -> None: if v1 not in self.model.get_cells_revealed() and v1 not in self.model.get_cells_flagged(): self.model.get_cel...
Imports: ```python import re from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = re.compile('.*\\.log\\.(\\d+)') v2 = False v3 = Path(self.logFile) if v3.is_file(): v2 = True...
Imports: ```python import torch as th import numpy as np import itertools as it import random import torch.nn.functional as F import typing ``` Type definitions: Input Types: th.Tensor, th.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: th.Tensor, v2: th.Tensor): if isinstan...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> dict: v2 = ['(?P<remote_host>\\S*)', '(?P<user_id>\\S*)', '(?P<user_name>\\S*)', '\\[(?P<datetime>.*?)\\]', '"(?P<request>.+)"', '(?P<res...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: '_MafFileHeaderBuilder' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> '_MafFileHeaderBuilder': self.properties[v1] = v2 return self ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[Point, Point] ``` ```python v1 = Tuple[int, int] ``` Input Types: v0, List[v1] Output Type: List[v1] Dependencies: ```python def v2(v3: List[v1]) -> Tuple[v1, v1]: v4: List[int] = [] v5: List[int] = [] for (v6, v7) in v3: v4....
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if v1 > 2: raise TypeError('Invalid loop mode.') self.loop = v1 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('A') ``` ```python v1 = TypeVar('B') ``` Input Types: v1, Callable[[v0, v1], v1] Output Type: v1 Dependencies: Function Name: v2 Function: ```python def v2(self: List[v0], v3: v1, v4: Callable[[v0, v1], v1]) -> v1: v5 = v3 for v6 in ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.stop() self._d.sync.pull(self._remote_path, v1) self._d.remove(self._remote_path) ```
Imports: ```python import numpy as np import scipy.sparse as sp import scipy.io as io from scipy.stats import mode import logging import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Union[str, None]=None, v2: Union[int, None]=None, v3: int=consts.TOTAL_DROPLET_DEFAULT, v4: float=0.5, v5:...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str, v2: typing.Dict[str, str]) -> str: v3 = '' v4 = '' for v5 in v1: v3 += v5 if v3 in v2: v4 += v2[v3] v3 = '' if v3 != '': ...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool, Union[str, int], Union[str, int, list] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False, v3: Union[str, int]=None, v4: Union[str, int, list]=None) -> str: v5 = lambda : input('{label}{...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.socket is not None: try: self.socket.close(linger=0) except Exception: pass self.socket = None ``...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], str, bool Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any], v2: str, v3: bool=True) -> Dict[str, Any]: v4 = dict() if not v2.endswith('.'): v2 += '.' for (v5...
Imports: ```python import contextlib import pathlib import typing ``` Type definitions: Input Types: Any, Any Output Type: ContextManager[IO] Dependencies: ```python @contextlib.contextmanager def v0(v1): yield v1 ``` Function Name: v2 Function: ```python def v2(v3, v4='r') -> ContextManager[IO]: if isinstance...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> None: if not v2.endswith('.csv' or '.ndjson'): v2 = v2 + '.' + self.file_ext try: if not os.path.exists(v2): ...
Imports: ```python import typing ``` Type definitions: ```python class v0(DialogueStateTracker): def __init__(self, v1: Text, v2: Optional[List[Slot]], v3: Optional[int]=None, v4: Optional[Domain]=None, v5: bool=False, v6: bool=False) -> None: super().__init__(v1, v2, v3, is_rule_tracker=v6) self._...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> None: v3: str = v1 + self.Name.lower().replace('_', '-') self.Anchor = v3 v4: str = v3 + '--' v5: ModelClass v6: int ...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]], str Output Type: bool Dependencies: ```python def v0(v1, v2): if len(v1) == k: result.append(v1) else: for (v3, v4) in enumerate(v2): v0(v1 + [v4], v2[v3 + 1:]) ``` ```python def v5(v6, v7): for...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = 123 return len(v1.encode('utf-8')) <= v2 ```
Imports: ```python import numpy as np from scipy.ndimage.morphology import distance_transform_edt as edt 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): if np.count_nonzero(v1...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self._pq('h1.title').find('span.pretty') return v1.text() ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, List[str]] Output Type: Dict[str, List[int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, List[str]]) -> Dict[str, List[int]]: v1[self._text_column] = self._filtering_func(v1) return self.tokenizer(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self._collect_features() v2 = self._collect_reference() (v1, v2) = self.preprocess_data(v1, v2) v3 = self.train_test_split(v1, v2) v...
Imports: ```python from threading import Thread import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str): v3 = Thread(target=self.kernel.login, args=(v1, v2)) v3.start() self.username = v1 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0, Any, Optional[str], Tuple Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: Any=None, v4: Optional[str]=None, v5: Tuple=()) -> None: if v4: v3 = v4.format(*v5...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: str Output Type: typing.Optional[datetime.datetime] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> typing.Optional[datetime.datetime]: try: v2 = datetime.datetime.strptime(v1, '%Y:%m:%d %H:%M:%S') ...
Imports: ```python import argparse import typing ``` Type definitions: Input Types: List[str] Output Type: argparse.Namespace Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> argparse.Namespace: v2 = argparse.ArgumentParser(epilog='Copyright (c) 2017 Alex Dale - See LICENSE') v2.ad...
Imports: ```python import typing ``` Type definitions: Input Types: List, str Output Type: Callable Dependencies: ```python def v0(cls, v1): for v2 in oneof_fields: if v2 in v1 and v1[v2] == cls.__fields__[v2].default: v1.pop(v2) return v1 ``` Function Name: v3 Function: ```python def v3(v4...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: bool): v3 = [] v4 = 0.8 if v2 else 1 v3.append(v1.loc['gwv', 'class_value'] * v4) v5 = v1.loc['group_axles', 'class_v...
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 = [] (v3, v4) = (None, False) v5 = '' for v6 in v1: if v3 is None and v6 == '-' or (v3 == '-' and v6 == '-'): ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> None: v1.YAGPD.apply(np.max).plot.line(ax=self.ax[0, 1]) self.ax[0, 1].axhline(v1.attrs['YAG_cutoff'], c='...
Imports: ```python import copy import typing ``` Type definitions: Input Types: 'Layer' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Layer'=None) -> None: self._layers.append(copy.deepcopy(v1) or self.Layer(layer_id=self._num_layer)) self._num_layer += 1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = input('Enter an integer to balance: ') return int(v1) if v1.isdigit() else 100 ```
Imports: ```python from os import path, getcwd from shutil import copyfileobj import requests import typing ``` Type definitions: Input Types: int, int, str Output Type: str Dependencies: ```python def v0(v1: str) -> str: return ''.join((s for v2 in v1 if v2.isalnum())).lower() ``` Function Name: v3 Function: ```p...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: n.SerializedNode Dependencies: Function Name: v0 Function: ```python def v0(self) -> n.SerializedNode: v1: Dict[str, SerializableType] = {} v1['severity'] = self.severity_string.upper() v1['start'] = self.start[0] v1['me...
Imports: ```python import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> torch.Tensor: if n...
Imports: ```python import typing ``` Type definitions: Input Types: argparse.ArgumentParser Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: argparse.ArgumentParser) -> None: super().add_arguments(v1) v1.add_argument('--recurse', '-r', choices=['yes', 'no'], default='yes'...
Imports: ```python import typing ``` Type definitions: Input Types: List[pygame.math.Vector2], float, int, bool Output Type: List[pygame.math.Vector2] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[pygame.math.Vector2], v2: float, v3: int=1, v4: bool=False) -> List[pygame.math.Vector2]: if v2...