text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = self.arr while v1 > 0: v3 = v1 + 1 >> 1 if self.less_than(v2[v1], v2[v3 - 1]): v3 -= 1 v4 = v2[v1] ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v2) -> int: if v1 == 'INSERT INTO Tasks (uuid, action_name, pickled, prio, running, run_count, created) VALUES (?,?,?,?,?,?,?)': v3 = v2[0] ...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3) -> None: logging.warning('Web socket has been closed') self._deinitialize_workers() self._connection_established =...
Imports: ```python import torch from torch.nn.modules import Dropout import typing ``` Type definitions: Input Types: int, List[int], torch.Tensor, Optional[List[List[int]]] Output Type: Dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: List[int], v3: torch.Tensor, v4: Optio...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = re.compile('^\\{(\\w{8})-(\\w{4})-(\\w{4})-(\\w\\w)(\\w\\w)-(\\w\\w)(\\w\\w)(\\w\\w)(\\w\\w)(\\w\\w)(\\w\\w)\\}$') v3 = v2.match(v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = u'The story [Story 2](https://app.clubhouse.io/zulip/story/9) was unarchived.' self.send_and_test_stream_message('story_unarchive', 'Story 2', v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = 'sgNom: [' + '] ['.join([f.value for v2 in self.sg_nom]) + '] \n' v3 = 'sgGen: [' + '] ['.join([v2.value for v2 in self.sg_gen]) + '] \n' v4 =...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = re.sub(' 0x[0-9a-fA-F]+', ' 0x...', v1) v3 = re.sub('/tmp/[0-9a-fA-F]+', '/tmp/...', v2) return v3 ``` Function Name: v4 Function: ```python def v4(v5: str...
Imports: ```python import os 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 = v2 if not os.path.isabs(v2): v3 = os.path.join(v1, v2) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): try: v2 = self._call_node_url({'action': 'account_info', 'account': v1}) except Exception as e: v2 = {'balance': 0} return v2 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = str(self.generator.random.randrange(111111, 99999999)) v1 = v1.zfill(8) v2 = 0 v3 = [0, 2, 4, 6] for v4 in v3: v5 = v1[v4] ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.n = 0 self.sesum = 0.0 ```
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 self._done: self._success = v1 self._done = True self.emit('finished') ```
Imports: ```python import typing ``` Type definitions: Input Types: tf_metric_accumulators.TFMetricsAccumulator, metric_types.StandardMetricInputs Output Type: tf_metric_accumulators.TFMetricsAccumulator Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tf_metric_accumulators.TFMetricsAccumulator, ...
Imports: ```python import numpy as np from numpy import ndarray import typing ``` Type definitions: Input Types: ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ndarray): v2 = v1.reshape(len(v1), -1) return np.sort(v2, axis=1) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: ```python def v0(v1: list, v2: int=5) -> list: assert len(v1) == 4, 'Bounding box can only have 4 corners' v3 = [] for (v4, v5) in enumerate(v1): if v4 < 2: v3.appe...
Imports: ```python import os import tensorflow as tf from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2 from tensorflow.lite.python.util import get_grappler_config, run_graph_optimizations import typing ``` Type definitions: Input Types: Any, str, bool, str Output Type: None...
Imports: ```python import typing ``` Type definitions: Input Types: typing.Callable Output Type: typing.Callable Dependencies: ```python def v0(v1: typing.Callable) -> typing.Callable: @functools.wraps(v1) def v2(*v3: typing.Any, **v4: typing.Any) -> typing.Any: try: return v1(*v3, **v4) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: self.say('Alors, vous voulez que je vous inscrive aux notifications ? Oui, non ?') return self.to_platform_dict() ```
Imports: ```python import math import numpy as np import typing ``` Type definitions: Input Types: str, str, int, bool Output Type: List[float] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: int, v4: bool) -> List[float]: if v3 < 1: raise ValueError(f"Subject {v2}: Invali...
Imports: ```python import typing ``` Type definitions: ```python v0 = graph_nets.graphs.GraphsTuple ``` Input Types: v0, Optional[int], Optional[int] Output Type: tf.Tensor Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0, v3: Optional[int]=None, v4: Optional[int]=None) -> tf.Tensor: (v3, v4...
Imports: ```python import typing ``` Type definitions: ```python @attr.s(frozen=True) class v0(GenericConverter, abc.ABC): v1: ClassVar[Dict[Type, Type['AttributeConverter']]] = {} v2: attr.Attribute = attr.ib() v3: Optional[Type[MutableSequence]] v4: Type v5: List[Type] v6: int v7: bool ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: List['OptNode'] Dependencies: Function Name: v0 Function: ```python def v0(self, v1=None) -> List['OptNode']: v2 = self._operator.ordered_subnodes_hierarchy(v1) return [self._node_adapter.adapt(node) for v3 in v2] ```
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]: if self.hasScore(): v1 = {} v1['date'] = self.getMatchDate() v1['score'] = self.getMatchScore() for v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.program_counter = 64738 self.stack_pointer = 509 self.cycles = 0 self.flag_i = True self.flag_d = False self.flag_b = True ```
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: List[int]) -> List[int]: assert len(v1) == len(v2), 'Misaligned inputs ({0} vs {1})'.format(len(v1), len(v2)) return [x ...
Imports: ```python import typing ``` Type definitions: Input Types: list, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2=None): v3 = 0 for (v4, v5) in enumerate(v1): for (v6, v7) in enumerate(v5['dialogue']): yield (v4, v5, v6, v7) ...
Imports: ```python from selenium.common.exceptions import TimeoutException, InvalidElementStateException, NoSuchElementException, StaleElementReferenceException from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from selenium.webdriver.remote.webelement impo...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[str]] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List[str]]) -> None: if len(v1) == 0: return self.row = len(v1) self.col = len(v1[0]) for v2 in range(self.row): ...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, Optional[Union[str, Callable]], Optional[int] Output Type: Tuple[torch.Tensor, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: torch.Tensor, v3: Optional[Union[str, Callab...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: v2 = [] for v3 in self.pipelines: v4 = v3.comments for v5 in v4: v6 = v5.get('associated_id...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> torch.Tensor: v2 = self.get_wav_tensor_from_file(v1) return self.get_mel_tensor(v2) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: List[float] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[float]: v2: List[float] = [] if ':' in v1: v3 = v1.split(':') v4 = float(v3[0]) v5 = float(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.current_line (v3, v4) = self.nvim.current.window.cursor self.current_line = v2[0:v4 + 1] + v1 + v2[v4 + 1:] self.nvim.c...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.count >= self.total: self.mark_completed() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.sync_batchnorm: self.model = self.configure_sync_batchnorm(self.model) self.configure_ddp() self.barrier() ```
Imports: ```python import typing ``` Type definitions: Input Types: ast.Assign Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ast.Assign) -> None: self.in_assign += 1 for v2 in v1.targets: self.visit(v2) self.in_assign -= 1 self.visit(v1.value) ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional['ExperimentData'] Output Type: 'ExperimentData' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional['ExperimentData']=None) -> 'ExperimentData': if v1 is None: v1 = self.__class__(experiment=self.experim...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], pyexiv2.metadata.ImageMetadata, Union[float, None], Union[List[int], None], Union[str, None] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: pyexiv2.metadata.ImageMetadata, v3: Union[float, N...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = [] with open(v1, 'rb') as v3: v2 = [char if isinstance(char, bytes) else bytes([char]) for v4 in v3.read(720)] return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable Output Type: Callable Dependencies: ```python def v0(v1: int, v2: Iterator[Iterator[int]]) -> Iterator[Optional[int]]: for v3 in v2: v4 = skip_func(v3, v1) if v4 is True: for v5 in v0(v1, v2): y...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, models.DbtCatalogNode], str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, models.DbtCatalogNode], v2: str, v3: str): v4 = v1.get(v2) v5 = None if v4 is None else v4.columns.get(v3) ...
Imports: ```python import numpy as np from pandas._libs import Timestamp, internals as libinternals, lib, writers from pandas._libs.internals import BlockPlacement from pandas._libs.tslibs import IncompatibleFrequency from pandas._typing import ArrayLike, DtypeObj, F, Shape, npt from pandas.errors import AbstractMethod...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> dict: if not v1: return dict() v2 = v1.get('reputation', None) v2 = dict() if not v2 else v2 v3 = v2.get('counts', None) ...
Imports: ```python import io import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = os.path.join(self._tmpdir, 'async.txt') try: with self._pathmgr.opena(v1, 'wb') as v2: v2.write(b'012345...
Imports: ```python import statsmodels.tsa.stattools as ts import typing ``` Type definitions: Input Types: int, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=1, v2: float=0.05): (v3, v4, v5, v6, v7) = ts.adfuller(self.time_series, maxlag=v1) return v4 < v2 and...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, **v2): if v1 == 'flash': self.flash(**v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Any) -> Optional[str]: if not self._root: return None return self._search_helper(self._root, v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: nodes.FunctionDef Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: nodes.FunctionDef) -> None: for v2 in self._function_matchers: if not v2.need_to_check_function(v1) or v1.is_method(): co...
Imports: ```python import gzip import pickle import typing ``` Type definitions: Input Types: Union[str, Path], bool, bool, str, Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, Path], v2: bool=False, v3: bool=False, v4: str='jsonpickle', v5: Optional[int]...
Imports: ```python import typing ``` Type definitions: ```python v0 = Dict[str, Union[bool, Tuple[str], 'SIGLIST_TYPE']] ``` Input Types: str, v0, List[Tuple[str, List[Tuple[str]]]], List[Tuple[str, List[Tuple[str]]]], bool, Optional[str], Sequence[str] Output Type: Any Dependencies: Function Name: v1 Function: ```pyt...
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int) -> int: v3 = sum((1 if v2 == i else 0 for (v4, v5) in v1)) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: v1 = list(map(int, input().split())) v1.sort() assert len(v1) == 26 assert v1 == list(range(1, 26 + 1)) ```
Imports: ```python import numpy as np from matplotlib import pyplot as plt from matplotlib.axes import Axes from matplotlib.ticker import MaxNLocator import typing ``` Type definitions: Input Types: Optional[Axes] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Axes]=No...
Imports: ```python import sys, os, glob, subprocess import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0() -> bool: v1 = any([e.startswith('-i') for v2 in sys.argv]) return v1 ```
Imports: ```python import torch import torch.nn as nn from torch import optim, Tensor import typing ``` Type definitions: Input Types: Tensor Output Type: Tuple[Optional[Tensor], Optional[Tensor], Optional[Tensor]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor) -> Tuple[Optional[Tensor],...
Imports: ```python import typing ``` Type definitions: Input Types: DataFrame, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: DataFrame, v2: str): v1 = v1[v1['//prepare/phase_1_bytes'] > 10000000] v1 = v1[['when', '//sync/phase_2_ms']] v3 = v1.groupby('when').agg(['min...
Imports: ```python import cvxpy as cp import cvxpy.settings as s from cvxpy import Minimize, Problem from cvxpy.expressions.constants import Constant, Parameter from cvxpy.expressions.variable import Variable from cvxpy.reductions.solvers.defines import INSTALLED_MI_SOLVERS from cvxpy.tests.base_test import BaseTest fr...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> str: v3 = [] for v4 in v1: if not v3: v3.append([1, v4]) elif v3[-1][1] == v4: v3[-1][0] +...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: List[dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> List[dict]: v3 = '/'.join((self._make_url(v1, contents=True), v2, 'extra_files')) return self._get(url=v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = open(v1, 'rt') v3 = v2.read().splitlines() v4 = [] v5 = len(v3) for v6 in range(v5): v7 = v3[v6] v8 = v7.split(',') ...
Imports: ```python import typing ``` Type definitions: Input Types: tf.keras.metrics.Metric Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tf.keras.metrics.Metric): if not hasattr(self, '_tfasr_metrics'): self._tfasr_metrics = {} self._tfasr_metrics[v1.name] = v1...
Imports: ```python import requests import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str): v2 = f'http://{v1}:9090/api/v1/targets' v3 = time.time() v4 = 120 while time.time() - v3 < v4: try: v5 = requests.get(v2, timeout=10) ...
Imports: ```python from pathlib import Path import torch import torch.nn as nn import torch.nn.functional as F 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=''): if v1 is None: v3 = self.che...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: any Dependencies: Function Name: v0 Function: ```python def v0(self) -> any: v1 = self.build_graph() return len(v1.find_ancestors('shiny gold')) ```
Imports: ```python import typing ``` Type definitions: Input Types: 'DocumentArray' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'DocumentArray'): v2 = self.exec_embedding_cls_type if v2.is_dense: return v1.all_embeddings else: return v1.get_all_spa...
Imports: ```python import csv import typing ``` Type definitions: Input Types: str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> list: with open(v1, 'r', encoding='utf-8') as v2: v3 = csv.reader(v2, delimiter=';') v4 = [] for v5 in v3: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(NamedTuple): v1: int v2: int v3: str v4: str ``` Input Types: List[v0] Output Type: int Dependencies: Function Name: v5 Function: ```python def v5(v6: List[v0]) -> int: v7: int = 0 for v8 in v6: v9 = len(v8.passwo...
Imports: ```python import base64 import hashlib import typing ``` Type definitions: Input Types: int, bytes Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: bytes) -> None: v3 = hashlib.sha256(v2).digest() self._session.client('ebs').put_snapshot_block(SnapshotId...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0): if v1 <= 0 or v1 > self._sum_tree.size: v1 = self._sum_tree.size v2: [] = [] v3: [] = [] v4: [] = [] v5: [] = [...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Generator Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Generator: for v2 in [v2.strip() for v2 in v1.split(',')]: if '-' in v2: (v3, v4) = v2.split('-') if '>' in v4: ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Protocol): v1: str v2: int v3: int v4: str def v5(self, v6, v7=False) -> Optional['RemoteObjectProtocol']: pass ``` Input Types: v0 Output Type: str Dependencies: Function Name: v8 Function: ```python def v8(self, v9...
Imports: ```python from itertools import combinations import typing ``` Type definitions: Input Types: Sequence[int], int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[int], v2: int) -> int: for (v3, v4) in enumerate(v1[v2:], start=v2): v5 = (sum(combination) for...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: nx.DiGraph Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: nx.DiGraph): v2 = deepcopy(v1) for (v3, v4) in v1.edges: v5 = deepcopy(v1.edges[v3, v4]) v5['pKa'] = -v5['pKa...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int Output Type: None Dependencies: ```python def v0(v1: int, v2: int) -> str: return f'\x1b[{v2};{v1}f' ``` ```python def v3(v4: int, v5: int) -> bool: v6 = 0 <= v4 <= 96 v7 = 0 <= v5 <= 30 return not (v6 and v7) ``` ```pyth...
Imports: ```python from math import inf import typing ``` Type definitions: Input Types: str, str, float, float, float, float Output Type: float Dependencies: ```python def v0(v1: str, v2: str) -> int: return int(v1 != v2) ``` Function Name: v3 Function: ```python def v3(v4: str, v5: str, v6: float=2.0, v7: float=...
Imports: ```python from collections import Counter import typing ``` Type definitions: Input Types: Sequence[str] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[str]) -> int: v2 = 0 v3 = 0 for v4 in v1: v5 = Counter(v4) if 3 in v5.values(): ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = [] for v2 in self.json_response.keys(): if v2 not in self.__class__._JSON_ATTRS: v1.append(v2) return v1 ```
Imports: ```python import random import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: random.shuffle(self.datasets['train']) return ```
Imports: ```python import typing ``` Type definitions: Input Types: Optional[str] Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[str]=None) -> Optional[str]: nonlocal _current_conf_file if v1 is not None: v2 = v1 return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[Any, Any], Dict[Any, Any] Output Type: Dict[Any, Any] Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[Any, Any], v2: Dict[Any, Any]) -> Dict[Any, Any]: v1 = v1.copy() v1.setdefault('environment', {}) v1['environme...
Imports: ```python import matplotlib.pyplot as plt import typing ``` Type definitions: Input Types: Image.Image, Image.Image, Image.Image, tuple Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Image.Image, v2: Image.Image, v3: Image.Image, v4: tuple=(18, 6)): plt.subplots(1, 3, fig...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[str]: if v1[-6:] in self.shortened_url_map: return self.shortened_url_map[v1[-6:]] return None ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Any): v3 = self._get_hash(v1) if not self.map[v3]: self.map[v3] = [[v1, v2]] return True else: for v4 in self....
Imports: ```python import pandas as pd import typing ``` Type definitions: ```python class v0(object): def __init__(self): self.train_size = 0.8 self.batch_size = 2 self.epochs = 50 self.lr = 0.01 self.path = '..\\data\\train.csv' self.target = 'Survived' sel...
Imports: ```python from rdkit.Chem import MolFromSmiles, MolToSmiles, PathToSubmol, RemoveHs, SanitizeMol from rdkit.Chem.rdchem import Mol, RWMol from rdkit.Chem.rdmolops import FindAtomEnvironmentOfRadiusN as SearchAtomEnv import typing ``` Type definitions: Input Types: Mol, int Output Type: Tuple Dependencies: ```...
Imports: ```python import csv import gzip import typing ``` Type definitions: Input Types: pl.Path, Sequence[str], Sequence[np.ndarray] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: pl.Path, v2: Sequence[str], v3: Sequence[np.ndarray]) -> None: assert len(v2) == len(v3) asse...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = [*map(int, v1.split('+'))] return sum(v2) ```
Imports: ```python import random import numpy as np from math import sqrt import typing ``` Type definitions: Input Types: np.array, int, int Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(v1: np.array, v2: int, v3: int=5) -> np.array: v4 = len(v1) v5 = np.array([random.randi...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): if v1 == 2: self.handler.sign_node.connect(self.node2_drawwindow.addPoint) self.node2_drawwindow.start(v1) elif v1 == 3: s...
Imports: ```python import numpy as np from numpy.linalg import solve import typing ``` Type definitions: ```python class v0: def __init__(self, v1: car.CarParams): """ Args: CP: Car Parameters """ self.m: float = v1.mass self.j: float = v1.rotationalInertia self.l: flo...
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: if v1[-1] != '/': v1 = v1 + '/' assert v2.startswith(v1) return v2[len(v1):] ```
Imports: ```python from inspect import signature from typing import Callable, Dict, List, Type import typing ``` Type definitions: Input Types: Callable Output Type: bool Dependencies: ```python def v0(v1): if getattr(v1, '__origin__', None): return v1.__origin__ if hasattr(v1, '_gorg') and hasattr(v1....
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1=None) -> None: if v1 is not None: if not 0 <= v1 < len(self._data): raise ValueError('invalid size value') self._cursor = v1 ...
Imports: ```python import typing ``` Type definitions: ```python class v0(SimpleStatement): def __init__(self, v1: VariableDeclaration, v2: Optional[Expression]=None): """ :param variable_declaration: :param expr: can be None """ super().__init__() self.variable_dec...
Imports: ```python import ast import typing ``` Type definitions: Input Types: str, Dict[str, str] Output Type: str Dependencies: ```python def v0(v1: str, v2: ast.AST, v3: Dict[str, str]) -> str: v4 = ImportsParser(v3) v4.visit(v2) for (v5, v6) in v4.replacements.items(): v1 = v1.replace(v5, v6) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Callable Dependencies: ```python def v0(v1: int, v2: int) -> int: v0.executed = True return v1 + v2 ``` Function Name: v3 Function: ```python def v3() -> Callable: def v4(v5: int, v6: int) -> int: v4.executed = True ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str): self.symbol = v1 self.index = 0 self.quote = dict() ``` Input Types: v0, list Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: list): v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self._descs_lock: self.cleanup_registry() self.verify_registry() ```
Imports: ```python import os import tempfile import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: ```python def v0(v1: str, v2: str) -> str: v3 = tempfile.NamedTemporaryFile(prefix=v1 + ' ', suffix='.' + v2).name return v3 ``` Function Name: v4 Function: ```python def v4(v5:...