text
stringlengths
190
325k
Imports: ```python 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: v2 = self(v1) v2 = [self.sm(out) for v3 in v2] return v2 ```
Imports: ```python import copy import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=10, v2: int=10) -> None: self.currentShips = copy.deepcopy(self.ships) self.sunkShips: list[str] = [] self.hits: list = [] ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, datetime, str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = 1 v3 = os.path.dirname(v1) v4 = os.path.basename(v1) (v5, v6) = os.path.splitext(v4) while True: v7 = v5 + f'_{v2}{v6}'...
Imports: ```python import os import typing ``` Type definitions: Input Types: Optional[dict] Output Type: Optional[dict] Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[dict]) -> Optional[dict]: if v1 is None: return None v2 = {} v2['SYSTEMROOT'] = os.environ.get('SYSTEMROO...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Any Output Type: typing.Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Any) -> typing.Any: if v1 is None: return None if isinstance(self.items, list): return [serializer.serialize(value)...
Imports: ```python import numpy as np import numpy.ma as ma from pandas._config import get_option from pandas._libs import algos as libalgos, lib, properties from pandas._libs.lib import no_default from pandas._typing import AggFuncType, AnyArrayLike, ArrayLike, Axes, Axis, ColspaceArgType, CompressionOptions, Dtype, F...
Imports: ```python import typing ``` Type definitions: Input Types: 'IntcodeComputer', str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'IntcodeComputer', v2: str): v1.done = True raise StopIteration() ```
Imports: ```python from pathlib import Path import sqlite3 import typing ``` Type definitions: Input Types: Union[str, Path] Output Type: sqlite3.Connection Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path]) -> sqlite3.Connection: v2 = Path(v1) if not v2.is_file(): v3 = f...
Imports: ```python import collections import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: v2 = list() v3 = 0 while v3 < len(v1): v4 = v1[v3] v5 = ord(v4) if 65 <= v5 <= 90: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = [] for v2 in self._subsets: v1 += list(self._dictionary_symbols_counting[self.get_qubits_key(v2)]) (v3, v4) = (mi...
Imports: ```python from urllib.parse import urljoin import typing ``` Type definitions: Input Types: int, List[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: List[int]): v3 = urljoin(self.api_url, self.URL_BULK_GET_FOLDERS) v4 = self._request(v3, 'put', par...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): v2 = '' for v3 in v1: v2 += v1[v3] if v3 != list(v1.keys())[-1]: v2 += ',' return v2 ```
Imports: ```python from tensorflow.keras.datasets import mnist, cifar10 from tensorflow.keras.utils import to_categorical import typing ``` Type definitions: Input Types: str Output Type: tuple Dependencies: ```python def v0(): v1 = 10 v2 = 64 v3 = (3072,) ((v4, v5), (v6, v7)) = cifar10.load_data() ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: v1 = self.position_controller.distance_travelled v2 = self.position_controller.angle v3 = self.status.target_dist - v1 v4 = self.status...
Imports: ```python import pandas as pd from tqdm import tqdm import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: ```python def v0(v1: pd.DataFrame) -> pd.DataFrame: tqdm.pandas(desc='Converting phone numbers to E.164 format') v2 = v1[['Country', 'Phone']].progr...
Imports: ```python import typing ``` Type definitions: Input Types: str, Optional[str] Output Type: Union[dict, bytes] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: Optional[str]='siteName') -> Union[dict, bytes]: self.check_subnets(v1) v3 = dict(startingPoint=v1, type='p...
Imports: ```python from collections import OrderedDict import typing ``` Type definitions: Input Types: int, dict, str, str, Path, dict, dict, logging.Logger Output Type: Any Dependencies: ```python def v0(v1: float, v2: str, v3: dict, v4: dict): if v1 == 'x': return False v5 = v3.get(str(v2)) v6 =...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: str='False'): v3 = await self.library_ctx.get_current_page().querySelector_with_selenium_locator(v1) await v3.click() ```
Imports: ```python import typing ``` Type definitions: ```python class v0(dict): def __init__(self, v1: str, v2: str, v3: int, v4: AlarmSeverity, v5: str, v6: str=''): """ Creates an object with the specified items. """ dict.__init__(self) self[KEY_MANAGED_OBJECT_ID] = v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: Union[int, float] Dependencies: ```python def v0(v1: list, v2: Union[int, float]) -> Union[int, float]: v3 = 0 for v4 in v1: if v4 <= v2: v3 += 1 v5 = 100.0 * v3 / len(v1) return v5 ``` Functio...
Imports: ```python import logging import os import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if os.path.exists(os.path.expanduser('~') + '/.omg/data_watcher'): logging.info('Chain data found') return True ...
Imports: ```python import typing ``` Type definitions: Input Types: ir.Ins, regs.EmitContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ir.Ins, v2: regs.EmitContext): v2.scratch_cpu_reg = v1.operands[0].cpu_reg return [] ```
Imports: ```python import json from json import JSONEncoder import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Union[List[ExperimentSetting], List[List[ExperimentSetting]]], v2: Program, v3: Optional[List[int]]=None, *, v4: int=SymmetrizationLevel.EXHAUSTIVE): if len(v1) == 0: ...
Imports: ```python import typing ``` Type definitions: Input Types: decafAlejandroV2Parser.Field_varContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: decafAlejandroV2Parser.Field_varContext): if v1 not in self.dictCodigoIntermedio.keys(): if v1.var_id() is not N...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> NoReturn: if v1.ndim > 1: raise NotImplementedError() self.lin_reg.fit(self.__transform(v...
Imports: ```python import random import numpy as np import torch from torch.utils.data import Dataset import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = torch.initial_seed() v3 = np.random.SeedSequence([v2]) np.ra...
Imports: ```python import typing ``` Type definitions: Input Types: float, float, Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: Tensor): v4 = min(max(round(v2.item()), 0), v3.shape[0] - 1) v5 = min(max(round(v1.item()), 0), v3.shape[1] - 1) re...
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): v1 = v2 * self.indentation + v1 self.append_text(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> str: v3 = '' if not v2.startswith('/'): v3 = '/' return f'{v1}' + v3 + f'{v2}' ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional['TimeAxis.TimePart'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional['TimeAxis.TimePart']: for v2 in self.time_parts: if v2.slug == v1: return v2 return None ...
Imports: ```python import typing ``` Type definitions: Input Types: Text, Union[int, float], Text Output Type: 'StepRequestValidation' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Text, v2: Union[int, float], v3: Text='') -> 'StepRequestValidation': self.__step_context.validators.append({'...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray) -> np.ndarray: v1 = np.insert(v1, v1.shape[1], values=1, axis=1) v2 = np.dot(v1, self.w.T) return np.ar...
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.filelist = self.gitdiff.get_diff() self._get_diff_after(v1) ```
Imports: ```python import json import tempfile import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1): v2 = [] v3 = None with open(v1, 'r') as v4: v5 = v4.read() v6 = osb.treeid_from_manifest(v5) if v6: v2 += [v6] v3 = osb.ma...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: tuple[str, dict[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> tuple[str, dict[str, str]]: with open(v1) as v2: v3 = v2.read().splitlines() (v4, v5, *v6) = v3 v6 = {from_str: to_...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.database if type(v1) is dict: return else: v1.sync() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: self._longpoll = await self._bot.method('messages.getLongPollServer') self._longpoll_url = 'https://' + self._longpoll['server'] self.ts = ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if v1 in ['ID', 'PHONE', 'CURRENCY']: v2 = 'INT' elif v1 in ['REFERENCE', 'PICKLIST', 'TEXTAREA', 'ADDRESS', 'URL']: v2 = 'VARCHAR...
Imports: ```python from random import random, randint, choice, choices, gauss import typing ``` Type definitions: Input Types: bool Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: bool=True) -> int: (v2, v3) = (2, 1) if v1 else (1, 1) return max(0, round(gauss(v2, v3))) ```
Imports: ```python import requests import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> dict: v4 = locals() if 'self' in v4: del v4['self'] v5 = self.headers.copy() v5['Content-Type'] = ...
Imports: ```python import torch from torch import Tensor, _TypedStorage import torch._prims.utils as utils from torch._prims.utils import TensorLike, TensorLikeType, ShapeType, getnvFuserDtype, DimsType, DimsSequenceType, StrideType, Number, NumberType, TensorMeta from torch.overrides import has_torch_function, handle_...
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 = [] v3 = len(v1) v4 = [0] * 26 v5 = lambda ch: ord(ch) - ord('a') v6 = lambda i: chr(ord('a') + i) for v7 in v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, discord.Member Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: discord.Member) -> None: await v1.remove_reaction('⬅️', self.client.user) await v1.remove_reaction('➡️', self.client.user) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Any, v2: Any, v3: Any) -> None: if v3 is None: if v2 in v1: del v1[v2] else: v1[v2] = v3 ```
Imports: ```python 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: v2 = self.encoder(v1) v3 = self.encoder.avgpool(v2) if v2.ndim > 2 else v2 v3 = v3.reshape(v3.size(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.document.add_heading(self.TITLE, level=0) self.document.add_paragraph(self.intro_text) self.document.add_paragraph() self._get_numeric_o...
Imports: ```python import warnings import torch import typing ``` Type definitions: ```python v0 = Union[int, torch.device] ``` Input Types: List[v0] Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python def v1(v2: List[v0]) -> List[v0]: v3: List[v0] = [] for v4 in v2: try: ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: int) -> List[int]: v3 = [] v4 = 0 for v5 in range(len(v1)): v6 = v4 + v1[v5] if v5 - v2 >= 0: ...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True): v2 = self.table_apps.get_width() v3 = self.toolbar_filters.sizeHint().width() v4 = self.toolbar_status.sizeHint().width() v5 = max(...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: if self._trace_store_calls: print(f'{self._class_name}.getsize(key={v1!r})') return len(self._vfs[v1]) + self._num_data_var_chunks_...
Imports: ```python import typing ``` Type definitions: ```python class v0(KohlerDataEntity): def __init__(self, v1: str, v2: str, v3: Optional[str], v4: Union[str, bool, int, float], v5: str, v6: str, v7: str, v8: bool, v9: str=None, v10: str=None): super().__init__(v1, v2, v7, v8) self.deviceClass...
Imports: ```python import typing ``` Type definitions: ```python class v0(BaseCollection): def __init__(self, v1: str, v2: List[BoardGame]=[]): super().__init__(v1, v2, item_fields_check=BOARDGAME_FIELD_CHECK) self.header = '' + 'title'.ljust(30) + 'players'.rjust(5) + 'duration'.rjust(10) + 'recom...
Imports: ```python from typing import Any, Dict, ForwardRef, List, Optional, Tuple, Type, TypeVar, Union import typing ``` Type definitions: Input Types: Optional[str], Optional[int] Output Type: List[List[str]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str]=None, v2: Optional[int]...
Imports: ```python import typing ``` Type definitions: Input Types: datetime.date Output Type: Dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: datetime.date=None) -> Dict: v1 = v1 or self.last_trade_date v2 = self.get_cash(v1) v3 = await self.get_assets(v1) return {'nam...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0() -> bool: if os.system('node -v') > 0: raise RuntimeError('NodeJS is not installed') if os.system('npm -v') > 0: raise RuntimeError('npm ...
Imports: ```python from urllib.parse import quote, unquote_plus, urlparse, urlunparse import typing ``` Type definitions: Input Types: Any, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str, v3: bool): try: v4 = v1.decode() except AttributeError: ...
Imports: ```python from os import getenv import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = str(getenv('INVMON_SQLITE_PATH')) if v1 == 'None': return self.__defaultPath__ else: return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> dict: v2 = getattr(self, v1) return {name: value for (v3, v4) in v2.items() if v4.should_be_shown} ```
Imports: ```python import typing ``` Type definitions: Input Types: 'IRunner' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'IRunner') -> None: self.counter = 0 self.counter2 = [0] * 4 self.counter3 = 0 ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str], bool, Optional[str], bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2: bool, v3: Optional[str], v4: bool) -> None: if v2: v1 = [item.lower() for v5 in v1] for v6 in v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[str, str]: assert 'tags' in self.source return (self.docid, str(self.source['tags'][0])) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str, List[str], bool Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: List[str], v3: bool=False) -> Iterator[str]: for (v4, v5, v6) in os.walk(v1): for v7 in v6: (v8,...
Imports: ```python import datetime as dt import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame): v2 = v1.date.max() v3: pd.DataFrame = v1.loc[v1.date == v2] v3.set_index('fips', drop=False, append=False, i...
Imports: ```python import typing ``` Type definitions: Input Types: ast.Call, List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Call, v2: List[str]) -> str: if len(v1.args) == 1: return f'0..{v2[0]}' elif len(v1.args) == 2: return f'{v2[0]}..{v...
Imports: ```python import typing ``` Type definitions: Input Types: Condition Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Condition) -> None: if v1 in self.__conditions: self.__conditions.remove(v1) ```
Imports: ```python import datetime import pickle import typing ``` Type definitions: Input Types: Output Type: list Dependencies: ```python def v0(v1, v2=None) -> list: if v2 is None: v2 = [] v3 = False for v4 in range(len(v2)): v5 = v2[v4] if v5[0] == v1[0]: if v5[1] =...
Imports: ```python import pathlib import typing ``` Type definitions: ```python v0 = List[Tuple[str, pathlib.Path]] ``` Input Types: str, str Output Type: v0 Dependencies: ```python def v1(v2: str, v3: str) -> str: (v4, v5) = v3.split(':') assert v4.startswith('//'), f'Build target should start with "//" but is...
Imports: ```python from typing import List, Union, cast import numpy as np from shapely.geometry import Polygon, MultiPolygon import typing ``` Type definitions: ```python class v0(TypedDict): v1: str v2: Union[List[List[List[float]]], List[List[List[List[float]]]]] ``` Input Types: v0 Output Type: MultiPolygon...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Any, dict, str, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: dict, v3: str, v4: dict): try: v5 = v3 in v2 v6 = v1['DATE'] <= v4['Date'] v7 = v1['VEST'] == 'VEST'...
Imports: ```python import torch import torch.nn.functional as F from torch.distributions.kl import kl_divergence import typing ``` Type definitions: Input Types: Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self) -> torch.Tensor: v1 = torch.cat(self.preds) v2 = torch.c...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> Tuple[np.ndarray, np.ndarray]: v3 = np.arange(v1.shape[0]) np.r...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Union[str, bytes, os.PathLike] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, bytes, os.PathLike]) -> None: if not Path(v1).is_file(): raise FileNotFoundError(f'file "{...
Imports: ```python import re from collections import defaultdict import typing ``` Type definitions: Input Types: [] Output Type: {str: {str}} Dependencies: ```python def v0(v1: str) -> furl.furl: try: v2 = furl.furl(v1) if not v2.host: v2 = furl.furl('http://' + v1) return v2 ...
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.hooks.get(v1) if v2 is not None: self._runfile(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: 'pl.LightningModule', str Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: 'pl.LightningModule', v2: str) -> List[Any]: v3 = getattr(v1, 'trainer', None) v4: List[Any] = [] if hasattr(v1, v2): ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[List[Callable], Dict[str, Callable]] ``` ```python v1 = Union[tuple, dict] ``` Input Types: v1 Output Type: (v1, v0) Dependencies: ```python def v2(v3: Any, v4: str=None, **v5) -> Any: return v3 ``` Function Name: v6 Function: ```python def...
Imports: ```python import typing ``` Type definitions: Input Types: pytest.Item Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: pytest.Item) -> int: v2 = tuple(v1.iter_markers(name='world_size')) assert len(v2) <= 1 if len(v2) == 1: v3 = v2[0] return v3.args...
Imports: ```python import typing ``` Type definitions: Input Types: int, Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2=None) -> int: if v2 is None: return (self._get_val(v1) << 16) + self._get_val(v1 + 1) else: v3 = self._set_val(v1, v2 >> 16...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> float: if self.dirty or v1: self.dirty = True self.process_image_sequence() self.dirty = False if self.valid: ...
Imports: ```python import typing ``` Type definitions: Input Types: list[dict], dict Output Type: tuple[list[dict], list[str]] Dependencies: ```python def v0(v1: str) -> str: v2 = 'PDC-hazard-' assert v1.startswith(v2) return v1.removeprefix(v2) ``` ```python def v3(v4: dict) -> dict[str, str]: v5 = v4...
Imports: ```python import typing ``` Type definitions: Input Types: Namespace Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Namespace) -> dict: v2 = {**self._opts} for (v3, v4) in vars(v1).items(): if v4 is not None: v2[v3] = v4 return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, UUID Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: UUID): v3 = self.services['telnet'] await v3.disconnect_session(v2) ```
Imports: ```python import json import typing ``` Type definitions: ```python v0 = Dict[str, Union[str, int, dict]] ``` ```python v1 = Dict[Union[int, str], Union[int, str, dict]] ``` Input Types: Output Type: Dict[str, Any] Dependencies: ```python def v2(v3: v1, v4: int) -> v0: v5 = {'message_id': v3[1], 'peer_id'...
Imports: ```python import re from pathlib import Path import typing ``` Type definitions: Input Types: Iterable['Script'] Output Type: Any Dependencies: ```python def v0(v1): return re.search('^airflow_version\\s*=.*', v1, flags=re.MULTILINE) is not None ``` ```python def v2(v3, v4): v5 = re.sub('(^depends_on....
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float): while True: v2 = int(v1) yield v2 v3 = v1 - v2 if not v3: return v1 = 1 / v3 ```
Imports: ```python from Bio import SeqIO from Bio.SeqRecord import SeqRecord import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='') -> int: if not v1: v1 = self._filename() + '.fasta' self._check_output() r...
Imports: ```python import os import requests import tqdm import typing ``` Type definitions: Input Types: Output Type: int Dependencies: ```python def v0(v1: str, v2: str) -> None: v3 = requests.get(url=imkimecon.API_ENDPOINT, params=dict(action='adjustments', symbol=v1)) v4 = f'{v1}.txt' v5 = os.path.joi...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, Tuple[str] Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Tuple[str]=None) -> Path: v3 = Path(v1) if not v3.is_file(): raise FileNotFoundError(f'No such file: `{...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> None: v3 = Path(v2, v1) Path(v3).mkdir(parents=True, exist_ok=True) return None ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: type Dependencies: Function Name: v0 Function: ```python def v0(v1) -> type: v2 = [int, float, str] for v3 in v2: try: v3(v1) return v3 except ValueError: continue raise...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str) -> Dict: v4 = self.get_function_params(v1, v2) v5 = v4.get(v3, {}) return v5 if v5 else {} ```
Imports: ```python import typing ``` Type definitions: Input Types: typing.Any Output Type: typing.Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Any) -> typing.Any: if v1 is None: return None return dict(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, str]: v1 = {model_id: model_name for (v2, v3) in zip(self.model_ids, self.model_names)} v4 = {v3: v2 for (v2, v3) in zip(self.model_ids...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=0.0, v2: float=0.0) -> None: v3 = self.resolution self.slice_num = int(np.abs(v1 - v2) * v3) ```
Imports: ```python import os import numpy as np import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: str, bool, Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2, v3: list, v4, v5=None, v6=None, v7='shap_values', v8=False, v9=None): (v10, v11, v12) = v1.shape assert v2...
Imports: ```python import typing ``` Type definitions: Input Types: dict, Any, Any, Any, Any, Any, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None, v2='', v3='', v4='', v5='', v6=False, v7=8, v8=None): if v1: for (v9, v10) in v1.items(): ...
Imports: ```python import typing ``` Type definitions: Input Types: t.Optional[t.Text] Output Type: 'SystemSettings' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: t.Optional[t.Text]=None) -> 'SystemSettings': if v1 and v1 in self.settings.platforms: del self.settings.platforms[v1] ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=None) -> list: v3 = [] v4 = {'metric': v1} if v2: v4.update(id=v2) for v5 in self._iter_vars(type='metric', filter_parms=v4): ...
Imports: ```python import pandas as pd 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.model = self.get_model() v2 = pd.DataFrame({'epoch': [self._df.model.num_epochs], 'train_loss': ...
Imports: ```python import asyncio import threading import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: Callable[..., v0] Output Type: v0 Dependencies: ```python def v1() -> None: v2 = func() loop.call_soon_threadsafe(future.set_result, v2) ``` Function Name: v3 Function: ```python a...