text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='>', v2: str='') -> str: self._in_config_mode = False return '' ```
Imports: ```python import numpy as np from tensorflow.keras.models import load_model from Bio.Seq import Seq import pandas as pd import typing ``` Type definitions: Input Types: str, str, str, pybedtools.BedTool, str Output Type: Any Dependencies: ```python def v0(v1: list, v2: pd.DataFrame): v3 = pd.DataFrame(dat...
Imports: ```python from sklearn.metrics import accuracy_score from datasets import load_dataset import datasets from sklearn.datasets import fetch_20newsgroups import typing ``` Type definitions: Input Types: str Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> tuple: if v...
Imports: ```python import typing ``` Type definitions: Input Types: datetime.timedelta, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: datetime.timedelta, v2=False): v3 = [] if v1.days: v3.append('{} {}'.format(v1.days, 'day' if v1.days == 1 else 'days')) (v4, ...
Imports: ```python import numpy as np from numpy.linalg import det, inv 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 = self.likelihood(v1) v3 = np.asarray([self.classes_[np...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1=None, v2=True) -> list: v3 = [collection for v4 in self.db.list_collection_names(filter=v1)] if v2: v5 = ['fs.files', 'fs.chunks'] ...
Imports: ```python from subprocess import DEVNULL, PIPE, Popen, TimeoutExpired, check_call, check_output import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: global _SINGULARITY_VERSION if not _SINGULARITY_VERSION: v1 =...
Imports: ```python from numpy.ma import masked_invalid from matplotlib.pyplot import figure, draw, close from matplotlib.colors import LogNorm from matplotlib.ticker import MultipleLocator from matplotlib.dates import SecondLocator, DateFormatter, MinuteLocator import numpy as np import typing ``` Type definitions: In...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> int: if v1 in self.tok2ind: return self.tok2ind[v1] else: return self._unk_token_idx ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as opt from torch.utils.data import DataLoader import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Tuple[torch.Tensor, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if not self.best_move or len(self.candidate_moves) == 0: return False return not self.is_ambiguous() and (not self.board.is_game_over()) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, int] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, int]: v2 = v1.split('@', 1) if len(v2) == 1: return (v2[0], 0) else: return (v2[0], int(v2[1])) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=False) -> None: if v2: self.futures[0].add_done_callback(v1) else: for v3 in self.futures: v3.add_done_callb...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: Any, str, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: str, v3=True) -> dict: v4 = torch.load(v2, map_location=v1) self.train...
Imports: ```python import logging import os import subprocess import typing ``` Type definitions: ```python v0 = Union[Path, str, os.PathLike] ``` Input Types: v0, v0, Path Output Type: Any Dependencies: ```python def v1(v2): logging.info(f'Run: {v2}') v3 = subprocess.run(v2, shell=True, stderr=subprocess.PIPE,...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Optional[str]: v2 = [os.path.join(v1, fname) for v3 in os.listdir(v1) if v3.startswith('experiment_state') and v3.endswith('.json')] if...
Imports: ```python import typing ``` Type definitions: Input Types: 'cirq.CircuitDiagramInfoArgs' Output Type: Tuple[str, ...] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'cirq.CircuitDiagramInfoArgs') -> Tuple[str, ...]: v2 = self.qubit_count() assert v1.known_qubit_count in (None, v...
Imports: ```python import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int): v3 = {} v4 = [] for v5 in range(1, len(v1) - 1): for v6 in range(v5 + 1, len(v1)): v7 = v1[v5] + v1[v6] ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, str, Optional[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3: str, v4: Optional[str]=None) -> str: v1 = v1.replace('\n', '\n' + (v2 + 4) * ' ') if v4 is None: v5 =...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python v0 = List[int] ``` ```python v1 = Dict[Optional[str], v0] ``` Input Types: Any, Optional[v1] Output Type: Any Dependencies: ```python def v2(v3: onnx.ModelProto, v4: str) -> Optional[int]: v5 = get_value_info_all(v3, v4) if v5 i...
Imports: ```python import numpy as np from scipy.io.wavfile import read, write import typing ``` Type definitions: Input Types: str Output Type: Tuple[np.float, int] Dependencies: ```python def v0(v1, v2): if v1.dtype != v2: v1 = v1 / (-1 * get_min_value(v1.dtype)) * get_max_value(v2) if v2 in (np....
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: np.array Dependencies: Function Name: v0 Function: ```python def v0(self) -> np.array: v1 = self._engine._grid[:, self._piece_size_:].flatten() return np.append(v1, self._engine._piece._idx) ```
Imports: ```python import json import os import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: ```python def v0(v1: Dict[str, Dict[str, str]], v2: StreamProcessor) -> Dict[str, Dict[str, str]]: v3 = v1 v4 = v2.local_registry for v5 in v4: if len(v4[v5]) > 0: ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=False): v3 = self.base(v1) v4 = self.mu(v3) v5 = self.logvar(v3) if v2: v6 = self._reparameterize(v4, v5) else: ...
Imports: ```python import sys, os import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: (v2, v3) = os.path.splitext(v1) v4 = 0 while os.path.isfile(v1): v1 = f'{v2}({str(v4)}){v3}' v4 += 1 retur...
Imports: ```python import random from PIL import Image import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if len(self.__images) == self.image_count: self.__images.pop(random.randint(0, self.image_count - 1)) ...
Imports: ```python import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor): self....
Imports: ```python import typing ``` Type definitions: Input Types: datetime, str, str, Any, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: datetime, v2: str, v3: str, v4=None, v5: bool=False): self.expiry = v1 self._user_id = v2 v6 = await self._client.ge...
Imports: ```python from shapely.geometry import LineString, MultiLineString, Point from shapely.ops import linemerge import typing ``` Type definitions: Input Types: LineString, List[int] Output Type: List[LineString] Dependencies: Function Name: v0 Function: ```python def v0(v1: LineString, v2: List[int]) -> List[Li...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict): v2 = self.net.state_dict() v3 = self._get_params() for (v4, v5) in v1.items(): if v4 in v3: v3[v4].data.copy_(v5.data) ...
Imports: ```python import json from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = Path(self.save_location).joinpath(self.file_name) self.json_string = v1.read_text() self.json = json.lo...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> list: v2 = [] for (v3, v4, v5) in v1: v6 = self._eod_process_seq(v4, v5) v2.append(v6) return v2 ```
Imports: ```python import hashlib import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> str: v2 = v1 if not isinstance(v1, np.ndarray): v2 = v1.numpy() return hashlib.sha256(v2.d...
Imports: ```python import collections import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: v1 = self._transposition_key() v2: Counter[Hashable] = collections.Counter() v2.update((v1,)) v3 = [] while self.move_...
Imports: ```python from asyncio import sleep import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: for v1 in range(10): await sleep(1) try: self.__manager.ping() return exc...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: v1 = self.items v2 = v1[:, 1] if (v2 < self.M).all(): return 0 v3 = v1[:, 0] if (v3 < self.M).all(): return 1 return 2 ...
Imports: ```python import requests, json import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1, v2, v3=None, v4=True): v5 = 'https://api.github.com' v2 = v5 + v2 v1 = v1.upper() v6 = {'Content-Type': 'application/json; charset=utf-8', 'Accept': 'applica...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> None: self.buildMaxHeap(v1) v3 = len(v1) for v4 in range(v3 - 1, v3 - v2, -1): (v1[v4], v1[0]) = (v1[0], ...
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 = len(v1) v3 = [[0 for v4 in range(v2)] for v5 in range(v2)] for v6 in range(v2): for v4 in range(v2 - v6): if v...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, bool, bool, bool, str, Dict[str, Any], Dict[str, Any] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: bool, v4: bool, v5: bool, v6: str, v7: Dict[str, Any], v8: Dict[str, Any]): v9...
Imports: ```python import typing ``` Type definitions: Input Types: List[List[int]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: List[List[int]]) -> int: v2 = 0 for v3 in v1: v2 += sum(v3) return v2 ```
Imports: ```python import json import os from os.path import isfile, join import typing ``` Type definitions: Input Types: Any Output Type: dict Dependencies: ```python def v0(v1: str, **v2) -> dict: v3 = dict(**v2) with open(v1, 'r') as v4: v3.update(json.load(v4)) return v3 ``` ```python def v5(v...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T') ``` Input Types: str, str, bool Output Type: v0 Dependencies: ```python def v1(v2: str) -> str: return v2.split('.')[0] ``` Function Name: v3 Function: ```python def v3(self, v4: str, v5: str, v6: bool) -> v0: self.register_depen...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: await self.flusher.stop() await self.flush() if self.session: await self.session.close() self.client.shutdown() ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = '\n'.join([s.strip() for v2 in self.text.splitlines()]) return f'{self.prefix}{v1}{self.suffix}' ```
Imports: ```python import os import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA import typing ``` Type definitions: Input Types: projector_config_pb2.EmbeddingInfo, str Output Type: Tuple[bokeh.plotting.figure, str] Dependencies: ```python def ...
Imports: ```python import typing ``` Type definitions: Input Types: list[pg.Rect] Output Type: pg.Rect Dependencies: ```python def v0(v1: Union[pg.Rect, pg.Surface]) -> bool: v2 = pg.mouse.get_pos() if type(v1) is pg.Surface: v3 = v1.get_rect() else: v3 = v1 return v3.collidepoint(v2) `...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> None: v2 = f'^{_INTERNET_ADDRESS_RE}\\/{_IMAGE_RE}$' _LOG.debug('regex=%s', v2) v3 = re.match(v2, v1) dbg.dassert(v3, "Invalid base_image: '%s'", v1) ``` ```pyth...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1 = [] def __init__(self, v2) -> None: if isinstance(v2, str): for v3 in v2: self.data += list(hex_to_bits[v3]) else: self.data = v2 print(f'Transmission with: {len(self.d...
Imports: ```python from datetime import date, datetime, time import typing ``` Type definitions: Input Types: Any, Any, Optional[Union[str, date]] Output Type: dict Dependencies: Function Name: v0 Function: ```python async def v0(self, v1='energy', v2='day', v3: Optional[Union[str, date]]=None) -> dict: v4 = {'ki...
Imports: ```python from re import search, sub import typing ``` Type definitions: Input Types: str, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: float=3) -> None: v3 = float('inf') (v4, v5, v6, v7) = (v3, v3, -v3, -v3) v8 = v1.splitlines() v9 = 0 ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> int: print('hola mundo') print(v1) print(v2) print(v2 * 3) print('----------------------------------------------------------...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0() -> None: print('DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY') print('BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE') print('ALSO BEEN DECLARED ...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Union[pd.DatetimeIndex, pd.PeriodIndex] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[pd.DatetimeIndex, pd.PeriodIndex]) -> np.ndarray: if self._freq.freqstr == 'H': ...
Imports: ```python import json from io import BytesIO from urllib.response import addinfourl import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: ```python def v0(v1): return addinfourl(fp=BytesIO(json.dumps(responses[v1.full_url]).encode()), headers={}, url=v1.full_url, code=200) `...
Imports: ```python import typing ``` Type definitions: Input Types: bool, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: bool, v2: str) -> bool: v3 = True if v2 == '': v3 = False elif not v1 and 'local_authority' in v2: v3 = False elif v1 and 'loca...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor): v2 = v1 == self._eos_tensor.expand(self._eos_tensor.size(0), v1.size(0)) return v2.sum(dim=0, dtype=torch.uint8) ``...
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, v4, v5, v6) = v1 (v7, v8, v9, v10) = v2 v11 = min(v5, v9) v12 = max(v3, v7) if not...
Imports: ```python import itertools import math import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2): self.name = v1 self.qty = v2 def v3(self, v4): return self.name == v4.name and self.qty == v4.qty def __repr__(self): return f'Chemical(name=...
Imports: ```python import typing ``` Type definitions: Input Types: int, bool, Any, float Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: int, v2: bool, *, v3=None, v4: float=0.1): if v2: v2 = 65280 await self._request(v3, 5, v1, v2, decode_packing='>BBHHH',...
Imports: ```python from hashlib import sha256 import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: v3 = sha256() v3.update(v1.encode()) v4 = v3.hexdigest() return v4 == v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> dict: v2 = {'u': 0, 'c': 0, 'w': 0} for v3 in v1.values(): v2[v3] += 1 return v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: assert self.host self.browser.get(self.host) ```
Imports: ```python from pandas import DataFrame, Series import typing ``` Type definitions: Input Types: Series, float, bool, bool, int Output Type: Any Dependencies: ```python def v0(v1: Series, v2: Series, v3: bool=True, v4: bool=True, v5: int=None, **v6): v1 = verify_series(v1) v2 = verify_series(v2) v5...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Iterable[Channel], Channel] Output Type: Callable Dependencies: ```python def v0(v1: Any) -> List[Any]: try: iter(v1) except TypeError: v1 = [v1] return v1 ``` ```python def v2(v3) -> bool: return any((chan in cha...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: openpyxl.styles.colors.Color, v2: Dict, v3: int, v4: int): self.text = v1.value or '' self.hyperlink = self.handle_hyperlink(v1) self.font_style = self.handle_font_style(v1, v2['themes']) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: super().exec_() if self.clickedButton() == self._continue_button: return False elif self.clickedButton() == self._cancel_button: ...
Imports: ```python import typing ``` Type definitions: Input Types: str | None Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str | None=None) -> list: v2 = [] for v3 in self.dump['workers'].values(): if isinstance(v3, dict) and 'tasks' in v3: v2.ext...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: self.PC = float(self.TP) / (float(self.TP + self.FP) + 1e-06) return self.PC ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: with open(v1, 'r') as v2: for v3 in v2: self._traced_functions.add(v3) ```
Imports: ```python import sys import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(v1: str, v2: str): print('? {} {}'.format(v1, v2)) sys.stdout.flush() return True if read_single_str() == '<' else False ``` Function Name: v3 Function: ```python def v3(v4: l...
Imports: ```python import typing ``` Type definitions: Input Types: Future Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Future): v1 = v1.result() self.log.debug('DagRunEventExecutorRunner for {} exit'.format(v1)) with self._lock: if not self._event_executor...
Imports: ```python import typing ``` Type definitions: Input Types: 'GatewayBase', list Output Type: Any Dependencies: ```python @callback def v0(self, v1: dict): if not v1: return v2 = v1.keys() if self.lazy_setup: for v3 in self.lazy_setup & v2: self.lazy_setup.remove(v3) ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str) -> None: self.name: str = v1 self.deps: list[v0] = [] self.deps_rev: set[v0] = set() self.incs: list[v0] = [] self.incs_rev: set[v0] = set() self.newer_than: list[v...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> bool: try: return v1.is_dir() and v1.joinpath('.pytestignore').exists() except PermissionError: return False ```
Imports: ```python import json import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v1 = json.loads(v1) v2 = v1['c'] v3 = v1['s'] v4 = v1['d'] v5 = v1['b'] v6 = v1['l'] return (v2, v3, v4, v5, v6) ```
Imports: ```python import requests import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = requests.post(self.api_url + f'/{v1}') v2.raise_for_status() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, *v2) -> Any: async for v3 in self._execute(v1, *v2): if v3: return v3[0] return None ```
Imports: ```python from functools import partial from itertools import chain from operator import attrgetter import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame, Sequence[str], Any, Any Output Type: Any Dependencies: ```python def v0(v1, v2): return pd.MultiIndex.from_tuples(prepend_t...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Set[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str]) -> Set[str]: v2 = set() for v3 in v1: v4 = self.first(v3) v2 |= self.first(v3) - {self.__empty_symbol} if ...
Imports: ```python import torch from torch import nn import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor): v4 = self.G(v1, v3) (v5, v6) =...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Dict[str, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> Dict[str, float]: v2 = self.confusion(v1) return {tag: v2.recall(tag) for v3 in v2._values} ```
Imports: ```python import typing ``` Type definitions: ```python v0 = 'GeoDataFrame' ``` Input Types: v0, str Output Type: plt.subplots Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: str) -> plt.subplots: v2['Volume_Region'] = 'Volume: ' + v2['Volume'].map(str) + ', Region: ' + v2['Region']...
Imports: ```python import typing ``` Type definitions: ```python class v0(object): def __init__(self, v1=[False, 1000], v2=[0, 1000], v3=False, v4=[False, 0.1], v5=False, v6=0.2, v7=-0.1, v8=[4, 1000], v9=[], v10='1', v11=[False, 0.1], v12=0, v13=EarthAge): self.__filter_by_uconc = v1 self.__which_...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str=None, v2: bool=False): assert self.result.exit_code == 0 if self.result.exception: raise self.result.exception self._assert_output...
Imports: ```python from pandas._libs import lib from pandas._libs.interval import Interval, IntervalMixin, IntervalTree from pandas._libs.tslibs import BaseOffset, Timedelta, Timestamp, to_offset from pandas._typing import Dtype, DtypeObj, IntervalClosedType, npt from pandas.errors import InvalidIndexError from pandas....
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any, Any, bool Output Type: Any Dependencies: ```python def v0(v1, v2, v3=False, v4: bool=False): v5 = [] for v6 in range(len(v1)): if v3: if v4: print(f'Parameter index:{v6} with int...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1) -> tuple: (v2, v3, v4, v5) = (0, 0, 0, v1) if v5 >= 60: v4 = v5 // 60 v5 -= v4 * 60 if v4 >= 60: v3 = v4 // 60 v4 -= v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: for v2 in (2, 3, 5): while v1 % v2 == 0 and v1 > 1: v1 //= v2 return v1 == 1 ```
Imports: ```python import requests from requests import Response import typing ``` Type definitions: Input Types: str, Optional[dict], Optional[dict] Output Type: Response Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[dict]=None, v3: Optional[dict]=None) -> Response: if no...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, List[Dict[str, Any]] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: List[Dict[str, Any]]): if v1 == 1: return np.ones([32]).astype(np.float32) elif v1 == 2: return n...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> str: v2 = len(v1) v3 = f"const KENNITALAS: [&'static str; {v2}] = [\n" for v4 in v1: v3 += f' "{v4}",\n' v3 += '];\n' ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: ```python def v0(v1): self.handled_errors[error_code] = v1 return v1 ``` Function Name: v2 Function: ```python def v2(self, v3: int): def v4(v5): self.handled_errors[v3] = v5 return v5 ...
Imports: ```python import torch from torch.distributions import AffineTransform, TransformedDistribution from torch.distributions.normal import Normal import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Tuple[torch.Tensor, torch.Tensor] Dependencies: Function Name: v0 Function: ```python def v0...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = [wid for (v2, v3) in self.windows_map.items() if v3.group] self.core.update_client_list(v1) ```
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 = f'{self.identifier}.' if self.identifier else '' return f'{v2}{v1}' ```
Imports: ```python import re import urllib import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> str: v2 = str(urllib.parse.quote(v1, safe='/:')) return v2.replace('%2520', '%20') ``` Function Name: v3 Function: ```python def v3(v4: str) -> str: v5...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, **v2: Any) -> str: self._check_kwargs(v2) return v1 ```
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: self.ward_occupancy = self._make_ward_occupancy() (self.occupancy, self.occupancy_week, self.occupancy_weekend) = self._make_occup...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, complex, float, float, bool Output Type: np.ndarray Dependencies: ```python def v0(v1, v2: float, v3: float, v4: float, v5: Union[None, float]=None, v6: bool=False, v7: bool=False) -> np.ndarray: if v5 is None: ...