text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: float, np.ndarray, Any Output Type: np.ndarray Dependencies: ```python def v0(v1: float, v2: np.ndarray) -> np.ndarray: return v1 * v2 ``` Function Name: v3 Function: ```python def v3(v4: float, v5: np.ndarray, v6=6.0) -> np.ndarray: v7 = v0(v...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Callable[[Sequence[str]], List[str]] Dependencies: ```python def v0(v1): return split_by_regex('[A-Z][a-z0-9]+')(v1) ``` Function Name: v2 Function: ```python def v2() -> Callable[[Sequence[str]], List[str]]: @apply_to_each ...
Imports: ```python from hashlib import sha256 import hmac import base64 import typing ``` Type definitions: ```python v0 = Union[str, bytes, bytearray] ``` Input Types: v0, v0, str Output Type: bytes Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0, v4: str='utf-8') -> bytes: if isinstance...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: if self.open[v1.code]: for v2 in range(len(self.outcomming)): v3 = next(self.outcomming_cicle) if v3.code != v1.re...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: 'qcelemental.models.results.WavefunctionProperties', int Output Type: numpy.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: 'qcelemental.models.results.WavefunctionProperties', v2: int) -> numpy.ndarray: v3 = g...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.assert_subtype(self.fx.e, self.fx.f) self.assert_equivalent(self.fx.f, self.fx.f) self.assert_not_subtype(self.fx.a, self.fx.f) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> str: if len(v1) == 4: return '0000{0}-0000-1000-8000-00805f9b34fb'.format(v1.lower()) else: return v1.lower() ```
Imports: ```python import datetime as dt import os import re import typing ``` Type definitions: Input Types: str Output Type: list[Any] Dependencies: ```python def v0(v1: str) -> list[Any]: v2: list[Any] = [] if len(v1.split('_')[0]) > 15: v2.append(f'Landsat {int(v1[2])}') v2.append(lsat_sens...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self.msg_edit.setText(v1) self.show() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: JobStatus Dependencies: Function Name: v0 Function: ```python def v0(self) -> JobStatus: self._update_status_queue_info_error() return self._status ```
Imports: ```python import logging import typing ``` Type definitions: Input Types: dict, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: dict, v2: str) -> None: v1['domains'][v2] = {'mapped': 0, 'next_neuron_id': 0, 'last_bmu_id': None, 'ema_error': None, 'ema_variance': 0.0, ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3) -> dict: (v4, v5) = np.split(v1, [int(0.9 * v1.shape[0])]) (v6, v7) = np.split(v2, [int(0.9 * v2.shape[0])]) v8 = {'...
Imports: ```python import typing ``` Type definitions: Input Types: yahoo_tv.Schedule Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: yahoo_tv.Schedule): v2 = v1.get_all_station() if not v2: print('放送局一覧を取得できませんでした。') return 1 for v3 in v2: print(v3)...
Imports: ```python import random import numpy as np import typing ``` Type definitions: Input Types: Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Optional[int]=None): if v1 is not None: np.random.seed(v1) random.seed(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: v2 = self.client.get(f'/containers/{v1}/exists') return v2.ok ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> list: v2 = [0] * 4 v3 = 3 while v1 != 0 and v3 > -1: v2[v3] = v1 % 10 v1 //= 10 v3 -= 1 return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: int=1): v3 = v1.shape[0] v4 = np.atleast_2d(v1) v5 = v4 + np.random.laplace(scale=self.eps, size=(v2, v3)) return v5...
Imports: ```python import typing ``` Type definitions: Input Types: list[int], list[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list[int], v2: list[int]): if v1[0] == 0: v2[v1[3]] = v2[v1[1]] + v2[v1[2]] elif v1[0] == 1: v2[v1[3]] = v2[v1[1]] + v1[2] ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: bool=False): v3 = [fname for v4 in sorted(os.listdir(v1))] if v2: v3 = [os.path.join(v1, v4) for v4 in v3] return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: carla.Client, int Output Type: Any Dependencies: ```python def v0(v1: carla.Client, v2: int) -> carla.ServerSideSensor: v3 = v1.get_world() v3.wait_for_tick() v4 = v3.get_actor(v2) v3.wait_for_tick() if v4 is None: raise Va...
Imports: ```python import tensorflow as tf import numpy as np import typing ``` Type definitions: Input Types: tuple Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: tuple) -> dict: v2 = {'num_detections': tf.convert_to_tensor(np.array([float(len(tf.convert_to_tensor(v1[2])))], dty...
Imports: ```python 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._expectation_value_components[0, 0](v1) for v3 in range(1, self._sp.num_energy_states): v2 +=...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> NoReturn: self.weights_ = np.zeros((self.iterations_,)) if len(v1.shape) == 1:...
Imports: ```python from qiskit import QuantumCircuit, QuantumRegister import typing ``` Type definitions: Input Types: Output Type: QuantumCircuit Dependencies: Function Name: v0 Function: ```python def v0() -> QuantumCircuit: v1 = QuantumRegister(4, 'q') v2 = QuantumCircuit(v1) v2.h(v1[0]) v2.h(v1[1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = ':green:`py`\\ :gray:`throttle`' v1 = v1.strip() v1 = v1.split('\n', 2)[-1] return v2 + '\n' + '=' * len(v2) + '\n' + v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: 'MonitorTask' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> 'MonitorTask': self._task_name = v1 return self ```
Imports: ```python import math import folium import typing ``` Type definitions: ```python v0 = Tuple[float, float] ``` Input Types: folium.Map, List[v0], bool, float, int Output Type: None Dependencies: ```python def v1(v2: v0, v3: v0) -> float: return math.sqrt((v2[0] - v3[0]) ** 2 + (v2[1] - v3[1]) ** 2) ``` ```...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: if not self._max_calls or v1 < self._max_calls: self._max_calls = v1 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, float Output Type: Tuple[np.ndarray, np.ndarray, float] Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: float=0.001) -> Tuple[np.ndarray, np.ndarray, float]: ...
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 == 'pc': return 1 elif v1 == 'android': return 2 elif v1 == 'ios': return 4 elif v1 == 'mac': ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: for (v1, v2) in self._heartbeat_future_dict.items(): if not v2.done() and (not v2.cancelled()): v2.cancel() await self._cli...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if v1.islower() or v1.isupper(): return 'Invalid calculation' try: return eval(v1) except ValueError: return 'Invalid calcul...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.war is not None: return self.should_send_mii_notification return False ```
Imports: ```python import torch import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.env.reset() self.network.reset_state_variables() self.accumulated_reward = 0.0 self.step_count = 0 self.overlay_start =...
Imports: ```python import inspect import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(cls: type) -> List[str]: v1 = inspect.signature(cls.__init__) v2 = dict(v1.parameters) v2.pop('self') return list(v2.keys()) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, bool Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: bool=False) -> None: v4 = self.container_client.get_blob_client(v2) with open(v1, 'rb') as v5: v4.upload_blob(v5, ...
Imports: ```python import os import os.path from os.path import expanduser import typing ``` Type definitions: Input Types: Optional[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[str]=None) -> None: if v1 is None: v1 = '' if self.path is None:...
Imports: ```python import glob import random import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0() -> list: v1: list = glob.glob('../data/VIDEO/*') v2: list = [] for v3 in v1: for v4 in glob.glob(v3 + '/*.csv'): ...
Imports: ```python import typing ``` Type definitions: Input Types: collections.Counter, list[str], list[tuple[int, str]] Output Type: tuple[collections.Counter, dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: collections.Counter, v2: list[str], v3: list[tuple[int, str]]) -> tuple[collectio...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: tuple Dependencies: ```python def v0(v1: dict=GRAPH_ATTR, v2: str=OUTPUT_FORMAT, v3: str=OUTPUT_PATH) -> str: v4 = f'{v3}/media_processing' with Diagram('Media Processing', show=False, outformat=v2, filename=v4): v5 = Pyt...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = self.label_histograms v2 = np.log(self._internal_bin_confidences()) return -(v1[..., 1, :] * v2).sum() / v1[..., 1, :]....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Optional[float] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[float]: if not self.queue: return None v1 = self.get_oldest() assert v1 is not None return self.queue[v1] ```
Imports: ```python import numpy from numpy.linalg import norm from scipy.fft import idstn, idctn from scipy.ndimage import convolve from scipy.ndimage import median_filter, gaussian_filter import typing ``` Type definitions: Input Types: Any, float Output Type: Any Dependencies: Function Name: v0 Function: ```python ...
Imports: ```python import sqlite3 import typing ``` Type definitions: ```python v0 = Tuple[int, str, str, str, str, str, str, str, str, Dict[str, Any]] ``` Input Types: str Output Type: None Dependencies: ```python def v1() -> sqlite3.Connection: v2 = wn.config.database_path v3 = v2.is_file() v4 = sqlite3.c...
Imports: ```python import typing ``` Type definitions: ```python v0 = typing.MutableMapping[tree.Node, tree.Node] ``` Input Types: v0, v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: v0) -> v0: v4 = {} for v5 in set(v2.keys()).intersection(set(v3.keys())): v4[v...
Imports: ```python import typing ``` Type definitions: Input Types: Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor) -> Tensor: (v2, v3, v4, v5, v5) = self.image_sizes return self.tile.backward_indexed(v1, v2, v3, v4) ```
Imports: ```python import json import os import typing ``` Type definitions: Input Types: str, int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int, v3: int) -> str: v4 = os.path.join(self.repo_dir, '{}:{}:{}'.format(v1, v2, v3)) (v5, v6, v7) = self.run_c...
Imports: ```python import json import typing ``` Type definitions: Input Types: Pipeline.PipeLineConfigDTO Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Pipeline.PipeLineConfigDTO): v2 = self._pl.get_all_pipeline_configs() if v2.status_code < 300: try: ...
Imports: ```python from io import BytesIO from PIL import Image, UnidentifiedImageError import typing ``` Type definitions: Input Types: dataiku.Folder, dataiku.Folder, List[AnyStr], AnyStr Output Type: AnyStr Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dataiku.Folder, v2: dataiku.Folder, v3:...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> int: if v1[0] != v1[-1]: while v1[0] != v1[-1]: v1 = str(int(v1) - 1) v2 = len(v1) v3 = 0 if v2 == 1: return int(v...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Any, Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> int: v3 = v1.split(' ') v4 = [i for v5 in range(0, len(v3)) if v3[v5][1:] == v2] if len(v4) == 0: return False ...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: os.environ.clear() os.environ.update(self._orig_env) if os.path.isfile(self.outfile): os.unlink(self.outfile) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._context['reversed']: self._move_to_last_line() self._vim.command('normal! zb') else: self._move_to_first_line() ```
Imports: ```python import typing ``` Type definitions: Input Types: float, bool Output Type: Any Dependencies: ```python def v0(v1: tf.Tensor, v2: tf.Tensor): v2 *= dm_alpha return tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True, reduction=tf.keras.losses.Reduction.SUM)(v1, v2) ``` Function Name...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str, v4: str): v5 = " {}: Optional[Union[Sequence[Union[{}, Reference]], {}, Reference]]\n if '{}' not in d:\n {} = ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: archs.HyperInfo Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2) -> archs.HyperInfo: v3 = self._encoder(v1, training=self.training) return self._entropy_model(v3, image_shape=v2, mode=self._mode) ...
Imports: ```python import typing ``` Type definitions: Input Types: ('Dry run', 'flag', 'd') Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ('Dry run', 'flag', 'd')): if v1: print('Doing nothing') else: print('Doing something') ```
Imports: ```python import typing ``` Type definitions: Input Types: bool, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool, v2=True): self.active_this_session = v1 if v2: self.save() ```
Imports: ```python import warnings import typing ``` Type definitions: Input Types: int, Optional[Dict[str, float]] Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=None, v2: Optional[Dict[str, float]]=None) -> Dict: if v2 is None: v2 = {} v3 = 0 v4: Optio...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: str, int Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int) -> list: v3 = 120 v4 = [] if v2 > v3: for v5 in range(1, int(np.floor(v2 / 120)) + 1): v6 = v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: Path Output Type: Path Dependencies: Function Name: v0 Function: ```python def v0(v1: Path) -> Path: v2 = next((v1 / 'lib').glob('*')) if v2.name != 'site-packages': v2 /= 'site-packages' return v2 ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4, v5, v6, v7=[]): self._url: str = v1 self._route: str = v2 self._format: str = v3 self._content: str = v4 self._title: str = v5 self._slug: str = v6 s...
Imports: ```python import cv2 import typing ``` Type definitions: Input Types: Any, List Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: List) -> None: for v3 in v2: for v4 in v3: cv2.circle(v1, v4, 1, (255, 0, 0)) ```
Imports: ```python from math import atan, degrees, gcd import typing ``` Type definitions: ```python v0 = Tuple[int, int] ``` ```python v1 = List[v0] ``` Input Types: v0, v1 Output Type: Any Dependencies: Function Name: v2 Function: ```python def v2(v3: v0, v4: v1): v5 = set() for v6 in v4: if v6 == v3...
Imports: ```python import typing ``` Type definitions: Input Types: np.array, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.array=None, v2: float=0.01, v3: float=0.005): if v1 is None or (v1[0] == 0 and v1[1] == 0): self.curr_reward -= v2 v4 ...
Imports: ```python import re import typing ``` Type definitions: ```python v0 = namedtuple('CalendarEvent', ['title', 'start', 'end', 'duration', 'categories']) ``` Input Types: List[v0], str, str Output Type: Dict[str, List[v0]] Dependencies: Function Name: v1 Function: ```python def v1(v2: List[v0], v3: str, v4: str...
Imports: ```python import ast import typing ``` Type definitions: Input Types: Path Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Path): v2 = {} if v1.exists(): with open(v1, 'r') as v3: v4 = v3.read() v2 = ast.literal_eval(v4) return v2 ``...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('Decorated') ``` Input Types: v0 Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> v0: v2.auth_allow_anonymous_access = True return v2 ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: ```python def v0(v1: int, v2: np.ndarray, v3: np.ndarray): v4 = 0 v5 = (0, 0) while True: v6 = v4 v3[v1] = 0 v7 = np.sum(np.array((v2 - v2[v1]) ** 2), 1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict, Dict[str, str], bool Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict, v2: Dict[str, str], v3: bool=False) -> Dict: if not v3: v1 = dict(v1) for (v4, v5) in v2.items(): if v4 in v1: ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray Output Type: Tuple[np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray, v3: np.ndarray, v4: np.ndarray) -> Tuple[np....
Imports: ```python import typing ``` Type definitions: Input Types: brawlstats.models.Player Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: brawlstats.models.Player): v2 = 0 for v3 in v1.raw_data['brawlers']: if 550 <= v3.get('trophies') <= 599: v2 = v2 + 7...
Imports: ```python import typing ``` Type definitions: Input Types: ndarray, ndarray, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: ndarray, v2: ndarray, v3: float) -> None: for v4 in range(v2.shape[0]): for v5 in range(v2.shape[1]): v1[v4, v5] = 1 if v...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0(EmbeddedDocument): v1: ClassVar[Manager] @property def v2(self): return getattr(self, self.Meta.pk_field, None) def v3(self) -> v0: return self.documents.create(obj=self) def v4(self) -> None: ...
Imports: ```python import pandas as pd import numpy as np import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): v2 = [np.ndarray, list, tuple, pd.Series] v3 = [] v4 = '' for v5 in v1.values(): if type(v5) no...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self.__field__ == '': self.__collection__.__collection__.delete_one({'_id': self.__id__}) else: self.__collection__.__collection__...
Imports: ```python import logging import typing ``` Type definitions: Input Types: str, Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2='latest') -> int: if (v1 in self._nonce_dict) is False: self._nonce_dict[v1] = self.web3.eth.get_transaction_count(v1, v...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Tuple[int, ...]], Optional[Tuple[int, ...]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[Tuple[int, ...]]=None, v2: Optional[Tuple[int, ...]]=None) -> bool: if not self.server_version: ...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, str]): v2 = v1.copy() v2['cache-control'] = 'no-cache' return v2 ```
Imports: ```python import torch import torch.cuda import torch.nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.LongTensor, Tuple[Any, ...], Optional[Dict[str, Any]] Output Type: Tuple[torch.Tensor, Optional[Dict[str, Any]]] Dependencies: Function Name: v0 Function: ```python ...
Imports: ```python import typing ``` Type definitions: Input Types: str, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: dict): try: v3 = self.dao.update(id=v1, update_data=v2) return v3 except Exception as e: raise ```
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 = super().get_xgb_params() v1['num_parallel_tree'] = self.n_estimators return v1 ```
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): self.file_path = v1 v2 = pd.read_csv(v1) v3 = str(input('Input the text Column Name Please ? : ')) self.corpus_list = ...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('T', bound=Tuple[Any, ...]) ``` Input Types: str Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(self, v2: str) -> v0: v3 = getattr(self.tuple_type, '_fields', None) v4 = getattr(self.tuple_type, '__annotat...
Imports: ```python from copy import deepcopy import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = deepcopy(self.parsed_mkt_data_buffer) v2 = self.get_internal_data() v3 = deepcopy(self.parsed_volume_data_buffer) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self._api_get(f'workspaces/{self._workspace_id}/projects') for v2 in v1: self._projects_by_name[v2['name']] = v2 self._projects_...
Imports: ```python import re import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = self.lex.get_token() if not re.match('[a-zA-Z]+', v1): raise Exception('expected identifier found %s' % v1) return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: ClauseElement) -> str: v2 = get_sqlalchemy_connection().dialect v3 = v1.compile(dialect=v2) return str(v3) ``` Function Name: v4 Function: ```python def v4(self) -> None: v5 = dict(...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: 'list[str]' Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str=' ', v3: str='"') -> 'list[str]': v4 = [] v5 = '' v6 = False v7 = False def v8(): nonlocal v, unitStarted ...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float) -> None: self.min_brightness = v1 self.max_brightness = max(self.max_brightness, v1) ```
Imports: ```python import torch import functools import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: ```python def v0(v1: int, v2: int=0): v3 = IntersimpleLidarFlatIncrementingAgent(loc=v2, track=v1, n_rays=5, reward=functools.partial(speed_reward, collision_penalty=0)) v4 = No...
Imports: ```python import folium from folium.plugins import MarkerCluster, FeatureGroupSubGroup import typing ``` Type definitions: Input Types: Iterable[Tuple[float, float]], str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Iterable[Tuple[float, float]], v2: str, **v3): v...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: v1 Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: v1): v2 = pd.DataFrame.from_dict(v1) v2.to_csv(self.output_file_name, index=False, sep='\t') ```
Imports: ```python import torch import torch.nn.functional as F import typing ``` Type definitions: Input Types: torch.Tensor, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: int): assert v1.dtype in {torch.float16, torch.float32} v3 = v1.dtype == torch.fl...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._built: return self._built = True self._global_step = tf.Variable(0, trainable=False) self._tf_optimi...
Imports: ```python import glob import os import pandas as pd import typing ``` Type definitions: Input Types: bool, str Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False, v2: str=None) -> tuple: self.errors = [] self.warnings = [] v3 = [d for v4 in os.listd...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.Optional[set[tanjun_abc.SlashHooks]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Optional[set[tanjun_abc.SlashHooks]]: v1: typing.Optional[set[tanjun_abc.SlashHooks]] = None if self._hooks a...
Imports: ```python from collections import namedtuple, defaultdict from inspect import signature import typing ``` Type definitions: ```python v0 = Iterable[Item] ``` ```python v1 = Any ``` Input Types: Iterable[v1], Callable[[v1], Hashable], Optional[Callable[[v1], Any]], Callable[[], v0], Callable[[Any, Any], bool], ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[Dict] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[Dict]: v1 = 'projects/%s' % self.project_id v2 = self.service.projects().processors().list(parent=v1).execute() return v2['processors'] ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1, v2) -> None: v1.add_argument('--output_dir', default=None, type=str, required=True, help='The output directory where the model predictions and checkpoints w...