text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: tp.Sequence, tp.Callable
Output Type: tp.AnyArray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: tp.Sequence, v2: tp.Callable, *v3, **v4) -> tp.AnyArray:
v5 = v1[0]
for v6 in range(1, len(v1)):
v5 = v2(v5, v1[v6], *v3,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
if v1.isdigit():
return int(v1)
else:
return float(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: NoReturn
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v1) -> NoReturn:
if not self.owner.get_selected():
self._touch_long = True
self._progress_animation = True
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
if self.__has_token():
v1 = self.__get_token()
else:
v1 = self.__fetch_token(self.__fallback_function, {})
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v1 = self._valid_attr(v1)
return f'{self._prefix_attr}{v1}'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0() -> float:
v1 = 0
v2 = -1
v3 = None
v4 = []
while (v5 := (yield v3)) is not None:
v4.append(v5)
v4.sort()
v1 += 1
if v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Dict[str, Any]
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Dict[str, Any]) -> Optional[str]:
if v2:
v3 = v2.get('analyzer', {}).get('name')
if v3:
retur... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = [c for v2 in self._df.columns if re.match('^reg[0-9]\\w+', v2)]
self._df.drop(columns=v1, inplace=True)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: str='value'):
if v1 < 0 or v1 > 1:
raise ValueError('{value_name} must be between 0 and 1.')
``` |
Imports:
```python
import copy
import typing
```
Type definitions:
Input Types: str, List[str], Sequence[str]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: List[str], v3: Sequence[str]) -> str:
v4 = self.config['multi_line_output'].name.lower()
v5 = getattr(sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path) -> None:
if not v1.is_dir():
raise FileNotFoundError(f'The directory cache path {v1} does not exist!')
global CUSTOM_CACHE_DIR
v2 = v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str], Optional[str], Optional[str], Any, Any, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None, v2: Optional[str]=None, v3: Optional[str]=None, v4=None, v5=100, v6: bool=False):
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
v0 = namedtuple('StockDay', ['open', 'close', 'name', 'day'])
```
Input Types: v0
Output Type: Any
Dependencies:
```python
def v1(v2, v3, v4=None):
if v4 is None:
v4 = np.random.RandomState()
v5 = 1.0 / v3
v6 = np.sq... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Optional[dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, **v2) -> Optional[dict]:
del kwargs
if v1 <= 0:
return {}
v3 = self._get_number_of_balls_to_save(v1)
self.debug_log('Bal... |
Imports:
```python
import json
from collections import OrderedDict
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: str):
try:
with open(v2, 'r', encoding='utf-8') as v3:
v4 = v3.read()
v... |
Imports:
```python
import json
from pathlib import Path
import typing
```
Type definitions:
Input Types:
Output Type: dict[str, str]
Dependencies:
```python
def v0(v1: Path) -> Path:
return v1.parent
```
```python
def v2(v3: Union[str, Path]) -> dict[Any, Any]:
with open(v3, 'r') as v4:
v5 = json.load... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
class v0(object):
def __init__(self, v1: Optional[Union[str, Path]]=None):
"""
Base class for handling .gitignore and .amlignore files
:param file_path: Relative path, or absolute path to the ignore file.
""... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: str):
v3 = self.jenkins.get_all_jobs()
for v4 in v3:
if v1(v4):
yield self.get_job(v4[v2])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, list
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: list) -> int:
v3 = 0
v4 = 0
v5 = 0
while v4 < len(v1):
if v1[v4] >= v2[v4]:
v5 += 1
if v5 > v3:
... |
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 = {')': '(', '}': '{', ']': '['}
v3 = []
for v4 in v1:
if v4 in v2:
if not v3 or v3.pop() != v2[v4]:
... |
Imports:
```python
import torch
from torch import nn, optim
from torch.optim import SGD
from torch.optim.adagrad import Adagrad
import typing
```
Type definitions:
Input Types: Optional[int], int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[int], v2: int=16):
(v3,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list[str]
Output Type: list[str]
Dependencies:
```python
def v0(v1: list) -> list:
return list(dict.fromkeys(v1))
```
Function Name: v2
Function:
```python
def v2(v3: list[str]) -> list[str]:
v4 = []
for v5 in v3:
if v5.startswith(... |
Imports:
```python
import json
from http import HTTPStatus
import typing
```
Type definitions:
Input Types: typing.PaymentNetworkID, Any, Any
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
assert v2 in ERROR_STATUS_CODES, 'Programming error, unexpected error status code'
log.error('Error processing r... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = []
v3 = []
v4 = []
with open(v1, 'r') as v5:
for v6 in v5:
v6 = v6.strip()
if v6 == 'query_id,reference_id,... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2=None) -> None:
with open(v1) as v3:
v4 = json.load(v3)
v5 = v4['cells']
if v2:
for v6 in v4['cells']:
... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: Union[str, pd.DataFrame, Sequence[Hashable]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[str, pd.DataFrame, Sequence[Hashable]]=None):
v2 = None
if isinstance(v1, pd.DataFrame):
... |
Imports:
```python
import warnings
import typing
```
Type definitions:
Input Types: bytes
Output Type: str
Dependencies:
```python
def v0(v1: bytes) -> str:
v2 = ''
for v3 in v1:
if v3 < 32 or v3 >= 127:
v2 += '.'
else:
v2 += chr(v3)
return v2
```
Function Name: v4
F... |
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 = zip(v1[:-1], v1[1:])
return sum((b > a for (v3, v4) in v2))
``` |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
self._eventloop = asyncio.get_running_loop()
self._stopped_event = asyncio.Event()
self.core.setup_listener(self)
self._... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=True) -> None:
if v1 and (not self.adaptive_allowed):
raise RuntimeError('Cannot change binning to adaptive.')
self._adaptive = v1
``` |
Imports:
```python
import shutil
import typing
```
Type definitions:
Input Types: Sequence[pathlib.Path], pathlib.Path, Sequence[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Sequence[pathlib.Path]=ZIP_COPY_PATHS, v2: pathlib.Path=ZIP_FOLDER, v3: Sequence[str]=('tex', 'rst', 'ip... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if self.try_pos(self.this_piece, self.cur_x, self.cur_y - 1):
return True
self.piece_dropped()
return False
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str, Any, list
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2=False, v3: list=None) -> dict:
with open(v1) as v4:
v5 = json.load(v4)['children']
if v3 is not None:
v5... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor, v2: torch.Tensor) -> None:
print(v1.shape, v2.shape)
if v1.min() < 0 or v1.max() > 1:
v1 = to... |
Imports:
```python
import numpy as np
from sklearn.metrics import confusion_matrix as sklearn_confusion_matrix
import typing
```
Type definitions:
Input Types: np.array, np.array, int, dict, int
Output Type: dict
Dependencies:
```python
def v0(v1: np.array, v2: np.array, v3: int) -> np.array:
v1 = np.ma.masked_arr... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = v1.split('/')[-1]
v3 = requests.get(v1, stream=True)
with open(v2, 'wb') as v4:
for v5 in v3.iter_content(chunk_... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
v2 = self.get_entry(v1)
if v2 is None:
self.add_entry(v1, identified=True)
return ':white_check_mark: Votre serveur est désormais ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Mapping[Tuple[str, str], str]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Mapping[Tuple[str, str], str]) -> int:
if not v1:
return 0
for ((v2, v3), v4) in v1.items():
if v2 == 'base-no... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: Dict[str, tf.Tensor], tf.Tensor, tf.Tensor, tf.Tensor, tf.Tensor, bool
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
v3 = tf.ragged.row_splits_to_segment_ids(v2)
v4 = tf.where(tf.math.is_finite(v1), v1, -1.0)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = True
v3 = ['preface', 'foreword', 'proceeding', 'editorial', 'conference', 'addendum', 'erratum', 'corrigendum', 'correction']
if any((v1.lower... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, Tensor, Tuple
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: Tensor, v3: Tuple) -> float:
(v4, v5, v6, v7) = (v3[0], v3[1], v3[2], v3[3])
v8 = 1 - (v6 - v4) * (v7 - v5) / (v2.size()[-1] * v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any):
v2 = self.create_adapter(v1)
v3 = v2.key()
if v3 in self.content:
v4 = self.content[v3]
if v1 is None:
self.delete... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: OrderedDict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=True, **v3) -> OrderedDict:
v4 = self.xml_to_dict(v1, **v3)
v4 = self.normalize_keys(v4)
if v2:
v4 = self.parse_... |
Imports:
```python
import torch
from torch import Tensor
import torch.cuda.comm
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: Union[List[Any], Tensor]) -> None:
self._values = v1
self.atomic = torch.is_tensor(v1)
if not self.atomic:
if not any((t... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: list, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: str, v3: str):
v4 = open(Path(v2) / 'result.txt', 'a')
v4.write('Number of values: (' + str(len(v1)) + ')')
... |
Imports:
```python
import matplotlib.pyplot as plt
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)):
plt.scatter(v2, v1[v2], c='black')
plt.show()
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: List['Index'], Label
Output Type: 'CategoricalIndex'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List['Index'], v2: Label) -> 'CategoricalIndex':
v3 = np.concatenate([self._is_dtype_compat(c).codes for ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> bool:
v1 = '{"id":1,"method":"info","params":[]}'
v2 = await self.request(v1)
if v2 is not None:
return True
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'pwncat.manager.Manager', Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'pwncat.manager.Manager', v2):
if v2.command == 'help':
self.parser.print_usage()
return
if v2.command == 'lis... |
Imports:
```python
import typing
```
Type definitions:
Input Types: qlast.CreatePseudoType
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: qlast.CreatePseudoType) -> None:
v2 = []
v2.append('PSEUDO')
v2.append('TYPE')
self._visit_CreateObject(v1, *v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pygame.sprite.Group
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pygame.sprite.Group):
for v2 in v1:
if v2.rect.collidepoint((self.getTileCenterXForDrawingPawn(v2), self.getTileCenterYForDrawingPaw... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor):
if isinstance(v1, np.ndarray):
return v1
if hasattr(v1, 'is_cuda'):
if v1.is_cuda:
retu... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._try_make_folder()
if not self.file_path.exists():
self._download_classifier()
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> None:
v3 = json.dumps(v2)
self.json_file_to_s3(v3, v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str, v2: str) -> None:
v3 = await self._connection.command('rename', self._prepared_params([v1, v2]))
self._check_empty(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: Union[List[dict], dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int=1) -> Union[List[dict], dict]:
v3 = self.service_api.wall.get(owner_id=v1, count=v2)
print(f'group {v1} posts rece... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: int
v2: int
v3: int
v4: int
```
Input Types: v0
Output Type: List[Tuple[int, int]]
Dependencies:
Function Name: v5
Function:
```python
def v5(v6: v0) -> List[Tuple[int, int]]:
v7 = []
if v6.x1 == v6.x2:
... |
Imports:
```python
from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor
from os import path, makedirs
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
global executor
v1 = ArgumentParser(d... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = [x.strip() for v3 in v1.split('\n')]
v4 = [0 for v5 in v2[0]]
for v6 in v2:
for (v7, v8) in enumerate(str(v6)):
if v... |
Imports:
```python
import pandas as pd
from pathlib import Path
import typing
```
Type definitions:
Input Types:
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0() -> pd.DataFrame:
v1 = pd.DataFrame(columns=['Type', 'File Size [MB]'])
v2 = Path('./tmp.xlsx')
v3 = [int,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None):
for v2 in self.repo.references:
if v2.startswith(v1):
yield v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Optional[str]:
if self.thumb_url is None:
self.extract()
return self.thumb_url
``` |
Imports:
```python
from statsmodels.compat.pandas import Appender, Substitution, call_cached_func
from statsmodels.compat.python import Literal
import pandas as pd
from statsmodels.base.data import PandasData
import statsmodels.base.wrapper as wrap
from statsmodels.iolib.summary import Summary, summary_params
from stat... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> bool:
v1 = np.array(v1) - 1
v2 = np.delete(self.ball_count, v1)
return np.all(self.ball_count[v1]) and (not np.any(v2))
... |
Imports:
```python
import numpy as np
import numpy.ma as ma
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
import typing
```
Type definitions:
Input Types: Any, np.array, tuple, str
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
v3 = make_axes_locatable(v2)
v4 = v3.append_axes('... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: int, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2):
v3 = 'https://graph.facebook.com/v2.10/{0}?access_token={1}'.format(v1, v2)
try:
v4 = requests.get(v3).json()
r... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> int:
v2 = len(v1)
v3 = [0] * (v2 + 1)
v3[0] = 1
v4 = {}
for v5 in range(1, v2 + 1):
v6 = v1[v5 - 1]
v3[v5] = v3[v5 -... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> str:
v2 = v1['event_time'] + v1['cluster_id'] + v1['message']
v3 = int(hashlib.md5(v2.encode('utf-8')).hexdigest(), 16)
return str(v3)
`... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str], Iterable[str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str], v2: Iterable[str]) -> None:
v3 = [coord for v4 in v1 if v4 in v2]
if not set(v3) == set(v2):
self.errors.append... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[np.ndarray, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[np.ndarray, np.ndarray]:
if self.imfs is None or self.residue is None:
raise ValueError('No IMF found. Please, run EMD m... |
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(self, v1: np.ndarray, v2: np.ndarray) -> float:
v3: np.ndarray = np.dot(v2, v1.T)
assert v3.shape == (len(v2), len(v1))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: str=' '):
self.pdb_to_pose_map.pop(self.pose_to_record_map[v1].tuple())
self.pose_to_record_map[v1].set_pdb_num(v2)
self... |
Imports:
```python
from random import randint
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = self.head_
v2 = v1.val
v3 = 2
v1 = v1.next
while v1 != None:
v4 = randint(1, v3)
if v4 == 1... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
v0 = TypeVar('JenkinsFactoryT', bound=Module)
```
```python
v1 = TypeVar('LocalFactoryT', bound=Module)
```
```python
v2 = TypeVar('TeamcityFactoryT', bound=Module)
```
Input Types: Callable[[], v1], Callable[[], v2], Callable[[], v0], str
Outpu... |
Imports:
```python
from subprocess import run
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
run('pipenv install -d', capture_output=True, check=True, cwd=v1, env=self.get_license_checker_env(), shell=True)
run("... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, *v2) -> list:
v3 = '\n data _null_;\n set _{}filelist(where=(length(method)>1)) end=last;\n if _n_=1 then put "METHLIST=";\... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(metaclass=ExprMeta):
def __init__(self) -> None:
self.left: Optional[v0] = None
self.ref_right: Optional[ReferenceType[v0]] = None
self.ref_begin: Optional[ReferenceType[v0]] = None
def __repr__(self) -> str:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'CheckoutLine', List['DiscountInfo']
Output Type: Any
Dependencies:
```python
def v0(v1: 'Product', v2: Money, v3: Country, **v4) -> TaxedMoney:
v5 = v4.get('taxes')
if v3 and (not v5):
v5 = get_taxes_for_country(v3)
if not v1.char... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = 'http://planet.openstreetmap.org/replication/{}/state.txt'.format(self.replication_name[self._periodicty])
v2 = requests.get(v1)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
global supported_backends
v1 = None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List, int
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List, v2: int) -> List:
v3 = [{'function_name': self.function_name, 'payload': {**function, **{'timeframe': v2}}} for v4 in v1]
v5 = self.execute... |
Imports:
```python
import numpy as np
import numpy.ma as ma
from numpy import ndarray
import typing
```
Type definitions:
Input Types: Callable
Output Type: Callable
Dependencies:
```python
@plottable('Soft penalised log acquisition function', default_plotting_parameters={'calculate_jacobian': False})
def v0(v1, *, v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=True) -> List[str]:
if v2:
v3 = 'obj_text'
else:
v3 = 'obj'
v4 = 'SELECT DISTINCT(' + v3 + ') FROM Triples... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[str]:
v1 = [node for v2 in self.get_geneg_resources() if len(v2) == 43 and 'news_' in v2 and (not '_evt' in v2)]
return v1
``` |
Imports:
```python
from http.client import BadStatusLine
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
v1 = await self.getline()
v2 = v1.split(None, 2)
if len(v2) != 3:
self.log(0, 'bad status_lin... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: Dict, Dict, Dict, Dict, Dict
Output Type: Tuple
Dependencies:
```python
def v0(v1: Dict) -> pd.DataFrame:
v2 = pd.DataFrame()
for (v3, v4) in v1.items():
print('IN COMBINE results')
print(v3)
v5 = v3... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
if await self.condition():
if not self.firing:
v1 = await self.trigger()
if v1:
self.firing = True
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[shapely.geometry.Polygon]
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[shapely.geometry.Polygon]) -> float:
v2 = 0
for v3 in v1:
v2 += v3.area
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> None:
self.filesystem.rmdir(self.path, v1)
self.update_hash()
``` |
Imports:
```python
import json
import os
import tensorflow as tf
import tensorflow.python.framework.convert_to_constants as cc
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: tf.Graph
Dependencies:
```python
def v0(v1: str) -> str:
v2 = os.path.abspath(__file__)
(v3, v4) = os.path.s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, bool, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: bool=False, v3: bool=False):
(v4, v5, v6, v7) = v1
return self(v4, v5, v6, None, v2, v3)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: np.ndarray, v2: float, v3: float) -> np.ndarray:
v4 = np.exp(-1 / 2 * ((v1 - v2) / v3) ** 2)
v4 = v4 / np.sum(v4)
return v4
```
Function Name: v5
Function:
```p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: drgn.Object
Output Type: int
Dependencies:
```python
def v0(v1: drgn.Object) -> bool:
assert v1.type_.type_name() == 'spl_kmem_cache_t *'
return v1.skc_linux_cache.value_() != 0
```
Function Name: v2
Function:
```python
def v2(v3: drgn.Object)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: list[tuple[str, bool]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list[tuple[str, bool]]:
v1 = self.bot.extensions.keys()
return [(ext, ext in v1) for v2 in self.bot.all_extensions]
``` |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: str, Any, int
Output Type: datetime
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2, v3: int=None) -> datetime:
if v1 in self._template:
if type(v2) == str:
try:
... |
Imports:
```python
import pickle
import typing
```
Type definitions:
Input Types: Any, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: str, v3: str):
v4 = self.re_model.layers[1]
v4.save_pretrained(v3)
v5 = self.re_model.get_layer('sigmoid').get_weights()... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.statement_group = None
self.citation_db = None
self.citation_db_id = None
self.evidence = None
self.annotations.clear()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
del self.hmm.A
del self.hmm.B
del self.hmm.pi
``` |
Imports:
```python
from typing import TYPE_CHECKING, Any, List, Union, Dict, Optional, Callable
import typing
```
Type definitions:
Input Types: Optional[Dict[int, List[Any]]], bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[Dict[int, List[Any]]]=None, v2: bool=Tru... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = self.analysis.get_transshipment_and_hinterland_fraction()
v2 = np.nan
if sum(v1) > 0:
v2 = v1.transshipment_capacit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.