text
stringlengths
190
325k
Imports: ```python import numpy import torch from sklearn.neighbors import NearestNeighbors import typing ``` Type definitions: Input Types: torch.Tensor, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: bool): v3 = v1.device v4 = v1.shape[0] v5 ...
Imports: ```python import numpy as np from numpy.typing import ArrayLike import typing ``` Type definitions: Input Types: np.ndarray, str, str, Tuple[int, int] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, *, v2: str='uint8', v3: str='minmax', v4: Tuple[int, int]=(...
Imports: ```python import torch from torch import Tensor import typing ``` Type definitions: Input Types: Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: Tensor) -> Tensor: assert len(v1.shape) == 3 and (v1.size(2) == 1 or v1.size(2) == 3), 'RGB image must have dimensiona...
Imports: ```python from cvxpy.atoms.affine.bmat import bmat from cvxpy.atoms.affine.trace import trace from cvxpy.constraints.constraint import Constraint from cvxpy.expressions.variable import Variable import typing ``` Type definitions: Input Types: Any, Any Output Type: Tuple[float, List[Constraint]] Dependencies: ...
Imports: ```python import numpy import cv2 import typing ``` Type definitions: Input Types: numpy.ndarray, List, List, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: numpy.ndarray, v2: List, v3: List, v4: float=2) -> None: v5 = numpy.array(v2).astype(int) cv2.rectangle(...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._times_connected += 1 if self._times_connected > 1: return return asyncio.create_task(self._prepare_application_comma...
Imports: ```python import os import pandas as pd import shutil import typing ``` Type definitions: Input Types: str, str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> dict: self.logger.info(f'VPLoader - Start of viral proteome data processing.') (v3, v...
Imports: ```python import typing ``` Type definitions: Input Types: Dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict) -> str: v2 = '' for (v3, v4) in v1.items(): v2 += f' -{v3}' if len(v3) == 1 else f' --{v3}' if not isinstance(v4, bool): v2...
Imports: ```python import typing ``` Type definitions: Input Types: Any, discord.Role Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1, v2: discord.Role): await self.updateRoleList(v1) v3 = await self.config.guild(v1.guild).roleList() v3.remove(self.roledataItem(v...
Imports: ```python from math import pi import typing ``` Type definitions: Input Types: float, float, float, float, float, float, float Output Type: Any Dependencies: ```python def v0(v1: float): return cnst.k * v1 ``` ```python def v2(v3, v4=cnst.c): return v4 / v3 ``` Function Name: v5 Function: ```python de...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: ```python async def v0(v1: int) -> Optional[models.Member]: return await models.Member.get(v1) ``` Function Name: v2 Function: ```python async def v2(v3: int) -> bool: v4 = await v0(v3) return v4.watched...
Imports: ```python import torch from torch import nn from torch.nn import functional as F import typing ``` Type definitions: Input Types: dict, dict, tuple, tuple, tuple, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: dict, v3: tuple, v4: tuple, v5: tuple, v6=False): ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.ensure_current_steps() for v2 in self.current_steps: v2.add_event(v1) ```
Imports: ```python import importlib import typing ``` Type definitions: Input Types: Union[Type[Any], str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[Type[Any], str]) -> Any: if isinstance(v1, str): v2 = v1.split('.') v3 = '.'.join(v2[:-1]) v1 = v...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame, v2: bool): v3 = self._extractor(v1) return v3.dot(self._components) ```
Imports: ```python from urllib import parse import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = v2 = v3 = None v4 = False while True: v5 = self.__network.Get() for (v6, v7) in v5.items(): ...
Imports: ```python import os import typing ``` Type definitions: Input Types: int, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: bool) -> None: if not self._shutdown_signal or not self._terminate_signal: return if not v2: os.system(f'shutd...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: str) -> bool: v3 = "SELECT 1 FROM sqlite_master WHERE type='table' and name = ?" return v1.execute(v3, (v2,)).fetchone() is not None ```
Imports: ```python import os import pathlib import platform import typing ``` Type definitions: Input Types: str, bool Output Type: str Dependencies: ```python def v0(v1: str, v2=False) -> str: assert v1 v1 = os.path.abspath(os.path.expanduser(os.path.expandvars(v1))) if v2: os.makedirs(v1, exist_o...
Imports: ```python import typing ``` Type definitions: Input Types: Union[list, tuple], int Output Type: list Dependencies: ```python def v0(v1: int, v2: int) -> (int, int): v3 = v1 // v2 v4 = v1 - v2 * v3 return (v3, v4) ``` Function Name: v5 Function: ```python def v5(v6: Union[list, tuple], v7: int) -> ...
Imports: ```python 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, FilePathOrBuffer, FloatFormatType, Formatt...
Imports: ```python from datetime import date, datetime, timedelta from polars import internals as pli from polars.datatypes import DataType, Date, Datetime, Float64, Object, UInt32, py_type_to_dtype import typing ``` Type definitions: ```python class v0: def __init__(self) -> None: self._pyexpr: PyExpr ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = {key: value for (v2, v3) in self.options.items() if v2 in self.cfg.settings and v3 is not None} for (v2, v3) in v1.items(): self.cfg.set...
Imports: ```python import json import subprocess import typing ``` Type definitions: ```python v0 = NewType('EnvVarName', str) ``` ```python v1 = NewType('FieldName', str) ``` ```python v2 = NewType('FieldValue', str) ``` ```python v3 = NewType('OpListItemsOutputOrderedByEnvVarName', List[OpListItemsEntry]) ``` Input T...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: if 'lgpassword' not in self._uniquedescriptionstr(): super()._write_cache(v1) ```
Imports: ```python import typing ``` Type definitions: ```python @dataclasses.dataclass class v0: v1: Connection v2: sqlalchemy.sql.Select v3: Any v4: Any v5: bool = False v6: Optional[_ResultProxyFake] = None v7: Optional[Exception] = None ``` Input Types: greenlet.greenlet Output Type: Dic...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any Output Type: np.array Dependencies: ```python def v0(v1, v2): if v1 >= v2: return 1 return 0 ``` Function Name: v3 Function: ```python def v3(self, v4, v5) -> np.array: v6 = v5[self._csp_enum.LOW] d...
Imports: ```python import typing ``` Type definitions: Input Types: int | None Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int | None) -> int: if v1 is None: return 100000 // (len(self.cols) or 1) or 1 return int(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> bool: for v2 in range(0, self.n + 1): for v3 in range(0, self.n + 1): for v4 in range(0, self.n + 1): if...
Imports: ```python import typing ``` Type definitions: Input Types: tuple Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple): self.pos = v1 self.hitbox.topleft = (self.pos[0] + 10, self.pos[1] + 5) ```
Imports: ```python from shapely.geometry import Polygon, LineString, LinearRing, Point from shapely.geometry.base import BaseGeometry from shapely.ops import nearest_points import typing ``` Type definitions: Input Types: BaseGeometry Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> None: if self.__endIndex > len(v1): raise IndexError('CompoundOperation: cannot delete index range {}:{} (out of bounds)'.forma...
Imports: ```python import re import typing ``` Type definitions: ```python v0 = typing.Dict[str, typing.Any] ``` Input Types: v0, typing.Any Output Type: bool Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: typing.Any) -> bool: if 'syntax_names' in v2 and v3.disabled_syntaxes: ...
Imports: ```python import typing ``` Type definitions: Input Types: couchbaseConstants.BATCH_MSG, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: couchbaseConstants.BATCH_MSG, v2: int): self.msgs.append(v1) self.bytes = self.bytes + v2 ```
Imports: ```python from itertools import product, count import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: ```python def v0(v1: List[List[str]]) -> List[List[str]]: v2 = [] for (v3, v4) in enumerate(v1): v5 = [] for (v6, v7) in enumerate(v4): v8 = [v...
Imports: ```python import typing ``` Type definitions: Input Types: dict, list, list, list, list Output Type: Dict[str, dict] Dependencies: ```python def v0(v1: dict, v2: list) -> dict: if not v1 or not v2: return {} v3 = {} for v4 in v2: if v4 in v1.keys(): v3[v4] = v1.get(v4) ...
Imports: ```python import typing ``` Type definitions: Input Types: Iterator[str], Any, Any, Any Output Type: Iterator[Tuple[str, ...]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterator[str], v2=1, v3='#', v4='#') -> Iterator[Tuple[str, ...]]: for v5 in v1: v6 = [] v5 = f'{v3...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = False if self.is_running: self._process.terminate() v1 = True self._process = None self._cmd = None return v1 ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[str, str] ``` Input Types: v0 Output Type: str Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> str: v3 = '' for (v4, v5) in v2.items(): v3 += f'{v4}() {{\n{v5}\n}}\n' return v3 ```
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.subcommands.pop(v1, None) if v2 is None or v1 in v2.aliases: return for v3 in v2.aliases: self.subcommands....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.instance: v2 = 'org/%s/project/%s' % (self.instance.id, v1) v3 = self.client.get(v2) v4 = v3.json() v4['organi...
Imports: ```python import typing ``` Type definitions: Input Types: str, dict Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: dict) -> tuple: if 'SAMPLE_BITS' in v2[v1]: if v2[v1]['SAMPLE_BITS'] == 16: v3 = 2 elif v2[v1]['SAMPLE_BITS'] == 8: ...
Imports: ```python import matplotlib import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: list, list Output Type: (tuple, tuple) Dependencies: ```python def v0(v1: str, v2: str): plt.savefig('%s/%s.png' % (v2, v1)) ``` Function Name: v3 Function: ```python def v3(v4: list, v5: list) -> ...
Imports: ```python import pprint as pp 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: pp.pprint('Attempting to make move %s' % v1) if v1[0] in ['R', 'B', 'N', 'Q', 'K']: self.make_n...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: if self._min is None: return None return round(self._min, 2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'typing.Tuple[str, str]' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'typing.Tuple[str, str]': if self.column is None: return tuple(self._f_name.split('.'))[0:2] return (self.foreign_column.table....
Imports: ```python import random import string import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = ''.join(random.choices(string.ascii_letters + string.digits, k=7)) return f'hyp3-testing-{v1}' ```
Imports: ```python from pandas import DataFrame from datetime import datetime import typing ``` Type definitions: Input Types: list, any, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: any, v3: str) -> None: v4 = datetime.now().strftime('%H_%M_%S') if v3 == 'csv...
Imports: ```python import os import typing ``` Type definitions: Input Types: os.PathLike Output Type: Union[str, bytes] Dependencies: Function Name: v0 Function: ```python def v0(v1: os.PathLike) -> Union[str, bytes]: (v2, v3) = os.path.split(v1) (v4, v5) = os.path.splitext(v3) v6 = v4 + '-dehinted' + v5...
Imports: ```python from qiskit import QuantumCircuit, Aer, execute, QuantumRegister from qiskit.circuit import Qubit from qiskit.transpiler import PassManager from qiskit.transpiler.passes import Unroller from qiskit import IBMQ import typing ``` Type definitions: Input Types: QuantumCircuit Output Type: int Dependenc...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: (pd.DataFrame, List) Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> (pd.DataFrame, List): v2 = ['tsne_x', 'tsne_y', 'lap_x', 'lap_y', 'umap_x', 'umap_y'] v3 = [x for v4 in v1.columns ...
Imports: ```python import torch from torch import Tensor import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Tuple[Tensor, Tensor, Tensor] Dependencies: ```python def v0(v1: Tuple, v2: torch.device) -> Tensor: v3 = gumbel_map.get(v2) if v3 is None: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(AbstractArray, DataWithCoords, DataArrayArithmetic): v1: dict[str, Any] v2: dict[Any, Variable] v3: Callable[[], None] | None v4: dict[Hashable, Index] | None v5: Hashable | None v6: Variable v7 = ('_cache', '_coords',...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Union[bool, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Union[bool, Any]: (v2, v3) = self._get_endpoint(v1) if v2: (v4, v3) = self._deserialize_response(v2, self._response_classes...
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: v2 = 12 v3 = 24 v4 = 24 v5 = 1 v6 = 2 v7 = -0.3 v8 = np.array(((1, 0, 0)...
Imports: ```python import numpy as np import h5py import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str, v2: str, v3: list): v4 = h5py.File(v1, 'r') v5 = v4['la_names'][:].astype(str) v6 = np.isin(v5, v3) v7 = v4['prediction'][:, :, :, v6] ...
Imports: ```python import typing ``` Type definitions: Input Types: torch.tensor, int, float, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.tensor, v2: int, v3: float, v4: int) -> int: self.base_classifier.eval() v5 = self._sample_noise_predictions(v1, v2, v4)...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Union[int, str, None] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Union[int, str, None]: v1 = self.amount_msat if v1 in [None, '!']: return v1 return int(v1 // 1000) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict[str, Any]: v1: Dict[str, str] = {'layer1': 'res2', 'layer2': 'res3', 'layer3': 'res4', 'layer4': 'res5', 'bn1': 'conv1.norm', 'bn2': 'conv2.norm...
Imports: ```python import math import pandas import typing ``` Type definitions: Input Types: Sequence[str], pandas.DataFrame, int Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[str], v2: pandas.DataFrame, v3: int) -> float: v4 = pandas.DataFrame(data=dict(premise_id=v1...
Imports: ```python import typing ``` Type definitions: Input Types: 'Cursor' Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: 'Cursor'=None): await v1.execute(f'CREATE TABLE IF NOT EXISTS {self.TABLE} (GuildID BIGINT);') await v1.execute(f'SELECT * FROM {self.TABLE};...
Imports: ```python import typing ``` Type definitions: Input Types: dict, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: dict): if v2.pop('show_colorbar', True): v1['legends'] = [{'fill': 'color', 'type': 'gradient'}] ```
Imports: ```python from typing import Callable, Dict, Optional, Sequence, cast import typing ``` Type definitions: Input Types: Sequence[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence[str]) -> None: assert isinstance(v1, Sequence), "'bands' must be a sequence"...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2=None): assert v1 is not None self.key = v1 self.runspec = v2 self.dependencies = set() self.dependents = set() self.duration = None self.priority = None ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: ```python def v0(v1): for v2 in range(number): v1.execute("INSERT INTO foobar VALUES (nextval('foobar_seq'), ?)", (instance_name,)) ``` Function Name: v3 Function: ```python def v3(self, v4: str, v5:...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2) -> None: v3 = os.path.getsize(v1) with open(v1, 'rb') as v4: v5 = v4.tell() while True: v6 = v5 ...
Imports: ```python from datetime import date, datetime, timedelta import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = False if not self.convert and self.inserted: if datetime.now() - self.created_at > timede...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int, v3: int, v4: int): v5 = [] try: with open(v1, 'rb') as v6: for v7 in range(v3): v8 = [] ...
Imports: ```python from collections import Counter import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: (self.table, self.rack, self.initial) = (Counter(), Counter(), True) self.table_array = np.zeros(s...
Imports: ```python from nltk.translate.nist_score import sentence_nist as sent_nist import typing ``` Type definitions: Input Types: List[str], List[List[str]], Optional[Dict[str, str]] Output Type: List[float] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: List[List[str]], v3: Optional...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any Output Type: set Dependencies: ```python def v0(v1: int, v2: int, v3: int) -> list: v4 = list() if v1 >= v2: v4.append(v1 - v2) if v1 < v2 * v3 - v2: v4.append(v1 + v2) if v1 % v2 != 0: v4.app...
Imports: ```python from datetime import datetime, timezone, timedelta import re import typing ``` Type definitions: Input Types: datetime Output Type: datetime Dependencies: ```python def v0(v1: str) -> False: if type(v1) != str: return False return re.match('[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Dict[str, typing.Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: typing.Dict[str, typing.Any]): if self._propagate_signals: self._propagate_signals = False self.cbColormap.setCurre...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> list: v3 = [] for v4 in v1: v5 = self.__random_remove_by_percent(v4[4], v2) v6 = len(v5) v3.append((v4[0], v4[1], v...
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): for v2 in self.patterns: v3 = v2.search(v1) if v3: v4 = self.canonicalize_path(os.path.join(self.root_path, v3.g...
Imports: ```python import typing ``` Type definitions: Input Types: object, List[str] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: object, v2: List[str]) -> bool: v3 = str(type(v1)) return v3 in v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.is_empty(): raise Exception('Stack is already') self.top = self.top.next self.size -= 1 ```
Imports: ```python import json import typing ``` Type definitions: Input Types: Namespace, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Namespace, v2: str='opts.json'): with open(v1.log_root / v2, 'w') as v3: v4 = {key: str(value) for (v5, v6) in v1.__dict__.items()}...
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 = self.endpoint + f'/vprr/{v1}/index.json' v3 = self.edgar_session.make_request(method='get', endpoint=v2) v4 = self.edgar_utiliti...
Imports: ```python import os import pickle import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = os.path.join(self.config.saved_path, self.config.ds_name + '_' + self.config.net_name + '_train_' + str(self.train_size) + '...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): while v1 > 127: self.write(bytes([v1 & 127 | 128])) v1 >>= 7 self.write(bytes([v1])) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1) -> list: if not isinstance(v1, list): v1 = [v1] return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.__logger.debug(f"Retrieve order with order_id '{v1}'' from database") return self.__dynamodb_service.find(id_name='order_id', item_id=v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable, str, str, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable, v2: str, v3: str, v4: str=None) -> None: if not callable(v1): raise ValueError('Invalid callback given to add_action(...
Imports: ```python import typing ``` Type definitions: ```python class v0(Job): def __init__(self, v1: Job, v2: Union[str, int]): self.job = v1 self.name = v2 @property def v3(self) -> str: return self.job.id @property def v4(self) -> int: return self.job.retry_cou...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self._started: self._num_insert += len(v1) ```
Imports: ```python from collections import OrderedDict import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Callable, OrderedDict, OrderedDict Output Type: OrderedDict Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: Callable, v3: OrderedDict, v4: OrderedDict) ...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Tuple[int, int] Output Type: Any Dependencies: ```python def v0(v1: str, v2: int): v3 = tf.io.read_file(v1) v4 = tf.image.decode_jpeg(v3, channels=1) v4 = tf.image.convert_image_dtype(v4, tf.float32) v4 = tf.ima...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.__io_base: self.__io_base.close() ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = pd.read_csv(filepath_or_buffer=v1) v3 = v2.values.tolist() v4 = v2.to_dict(orient='records') self.dataframe = v2 ...
Imports: ```python import math from tqdm import tqdm import typing ``` Type definitions: Input Types: Iterable Output Type: Any Dependencies: ```python def v0(v1): """ Some test cases (use with print and doctest) >>> _analyze('Ady7774))') L3D4S2 ['Ady', '7774', '))'] ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = 'backend:\ncpp_namespace: torch_xla\nsupported:\n- abs' v2 = self.get_errors_from_gen_backend_stubs(v1) self.assertExpectedInline(v2, 'You m...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('_DeferredSemaphoreT', bound='DeferredSemaphore') ``` Input Types: Output Type: None Dependencies: Function Name: v1 Function: ```python def v1(self: v0) -> None: assert self.tokens < self.limit, 'Someone released me too many times: too...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Any Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1) -> pd.DataFrame: if isinstance(v1, dict): return pd.DataFrame.from_dict({0: v1}, orient='index') else: return v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.extract_special_chars_then_lower_case() v1 = '#' + v1.strip().replace(' ', '-') return '(' + v1 + ')' ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple Dependencies: Function Name: v0 Function: ```python def v0(self) -> Tuple: self.stats['cpu'].append(self.cpu_usage) self.stats['gpu'].append(self.gpu_usage) return (self.cpu_usage, self.gpu_usage) ```
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = 'abcdefghijklmnopqrstuvwxyz' v2 = random.choice(v1) v3 = random.randint(0, 2) if v3 == 0: v2 = f'%{v2}' if v3 == 1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1) -> None: v1.what.order() v1.by.order() v1.fro.order() v1.too.order() ```
Imports: ```python import collections import socket import requests import typing ``` Type definitions: ```python class v0(TypedDict, total=False): v1: str v2: int v3: str v4: str v5: int v6: bool ``` Input Types: str, str, int, str Output Type: Dict[str, List[Tuple[v0, bool]]] Dependencies: ```...
Imports: ```python import typing ``` Type definitions: Input Types: List[Any], int Output Type: Iterator[List[Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Any], v2: int) -> Iterator[List[Any]]: v3 = (v1[i:i + v2] for v4 in range(0, len(v1), v2)) return v3 ```