text
stringlengths
190
325k
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor) -> tf.Tensor: if v1.shape[-1] != 4: raise ValueError('boxes.shape[-1] is {:d}, but must be 4.'.format(v1.sh...
Imports: ```python from collections import defaultdict import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): v1 = v1.copy() v1['diffs'] = v1.val - v1.val_nnls v2 = ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.create.db.session.remove() self.create.db.drop_all() ```
Imports: ```python import tempfile import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None) -> Optional[str]: if not v1: v1 = tempfile.mkdtemp() return v1 ```
Imports: ```python import torch from torch.optim import Optimizer, AdamW from torch.optim.lr_scheduler import _LRScheduler, LambdaLR import typing ``` Type definitions: Input Types: Tuple[torch.Tensor, dgl.DGLGraph], str Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[torc...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: List[int]) -> None: if self.enc_type == 0: v1[0] = 3 elif self.enc_type == 2: v1[0] = 2 else: ...
Imports: ```python import torch.nn as nn import torch import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if self.__model_name == 'resnet18': v2 = self.__model.fc.in_features self.__model.fc = nn.Sequentia...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: 'Tensor' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'Tensor': self.data = self.data.astype(np.float64) return self ```
Imports: ```python import numpy as np import cv2 import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=False): if v2 == True: v3 = cv2.imread(v1) else: v3 = v1 v4 = cv2.cvtColor(v3, cv2...
Imports: ```python import re import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = {} v3 = '' for v4 in v1: v5 = None if not re.match(self.__subpattern, v4) and (not v4 == ''): v3 ...
Imports: ```python import typing ``` Type definitions: ```python class v0(RecordUpdateListener): def __init__(self, v1: str, v2: str, v3: Optional[Union[bytes, List[bytes]]]=None, v4: Optional[int]=None, v5: int=0, v6: int=0, v7=b'', v8: Optional[str]=None, v9: int=_DNS_HOST_TTL, v10: int=_DNS_OTHER_TTL, *, v11: O...
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: Union[dict, list] Dependencies: Function Name: v0 Function: ```python def v0() -> Union[dict, list]: print('Hello! This is JSON navigator. Please provide us with the path to .json file.') v1 = input('Please, enter a ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> list: v2 = [] for v3 in v1: if v1.count(v3) > 1: v2.append(v3) else: pass return v2 ```
Imports: ```python import re import typing ``` Type definitions: Input Types: Dict[str, OrderedDict] Output Type: Dict[str, List[OrderedDict]] Dependencies: ```python def v0(v1: str) -> str: v2 = 'seed\\_?([0-9]*[.])?[0-9]+' return re.sub(v2, '', v1) ``` Function Name: v3 Function: ```python def v3(v4: Dict[st...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('TRetrieve', bound='CRUDModel') ``` Input Types: Any Output Type: v0 Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: Any) -> v0: v3 = self.attrs.update_model.from_orm(v2) v4 = self.attrs.update_endpoint.for...
Imports: ```python import typing ``` Type definitions: Input Types: List Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: List) -> bool: v2 = len(v1) if v2 <= 1: return True v3 = {} for v4 in v1: if v4 in v3: v3[v4] += 1 else: ...
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: if not self.get_new_connections: return False if self.check_black_list: if v2[0] in self.black_list: self...
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: v1 = v1 or self.team_id return self.client.request_json('get', f'team/{v1}') ```
Imports: ```python from Bio import SeqIO from Bio.Seq import Seq from Bio import AlignIO from Bio.SeqRecord import SeqRecord import typing ``` Type definitions: Input Types: Seq, int, int Output Type: List[str] Dependencies: ```python def v0(v1: Seq) -> Seq: v2 = len(v1) % 3 return v1 if v2 == 0 else v1 + Seq(...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Callable[..., None] Dependencies: Function Name: v0 Function: ```python def v0(v1: bool=False) -> Callable[..., None]: if v1: return lambda *_, **__: None else: return print ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Optional[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> Optional[int]: if v1: self.status() return self._queue_position ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Tuple[int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Tuple[int, int]: if v1 not in self.__tokens2chars__: raise IndexError(f'Token id {v1} out of bounds') return self.__tokens2c...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: if not getattr(self, 'records', None): return None (*v1, v2, v3) = self.records[0]['eventSourceARN'].split(':') return ...
Imports: ```python import re import shlex import typing ``` Type definitions: Input Types: list, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: str, v3: bool=True): try: (v4, v5) = v2.strip().split('=') v4 = shlex.quote(v4.strip()) v5 = ...
Imports: ```python from scipy.stats import beta import typing ``` Type definitions: Input Types: float, float, float Output Type: List[Optional[float]] Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float=0.05) -> List[Optional[float]]: v4 = beta.ppf(v3 / 2, v1, v2 - v1 + 1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Iterable[Tuple] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Iterable[Tuple]: v2 = self._edges.get(v1) or {} return {(v1, t, r) for (v3, v4) in v2} ```
Imports: ```python import typing ``` Type definitions: Input Types: list[str], str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list[str], v2: str) -> int: v3 = 0 v4 = [] for v5 in v1: v6 = {} for v7 in v5: if v7 in v6: v...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: str Dependencies: ```python def v0() -> ModuleType: __import__('distutils._msvccompiler') return sys.modules['distutils._msvccompiler'] ``` Function Name: v1 Function: ```python def v1() -> str: v2 = v0() retur...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self) -> None: self._pyexpr: PyExpr @staticmethod def v1(v2: 'PyExpr') -> 'Expr': v3 = v0.__new__(v0) v3._pyexpr = v2 return v3 def v4(self, v5: Any) -> 'PyExpr': if isinsta...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, Any, Any, str Output Type: Any Dependencies: ```python def v0(): return {'warns': [], 'mutes': [], 'kicks': [], 'bans': [], 'notes': [], 'mail': [], 'mail_blocked': False, 'watch': False, 'name': 'n/a'} ``` ```python def v1(): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().prepare_for_removal() try: self._image.image.anim_reset(False) except AttributeError: pass ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int) -> None: self._data = [] self._capacity = v1 def v2(self, v3: int): if v3 >= self._capacity or v3 < 0: raise IndexError def v4(self, v5: int) -> object: self....
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: if not self.ignore: self.p.append(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str) -> bool: if not v1.startswith('0x'): return False if len(v1) != 18: return False try: int(v1, 16) except: ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool): if not isinstance(v1, bool): raise ValueError('Argument must be boolean') if v1 == True: self._set_values([1]) elif v1 == Fa...
Imports: ```python import typing ``` Type definitions: Input Types: bool, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: bool, v2: str) -> None: if not v1: raise RuntimeError(v2) ```
Imports: ```python import ast import typing ``` Type definitions: ```python class v0(ast.NodeVisitor): v1 = Counter() def v2(self, v3): for v4 in v3.names: self.counter[v4.name] += 1 def v5(self, v6): self.counter[v6.module] += 1 ``` Input Types: Path, v0 Output Type: None Depe...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): self.horas_trabajadas += v1 print(f'{self.nom} {self.ap_1} {self.ap_2} lleva {str(self.horas_trabajadas)} horas trabajadas.') ```
Imports: ```python import os from os import listdir from os.path import isfile, join, isdir import typing ``` Type definitions: Input Types: str Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[str]: v2 = [join(v1, f) for v3 in listdir(v1) if isdir(join(v1, v3)) a...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int) -> int: v4 = v2 * v2 if v4 > v1: return v2 - 1 if v4 == v1: return v2 if v2 == v3: retu...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, bool, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3: bool=False, v4: str='Close', v5: bool=False): v6 = 'ohlc_avg' v1[v6] = (v1['Open'] + v1['High'] + v1['Low'] + v1['Close']) / 4 ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, dict Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: dict) -> bool: v3 = True if not len(v1.keys()) == len(v2.keys()): print(f'Incorrect number of rows in inference csv. Expected {len(v...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: str v2: str ``` Input Types: List[v0] Output Type: None Dependencies: Function Name: v3 Function: ```python def v3(self, v4: List[v0]) -> None: self.buffer['child_links'] = v4 return ```
Imports: ```python import typing ``` Type definitions: Input Types: api.ChatMessage, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: api.ChatMessage, v2): if len(self.cfg) == 0: await v1.reply('No tags defined') else: await v1.reply('\n'.join(['[...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: bool=True): v2 = 'UPDATE completed_trades set verified = $1 WHERE code = $2' await self.bot.db.execute(v2, v1, self.record['code']) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: dict, dict, str, Optional[Union[List[int], np.ndarray]], Any, Any, Optional[float], Optional[float] Output Type: (np.ndarray, np.ndarray, np.ndarray, np.ndarray) Dependencies: ```python def v0(v1: dict, v2: str, v3: str, v4: Union[T...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, np.float64, np.float64 Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: np.float64, v4: np.float64): for (v5, v6) in self._stages_and_updates: v1.synchronize(v3) for (v7, v8) ...
Imports: ```python import re import pandas as pd import numpy as np import typing ``` Type definitions: Input Types: str, str, list, list, Any Output Type: dict Dependencies: ```python def v0(v1: pd.DataFrame, v2: Union[str, None], v3: Union[str, None], v4: Union[int, None]) -> Union[np.datetime64, float, int, str]: ...
Imports: ```python from collections import defaultdict import typing ``` Type definitions: ```python v0 = DefaultDict[str, List[str]] ``` Input Types: str Output Type: int Dependencies: ```python def v1(v2: str) -> bool: return v2.isupper() ``` ```python def v3(v4: v0, v5: str, v6: str) -> int: return walk(cave...
Imports: ```python import asyncio from typing import Any, AsyncIterable, AsyncIterator, Awaitable, Callable, ContextManager, Dict, Iterable, Iterator, List, Optional, Reversible, Set, Tuple, Type, TypeVar, Union, cast, no_type_check, overload import typing ``` Type definitions: ```python v0 = Union[AsyncIterable[T], It...
Imports: ```python import os import shutil import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: if v1 and os.path.exists(v1): if os.path.isdir(v1): shutil.rmtree(v1) else: os.unli...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> dict: for v2 in range(len(v1)): if v1[v2]['status'] == 0: return v1[v2 - 1] if v1[v2]['status'] == 1: ret...
Imports: ```python import numpy as np from sklearn.cluster import DBSCAN from sklearn.neighbors import LocalOutlierFactor import typing ``` Type definitions: Input Types: np.ndarray, dict Output Type: Any Dependencies: ```python def v0(v1, v2): v3 = np.max(v2) v4 = np.empty((v3, 2)) for v5 in range(v3): ...
Imports: ```python import re import typing ``` Type definitions: Input Types: Any, bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: bool=False) -> str: v1 = str(v1) v1 = re.sub("<class '([^']+)'>", '\\1', v1) v1 = re.sub('playwright\\._impl\\._api_structures.([...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self.last_node: return self.last_node.val ```
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 = -2147483648 v3 = v4 = 0 for v5 in v1: v6 = v3 v3 = max(v3, v2 + v5) v2 = max(v2, v4 - v5) ...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, List[str]], Any, bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, List[str]], v2=DEFAULT_PROCESS_TIMEOUT_SEC, v3: bool=True, v4: bool=True): print('cmd: ', v1) 'Write comma...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]], List[int], set, List[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[int]], v2: List[int], v3: set, v4: List[int]) -> None: if len(v2) == len(v4): v1.append(list(v2)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, **v2) -> None: self.app_service_config_files = v1.get('app_service_config_files', []) self.notify_appservices = v1.get('notify_appservices', True) ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int): v3 = (v1 - 1) * 64 + (v2 - 1) % 64 return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str='0') -> Response: v3 = {'Type': 'METADATA-' + v1.upper(), 'ID': v2, 'Format': 'COMPACT'} return self._http_request(self._url_for(...
Imports: ```python import typing ``` Type definitions: ```python class v0(Context): v1 = -1 v2 = None v3 = LITERAL_NO v4 = None def v5(self) -> str: v6 = self.accept(mypy.strconv.StrConv()) if v6 is None: return v2(self) return v6 @overload def v7(self, ...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str Output Type: (str, int) Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> (str, int): v1 = Path(v1).name v2 = len('step_') v3 = int(v1[v2:v2 + 2]) return (v1[v2 + 3:], v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if 'habituation' in v1 or 'bpod_ttl_test' in v1: return 'GaborHabituationTask' elif 'ephys_certification' in v1: return 'ephys_ce...
Imports: ```python import typing ``` Type definitions: Input Types: float, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float) -> None: if (v1, v2) != self._selection: self._selection = (v1, v2) self.update() ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = f'proxy.py --port {v1}'.split() subprocess.check_output(v2) ```
Imports: ```python import requests import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: str='10003045') -> pd.DataFrame: v2 = f'http://hq.sinajs.cn/list=CON_SO_{v1}' v3 = requests.get(v2) v4 = v3.t...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: while self.manager.is_running: self._peer_reporter_registry.trigger_peer_reports() await asyncio.sleep(self._report_...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2=2): v1 = v1.replace('_', ' ') v1 = v1.replace('@@', '') v1 = v1.strip('<s>') v3 = v1.split('\n') v3: List[str] = [l.strip(' ') for v4...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: str): v3 = v1[v2].dtype if isinstance(v3, pd.core.dtypes.dtypes.DatetimeTZDtype): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[Union[str, Dict], Dict] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[Union[str, Dict], Dict]: v1: str = self.handler.get_text() v2: Union[str, Dict] = v1 v3: Dict = {} v4: str = self.ha...
Imports: ```python import os import re import typing ``` Type definitions: Input Types: str, int, int, Any, Any Output Type: Any Dependencies: ```python def v0(v1: str): return 'rm -rf /' == v1.strip() ``` ```python def v2(v3: str, v4: bool=False, v5: bool=True, v6: str=None, v7: bool=False): if not isinstance...
Imports: ```python import typing ``` Type definitions: Input Types: str, Dict, bool Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict, v3: bool=False) -> Dict: v4 = {'sync': v3} v5 = self._make_url(f'collections/{v1}', params=v4) return self._request('PUT...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): if v1 == 141: return '141: 91BG' if v1 == 143: return '143: Iax' if v1 == 145: return '145: point Ia' if v1 == 149: ...
Imports: ```python import numpy as np import pandas as pd import gc import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): v2 = pd.concat(v1, ignore_index=True, sort=False) v2['index'] = np.arange(start=0, stop=len(v2)...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any Output Type: int Dependencies: ```python def v0(v1=None): if v1 is None: if not current_app or not current_app.config: raise ValueError('postgres_connection must receive a config if Flask.current_app is not define...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: ```python def v0(*v1): v2 = [tuple(pool) for v3 in v1] v4 = [[]] for v3 in v2: v4 = [x + y for v5 in v4 for v6 in v3] return v4 ``` ```python def v7(v8: dict[int, Union[list[list[int]], str]],...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, Union[AsyncIterator[bytes], bytes], Optional[str] Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str, v3: Union[AsyncIterator[bytes], bytes], v4: Optional[str]=None) -> None: async ...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: (float, float) Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: float) -> (float, float): v4 = v2 - v1 v5 = v2 + v4 * v3 v6 = v1 - v4 * v3 return (v6, v5) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = [line for (v2, v3) in self.platform.items() if self.OBJCOPY_STEP_NAME_REGEX.match(v2)] v1 = [self.replace_compile_binary_with_override...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: 'BaseActor') -> NoReturn: v2 = self.outbox.pop for v3 in v1: v2(v3.name, None) ```
Imports: ```python import typing ``` Type definitions: Input Types: models.Area Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: models.Area): v2 = ' ' print('Description: ', v1.description) if v1.parent: print('Parent:') print(v2, v1.parent.name) if v1....
Imports: ```python import torch import typing ``` Type definitions: Input Types: bool, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True, v2: bool=True): assert not v1 or (v1 and (not v2)), 'Training on the test set is not cool :c' self.metrics.reset() se...
Imports: ```python import logging import pickle import numpy as np import typing ``` Type definitions: Input Types: Sequence[Path], Optional[int] Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[Path], v2: Optional[int]) -> Tuple[np.ndarray...
Imports: ```python from string import punctuation import re import typing ``` Type definitions: Input Types: str, bool, bool Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False, v3: bool=True) -> str: if v3: v1 = v1.lower() v4 = ' ' v5 = ' ' if v...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int]=None) -> None: self._set_graspable = True if v1 is None: self._non_graspable = list() else: self._non_graspable = v...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path) -> int: v2 = 1 for v3 in reversed(range(self.hps.n_epochs)): v4 = self._model_path(v1, v3) if v4.exists(): if v2 and ...
Imports: ```python import sys import json import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str) -> bool: return v1.endswith('.apk') or v1.endswith('.jar') ``` ```python def v2(v3: str) -> str: if v3.startswith('system/system/'): return v3[len('syste...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: list[Edict2Glossary] v2: list[Edict2Japanese] v3: list[str] v4: Optional[str] v5: bool ``` Input Types: re.Pattern[str], v0 Output Type: Optional[Any] Dependencies: Function Name: v6 Function: ```python def v6...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.word_search.next_word() self.check_error() ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: ```python def v0(v1: str) -> str: v1 = v1.replace('..', '__') return v1 ``` Function Name: v2 Function: ```python def v2(v3: str, v4: str) -> bool: v4 = v0(v4) return os.path.isfile(os...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=''): v1 = 'Quit: %s' % v1 self.quit(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: List Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: List) -> Optional[str]: if not v1: return None v2 = {'salary-pl': 'player', 'salary-tm': 'team', 'salary-et': 'early termination'} for ...
Imports: ```python import math import typing ``` Type definitions: Input Types: (float, int) Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4, v5, v6): v7 = v2 v8 = v3 v9 = math.radians(v4) v10 = math.cos(v9) v11 = math.sin(v9) v12 = v6 * v11 v13 = v6 * v10 v14 = v5 * v11 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: callable(object) Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> callable(object): return lambda x: v1(self) pass ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1: int = self.parameters.get('nodes', 1) v2: int = self.parameters.get('ntasks_per_node', 1) return v1 * v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> int: for v2 in range(len(self.__db)): if self.__db[v2].id == v1: return v2 return -1 ```
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: List[Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> List[Dict]: v2 = [] for (v3, v4) in zip(v1.columns, v1.dtypes): v5 = {'FeatureName': v3} if v4 == 'floa...
Imports: ```python import torch from math import log2, ceil from torch.fft import fft, ifft import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, int, int Output Type: Any Dependencies: ```python def v0(v1, v2, v3, v4, v5, **v6): v7 = torch.zeros(v3, v4 * v5, **v6) for v8 in range(v4): ...
Imports: ```python import hashlib import typing ``` Type definitions: Input Types: dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> str: v2 = hashlib.blake2s(digest_size=5) for (v3, v4) in sorted(v1.items()): v2.update(str(v3).encode()) v2.update(st...