text stringlengths 190 325k |
|---|
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
```python
def v0(v1: str) -> dict:
with open(f'{v1}', 'r') as v2:
return json.load(v2)
```
Function Name: v3
Function:
```python
def v3(v4: str) -> bool:
try:
v5 = v0(v4)
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: ml_collections.ConfigDict
Output Type: Dict[Text, tf.Tensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: ml_collections.ConfigDict) -> Dict[Text, tf.Tensor]:
v2 = [self._gen_raw_sample(v1) for v3 in ran... |
Imports:
```python
import typing
```
Type definitions:
Input Types: requests.Response
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: requests.Response) -> int:
v2 = v1.headers.get('Retry-After')
if v2:
return int(v2)
v3 = float(v1.headers.get('X-Rate-Limit') ... |
Imports:
```python
import requests
import hashlib
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: str=None) -> None:
with requests.get(v1) as v4:
v4.raise_for_status()
if v3 is not Non... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Path
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path):
print('In parsing results')
with v1.open(encoding='utf-8') as v2:
v3 = json.load(v2)
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: socket
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> socket:
self._proxy = self._ctx.proxy_manager.get_random_proxy()
v1 = self._ctx.sock_manager.create_tcp_socket(self._proxy)
v1.connect(self._target)
... |
Imports:
```python
import h5py
import typing
```
Type definitions:
Input Types: list, str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2: str, v3: int):
with h5py.File(v1) as v4:
v5 = v4[v2].shape
return v5[v3]
``` |
Imports:
```python
from scipy.spatial.distance import cdist
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, np.ndarray
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray) -> np.ndarray:
v4 = cdist(v1 / v3, v2 /... |
Imports:
```python
import logging
import numpy as np
from numpy.random import default_rng
import typing
```
Type definitions:
Input Types: List[np.ndarray]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[np.ndarray]):
v2 = np.array(v1)
v3 = np.array([a[-1] for v4 in v2])
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray):
v2 = np.zeros([v1.size, self.zvals.size])
for (v3, v4) in enumerate(v1):
v5 = np.where(self.dmvals > v4)[... |
Imports:
```python
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
import typing
```
Type definitions:
Input Types: s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple[int, int], int, int, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple[int, int], v2: int, v3: int, v4: int) -> None:
v5 = ['%d_%d' % (v2, index) for v6 in range(v3, v4 + 1)]
v7 = v4 - v3 +... |
Imports:
```python
import typing
```
Type definitions:
Input Types: utils.DataFromPlugins
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: utils.DataFromPlugins):
self._display_temporary = True
self.show_data(v1)
``` |
Imports:
```python
from collections import deque
import typing
```
Type definitions:
Input Types: int, List[List[int]]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: List[List[int]]) -> bool:
v3 = len(v2)
if v3 == 0:
return True
v4 = [0 for v5 in ra... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list:
if self._validated:
return self._validation_issues
v1 = list()
if 'version' not in self._pipeline_definition:
v1.append('Pipeline... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 'val'
v2 = 'dft'
v3 = 'min'
v4 = 'max'
v5 = 'avg'
v6 = 'ptl'
v7 = 'perc'
v8 = 'pin'
```
```python
@dataclass
class v9:
v10: Enum = None
v11: v0 = None
v12: Any = None
```
Input Types: Enum, ... |
Imports:
```python
import torch
from torch.utils.data import Dataset
import typing
```
Type definitions:
Input Types: List[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int]):
self.desc_vals = torch.as_tensor([[val[i] for v2 in v1] for v3 in self.desc_vals])
s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor):
assert 'contextual' in self.exemplar
self.exemplar['contextual'].sibling = v1.detach()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any], Optional[type]
Output Type: Union[str, bytes]
Dependencies:
```python
def v0(v1: Union[str, bytes]) -> str:
if isinstance(v1, str):
v1 = v1.encode('utf-8')
return v1
```
```python
def v2(v3: Union[str, bytes]) -> str:
... |
Imports:
```python
from gc.core import config
from gc.core.AddressState import AddressState
from gc.core.OptimizedAddressState import OptimizedAddressState
from gc.core.MultiSigAddressState import MultiSigAddressState
from gc.core.Block import Block
from gc.core.ChainManager import ChainManager
from gc.core.ESyncState ... |
Imports:
```python
import numpy as np
from itertools import product
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:
(v3, v4) = v1.shape
v5 = np.inf
fo... |
Imports:
```python
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 = v1.rsplit('.', 2)
if len(v2) < 3 or not v2[1].startswith('ckpt-'):
return ('', '')
v3 = v2[0]
v4 = '... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> None:
v2 = len(self.text)
v3 = str(v1['size'] / 2)
if self.properties['size']:
if self.__is_space(v1) or self.properties['size'][... |
Imports:
```python
from copy import deepcopy
import typing
```
Type definitions:
Input Types: int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> list:
v2 = deepcopy(self.whole_cascade_control_path)
v3 = len(v2)
for v4 in range(v3):
v5 = v2[v4]
... |
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:
if self.projector is not None:
return v1 @ self.projector.transpose(-1, -2)
else:
retur... |
Imports:
```python
import asyncio
import json
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = asyncio.get_event_loop()
v2 = v1.run_until_complete(self.agent_controller.connections.create_invitation())
v3 = v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str='utf-8') -> str:
with open(v1, 'r', encoding=v2) as v3:
v4 = v3.read()
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[Tuple[List[List[str]], ...], List[List[str]]], Union[List[List[str]], List[str]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[Tuple[List[List[str]], ...], List[List[str]]], v2: Union[List[List[str]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, float, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=30000, v2: int=None, v3: float=1, v4: float=0.002, **v5):
v5['max_epochs'] = v1
v5['batch_size'] = v2
v5['train_size'] = v3
... |
Imports:
```python
import json
import os
import zipfile
import typing
```
Type definitions:
Input Types: set, reverse_data.WordDictionary, Dict[str, float], str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: set, v2: reverse_data.WordDictionary, v3: Dict[str, float], v4: str, v5:... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List, str
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List, v2: str) -> Dict:
v3 = {}
for v4 in v1:
v5 = v4.pop(v2)
v3[v5] = v4
return v3
``` |
Imports:
```python
import subprocess
import typing
```
Type definitions:
```python
class v0(BaseModel):
v1: str
v2: str
v3: str = None
v4: str = None
v5: str = None
@validator('name', always=True)
def v6(cls, v7):
v8 = ['package-template', 'compression-job-handler', 'job-orchestrati... |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: torch.Tensor, float
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: float=1e-12) -> torch.Tensor:
if not isinstance(v1, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[Iterable[Any]]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[Iterable[Any]]) -> str:
v1 = f"{', '.join((i for v2 in v1))}" if v1 else '*'
return v1
``` |
Imports:
```python
from copy import deepcopy
import typing
```
Type definitions:
Input Types: List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str]=None):
if v1 is None:
return deepcopy(self._selected_features)
else:
return self._get_selected... |
Imports:
```python
import warnings
import numpy as np
from xarray import Dataset, SerializationWarning, Variable, cftime_range, coding, conventions, open_dataset
from xarray.backends.common import WritableCFDataStore
from xarray.backends.memory import InMemoryDataStore
from xarray.conventions import decode_cf
from xarr... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = v1.lower().translate(self.table)
return [s for v3 in v2.split(' ') if v3]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
with self.vcr():
self.make_http_request_using_proxy()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool):
if self.UD_centers_staged():
return
if False:
v2 = len(self.solution)
self.lt_phase4.solve_via_c(use_kociemba_string=Tru... |
Imports:
```python
from copy import deepcopy
import typing
```
Type definitions:
Input Types:
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict:
v1 = self.current_time + self.wakeup_interval_generator.next()
self.set_wakeup(v1)
self.update_raw_state()
v2 = dee... |
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 = self.primary_key_index_version_root_path
return f's3://{v1}/{v2}'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=1.0):
v1 = float(v1)
self._work_dir['boost'] = v1
return self
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
with open('examples.json') as v1:
self.data_string = v1.read()
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(DatasetProviderBase):
def __init__(self, v1: str, v2: DataSource, v3: Mapping[str, Feature], v4: Optional[Sequence[Callable[..., tf.data.Dataset]]]=None, v5: Optional[Callable[..., Any]]=None, v6: Optional[Callable[..., Mapping[str, float]]]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str=None) -> str:
if v2:
return v1.format(action_return=v2)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, List[str], List[str], List[str], List[str], List[int], List[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: List[str]=[], v4: List[str]=[], v5: List[str]=[], v6: List[str]=[], v7:... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, int, float
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: float) -> np.ndarray:
v4 = int(v1 * v3)
v5 = []
for v6 in range(v2):
v7 = np.zeros([v4])
... |
Imports:
```python
import os
from pathlib import Path
import typing
```
Type definitions:
Input Types: str, str, str, str, bool, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: str, v5: bool, v6: bool) -> None:
if not isinstance(v5, bool):
... |
Imports:
```python
import re
import typing
```
Type definitions:
```python
class v0(object):
v1: str
v2: _G
v3: List['XMLNode']
v4: Optional['XMLNode'] = None
v5: Optional[str]
v6: Any
def __init__(self, v7: str):
self.tag = v7
self.attributes = _G()
self.children = ... |
Imports:
```python
import traceback
import typing
```
Type definitions:
Input Types: Dict[Text, Any], 'RasaNLUModelConfig'
Output Type: Optional['Component']
Dependencies:
```python
def v0(v1: Text) -> Type['Component']:
if v1 == 'DucklingHTTPExtractor':
rasa.shared.utils.io.raise_deprecation_warning("The ... |
Imports:
```python
import tensorflow as tf
from tensorflow.keras import backend
from tensorflow.python.ops import array_ops
import typing
```
Type definitions:
Input Types: tf.Tensor, tf.Tensor
Output Type: tf.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tf.Tensor, v2: tf.Tensor) -> tf.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> None:
v3 = self.get_node(v1)
v4 = self.get_node(v2)
if v3:
v3._add_child(v4)
v4._add_parent(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable['Document']
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Iterable['Document']):
for v2 in v1:
self.add_node(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: nn.Module, nn.Module, Optimizer, Union[str, torch.device]
Output Type: Callable
Dependencies:
```python
def v0(v1: Engine, v2: Dict) -> float:
classifier.train()
v3 = v2['img'].to(device)
v4 = v2['target'].to(device)
v5 = classifier(v3... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: T.List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> T.List[str]:
v1 = super().get_linker_always_args()
if self.info.is_windows():
return v1
return v1 + ['-defaultlib=phobos2', '-debuglib=p... |
Imports:
```python
import pandas as pd
import requests
from tqdm import tqdm
import typing
```
Type definitions:
Input Types:
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0() -> pd.DataFrame:
v1 = 'https://datacenter-web.eastmoney.com/api/data/v1/get'
v2 = {'sortColumns'... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: List[Union[str, int]]
v2: Optional[str]
v3: EventCallbacks
```
```python
v4 = TypeVar('S', bound='QueueSelection')
```
Input Types:
Output Type: v4
Dependencies:
```python
def v5(v6: v0, v7: Mapping):
if v6.callba... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> int:
if abs(v1) > (1 << 31) - 1:
return 0
if v1 < 0:
v2 = int('-' + str(v1)[1:, ::-1])
else:
v2 = int(str(v1)[::-1])... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Callable, Union[str, Iterable[str]], Union[str, Iterable[str]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Callable, v2: Union[str, Iterable[str]]=None, v3: Union[str, Iterable[str]]=None, **v4):
self.ins... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int, v4: int) -> int:
if v1 == v2:
v5 = v3 + v4
return v5
else:
v5 = self.frogRec(v1, v2 + 1, v... |
Imports:
```python
import torch as t
import torch.nn as nn
import typing
```
Type definitions:
Input Types: t.Tensor, t.Tensor, t.Tensor
Output Type: Tuple[t.Tensor, t.Tensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: t.Tensor, v2: t.Tensor, v3: t.Tensor) -> Tuple[t.Tensor, t.Tensor]:
(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Optional[int]
Output Type: Optional[dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: Optional[int]=None) -> Optional[dict]:
if hasattr(v1, '__iter__') or hasattr(v1, '__getitem__'):
v3 = True
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Set[int], List[bool]
Output Type: Set[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Set[int], v2: List[bool]) -> Set[int]:
v3 = set()
v4 = self.prepare_pre_image(v1)
for v5 in v4:
if self.is_reachable_i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str, str
Output Type: Any
Dependencies:
```python
def v0(v1, v2: str, v3: str, v4: Callable):
v5 = v1.addAction(v3, v4, shortcuts[v2])
self._menu_actions[v2] = v5
return v5
```
```python
def v6(v7):
self._menu_actions[v7].setCheck... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: int) -> None:
try:
await self.listeners[v1].put(('complete', None))
except KeyError:
pass
``` |
Imports:
```python
from PIL import Image
import cv2
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, [[int]], [[float]], Tuple[int, int, int], int
Output Type: Tuple[Type[Image.Image], np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: [[int]], v3... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(BaseStructHandler['COCO_Image_Handler', 'COCO_Image']):
def __init__(self, v1: List[COCO_Image]=None):
super().__init__(obj_type=COCO_Image, obj_list=v1)
self.image_list = self.obj_list
def v2(self, v3: str) -> List[COCO... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int=0) -> None:
if not (self._io.is_very_verbose() or self._io.is_debug()):
return
if v1.startswith('fact:'):
i... |
Imports:
```python
from pandas._libs import index as libindex
from pandas._libs.tslibs import NaT, frequencies as libfrequencies, resolution
from pandas._libs.tslibs.parsing import parse_time_string
from pandas._libs.tslibs.period import Period
from pandas.util._decorators import Appender, cache_readonly
from pandas.co... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
assert self.state.pitch.bomb is None
self.state.pitch.bomb = v1
``` |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass(frozen=True)
class v0:
v1: str
v2: 'FunctionSchema'
v3: bool
v4: bool
v5: DeviceCheckType
v6: Optional[str]
v7: Optional[str]
v8: Set[Variant]
v9: bool
v10: bool
v11: 'Location'
v12: List['Operato... |
Imports:
```python
from datetime import datetime, timedelta
import warnings
import numpy as np
from pandas._libs import NaT, Timestamp, algos as libalgos, lib, tslib, writers
from pandas._libs.index import convert_scalar
import pandas._libs.internals as libinternals
from pandas._libs.tslibs import Timedelta, conversion... |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
Input Types: IO[str]
Output Type: int
Dependencies:
```python
def v0(v1: str) -> Tuple[bool, bool]:
v2 = Counter(v1)
v3 = v2.values()
return (2 in v3, 3 in v3)
```
Function Name: v4
Function:
```python
def v4(v5: IO[str]... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: List[bytes]
Output Type: List[List[np.ndarray]]
Dependencies:
```python
def v0(v1: bytes) -> List[np.ndarray]:
v2 = np.frombuffer(v1[:31360], dtype=np.dtype('float32'), count=-1, offset=0).reshape(784, 10)
v3 = np.frombuffer... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: models.VideoOutput
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> models.VideoOutput:
v1 = await self.get_settings()
return v1.video_output
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, dict
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: dict=None, **v3) -> dict:
v4 = self.session.get(v1, params=v2, **v3)
return v4.json()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool) -> None:
v2 = self._hinter
v3 = self.BHINT if v1 else self.WHINT
self._board.itemconfig(v2, fill=v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
self.task_logger(self.hacs.log.debug, 'Starting recurring background task for installed repositories')
for v1 in self.hacs.repositories.list_do... |
Imports:
```python
from datetime import datetime, timedelta
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[Tuple[datetime, datetime]]
Dependencies:
```python
def v0(v1: str) -> datetime:
return eumetsat.eumetsat_cloud_name_to_datetime(v1).replace(second=0)
```
```python
def v2(v3: str... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, int, bool
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: int, v3: bool) -> list:
if v3:
if sum((int(item[v2]) for v4 in v1)) >= len(v1) / 2:
v5 = '1'
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str) -> str:
v3 = ''
v4 = False
v5 = 0
with open(str(v1), 'r') as v6:
for v7 in v6:
if v5 > 1:
bre... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, Any, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3: int=256):
v4 = 0
v5 = None
v6 = [0]
for v7 in v2:
if v5 is not None:
v4 = v4 + np.linalg.norm... |
Imports:
```python
import copy
import typing
```
Type definitions:
Input Types:
Output Type: 'Model'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'Model':
v1 = copy.deepcopy(self)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool, types.Optional[types.Numeric], types.Optional[types.Sequence], types.Numeric, types.Optional[types.Sequence[types.Numeric]], types.Optional[types.Numeric], types.Optional[types.Numeric], str, types.Union[bool, str], types.Optional[types.Seq... |
Imports:
```python
import threading
import typing
```
Type definitions:
Input Types:
Output Type: NoReturn
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> NoReturn:
v1 = threading.Thread(target=self._execute_chunk_job_and_add_to_queue)
v1.daemon = True
v1.start()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: tp.Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> tp.Dict[str, str]:
v1 = {'meter_address': self.serial_url, 'baudrate': str(self.baudrate), 'bytesize': str(self.bytesize), 'stopbits': str(self.st... |
Imports:
```python
import argparse
import typing
```
Type definitions:
Input Types:
Output Type: argparse.Namespace
Dependencies:
Function Name: v0
Function:
```python
def v0() -> argparse.Namespace:
v1 = argparse.ArgumentParser(description='An AWS hosted Minecraft server that will only run when players are acti... |
Imports:
```python
import numpy as np
import scipy.stats as st
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, List[str], int
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: List[str]=None, v4: int=None) -> tuple:
if not v4... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
v0 = NewType('ExternalSymbol', str)
```
Input Types: List[List[v0]]
Output Type: List[int]
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: List[List[v0]]) -> List[int]:
v3 = np.ndarray(shape=(len(v2),), dtype=i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict[str, str], str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict[str, str], v2: str):
if v2 in v1:
return v1[v2]
if v2 == 'External Id CDISC':
return v1.get('External ID CDISC')
if v... |
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:
self.handleException(v1, v2)
v3 = self.extractString(v1)
v4 = self.extractString(v2)
if v3 == v4:
return Tr... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
while self.stack and self.stack[-1].left:
v1 = self.stack[-1].left
self.stack[-1].left = None
self.stack.append(v1)
v1 = self.s... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
print(f'data abertura: {self.data_abertura}')
print('transações: ')
for v1 in self.transacoes:
print('-', v1)
``` |
Imports:
```python
import asyncio as aio
import typing
```
Type definitions:
Input Types: aio.AbstractEventLoop
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, *, v1: aio.AbstractEventLoop) -> None:
v2 = [self.get_label(), self.get_location(), self.get_version(), self.get_... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('instantiable', str, Any)
```
Input Types: v0, Any
Output Type: Any
Dependencies:
```python
def v1(v2={}):
v2 = v2 if v2 else using
if self._singletons.__contains__(class_val):
return self._singletons.get(class_val)
else:
... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
```python
def v0(v1: dict) -> int:
v2 = 0
v3 = 0
v4 = {}
v5 = []
for v6 in v1:
v7 = PRICE_TABLE.get(v6)
v8 = v7.get('price')
v9 = v7.get('offers')
if v9... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v1 = v1.replace('。', '。[SEP]')
v1 = v1.replace('!', '![SEP]')
v1 = v1.replace('?', '?[SEP]')
if '[SEP]' in v1:
v2 = v1.split('[SEP... |
Imports:
```python
from itertools import chain
import typing
```
Type definitions:
```python
v0 = list[list[int]]
```
Input Types: v0, list[int]
Output Type: int
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0, v3: list[int]) -> int:
v4 = set(chain(*v2)) - set(v3)
return sum(v4) * v3[-1]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: 'Container'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=True) -> 'Container':
self.tty = v1
return self
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = List[FileInfoPair]
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0):
for v3 in v2:
print('"{0}" "{1}"'.format(v3[0].fpath, v3[1].fpath))
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.