text
stringlengths
190
325k
Imports: ```python import torch.backends as backends import torch.cuda as cuda import torch.nn as nn import torch.utils.checkpoint as torchcheckpoint import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: assert cuda.is_available()...
Imports: ```python import re import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2): v3 = re.search(v1, v2.text) v4 = 0 while v3: yield v3 v5 = v3.span(0)[0] if v4 != v5: v4 = v5...
Imports: ```python import typing ``` Type definitions: Input Types: Union[int, str] Output Type: str Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: Union[int, str]) -> str: v2 = await self._export_chat_invite_link__make_request(chat_id=v1) return self._export_chat_invite_link__proc...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, pd.DataFrame, Union[List[str], str] Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2: pd.DataFrame, v3: Union[List[str], str], **v4: Any) -> pd.DataFrame: ...
Imports: ```python import typing ``` Type definitions: Input Types: io.TextIOWrapper Output Type: Tuple[str, str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: io.TextIOWrapper) -> Tuple[str, str, str]: v2 = next(v1).replace('\n', '') v3 = next(v1).replace('\n', '') next(v1) ...
Imports: ```python import tensorflow as tf from tensorflow.python.keras import layers from tensorflow.python.keras.utils import data_utils import typing ``` Type definitions: Input Types: bool, str, Tuple[int], Optional[str], int Output Type: tf.keras.Model Dependencies: ```python def v0(v1: Callable[[tf.Tensor], tf.T...
Imports: ```python from math import inf as infinito import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2 = -infinito v3 = [] for v4 in range(len(v1) - 1, -1, -1): if v1[v4] > v2: v2 = v1[v4] ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.df_rater.drop_duplicates(subset=['Rater', 'Frame', 'Trial'], keep='last', inplace=True) self.df_algo.columns = ['Trial', 'Label', '1', '2', '3',...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: Tuple[float, float] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple[float, float]: if self.beta > 0: if self._H is False: v1 = 2 / self.beta v2 = 0 ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, Optional[transport.PTransportSettings] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: Optional[transport.PTransportSettings]=None) -> str: v4 = self.delete(f'/users/{v1}/sessions/...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> None: self.weight = self.make_weight(v1)[:, :, None, None].add_(1) self.bias = self.make_bias(v1)[:, :, None, None] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str], Dict, Any Output Type: Dict Dependencies: ```python def v0(v1, v2): for (v3, v4) in zip(v1, v2): if v3 != v4: if v3.startswith('_'): return False if not (v4.startswith('{') and v4.end...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any], str, Optional[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Any], v2: str, v3: Optional[str]=None) -> str: if v2 in v1: return self.__filterNonPrintable(v1[v2].strip()...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int, v4: str) -> str: if abs(v1) < 25: return ('N', 'neutral') v1 = v1 * -1 if v3 % 2 == 0 else v1 v2 = v2 * -1 i...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str): self._manager = config.ConfigManager(v1) self._log_path = self._manager.get_file(LOGFILE_NAME) self._old_log_path = self._manager.get_file(LOGFILE_NAME_OLD) def v2(self, v3: str) -> ...
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 = self._sim v3 = v2.vehicle_index.actor_id_from_vehicle_id(v1) v4 = v2.vehicle_index.shadow_actor_id_from_vehicle_id(v1) v5 = v1...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=1e-05) -> float: v2 = self.q_vector if v2 is not None: v3 = np.sqrt(np.sum(v2 * v2)) return v3 if v3 > v1 e...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.theming['text'] = v1 self.build_text_layout() self.redraw_all_states() ```
Imports: ```python import numpy as np from pandas._libs import lib import pandas._libs.sparse as splib from pandas._libs.sparse import BlockIndex, IntIndex, SparseIndex from pandas._libs.tslibs import NaT from pandas._typing import ArrayLike, AstypeArg, Dtype, NpDtype, PositionalIndexer, Scalar, ScalarIndexer, Sequence...
Imports: ```python import torch from torch import nn import torch.nn.functional as F from torch.distributions import Normal import typing ``` Type definitions: Input Types: Tuple[torch.Tensor], bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tuple[torch.Tensor], v2: bool): ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[int, int] ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0): if self._is_free(v2): self.pos = v2 ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='./log.runlog'): v2 = v1 v3 = '%(asctime)s %(name)s:%(levelname)s:%(message)s' v4 = logging.FileHandler(filename=v2, encoding='utf-8', ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: ```python def v0(v1, v2): return ec2.instances.filter(Filters=[{'Name': v1, 'Values': [v2]}]) ``` ```python def v3(v4='t4g.2xlarge'): return v0('instance-type', v4) ``` Function Name: v5 Function: ```python ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.reqid += 1 v1 = {} v1['requestID'] = self.reqid v1['accountID'] = self.accountid self.reqStockQryStockStaticInfo(v1) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0() -> Tuple[str, str]: try: v1 = os.environ['NETMIKO_DIR'] except KeyError: v1 = NETMIKO_BASE_DIR v1 = os.path.expanduser(v1) if v1 == '/': raise Valu...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {} if hasattr(self, 'checksum'): v1['checksum'] = self.checksum if hasattr(self, 'custom_attribute'): v1['customAttribute'] ...
Imports: ```python import typing ``` Type definitions: Input Types: Union['futures.Future[_T]', 'Future[_T]'], Callable[..., None] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: Union['futures.Future[_T]', 'Future[_T]'], v2: Callable[..., None]) -> None: if v1.done(): v2(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = bytearray(self.state.phone_id, 'ascii') v2 = 0 for v3 in range(len(v1)): v2 += v1[v3] return f'2{v2}' ```
Imports: ```python from collections import deque import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.val = v1 self.left = None self.right = None ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0): ...
Imports: ```python from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: datetime, DataFrame, int Output Type: Tuple[int, int, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime, v2: DataFrame, v3: int) -> Tuple[int, int, int]: v4 = v1 + timedelt...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v1 = self.ensure_tree(v1) if self.is_empty(): self.node = v1.node self.left = v1.left self.right = v1.right re...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, **v1: Any) -> None: self.__instance_params = v1 for (v2, v3) in v1.items(): setattr(self, v2, v3) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: FloatArray, FloatArray Output Type: Tuple[FloatArray, FloatArray, IntArray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: FloatArray, v2: FloatArray) -> Tuple[FloatArray, FloatArray, IntArray]: (v3, v4) =...
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 = [col for v2 in [self.o, self.h, self.l, self.c, self.vwap] if v2 is not None] v3 = np.any(np.isnan(v1), axis=0) self.vali...
Imports: ```python import seaborn as sns import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: list Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> None: v2 = 1 plt.figure(figsize=(24, 16)) for v3 in self.dataframe[v1].columns: ...
Imports: ```python import math import numpy as np import scipy.sparse as sp import numpy.random as rnd import typing ``` Type definitions: Input Types: int, int, float, float, Optional[float], float, Optional[float], str Output Type: Tuple[Tuple[sp.spmatrix, sp.spmatrix], np.array] Dependencies: ```python def v0(v1: s...
Imports: ```python import torch from torch import device as _device import typing ``` Type definitions: Input Types: Optional[_device], bool, bool Output Type: int Dependencies: ```python def v0() -> int: if torch.cuda.device_count() > 0: return torch.cuda.current_device() return -1 ``` Function Name: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: bool def __init__(self) -> None: self.highlight = False def __repr__(self) -> str: """From the top level node, the tree is traversed and `linearized` to produce a representation with exactly one node def...
Imports: ```python import requests import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self.nodes v2 = None v3 = len(self.chain) print('get here') print(v1) for v4 in v1: v5 = requests.get(f'...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(): v1 = tuple((field.strip().lower() for v2 in lines[0].split('|'))) for v3 in lines[1:]: v4 = tuple((v2.strip() for v2 in v3.split('|'))) if len(v4) == 0: continu...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: str=None): self._check_legal_access(v1, v2) if v1 is None: return self.dataset elif v2 is None: return self.datas...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: ```python def v0(v1: str) -> bool: v2 = True for v3 in v1: for v4 in ['left', 'right']: v5 = v3[0] if v5 == '*': pass else: v5 = in...
Imports: ```python import typing ``` Type definitions: Input Types: str, Set[str] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: Set[str]) -> bool: if v1 in v2: return True v3 = v1.split('.') v3.append('*') while v3: v3[-1] = '*' if '....
Imports: ```python import typing ``` Type definitions: Input Types: Iterable[int], dict[int, set[int]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[int], v2: dict[int, set[int]]) -> None: self._highest = v3 = self._highest + 1 self._mod_seqs_order.append(v3) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python async def v0(self) -> Optional[str]: if not self.serial.isOpen(): return self.buffer += self.serial.read_all().decode() if '\n' in self.buffer: ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> bytes: v1 += self.X86_64_OFFSET v3 = self.object.Read(v1, v2, dbus_interface='org.example.TestsInterface') return bytes(v3) ...
Imports: ```python import pathlib import typing ``` Type definitions: Input Types: Any, Any Output Type: pathlib.Path Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> pathlib.Path: v3 = self.get_install_root(v1) v4 = self.get_install_prefix(v1) if v2 == 'sysconf': return...
Imports: ```python import subprocess from subprocess import PIPE, Popen, STDOUT import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = f'gpg -K {v1}'.split() try: subprocess.run(v2, check=True) retur...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: self._get_userdata_classes() return v1 in self.userdataclasses ```
Imports: ```python from os import path, makedirs import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: for v1 in self.subdirs: print(f'INFO Saving {v1}/{self.html_name}') makedirs(v1, exist_ok=True) wit...
Imports: ```python from polars import internals as pli from polars.internals.construction import arrow_to_pyseries, numpy_to_pyseries, pandas_to_pyseries, sequence_to_pyseries, series_to_pyseries from polars.datatypes import Boolean, DataType, Date, Datetime, Duration, Float32, Float64, Int8, Int16, Int32, Int64 from p...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: super().dry_run() v1: List[SftpFile] = self.get_sftp_files_map() for v2 in v1: self.log.info('Process will upload file from (SFTP) %s to ...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Union[int, None] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Union[int, None]: try: v2 = int(re.sub('[^0-9]', '', str(v1))) except ValueError: v2 = None return v2...
Imports: ```python from collections import deque import typing ``` Type definitions: Input Types: str Output Type: Iterator[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Iterator[str]: v2 = deque(list(v1)) while v2: v3 = v2.popleft() assert v3 in ['e', 'w', 's', '...
Imports: ```python import inspect import logging from typing import Any, Callable, List, Optional, Type, TypeVar, Union, cast, overload import typing ``` Type definitions: ```python class v0: v1: _FUNC_TYPE = None v2: Optional[str] = None v3: int = logging.NOTSET v4: Any = None v5: Optional[str] = N...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): self.build_layouts_toolbar() self.update_hex_viewer_actions() ```
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: super().reset() self.next_observations = np.zeros((self.buffer_size,) + self.obs_shape, dtype=self.env.observation_space.dtype) ``...
Imports: ```python import typing ``` Type definitions: Input Types: int, List[List[int]] Output Type: int Dependencies: ```python def v0(v1): if v1 in visited: return visited[v1] visited[v1] = -1 v2 = 1 for v3 in graph[v1]: v4 = v0(v3) if v4 == -1: return -1 ...
Imports: ```python import json import os import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2 = ['success_count', 'failure_count'] v3 = json.loads(os.getenv('RESULTS')) assert len(v3) == len(v1), f'results: {v3}\n\n...
Imports: ```python import typing ``` Type definitions: Input Types: np.array, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array, v2: int) -> None: (v3, v4, v5) = self._interpret_action_continuous(v1, v2) if v3: self.add_line(v4, v5) else: s...
Imports: ```python import torch from torch import nn from torch.nn.functional import cross_entropy from torch.optim import Adam from torch.utils.data import DataLoader import typing ``` Type definitions: Input Types: Dict[str, torch.Tensor], Dict Output Type: Dict[str, torch.Tensor] Dependencies: Function Name: v0 Fu...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, int Output Type: t.List[t.List[dict]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str, v4: int=1) -> t.List[t.List[dict]]: v5 = self.client.get(path=f'/projects/{v1}/{v2}/results', params=...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = self._get_enviornment_variable(self._environment_keys.PIP_KEY) v2 = {'Content-Type': 'application/vnd.az.batch.v1+json', 'x-api-key': v1, 'Accep...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> List[str]: v2 = [] with v1.open() as v3: for v4 in v3: v4.strip() v5 = v4.split(' ') v2.extend(v5)...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> bool: v2 = v1[..., 1].max() return v2 < 0.5 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = False v2 = None try: v2 = self.ui_theme.get_image('normal_image', self.combined_element_ids) except LookupError: v2 = No...
Imports: ```python import requests import shutil import os import typing ``` Type definitions: Input Types: str, str Output Type: image Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> image: v3 = requests.get(v1, stream=True) v4 = f'./Data/Images' if not os.path.exist...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): v1 = ['_key', '_parent', '_left', '_right', '_color'] def __init__(self, v2: int, v3, v4: bool): """ Constructor with parameter. :param key: int :param parent: Node :param color: boolean ...
Imports: ```python import pandas as pd import string import itertools import datetime import typing ``` Type definitions: Input Types: pd.DataFrame, snowquery.Connector, str, bool Output Type: bool Dependencies: ```python def v0(v1: str, v2: snowquery.Connector) -> list: v3 = f"SELECT\n ORDINAL_POSI...
Imports: ```python import math import typing ``` Type definitions: Input Types: int Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bytes: assert v1 in [2, 3] v2 = self.__send_cmd(198, parameter=[v1], response_length=2, echo_expected=False) v3 = int.from_byt...
Imports: ```python import subprocess import sys import typing ``` Type definitions: Input Types: str, bool, Optional[str] Output Type: Tuple[int, str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False, v3: Optional[str]=None) -> Tuple[int, str, str]: if v2: sys.stdout...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: 'Dataset' Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, **v3) -> 'Dataset': self._check_dim(v2) return self.obj.map(v1, dim=v2, **v3) ```
Imports: ```python import sqlite3 from contextlib import closing import typing ``` Type definitions: Input Types: int, dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: dict) -> None: if v2 == {}: return with closing(sqlite3.connect('./taskmanager/data/task...
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 = 0 v3 = -1 v4 = '' for (v5, v6) in enumerate(v1): if v6 not in v1[v2:v3 + 1]: v3 += 1 if len(v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: list): v3 = ['%s[%d].lambdify()(x)*(%s<=x<%s)' % (v1, i, v2[i], v2[i + 1]) for v4 in range(len(v2) - 1)] return eval('lambda x: %s' % '+'.join(...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array, np.array, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: np.array, v3): v1 = v1.squeeze() v2 = v2.squeeze() if v3 == 'origin': return np.concatenate([...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: Any, Any Output Type: cv2.VideoWriter Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> cv2.VideoWriter: print('Creating writer %s' % v1) print('Fourcc: %s' % v2) v2 = cv2.VideoWriter_fourcc(*v2) v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> dict: v3 = {} for (v4, v5) in v1: v3[v4] = v2[v5].copy() return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=100): v2 = {} v3 = {} (v4, v5) = self.process_protocol(v1) v2.update(v4) v3.update(v5) return (v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self.state if v1 is None: self._logger.debug('Not got enough state to start yet... waiting... no state.') elif v1.dungeon_map is Non...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: TraceFrameQueryResult v2: int = 1 v3: bool = False v4: bool = False ``` Input Types: v0 Output Type: Tuple[str, str] Dependencies: Function Name: v5 Function: ```python def v5(self, v6: v0) -> Tuple[str, str]: ...
Imports: ```python import gzip import pickle import logging import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): try: v2 = gzip.open('cache.gz', 'wb') v1 = pickle.dump(v1, v2) v2.close() print('...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: ```python def v0(v1: pd.DataFrame) -> pd.DataFrame: if v1['subtype_id'] in [81, 36, 21, 90, 91]: v2 = 'other' elif v1['subtype_id'] == 82: v2 = 'head' elif v1['type_id'] ...
Imports: ```python import math import typing ``` Type definitions: Input Types: List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> None: self.idf_col = list() self.vocabulary = list() v2 = self.preprocess(v1) for v3 in v2: for v4 in v...
Imports: ```python import random import requests import typing ``` Type definitions: Input Types: Output Type: List[Dict] Dependencies: ```python def v0(v1: str) -> requests.Response: return requests.get(v1, headers={'User-Agent': REDDIT_USER_AGENT}) ``` Function Name: v2 Function: ```python def v2() -> List[Dict...
Imports: ```python import typing ``` Type definitions: Input Types: str, type Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: type): if not isinstance(v1, str): raise TypeError('parameter_name must be a str') if not isinstance(v2, type): raise Typ...
Imports: ```python import datetime import asyncio import typing ``` Type definitions: Input Types: datetime.time Output Type: bool Dependencies: ```python def v0(*v2, v1: float=None): v3 = asyncio.get_event_loop() if not v2: if v3.is_running(): return v3.run_forever() v4 = a...
Imports: ```python import torch from torch import Tensor import torch.distributions as D from torch.nn.functional import mse_loss import typing ``` Type definitions: Input Types: dict, dict Output Type: Tuple[Tensor, Tensor] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: dict) -> Tuple...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, float, float, int, float, float Output Type: float Dependencies: ```python def v0(v1, v2, v3, v4): v1[0] = v2 v1[1] = v3 v1[2] = v4 ``` ```python def v5(v6: float, v7: float, v8: float) -> float: v9 = [0, 0, 0...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Optional[calibration.Calibration] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> Optional[calibration.Calibration]: if not self._calibrations: return None return self._calibrations[max(se...
Imports: ```python import typing ``` Type definitions: ```python v0 = Tuple[List[hikari.Embed], str] ``` Input Types: int Output Type: v0 | None Dependencies: Function Name: v1 Function: ```python async def v1(self, v2: int) -> v0 | None: if v2 < 0: return None self.index = v2 while self.index > le...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict): for v2 in self.per_ep_group_data.keys(): if v2 not in v1: v1[v2] = np.nan self.per_ep_group_data[v2]....
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Tuple[str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> Tuple[str, int]: v2 = chr(v1 & 255) v3 = v1 >> 8 << 8 return (v2, v3) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: bytearray): """ Initialize an instance of Genotype :param array_of_bytes: The underlying representation of the genotype. For some application, each byte can represent an ascii c...
Imports: ```python from collections import OrderedDict import typing ``` Type definitions: Input Types: Output Type: List[OrderedDict] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[OrderedDict]: v1: List[OrderedDict] = [] for (v2, v3) in self.component_configurations.items(): ...
Imports: ```python import torch from torch._C import dtype import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, Any, Any, int, int, Any Output Type: Any Dependencies: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3=None, v4=1): (v5, v6, v7, v8...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, int, List[Union[str, int]], Set[Union[str, int]]], Union[str, int, List[Union[str, int]], Set[Union[str, int]]], bool Output Type: Union[str, int, List[Union[str, int]], Set[Union[str, int]]] Dependencies: Function Name: v0 Function: ```py...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: if 'CSW' in v1: v1 = 'CSW' elif 'Unittest' in v1: v1 = 'Unittest' elif 'Coverage' in v1: v1 = 'Coverage' el...
Imports: ```python import torch from torch import Tensor from torch.jit.annotations import List, Tuple import typing ``` Type definitions: Input Types: Tensor, int, int, int, int, List[int], int Output Type: Tensor Dependencies: ```python def v0(v1: Tensor, v2: int, v3: int, v4: int, v5: int) -> Tensor: if not isi...
Imports: ```python import PIL.Image as Image import torch from torch.autograd import Variable from PIL.ImageOps import invert import typing ``` Type definitions: Input Types: Union[torch.Tensor, List[torch.Tensor]], int, int, bool, Optional[Tuple[int, int]], bool, int Output Type: Any Dependencies: ```python def v0(v1...