text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v1 = v1.replace('ใใ', 'ใใผ')
v1 = v1.replace('ใใ', 'ใใผ')
v1 = v1.replace('ใใ', 'ใใผ')
v1 = v1.replace('ใใ', 'ใใผ')
v1 = v1.replace('ใใ', 'ใใผ')
... |
Imports:
```python
import ast
import importlib
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: str):
v2 = ast.parse(v1)
for v3 in ast.iter_child_nodes(v2):
if isinstance(v3, ast.Import):
v4 = []
elif isinstance(v3, ast.ImportF... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes) -> None:
self._buffer += v1
while self.__has_full_response():
v2 = self.__packet_size(self._buffer)
v3 = self._buffer[0:v2]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool):
v2 = self.__key_strict__
self.__key_strict__ = v1
if v2 is False and v1 is True:
self.pop_unsupported_items()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.__ui.userDataTableWidget.setRowCount(0)
self.__ui.userDataDockWidget.setWindowTitle('User data')
``` |
Imports:
```python
from astropy import units as u
from astropy.coordinates import AltAz
from astropy.coordinates import EarthLocation
from astropy.coordinates import SkyCoord
from astropy.coordinates import get_moon
from astropy.coordinates import get_sun
from astropy.time import Time
from astropy.utils.iers import con... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> bool:
v2 = self.get_proof(v1)
return self.verify_leaf_inclusion(v1, v2)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, str
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: str) -> np.ndarray:
if v2 == 'rows':
v3 = np.where(v1 == 0, 2, np.where(v1 == 2, 0, v1))
elif v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.urls = self.read_from_file(self.urls_file_path)
self.genre_list_url = self.make_wiki_url(self.urls['GENRE_LIST'])
``` |
Imports:
```python
import base64
import os
import typing
```
Type definitions:
Input Types: str, AnyStr, str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: AnyStr, v3: str='ascii', v4: bool=False):
if isinstance(v2, bytes):
v5 = v2
elif v3 == 'base... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> List[str]:
v1 = v1.lstrip('[')
v1 = v1.rstrip(']')
return self._explode_ipv6(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = self.set_filters()
v2 = self.set_fields()
v3 = v1 + v2
v4 = f'\n <columns code="{self.browsecode}">\n {v3}\n </co... |
Imports:
```python
import typing
```
Type definitions:
```python
@json_serializer
class v0:
def __init__(self, v1: QueryLevel, v2: Optional[List[Dataset]]=None, v3: Optional[QueryProv]=None):
if v1 not in QueryLevel:
raise ValueError('Invalid query level')
self._level = v1
self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: List[float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any) -> List[float]:
if self.metrics is not None:
try:
if self.mode == 'weighted_sum':
v2 = [v1[key] * value for... |
Imports:
```python
from string import ascii_letters, digits
from random import randint, random, choice
import typing
```
Type definitions:
Input Types: dict, list, bool
Output Type: dict
Dependencies:
```python
def v0(v1: object):
v2 = {'str': lambda : ''.join((choice(ascii_letters + digits) for v3 in range(randin... |
Imports:
```python
import torch
from torch import Tensor
import torch.nn as nn
import typing
```
Type definitions:
Input Types: Tensor, Tensor, Optional[Dict[nn.Module, Dict[str, List[Tensor]]]], Optional[Dict[nn.Module, Dict[str, Dict[str, Optional[Tensor]]]]], Any
Output Type: Any
Dependencies:
```python
def v0(v1, ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 'A'
v2 = 'B'
v3 = 'C'
v4 = 'D'
v5 = 'E'
v6 = 'F'
v7 = 'H'
v8 = 'L'
v9 = 'BC'
v10 = 'DE'
v11 = 'AF'
v12 = 'HL'
v13 = 'SP'
v14 = 'PC'
v15 = 'MEM_AT_HL'
```
Input Types: v0
Outp... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, np.ndarray, np.ndarray
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray, v4: np.ndarray) -> float:
v5 = 1e-06
v6 = (v2 - v1)[0]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, base.base_obj, base.MSGdesc_Type
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: base.base_obj, v4: base.MSGdesc_Type) -> bool:
v5 = self.get_record(v1, v2)
if v5 is None:
... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.x = math.floor(self.x)
self.y = math.floor(self.y)
self.width = math.floor(self.width)
self.height = math.floor(self.height)... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, float, float
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: float, v3: float) -> torch.Tensor:
v4 = np.deg2rad(v3)
v5 = np.cos(v4)
v6 = np.sin(v4)
... |
Imports:
```python
import numpy as np
import torch
from torch import nn
from torch.utils.data._utils.collate import default_collate
import typing
```
Type definitions:
```python
class v0(Protocol):
@property
def v1(self) -> str:
...
@property
def v2(self) -> Optional[Scaler]:
...
... |
Imports:
```python
import os
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from torch.optim.lr_scheduler import _LRScheduler
from torch.optim.optimizer import Optimizer
from torch.utils.data import Dataset
import typing
```
Type definitions:
Input Types: str, nn.Module, Optimizer, torch.te... |
Imports:
```python
import os
from torch.distributed.elastic.multiprocessing.api import MultiprocessContext, PContext, ProcessFailure, RunProcsResult, Std, SubprocessContext, _validate_full_rank, to_map
import typing
```
Type definitions:
Input Types: str, Union[Callable, str], Dict[int, Tuple], Dict[int, Dict[str, str... |
Imports:
```python
import pickle
import io
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1):
return RestrictedUnpickler(io.BytesIO(v1)).load()
```
Function Name: v2
Function:
```python
def v2(self, v3: str):
with open(v3, 'rb') as v4:
v0(v4.read()... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: Path, Optional[Tuple[str, str, str]]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: Optional[Tuple[str, str, str]]) -> int:
global current_StFr, markdown_text
v3 = 0
if v2 is None:
... |
Imports:
```python
import copy
from math import sqrt
import numpy as np
from scipy.ndimage.measurements import center_of_mass
from scipy.spatial.distance import pdist, squareform
from skimage.segmentation import relabel_sequential
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, float, float, f... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[str]:
v1 = self.monitor_def.tmpl_cache.get(self, 'args')
if not v1:
v1 = self.monitor_def.tmpl_cache.set(self, 'args', self.monitor_def.e... |
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 = argparse.ArgumentParser(description='This script is used to produce Fermi surface c... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: Tuple[np.ndarray, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
v3 = v1[2] - v1[6]
v4 = v1[2] - ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = list()
v2 = list()
for v3 in range(10):
v1.append(chr(48 + v3))
v2.append(chr(65296 + v3))
for v3 in range(26):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3) -> int:
for v4 in v1.columns.to_list():
if v4 not in self.df.columns.to_list():
self.df[v4] = v3
if v2 is None:
... |
Imports:
```python
import torch
import torch.nn as nn
from torch.autograd import Variable
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, torch.Tensor
Output Type: Tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor, v2: torch.Tensor, v3: torch.Tensor) ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> float:
v3: float = np.sqrt(np.sum(np.square(v1 - v2)))
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
v2 = {'fcn': 'Mint', 'args': [str(v1)], 'peers': ['peer0.msb1.example.com', 'peer0.msb2.example.com'], 'chaincodeName': 'token-erc-20', 'channelName':... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1: typing.Optional[str] = None
v2: typing.Optional[int] = None
def __init__(self, v3, v4):
self.value = v4
self.parser = v3
self.first = None
self.second = None
def v5(self):
raise Synta... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[int]) -> int:
v2 = 0
for (v3, v4) in zip(v1, range(len(v1), 0, -1)):
v2 += v3 * v4
return v2
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.DataFrame) -> dict:
v1 = v1.select_dtypes(include=np.number)
v2 = self._get_statistical_metrics(v1)
v3 = self._get_c... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'PrintJobOutputModel', str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'PrintJobOutputModel', v2: str):
v3 = '{"action": "%s"}' % v2
self._output_device.put('print_jobs/%s/action' % v1.key, v3, onFini... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = '\t User registers overview \n'
v2 = [''] * 16
v2[0] = 'Loop count'
v2[1] = 'Readout mode'
v2[2] = 'Wait delay'
v2[3] = 'Average... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> str:
if v1 == 0:
return 'Healthy'
if v1 == 1:
return 'Fine'
if v1 == 2:
return 'Fair'
if v1 == 3:
return 'Poor... |
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(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
v3 = 1
if v1.ndim == 1 and v2.ndim == 1:
v3 = 0
return np.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable['jina_pb2.Document'], 'jina_pb2.Document', str, Dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Iterable['jina_pb2.Document'], v2: 'jina_pb2.Document', v3: str, v4: Dict, *v5, **v6) -> None:
if... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'TreeNode', int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: 'TreeNode', v2: int) -> int:
(v3, v4) = ([], None)
while True:
while v1:
v3.append(v1)
v1 = v1.right
v5 = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: bool
Dependencies:
```python
def v0(v1: str, v2: Union[str, List[str]]) -> bool:
if isinstance(v2, str):
v2 = [v2]
for v3 in v2:
if v3 == '':
continue
if v3.lower() == v1.lower():
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, dict, Any
Output Type: dict
Dependencies:
```python
def v0(v1: dict):
v2 = set(['alphaPiercingHE', 'alphaPiercingCS', 'bulletAirDrag', 'bulletAlwaysRicochetAt', 'bulletDetonator', 'bulletDetonatorThreshold', 'bulletDiametr', 'bulletKrupp', '... |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
Input Types:
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> pd.DataFrame:
v1 = [node[1]['Name'] for v2 in self.alertentity_graph.nodes.items()]
v3 = [v2[1]['Description... |
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:
(v1[0], v1[1]) = (v1[1], v1[0])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=True) -> None:
self.check_is_repo()
self._stager.change_job_stage_status(v1, v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> dict:
if v1 is None:
return -1
v2 = {}
for v3 in self.get_data():
if v3 in v1:
v2[v3] = self.get_data().get(v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {'name': self.name, 'numerator': self.numerator, 'denominator': self.denominator, 'percentage': self.percentage, 'proportion': self.proportion}
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Any
```
Input Types: Callable[[v0], v0], converters.DefaultTrialConverter, vz.SearchSpace, int, float
Output Type: List[vz.Trial]
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Callable[[v0], v0], v3: converters.DefaultTrialCon... |
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.conv_1(v1)
v2 = self.batch_norm_1(v2)
v2 = self.activation_1(v2)
v2 = self.conv_2(v2)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.inputs['payoff_matrix']
v2 = self.inputs['player_1_strategies']
v3 = self.inputs['player_2_strategies']
(self.ans, self.work) = sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: readability.Document
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: readability.Document) -> bool:
if 'Are you a robot?' in v1.title():
return True
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> bytes:
if self.env.cache_all_tx_hashes:
return self.total_transactions[v1]
return self.prefix_db.tx_hash.get(v1, deserialize_value=Fal... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {}
if hasattr(self, 'currency_code'):
v1['currencyCode'] = self.currency_code
if hasattr(self, 'namespace'):
v1['namespace']... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self):
self.cbsd = DBCbsd()
def v1(self) -> DBCbsd:
return self.cbsd
def v2(self):
self.cbsd.is_deleted = True
return self
def v3(self):
self.cbsd.is_updated = True
... |
Imports:
```python
import difflib
import typing
```
Type definitions:
```python
@dataclass(frozen=True)
class v0:
v1: List[str]
v2: List[str]
```
```python
v3 = Dict[int, Histogram]
```
```python
@dataclass(frozen=True)
class v4:
v5: int
v6: str
```
Input Types: str, str, v3, v3
Output Type: Any
Depende... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, int, Any, dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int, v3: int, v4, v5: dict):
self._dimension_chunk_offsets[v1] = v2
v6 = v4[v1]['data'][v2:v3]
v7 = v6.shape
self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame, pd.DataFrame
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.DataFrame, v2: pd.DataFrame) -> pd.DataFrame:
for v3 in v1.columns:
print(f'fitting: {v3}')
(self.coef_[v... |
Imports:
```python
import torch
from torch.optim.lr_scheduler import _LRScheduler
from torch.optim.optimizer import Optimizer
import typing
```
Type definitions:
Input Types: Optional[Optimizer]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[Optimizer]=None, **v2: Any):
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: str) -> tuple:
v3 = v1.get('responseElements').get('tableDescription').get('provisionedThroughput').get(v2)
v4 = v1.get('requestParameters')... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if len(self.message) + self.tags.get_size() + len(v1) > self.limit and self.overflow is False:
self.overflow = True
self.close_tags()
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> int:
if v1 in self:
return 0
raise IndexError(v1)
``` |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: Dict[Any, Any]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[Any, Any]):
if self.access_token:
return self.access_token
if not self.validate_params(v1):
raise Except... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, int, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int=0, v3: bool=False):
v4 = None
if v3:
while v4 is None:
v2 = np.random.randint(0, self.num... |
Imports:
```python
import os, shutil
import glob
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str='./data/fourspeakers'):
v2 = os.path.join(v1, '*')
v3 = glob.glob(v2)
v4 = [s.rsplit('/', maxsplit=1)[1] for v5 in v3]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Any
Dependencies:
```python
def v0(cls: Type):
v1 = cls.__name__
v2 = '_'
v1 = _NAME_FIRST.sub(f'\\1{v2}\\2', v1)
v1 = _NAME_ALL.sub(f'\\1{v2}\\2', v1)
v1 = v1.lower()
return v1
```
Function Name: v3
Function:
```... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Callable[[Doc, int, int], bool]
```
Input Types: str, str, Union[str, List[str]]
Output Type: v0
Dependencies:
```python
def v1(v2, v3, v4):
if v4 >= len(v2):
return False
for v5 in value:
v6 = v2[v3:v4]
if pos_or_dep ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 0
v2 = 1
```
```python
v3 = TypeVar('T')
```
Input Types: v0
Output Type: v3
Dependencies:
Function Name: v4
Function:
```python
def v4(self, v5: v0) -> v3:
if v5.value not in self.__local_cache:
return None
r... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = re.compile('{([^{]*)}')
while True:
v3 = v2.search(v1)
if not v3:
break
v1 = v1[:v3.start()] +... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Token
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Token) -> bool:
for v2 in v1.children:
if v2.dep_ == 'det' or self.has_morph(v2, 'PronType', 'Art'):
return True
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
nonlocal completed
v1 = True
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Callable[[typing.T], bool], typing.Iterable[typing.T]
Output Type: typing.List[typing.T]
Dependencies:
```python
def v0(v1: typing.Callable[[typing.T], bool], v2: typing.List[typing.T]) -> None:
while v2 and v1(v2[-1]):
v2.pop()
```... |
Imports:
```python
import hashlib
import json
import typing
```
Type definitions:
Input Types: dict, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: int=20):
v3 = json.dumps(v1, sort_keys=True).encode()
return hashlib.sha256(v3).hexdigest()[:v2]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int) -> int:
if v1 % 2 == 0:
return v1 // 2
return (v1 - 1 + v2) // 2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Text, int, Text
Output Type: 'DataBaseValidation'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text, v2: int, v3: Text='') -> 'DataBaseValidation':
self.__db_validate.validators.append({'length_less_or_equals': [v1, v2, v3... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: list[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list[str]:
v1 = []
v2 = np.unique([k.lstrip('_').split('_')[0] for v3 in self.__dict__.keys() if 'channel' in v3])
for v4 in v2... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: int
Output Type: List[pd.DataFrame]
Dependencies:
```python
async def v0(v1: FPL, v2: int=None):
return await v1.get_user_team(v2)
```
Function Name: v3
Function:
```python
def v3(self, v4: int=None) -> List[pd.DataFrame]:
... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
```python
@enum.unique
class v0(enum.Enum):
v1 = 0
v2 = 1
v3 = 2
```
Input Types: v0
Output Type: T.Tuple[T.Optional[T.Awaitable[str]], T.Optional[T.Awaitable[str]]]
Dependencies:
```python
def v4(v5: T.Union[None, bytes]) -> str:
if ... |
Imports:
```python
import threading
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
self.kill_origin()
self.worker_alive = True
self.worker = threading.Thread(target=self._workerFunc)
self.worker.start()
... |
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.q = self.q[:self.x + 1]
self.q.append(v1)
self.x += 1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Collection[str], dict[str, Collection[str]], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *, v1: Collection[str], v2: dict[str, Collection[str]], v3: str) -> None:
v4: Recs = {}
for v5 in v1:
... |
Imports:
```python
import asyncio
from functools import partial
import threading
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
```python
def v0(v1):
v1()
```
Function Name: v2
Function:
```python
def v2(self, v3) -> None:
def v4(v5):
"""Wrapper to execute this fu... |
Imports:
```python
import logging
import warnings
from qiskit import IBMQ, QuantumCircuit, assemble
from qiskit.opflow.primitive_ops.pauli_sum_op import PauliSumOp
from qiskit.circuit import Barrier, Gate, Instruction, Measure
from qiskit.circuit.library import UGate, U3Gate, CXGate
from qiskit.providers.aer.noise impo... |
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._frontend_backend_mapping[v1]
return v2
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3=None) -> None:
super().setup(v1, v2, v3)
self.chain = v2
if self.samples:
v4 = len(self)
self.d... |
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=True):
v3 = super().to_dict(v1)
if v2:
v3['certificates'] = self.channel_keys
return v3
``` |
Imports:
```python
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
import xarray as xr
import numpy as np
import typing
```
Type definitions:
Input Types: xr.DataArray
Output Type: xr.DataArray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: xr.DataArray) -> xr.DataArra... |
Imports:
```python
import platform
import sys
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0() -> dict:
v1 = 'Unknown'
v2 = 'Unknown'
try:
v1 = platform.python_implementation()
if v1 == 'CPython':
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Token'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Token') -> None:
if not self.etype.parse_children:
return
self.children.append(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, bool, bool, str, str, str, bool, Optional[str], Optional[str]
Output Type: 'ClientResponse'
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: bool=True, v2: bool=False, v3: bool=False, v4: str=None, v5: str=None, v6: st... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict):
v2 = []
for v3 in v1:
if not isinstance(v3, str) or isinstance(v1[v3], dict):
v2.append(v3)
for v3 in v2:
if isi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, *, v2: int=None, v3: str='\n'):
if v1 != '':
print(f'[ERROR] {v1}', end=v3)
if v2 is not None:
exit(v2)
``` |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: List
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List):
if self.is_method:
v1 = [self._self] + v1
self.arg_ids = list()
v2 = list()
for v3 in v1:
if isinstance(v3,... |
Imports:
```python
import pprint
import typing
```
Type definitions:
Input Types:
Output Type: set
Dependencies:
```python
def v0():
if 'skipgrams' not in self._d_input['tokens']:
return False
if len(self._d_input['tokens']['skipgrams']) == 0:
return False
return True
```
Function Name: v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Mapping
Output Type: Mapping
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Mapping) -> Mapping:
v2 = ['author_email', 'author', 'classifiers', 'cmdclass', 'description', 'distclass', 'download_url', 'entry_points', 'ext_modules',... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any], str, tqdm, Dict[str, Dict[str, Any]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, Any], v2: str, v3: tqdm, v4: Dict[str, Dict[str, Any]]):
if v1.get('progressDetail'):
v4[v1['id... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, int
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: int) -> torch.Tensor:
v3 = torch.tensor(1e-10)
if v2 == 1:
v1 = torch.max(v1, v3)
v1 = t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.