text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: float, float, float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: float): self.assertLess(v2, v3, 'Test Configuration issue') self.assertGreater(v1, v2) self.assertLess(v1, v3)...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.__check_fastqc() self.__check_trim_galore() self.__check_kallisto() ```
Imports: ```python import torch from torch import optim from torch.optim.optimizer import Optimizer import typing ``` Type definitions: Input Types: Output Type: Optimizer Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optimizer: v1 = self.args v2 = optim.Adamax(self.model.parameters(), ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> bool: try: self.find_category_from_names(v1, v2) return True except ValueError: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if self._finalizer: self._finalizer() ```
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = '{{"id": "some-id", "count": {count}}}' return v2.format(count=v1).encode() ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.set_models({'meeting/1': {'motion_poll_default_group_ids': [1], 'is_active_in_organization_id': 1}, 'group/1': {'used_as_motion_poll_default_id': 1}...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.coins_list = [200, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.25, 0.1, 0.05, 0.01] v1 = self.coins_list v2 = self._coins_frame [setattr(self, f'_{...
Imports: ```python import os, sys 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.exists(v1): raise FileNotFoundError(f'Could not find {v1}.') return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(v1) -> Dict: v2 = {} for v3 in v1: if '=' in v3: (v4, v5) = v3.split('=', 1) else: (v4, v5) = (v3, None) v2[v4] =...
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Dict[str, str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Dict[str, str]: v2 = re.split('\\t|\\s', v1) v1 = {} for v3 in v2: if v3.strip(): v4 = v3.split(':'...
Imports: ```python import typing ``` Type definitions: Input Types: dict Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: dict) -> str: v2 = v1['Given'] v3 = v1['Given2'] v4 = v1['Maiden'] v5 = v1['Maiden2'] v6 = v1['Surname'] v7 = set() if v6: v7.add...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): with self.lock: v2 = self._get_cached_node(v1) v3 = v2.get_external_ip() if v3 is None: v2 = self._get_node(v1) ...
Imports: ```python import typing ``` Type definitions: Input Types: Union[str, list] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[str, list]) -> str: v2 = 0 for v3 in range(13): v2 += int(v1[v3]) * self.weights_second[v3] v2 = v2 % 11 if v2 < 2: ...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str=DEFAULT_IMAGE) -> bool: try: subprocess.run(['docker', 'image', 'inspect', v1], check=True, stdout=subprocess.DEVNULL, stderr=subpr...
Imports: ```python import json import typing ``` Type definitions: Input Types: TextIO Output Type: str Dependencies: ```python def v0(v1: str, v2: str='L4') -> str: try: v1 = json.dumps(v1) v1 = {v2: v1} return json.dumps(v1) except Exception: return json.dumps({}) ``` ```pytho...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: self._raise_from_pending() return self._serve_thread.is_alive() ```
Imports: ```python import typing ``` Type definitions: Input Types: str, List[str], Any Output Type: Any Dependencies: ```python def v0(): client_lock.acquire() v1 = boto3.client('sqs') client_lock.release() return v1 ``` ```python def v2(v3: str, v4=None) -> (str, Any): if v4 is None: v4 =...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self) -> None: v1 = self._req assert v1 is not None v2 = self._payload_writer assert v2 is not None v3 = v1.version v4 = 'HTTP/{}.{} {} {}'.fo...
Imports: ```python import socket import typing ``` Type definitions: Input Types: int, str, int, bool Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0, v2: str=None, v3: int=5, v4: bool=True) -> bool: v5 = v2 if v2 else self.host v6 = v1 if v1 else self.port try...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Any Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> list: v2 = '/sys/devices/system/node/node%d/cpulist' % v1 try: with open(v2, 'r') as v3: v4 = v3.read() except: ...
Imports: ```python import numpy import typing ``` Type definitions: Input Types: int, int, Tuple[int] Output Type: Generator[List[numpy.ndarray], None, None] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: Tuple[int]) -> Generator[List[numpy.ndarray], None, None]: v4 = 3 v5 = ...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3, v4): (v5, v6) = (v1.shape[0], v1.shape[1]) v7 = np.random.uniform(v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> int: v2 = v1.encode('utf16') v3 = len(v2) // 2 if v2[:2] in [b'\xff\xfe', b'\xff\xff', b'\xfe\xff']: v3 -= 1 return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: List[Optional[int]] Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[Optional[int]]) -> int: self.remove_invalid(v1) self.reposition_to_right_index(v1) return self.find_first_missing(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): for v2 in range(len(v1)): v3 = v2 for v4 in range(v2 + 1, len(v1)): if v1[v3] > v1[v4]: v3 = v4 v5 = v...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor): v2 = v1.diag().sum() / v1.sum() return v2.item() ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: Todo, v2=None) -> None: self.todo = v1 self.revision = v2 @cproperty def v3(self) -> List[str]: v4 = self.todo['DESCRIPTION'] v5 = re.findall('---\\n\\n(.*?)\\n\\nUpdated:', v4...
Imports: ```python import sys import typing ``` Type definitions: Input Types: Output Type: int Dependencies: ```python def v0(v1: str, v2: Optional[Any]=None) -> Any: from .Globals import global_get return global_get('settings.{}'.format(v1), v2) ``` Function Name: v3 Function: ```python def v3() -> int: ...
Imports: ```python import json import logging import typing ``` Type definitions: ```python class v0: v1: str v2: Set['Node'] v3: Set['Node'] v4: NodeType v5: 'DependencyGraph' v6: 'Configuration' v7: Optional[str] v8: bool v9: Optional[List[str]] v10: Optional[List['Node']] ...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> torch.Tensor: v2 = self.blocks(v1) return nn.Softmax(dim=1)(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Sequence[str] Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Sequence[str]) -> Optional[str]: v3 = v1.split() for v4 in v3: if v4.upper() in v2: return v4.titl...
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float=0.1): print(v1) self['exact_goal_radius'] = 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: self.call_counter_start_execution += 1 self.__get_test_case_by_id(v1) return str(self.call_counter_start_execution) ```
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0() -> str: v1 = Path('/etc/alpine-release').read_text().split('.') return f'alpine-{v1[0]}.{v1[1]}' ```
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: pd.DataFrame Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: pd.DataFrame) -> str: if v1.empty is True: return 'There is no prize data for this grade.' else: v1['year'] = pd....
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0() -> int: v1 = 10 try: v2 = int(os.environ.get('GLUU_WAIT_SLEEP_DURATION', v1)) except ValueError: v2 = v1 return max(1, v2) ```
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): for v3 in v2: self.submit(v1, v3) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> None: v2 = f'{os.getcwd()}/{v1}' os.makedirs(f'{v2}/src/templates') os.mkdir(f'{v2}/src/static') os.mkdir(f'{v2}/tests') ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: int, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: str, v3: bool): v4 = ['./scop_modeling.sh', str(v1), v2] if v3: v4 = ['qsub', '-g', 'tga-ishidalab', '-N', 'mode...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: list[int], int Output Type: tuple[int, ...] Dependencies: ```python def v0(v1: int, v2: int) -> tuple[tuple[int, ...], tuple[int, ...]]: v3 = (v2,) * (v1 // v2) v4 = (v1 % v2,) if v1 % v2 else () return (v3, v4) ``` Func...
Imports: ```python import urllib from io import BytesIO import typing ``` Type definitions: Input Types: str, str Output Type: BytesIO Dependencies: ```python def v0(v1: str, v2: str) -> HTTPResponse: if not validators.url(v1): raise ValueError("Wrong URI format for 'file_uri' argument. ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List, np.ndarray Output Type: List[sitk.Euler3DTransform] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List, v2: np.ndarray) -> List[sitk.Euler3DTransform]: v3 = v1 v2 = np.insert(v2, 0, 0) v2 = ...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: if self.filters.time and self._date_last is not None: return self.accounts[v1].close_date < self._date_last retur...
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 = v1 if v2.startswith('com.sun'): v2 = v2[13:] else: v2 = self._ns_mod + '.' + v2 return v2 ```
Imports: ```python import os import os.path as path import typing ``` Type definitions: Input Types: io.TextIOBase, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: io.TextIOBase, v2: int=128) -> str: v3 = 2 * v2 v4 = v1.tell() v1.seek(0, os.SEEK_END) v5 = v1.tell() ...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('Context', 'objects, attributes, relations') ``` Input Types: v0, str Output Type: Any Dependencies: Function Name: v1 Function: ```python def v1(v2: v0, v3: str): with open(v3, 'w') as v4: v4.write('[Lattice]\n') v4.w...
Imports: ```python import numpy as np import typing ``` Type definitions: ```python class v0(IndexOpsMixin, PandasObject): v1: frozenset[str] = PandasObject._hidden_attrs | IndexOpsMixin._hidden_attrs | frozenset(['contains', 'set_value']) v2 = 1 def v3(self, v4: np.ndarray, v5: np.ndarray) -> np.ndarray: ...
Imports: ```python import typing ``` Type definitions: Input Types: str, bool Output Type: Real Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: bool=True) -> Real: if v2: v3 = self.load_ann(v1)['fs'] else: v4 = self._get_tranche(v1) v3 = self.fs[v4] re...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: List[Tuple[int, int, float]], int, str, str Output Type: List[Tuple[int, int]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Tuple[int, int, float]], v2: int, v3: str='linear', v4: str='bot...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> np.ndarray: v3 = self._config['m']['overlay'] if v3['strategy'] in ['overlay...
Imports: ```python import typing ``` Type definitions: Input Types: Union[pd.DataFrame, ks.DataFrame], Union[pd.Series, ks.Series] Output Type: Union[pd.DataFrame, ks.DataFrame] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[pd.DataFrame, ks.DataFrame], v2: Union[pd.Series, ks.Series]=None...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: List[Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> List[Any]: v2 = [f.changed_methods for v3 in v1.modified_files] return [item for v4 in v2 for v5 in v4] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str, List[Any], asyncpg.exceptions.PostgresError Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: List[Any], v4: asyncpg.exceptions.PostgresError) -> None: if v3: v3 = f'\n{v3}' e...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> None: v2 = v1[0][:1] if v2 in ['(', '[', '{']: v1[0] = ' ' + v1[0][1:] v1[:] = [v2] + v1 v3 = v1[-1][-1:] if v3 i...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v1 = f'\n{v1}\n' self.welcome_msg = v1 print(f'Welcome message :') print(v1) print() ```
Imports: ```python import torch from torch.autograd import Variable, Function import typing ``` Type definitions: Input Types: torch.Tensor, Any Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2=None) -> torch.Tensor: v1 = v1.long().view(-1, 1) v2 = v2 i...
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool Output Type: Any Dependencies: ```python def v0(v1): v2 = [0 for v3 in range(1440)] for v4 in range(len(v1)): v5 = int(v1.at[v4, 'Charge_start']) v6 = int(v1.at[v4, 'Charge_end']) if var_power: v7 ...
Imports: ```python import json import typing ``` Type definitions: Input Types: Any, str, str, str Output Type: Any Dependencies: ```python @retry(stop=stop_after_attempt(5), retry=retry_if_exception_type(TryAgain), wait=wait_exponential(multiplier=1, min=2, max=5)) def v0(v1: Any, v2: Any, v3: bool=False, **v4): ...
Imports: ```python import typing ``` Type definitions: Input Types: str, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int) -> None: self.job_id = v1 self.committed = v2 ```
Imports: ```python import logging import torch from torch.nn.utils.rnn import pad_sequence from tqdm import trange import typing ``` Type definitions: ```python v0 = torch.Tensor ``` Input Types: List[Tuple[v0, v0]], int, int Output Type: List[Tuple[Tuple[v0, v0], Tuple[v0, v0]]] Dependencies: ```python def v1() -> Non...
Imports: ```python from logging import Logger, getLogger import typing ``` Type definitions: Input Types: str, Optional[Logger] Output Type: Optional[Any] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Optional[Logger]=None) -> Optional[Any]: v2 = v2 if v2 is not None else getLogger...
Imports: ```python import typing ``` Type definitions: ```python class v0(Node): def __init__(self, v1: str, v2: int, v3: str, v4: int, v5: int, v6: bool, v7: str='disabled', v8: str='disabled', v9: typing.SupportsFloat=0): super(v0, self).__init__() self.shutdown_task = None self.data_file...
Imports: ```python import numpy as np import torch import torch.distributions as D from torch.utils.data import DataLoader, TensorDataset import typing ``` Type definitions: Input Types: pl.LightningDataModule, int, float, int, float, float, float, float, str, float Output Type: DataLoader Dependencies: ```python def ...
Imports: ```python import datetime import typing ``` Type definitions: ```python class v0(Terms): def __init__(self, v1: str, v2: Address, v3: Address, v4: Dict[str, int], v5: Dict[str, int], v6: bool, v7: str, v8: Optional[Dict[str, int]], v9: str, v10: str) -> None: """ Instantiate transaction. ...
Imports: ```python import typing ``` Type definitions: Input Types: asyncio.StreamReader, asyncio.StreamWriter Output Type: Any Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: asyncio.StreamReader, v2: asyncio.StreamWriter): self.DATA.append(await v1.readline()) v2.close() ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): with open(v1, 'r') as v2: v3 = v2.read() v4 = re.search(pattern=self.__class__.function_pattern, string=v3, flags=re.I | re.M) ...
Imports: ```python import uuid import typing ``` Type definitions: Input Types: NDArray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: NDArray): v2 = [str(uuid.uuid4()) for v3 in range(v1.shape[0])] for v4 in range(v1.shape[0]): v5 = v2[v4] for (v6, v7) i...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, float, float, bool Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: float, v3: float, v4: bool=False) -> float: v5 = 0 if v4 else self.pos_x v6 = 0 if v4 else self.po...
Imports: ```python import typing ``` Type definitions: Input Types: 'Polygon', 'Polygon' Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'Polygon', v2: 'Polygon') -> bool: v3 = self._poly_to_geom(v1) v4 = self._poly_to_geom(v2) return v3.intersects(v4) ```
Imports: ```python import copy import typing ``` Type definitions: Input Types: Any, dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: dict): v1['type'] = self.txin_type v3 = self.received.get(v1['prevout_hash'] + f":{v1['prevout_n']}") (v4, v5, v6) = v3 v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int Output Type: Optional[dict] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, v2: int, v3: int) -> Optional[dict]: v4 = await self.get_reaction(v1, v2) if v4 is None: return None return ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.val = v1 self.left = None self.right = None ``` Input Types: v0 Output Type: List[int] Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0) -> List[int]: v4 = [] ...
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: Sequence[str] Output Type: subprocess.CompletedProcess Dependencies: Function Name: v0 Function: ```python def v0(v1: Sequence[str], /, **v2) -> subprocess.CompletedProcess: print(f"+ {' '.join(v1)}") return subprocess.run(v...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list): if len(v1) <= 1: raise ValueError('You called manage.py or python -m zacoby without specifying any commands to run.') v2 = v1[0] v3 ...
Imports: ```python import matplotlib import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.text import Text from matplotlib.collections import Collection, PathCollection from matplotlib.quiver import QuiverKey, Quiver import matplotlib.animation as animation import typing ``` Type definiti...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: int=-1) -> None: self.label = v1 self.ops: List[Op] = [] self.error_handler: Optional[v0] = None @property def v2(self) -> bool: """Does the block end with a jump, branch or re...
Imports: ```python import torch.nn as nn import torch.nn.functional as F import torch import torch.optim import typing ``` Type definitions: Input Types: Any, Any Output Type: torch.Tensor Dependencies: ```python def v0(self, v1): if layer == 'text_projection': v1 = v1 @ self.text_projection return...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int): v4 = v1 % (v2 + v3) if v4 // v2 == 0: return True return False ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict[str, Set[str]] Dependencies: ```python def v0(v1: LoggingTransaction) -> Dict[str, Set[str]]: v2 = "\n SELECT DISTINCT\n tc.table_name,\n ccu.table_name AS foreign_table_name\...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: if type(v1) != str or type(v2) != str: return False v1 = v1.lower().replace(' ', '') v2 = v2.lower().replace(' ', '')...
Imports: ```python import tensorflow as tf from keras.utils import losses_utils, metrics_utils from keras.utils.tf_utils import is_tensor_or_variable from tensorflow.keras import backend from tensorflow.keras.metrics import Mean from tensorflow.keras.metrics import get as get_metric import typing ``` Type definitions: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: if not self.enabled: return self.enabled = False self.state = 'disabled' self.timer_started = False self.debug_log('Disabling...'...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: self.login_status = False v2: str = self.getApiErrorMsg(v1) self.gateway.write_log(f'交易服务器连接断开,原因:{v1},{v2}') ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.closeSignal.emit() v1.accept() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: self.result.msg = f"number for stop_wavelength changed to '{v1}'" self.result.value = v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: assert self._epoch_end_reached v1 = self.metrics self._progress_bar_metrics.update(v1['pbar']) self._callback_metrics.update(v1['callback']) ...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, 'Prior', Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, v2: 'Prior', v3=True): v4 = v1 if v3 else v2.get_constrained(v1) if v3: v5 = v2().support.check(v4) ...
Imports: ```python import typing ``` Type definitions: Input Types: Iterable, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: Iterable, v2=None): v3 = iter(v1) v4 = next(v3) if v2 is None else v2 v5 = v4.data for v6 in v3: v5 = v6.mul_data(v5, v6.data) r...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: dm_env.TimeStep, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dm_env.TimeStep, v2: np.ndarray): v3 = np.array(v1.reward or 0, np.float32) self._episode_reward += v3 se...
Imports: ```python import typing ``` Type definitions: Input Types: float, int, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: float=WEIGHT, v2: int=HEIGHT, v3: str=SEX): if v3 == 'female': v4 = 1.07 * v1 - 148 * (v1 / v2 * (v1 / v2)) else: v4 = 1.1 * v1 - ...
Imports: ```python import numpy as np import torch from torch.nn.functional import cross_entropy import typing ``` Type definitions: Input Types: Image Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: Image) -> torch.Tensor: v2 = np.array(v1).transpose(2, 0, 1)[np.newaxis, ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, int, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3: int, v4: bool=True): for v5 in range(v3): (v1, v2) = self._shuffle_data(v1, v2) v6 = 0 while v6 < len(v1): ...
Imports: ```python import random import typing ``` Type definitions: Input Types: int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=0) -> str: v2 = '{}_{}'.format(random.choice(self._left), random.choice(self._right)) if v2 == 'boring_wozniak': return self.g...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: 'IApiCursor' Dependencies: Function Name: v0 Function: ```python def v0(self) -> 'IApiCursor': if self.conn is None: raise Exception('cursor. Empty conn!!') return self.conn.cursor() ```
Imports: ```python import typing ``` Type definitions: Input Types: list[str] Output Type: int Dependencies: ```python def v0(v1: list[str]) -> tuple[dict[Vector2D, int], Vector2D]: v2 = {} for (v3, v4) in enumerate(v1): for (v5, v6) in enumerate(v4): v2[v5, v3] = int(v6) v7 = (len(v1) ...
Imports: ```python import os import healpy as hp import numpy as np import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): assert os.path.isfile(v1) self.map = np.load(v1, allow_pickle=True) self.nside = hp.npix2nsid...
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: if v2 == '*': v3 = v1 elif v1 == '未定義語': v3 = '未定義語-その他' else: v3 = f'{v1}-{v2}' if v3 in sel...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Tuple[List[str], List[str], List[str]] Dependencies: ```python def v0(v1: str) -> List[str]: v2 = v1.lower() v3 = [] for (v4, v5) in BANNED_WORDS.items(): if v4 in v2: if 'realm_name' in v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, Union[dict, list] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: Union[dict, list]): v3 = getattr(self, self._id_parsing_function['object'])('observed-data', v1) v4 = {'id': v3, 'type': '...