Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
190
325k
Imports: ```python import math import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> str: v3 = v2 - len(v1) v4 = math.floor(v3 / 2) v5 = math.ceil(v3 / 2) return f"{' ' * v4}{v1}{' ' * v5}" ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): self.attr_name_stack.append(self.cur_attr_name) self.cur_attr_name = self.cur_attr_name + '.' + v1 if self.cur_attr_name else v1 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str Output Type: typing.Dict[str, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> typing.Dict[str, np.ndarray]: print('Loading Glove Model') v2 = open(v1, 'r', encoding='utf-8', errors='ig...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0: v1: Any v2: Any v3: Optional['Node'] = None v4: Optional['Node'] = None v5: Optional['Node'] = None v6: int = 0 ``` Input Types: v0 Output Type: None Dependencies: Function Name: v7 Function: ```python def v7(...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame, v2): v3 = v1.min(axis=1) v4 = v1.eq(v3, axis='rows').sum(axis=0) v5 = v1.ge(v2, axis='rows').sum(axis=0) ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str, v3, v4=''): try: v5 = v3() except Exception: v5 = v4 v1[v2] = v5 return v5 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): assert all([isinstance(d, np.ndarray) for v2 in v1]) assert all([v2.shape[1] == v1[0].shape[1] for v2 in v1]) assert all([all(v...
Imports: ```python import typing ``` Type definitions: Input Types: 'FileProxy' Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'FileProxy'): if not v1: return None if v1.path is None: raise ValueError('file has no path') return v1.path ```
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> str: (v3, v4, v5) = (v1, '', '') while len(v3) > 0 and (not v3[-1].isdigit()): v5 = v3[-1] + v5 v3 = v3[:-1] if not ...
Imports: ```python from base64 import b64encode import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str]: v2 = str() v3 = str() if not v1: return (v2, v3) if not isinstance(v1, str):...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> int: v2 = datetime.datetime.now() - datetime.timedelta(seconds=v1) v3 = 0 for v4 in reversed(self._logs): if v4['time_rec...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as nf from torch.distributions import Distribution import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if v1 == 'fit': if self.pre_t...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: tp.ArrayLike Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tp.ArrayLike) -> np.ndarray: v2 = self.transform_var.process(v1) return np.array(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[str], str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str], v2: str) -> str: for v3 in v1: if v3.startswith(v2): return v3 raise ValueError("Can't find dir matching '%s' in %s"...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Path): for v2 in v1.open('r').readlines(): if 'password:' not in v2: continue v3 = v2.split('password:')[-1].strip() if...
Imports: ```python import typing ``` Type definitions: Input Types: Text Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Text=None): v2 = self.git_repo.git v2.reset('HEAD', v1) ```
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): v3 = ['[MAJOR]', '[MINOR]', '[INFO]'] if v2 == 0: self.major += 1 elif v2 == 1: self.minor += 1 else: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, nx.MultiDiGraph Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: nx.MultiDiGraph): v3 = [] for v4 in v1: v5 = v2.edges[v4[0][0], v4[0][1], 0] v5['type'] = 'segment' v5['has...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict=None): v2 = f'{self.endpoint}/v1/unit-amenity-properties' v3 = self._headers() return self._iterate_pages(v2, v3, v1) ```
Imports: ```python import logging import sys import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: bool): logging.basicConfig(level=logging.INFO, format='%(message)s', stream=sys.stdout) if v1: logging.getLogger().setLevel...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: global last_arguments v1 = sys.argv ```
Imports: ```python import typing ``` Type definitions: Input Types: 'pl.Trainer' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'pl.Trainer') -> None: v2 = self._monitor_candidates(v1) self._save_topk_checkpoint(v1, v2) self._save_last_checkpoint(v1, v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: list, bool Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: bool) -> float: v3 = self.results.LossFunctionPerformance(v2, v1) return v3[0] ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, Number Output Type: Number Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: Number=INF) -> Number: if v1 == v2 or v3 == 0: return v3 for v4 in range(self.last[v1], len(self.AL[v1])): ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[int, Dict[str, Any]] Output Type: int Dependencies: ```python def v0(v1: Dict[int, Dict[str, Any]]) -> Dict[int, Dict[str, Any]]: return find_tiles_with_neighbours(2, v1) ``` ```python def v2(v3: int, v4: Dict[int, Dict[str, Any]]) -> Dict[in...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[bool], Optional[bool] Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, *, v1: Optional[bool]=None, v2: Optional[bool]=None) -> None: v3 = {'send': v1, 'recv': v2} v3 = {k: v for (v4, v5) in v3....
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): os.makedirs(v1, exist_ok=True) os.makedirs(os.path.join(v1, 'edw_temp'), exist_ok=True) ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.array Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array) -> np.array: v1 = np.array(v1) if len(v1.shape) == 1: v1 = v1.reshape(1, -1) return self.model.predic...
Imports: ```python import numpy as np import matplotlib.pyplot as plt from matplotlib import style from matplotlib.patches import Ellipse import typing ``` Type definitions: Input Types: List[float], bool Output Type: Any Dependencies: ```python def v0(v1: List[float]) -> dict: v2 = np.diff(v1) v3 = np.sqrt(np...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self._guilds = v1 def v2(self): """Synchronously retrieves the data for all guilds saved in the database Returns ------- dict All the guilds saved in t...
Imports: ```python import typing ``` Type definitions: Input Types: 'str' Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: 'str') -> str: with open(v1) as v2: v3 = v2.read() v4 = v3.split('#define Scope_ChannelTrigger ')[1].split('\n')[0] return v4 ```
Imports: ```python import numpy as np from datetime import date, datetime, timedelta import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: v2 = {'BOOLEAN': str, 'DATE': datetime, 'DATETIME': datetime, 'FLOAT': np.float...
Imports: ```python import typing ``` Type definitions: Input Types: node.TopLevelNode Output Type: list[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: node.TopLevelNode) -> list[str]: v2 = [] for v3 in v1.labels.all(): v2.append(v3.name) return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: 'VladEncoder' Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'VladEncoder') -> None: self.num_clusters = v1.num_clusters self.centroids = v1.centroids self.centroids_l2 = v1.centr...
Imports: ```python import typing ``` Type definitions: Input Types: DataFrame, Hashable, str, Any Output Type: Tuple[DataFrame, str] Dependencies: ```python def v0(v1: str) -> bool: return name_comparator in [f'{var_name}__{v1}' for v2 in var_names] ``` Function Name: v3 Function: ```python def v3(v4: DataFrame, v...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = '' with open(v1['file'], 'r') as v3: v2 = v3.readlines() v2[v1['line_number'] - 1] = v1['data'] + '\n' with open(v1['...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._state_thread.start() self.ble_status.encoding_active.register_value_update() self.ble_status.system_ready.register_value_update() self....
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: List[Dict[Any, Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> List[Dict[Any, Any]]: v2 = json.JSONDecoder() v3 = 0 v4 = [] while v3 < len(v1): if v1[v3] in ' \t\n\r': ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[List[str]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[List[str]]: v1 = self._get_number_of_columns() v2 = [] for v3 in v1: v4 = [] for v5 in range(1, v3 + 1): if...
Imports: ```python import json import logging import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: for v2 in ['bin']: if v2 in self.release_manifest: del self.release_manifest[v2] ...
Imports: ```python import typing ``` Type definitions: Input Types: Union[int, None], str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[int, None], v2: str) -> str: v3 = self.__get_latest_messages(v1) v4 = self.__get_group_titles() v5 = self.__create_messages_...
Imports: ```python from csv import DictReader, DictWriter from Bio.Seq import Seq import typing ``` Type definitions: Input Types: Union[str, Path], Optional[Dict[Seq, Seq]] Output Type: Dict[Seq, Seq] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path], v2: Optional[Dict[Seq, Seq]]=None) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Tuple[str, List[str]] Dependencies: Function Name: v0 Function: ```python def v0() -> Tuple[str, List[str]]: v1 = ['chapter_id INTEGER PRIMARY KEY', 'series_id INTEGER', "chapter_title TEXT NOT NULL DEFAULT ''", 'chapter_number INTE...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: Sequence[int] Output Type: Any Dependencies: ```python def v0(v1): def v2(*v3, **v4): v5 = v3[0] v6 = v5.ndim if v6 in available_dims: return v1(*v3, **v4) else: v7 = min(availa...
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 = '' if v1 in self.default_config and self.default_config[v1]: v2 = ' '.join([key + ':' + val for (v3, v4) in self.default_confi...
Imports: ```python import os import glob import argparse import tqdm import numpy as np import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str) -> namedtuple: v2 = torchaudio.info(v1) if hasattr(v2, 'num_frames'): return Info(v2.num_frames, v2.sample_...
Imports: ```python from urllib.request import Request, urlopen, HTTPError import typing ``` Type definitions: Input Types: str, Any, int Output Type: (int, List[List[str]]) Dependencies: ```python def v0(v1): v2 = '' while v2 == '': try: print('Download string from ' + v1) v3 = ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, List[List[Path]], List[Path], List[int], List[str] Output Type: None Dependencies: ```python def v0(v1: str, v2: int, v3: int) -> Tuple[List[Path], Path]: v4: List[Path] = [] v4.append(*list(DATA_ROOT.glob(f'**/*{v1}_0{v2}_flair_pp.n...
Imports: ```python import json import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str) -> Dict[str, str]: v2 = v1.split('|') return {'Book': v2[0], 'Chapter': int(v2[1]), 'Verse': int(v2[2]), 'Text': v2[3][1:-1]} ``` Function Name: v3 Function: ```pyth...
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 logging import logging.handlers import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not self._active: return logging.info('Closing plugin') self._connection.close() self._exte...
Imports: ```python from pandas._libs import internals as libinternals, lib from pandas._typing import ArrayLike, Dtype, DtypeObj, Shape from pandas.errors import PerformanceWarning from pandas.util._validators import validate_bool_kwarg from pandas.core.dtypes.cast import find_common_type, infer_dtype_from_scalar from ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self v2 = '' while v1: if v1.is_root: v2 = v1.prefix + v1.main_splitter + v2 break else: v...
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 = f'{self.internal_module.__name__}.' v3 = v1[len(self.namespace) + 1:] if v1.startswith(self.namespace + '.') else ...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(self, v1: pd.DataFrame) -> pd.DataFrame: v1 = super().normalize(v1) v2 = {'Mcnairy': 'McNairy', 'Mcminn': 'McMinn', 'Dekalb': 'DeKalb'} v1['...
Imports: ```python import torch import typing ``` Type definitions: Input Types: list, list Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list, v2: list) -> torch.Tensor: v1 = torch.stack(v1).float() v2 = torch.stack(v2).float() (v3, v4) = (v1.shape[0], v2....
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if not os.path.isfile(v1): raise RuntimeError(f'Bamfile {v1} not found!') v2 = v1.replace('.bam', '.bai') if os.path.isfile...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=-1) -> bytes: if self._closed: return b'' if v1 == -1: return self.readall() try: while len(self._buffer) < v1: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: bool Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> List[str]: if not self.is_built: return ['<%s>\n' % self.__class__.__name__, f' ntimes: {self.ntimes:d}\n'...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self) -> tf.Tensor: v1 = tf.matmul(self.input_tensor, self.weights['h1']) v2 = tf.add(v1, self.biases['b1']) v3 = tf.nn.relu(v2) ...
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 not v1 or not v1[0]: return (self.m, self.n) = (len(v1), len(v1[0])) self.solveDFS(v1, 0, 0) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: 'str', 'Sequence[str]', Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: 'str', v2: 'Sequence[str]', v3=False): v4 = re.compile('|'.join(v2), re.MULTILINE) v5 = -1 for v6 in v4.finditer(v1): ...
Imports: ```python import typing ``` Type definitions: Input Types: int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: str): v3 = [[8, 1, 0], [8, 2, v1], [11, 3, v2]] v4 = self.generateDummyProtocol('updateProfileAttribute', v3, 4) return self.postPackD...
Imports: ```python import signal import sys import traceback import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: Any, v2: Any) -> None: traceback.print_stack(v2, file=sys.stderr) if callable(old_handler): old_handler(v1, v2) ``` Function Name: v3 Funct...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'Pipette.DictType' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'Pipette.DictType': self._config_as_dict.update({'current_volume': self.current_volume, 'available_volume': self.available_volume, 'name': self.n...
Imports: ```python import urllib.parse as parse import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: v2 = parse.urlparse(v1) v3 = v2[2] if v2[3] != '': v3 += ';' + v2[3] if v2[4] != '': v3 += '...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: List[int]) -> List[int]: v3: set = set() for v4 in v1: for v5 in v2: if v4 == v5: ...
Imports: ```python import json import requests import typing ``` Type definitions: Input Types: [str], str, dict, dict, dict, dict Output Type: Iterator[dict] Dependencies: ```python def v0(v1: requests.Response, v2: int): if v1.status_code != v2: raise RequestException(v1) ``` Function Name: v3 Function: ...
Imports: ```python import typing ``` Type definitions: Input Types: dendropy.Tree Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dendropy.Tree): self.tree = v1 self.tree.resolve_polytomies() v2 = 0 for v3 in self.tree.postorder_node_iter(): if v3 == self....
Imports: ```python from collections import deque import typing ``` Type definitions: Input Types: List[int], int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int], v2: int) -> int: (v3, v4) = (deque([0] * 7), deque([0, 0])) for v5 in v1: v3[v5] += 1 for v6 i...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: self.uid_count += 1 return f'__cse_{self.uid_count}' ```
Imports: ```python import typing ``` Type definitions: ```python @dataclass(frozen=True) class v0: v1: str v2: str = '1.0' v3: str = '' v4: int = 0 v5: str = '' v6: FrozenSet[str] = field(default_factory=frozenset) v7: int = field(default_factory=lambda : int(time.mktime(time.gmtime()) * 100...
Imports: ```python import inspect from datetime import datetime import typing ``` Type definitions: ```python class v0: def __init__(self, v1: 'PandasStore', v2: str): self.store = v1 self.path = v2 @property def v3(self): return self.store.get_storer(self.path).attrs def v4(s...
Imports: ```python import logging from tqdm import tqdm import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): logging.info(f'Reading file into dict: {v1}') print(f'This will fail if you have not downloaded or generated ...
Imports: ```python from pathlib import Path import numpy as np import typing ``` Type definitions: Input Types: float, List[float], int, Union[int, float] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: List[float], v3: int=None, v4: Union[int, float]=None) -> None: ...
Imports: ```python import typing ``` Type definitions: Input Types: float, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: str='hms') -> str: (v3, v4) = divmod(v1, 60) if v2 == 'ms': v5 = '{:d}m:{:02d}s'.format(int(v3), int(v4)) elif v2 == 'hms': ...
Imports: ```python import torch import typing ``` Type definitions: ```python v0 = Dict[str, torch.Tensor] ``` Input Types: Mapping[str, np.ndarray], Sequence[str] Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: Mapping[str, np.ndarray], v3: Sequence[str]) -> v0: v4 = {k: torch.tenso...
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 = 2 * len(v1) + 1 v4 = 0 for v5 in range(v3): if v5 % 2 == 1: v2 += v1[v4] v4 += 1 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Optional[Dict[str, int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Optional[Dict[str, int]]: v2 = self.object.getTermPositions(self.reader, v1) if v2 is None: return None v3 = {}...
Imports: ```python import typing ``` Type definitions: Input Types: 'TreeNode', 'TreeNode', 'TreeNode' Output Type: 'TreeNode' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'TreeNode', v2: 'TreeNode', v3: 'TreeNode') -> 'TreeNode': if v1.val == v2 or v1.val == v3: return v1 if v...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: dict[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True) -> dict[str, Any]: v2 = self.emoji() if v1 else self.score return {'n': self.n, 'Soln': str(self.soln), 'Guess': str(self.guess),...
Imports: ```python import logging import re import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: str, v3: int, v4: int, v5: Optional[str]=None, v6: Optional[str]=None): self.filepath = v1 self.description = v2 self.line_number = v3 self.line_count ...
Imports: ```python import numpy as np import tensorflow as tf import typing ``` Type definitions: Input Types: Tuple[np.ndarray, np.ndarray], tf.keras.Model, int, int Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: Tuple[np.ndarray, np.ndarray], v2: tf.keras.Model, v3: int, v4: ...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset from torch.utils.data import DataLoader from torch.utils.data import TensorDataset from torch.nn.utils.rnn import pack_sequence from torch.nn.utils.rnn import pad_packed_sequence from torch.nn.util...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = self.get_standby() return any((v1 in mgr for v3 in v2)) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Mapping[str, str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Mapping[str, str]) -> str: v3 = v2.copy() v3['__value__'] = v1 return self.format_env(v3, self.global_env)['__value__'] ...
Imports: ```python import typing ``` Type definitions: ```python class v0: @overload def __init__(self, v1: Iterable, v2: bool=False) -> v0: ... @overload def __init__(self, v3: List[int, int], v4: bool=True) -> v0: ... @overload def __init__(self, v5: Tuple[int, int], v6: boo...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> bool: v2 = self.raw_param.get('no_wait') return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict, str, list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str, v3: list): if v2.lower() in v1['name'] or v2.lower() in v1['id']: v3.append(v1) ```
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 = np.zeros_like(v1[:-1], dtype=float) for (v3, v4) in zip(self.grows.dist0_fr, self.grows...
Imports: ```python import typing ``` Type definitions: Input Types: int, List[float] Output Type: Tuple[List[float], List[float], List[float]] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: List[float]) -> Tuple[List[float], List[float], List[float]]: v3 = [v2[i] / (v2[i] + v2[i + 1]) for...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float): v2 = str(v1) v3 = v2.find('.') v4 = 0 for (v5, v6) in enumerate(v2[:v3]): v4 += int(v6) * 2 ** (v3 - v5 - 1) for (v5, v6) in enu...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: float Dependencies: ```python def v0(v1: float, v2: float, v3: float) -> float: assert v3 > v2, 'Upper bound should be larger than lower bound' if v2 < v1 < v3: return -np.log(np.log(v3 / v2))...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: for v2 in ['p', 'g']: if v2 not in v1.model.keys(): continue for (v3, v4) in v1.model[v2].items(): for v5 ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], List[int] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: List[int]) -> bool: v3 = [max(v1[0], v2[0]), max(v1[1], v2[1])] v4 = [min(v1[2], v2[2]), min(v1[3], v2[3])] if v3[0...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: Union[datetime.datetime, int, float, str], bool, Optional[datetime.tzinfo] Output Type: datetime.datetime Dependencies: ```python def v0(v1: str) -> datetime.datetime: return dateutil.parser.isoparse(v1) ``` Function Name: v2 Funct...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(self, v2: v0): v3 = self.joined_plaintext_printer return v3(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any, Any, Any, Any Output Type: 'abs_lat_stab_uty' Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3, v4, v5, v6) -> 'abs_lat_stab_uty': v7 = v6 * (v1 + v4 * v2) / (v4 * v5 + v3) return v7 ```
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
29