text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes=b''):
v2: Iterator[Tuple[bytes, bytes]] = self.db.iteritems()
v2.seek(v1)
while True:
try:
(v3, v4) = next(v2)
e... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.config['ftp_enabled'] = False
self.ftpd.set_config(self.config)
with self.assertRaises(EOFError):
self.ftp.pwd()
self.assertIsNo... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: float, float
Output Type: float
Dependencies:
```python
def v0(v1: float) -> List[Dict[str, float]]:
v2 = []
v3 = (v1 + 16) ** 3 / 1560896
v4 = v3 if v3 > EPSILON else v1 / KAPPA
v5 = 0
while v5 < 3:
v6 = v5
... |
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.split(' ')
v3 = []
v4 = v2[:]
for v5 in v2:
if v5.startswith('-') or v5.startswith('--'):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: tuple, str, str
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tuple, v2: str='start', v3: str='end') -> tuple:
v4 = self.transform_point((v1[1], v1[3]), v2, v3)
v5 = self.transform_point((v1[0], v1[2]... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list:
v1 = self._get_raw_band_paths()
return list(v1.keys())
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> str:
(v3, v4) = v2
v5 = v1[v4][v3]
return tuple(v5[..., ::-1])
``` |
Imports:
```python
import argparse
import typing
```
Type definitions:
Input Types: argparse._SubParsersAction
Output Type: Any
Dependencies:
```python
def v0(v1: str, v2: str, v3: bool, v4, v5):
v6 = f'{v2} {deprecated_msg}' if v3 else v2
v7 = {'formatter_class': v5} if v5 else {}
v8 = subparsers.add_pars... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes):
v2 = []
v3 = self.get_text_hook(v1)
for v4 in self.parse_text(v3):
v2.append(v4)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> list:
v2 = []
for v3 in range(len(self.cells)):
for v4 in range(len(self.cells[0])):
if self._can_place(v1, (v3, v4)):
... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: int, Any, Any, Dict[str, int], Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2, v3, v4: Dict[str, int], v5, v6, v7):
for v8 in v2:
if isinstance(v6[v8], dict):
... |
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._parse_codeblock_start(v1)
if self._in_codeblock:
return
self._parse_regular_line(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:
v2 = []
v3 = v1.split('/')
for v4 in v3:
if v4 == '..':
if v2:
v2.pop()
elif v4 == '.' or v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
if self.primitive == 'int' and v1 == '':
return '-1'
if 'varchar' in self.primitive:
v2 = v1.replace("'", "''")
ret... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[type]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[type]):
v3: Optional[Parameter] = self.signature.parameters.get(v1)
assert v3 is not None, 'Cannot happen due to previ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1 = ('_map',)
def __init__(self, v2: typing.Optional[dict[str, int]]=None, /) -> None:
self._map = v2 or {}
def v3(self, v4: typing.Literal[0, 1]) -> v0:
"""Set the array socket type.
Parameters
--... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, List[int]
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: List[int]) -> List[int]:
v3 = {v1}
v4 = []
while v3:
v5 = v3.pop()
if v5 in v4:
continue
... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: tf.Tensor
Output Type: tf.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tf.Tensor) -> tf.Tensor:
v2 = tf.shape(v1)[:-2]
v3 = tf.concat([v2, (self.outer_dim * self.inner_dim, 1)], axis=0)
... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> List[str]:
v2 = []
v3 = ['stdlib', 'third_party']
for v4 in v3:
v5 = os.path.join(v1, v4)
if not os.path.isdir(v5)... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
v0 = Tuple[int, int]
```
Input Types: List[Tuple[v0, v0]]
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: List[Tuple[v0, v0]]) -> v0:
v3 = [t for v4 in v2 if self.game_state.is_in_bounds(v4[0])]... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if self._location is None:
return False
return self._location.remove(self.relpath)
``` |
Imports:
```python
from difflib import unified_diff
import typing
```
Type definitions:
Input Types: str, str, Path
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: Path) -> None:
v4 = [line for v5 in unified_diff(v2.splitlines(), v1.splitlines(), fromfile=str(v3)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: Iterable[Tuple[int, int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int) -> Iterable[Tuple[int, int]]:
for v4 in range(v3):
for v5 in range(1, v3 - v4 + 1):
... |
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=6) -> int:
v3 = 10 ** v2 - 1
v4 = [True] * (v3 // 2)
for v5 in range(3, int(v3 ** 0.5) + 1, 2):
if v4[v5 // 2]:
v4[v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Tuple[Hashable, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]) -> Tuple[Hashable, Any]:
v2 = self.get_function(v1['spec']['function'])
v3 = self.client.submit(v2, *v1['spe... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Piece'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Piece') -> None:
v2 = self.__pieces_to_coordinates.get(v1, None)
if v2:
self.__coordinates_to_pieces[v2].remove(v1)
self.__pieces_... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, dict, dict, dict, List[dict], dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: dict, v4: dict={}, v5: dict=None, v6: List[dict]=None, v7: dict={}):
self.stats = {}
v8 = sel... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[_T, Iterable[_T]]
```
Input Types: v0, v0, Optional[v0]
Output Type: float
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0, v3: v0, *, v4: Optional[v0]=None) -> float:
if self._model is not None:
return self... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: str, str, str, str, str, str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: str, v4: str, v5: str, v6: str, v7: bool):
if v7:
v8 = 'https'
else:
v8 = 'ht... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int]) -> int:
v2 = [0] * (100 + 1)
for v3 in v1:
v2[v3] += 1
return sum((i for (v4, v3) in enumerate(v2) if v3 == 1))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = self.atom_weights_by_sample.pop(v1)
self.atom_weights -= v2
v3 = self.compound_weights_by_sample.pop(v1)
for v4 in v3.keys():
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: (int, int, int)
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict) -> (int, int, int):
v2 = v1['min']
v3 = v1['max']
v4 = v1['lives']
return (v2, v3, v4)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: np.array
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.DataFrame) -> np.array:
v2 = v1.loc[:, [self.target]].values.ravel()
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2, v3, v4=0):
(v5, v6, v7, v8) = v1
(v9, v10) = (v5 + v7, v6 + v8)
v5 = min(max(0, v5), v3 - v4)
v9 = min(max(v4, v9), v3)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
```python
def v0(v1: cst.Module, v2: cst.Module) -> cst.Module:
v3 = ImportCollector()
v2.visit(v3)
v4 = TypeCollector(v3.existing_imports)
v1.visit(v4)
v5 = TypeTransformer(v4.function_annot... |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
Input Types: List[Tuple[str, int]], int
Output Type: List[Tuple[str, float]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[Tuple[str, int]], v2: int) -> List[Tuple[str, float]]:
v3 = defaultdict(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> float:
v1 = self.analyses['analysis']['flags']['discriminatory'] * 10
if self.is_debug:
self.logger.debug('\n'.join(['Discriminatory Flag Rule', '... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, Optional[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: Optional[str]=None):
v4 = '' if v3 is None else f'# {v3}\n'
return v4 + f'# Begin {v1}\n' + v2 + f'\n# End {v1}'
``` |
Imports:
```python
import matplotlib.pyplot as plt
import typing
```
Type definitions:
Input Types: pd.DataFrame, pd.DataFrame, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: pd.DataFrame, v3: str=None, v4: str=None) -> None:
if not v1['utc_datetime'].e... |
Imports:
```python
from typing import List, Tuple, cast
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[bool, bool, bool, bool, bool]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[bool, bool, bool, bool, bool]:
v1 = [False, False, False, False, False]
(v2, v3, ... |
Imports:
```python
import re
import pandas
import typing
```
Type definitions:
Input Types: str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> dict:
v2 = pandas.read_excel(v1)
v3 = ''.join([_ for v4 in v2.loc[0].to_list() if not pandas.isna(v4)])
v5 = '.*?(\\d+)ๆ(... |
Imports:
```python
import sqlite3
import typing
```
Type definitions:
Input Types: tuple, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: tuple, v2: str='./Data/sensor-data.db'):
with sqlite3.connect(v2) as v3:
v4 = v3.cursor()
v5 = f' \n SELECT *... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1: [] = ['?']
if type(self.parameters) == dict and len(self.parameters) > 0:
for v2 in self.parameters.keys():
v3: [] = [v2, '=', ... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> str:
if v1 is None:
return ''
if isinstance(v1, str):
return str(v1)
return json.dumps(v1)
``` |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: int, int
Output Type: None
Dependencies:
```python
def v0(v1: int, v2: int) -> List[int]:
v3 = []
(v4, v5) = divmod(v1, v2)
while v5 != 0:
v3 = v3 + [v4]
(v4, v5) = divmod(v2, v5)
v2 = (v2 - v5) // v4
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: list
Dependencies:
```python
def v0(self):
return self._vector
```
Function Name: v1
Function:
```python
def v1(self, v2) -> list:
v2 = v0(v2)
return [f for v3 in self if v3.vector() == v2]
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]) -> Dict[str, Any]:
v2 = self.__get_cache_directory(v1['url'], v1['user_agent'], v1['referer']) / 'submit'
... |
Imports:
```python
import argparse
import os
from pathlib import Path
from typing import TYPE_CHECKING, Any, List, cast
import typing
```
Type definitions:
```python
class v0(argparse.Namespace):
v1: str
v2: str
v3: str
v4: str
v5: str
v6: str
```
Input Types: list[str]
Output Type: int
Dependen... |
Imports:
```python
import json
import typing
```
Type definitions:
```python
class v0(json.JSONEncoder):
v1 = False
def v2(self, v3: object) -> object:
"""
The overwritten `default` method for `json.JSONEncoder`
:param obj: The object to serialize to json
:return: The serialize... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.time_steps == 0:
self.recording = {var: [] for v1 in self.state_variables}
else:
self.recording = {v1: [[] for v2 in range(se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> bool:
if not hasattr(self, v1):
raise AttributeError('%s not in %s' % (v1, self.__class__.__name__))
return v1.startswith('_')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = 1
for (v2, v3) in self.nested_closures:
v1 += v3.call_tree_length()
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
self.n_pulls += 1
self.mu_hat = (1 - 1 / self.n_pulls) * self.mu_hat + 1 / self.n_pulls * v1
``` |
Imports:
```python
import shutil
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> None:
v2 = shutil.get_terminal_size((78, 20)).columns
v3 = '=' * ((v2 - len(v1) - 4) // 2)
print(color(HEADING_BLUE)(f'{v3} {v1} ... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: Any
Dependencies:
```python
def v0(v1: Optional[str]=None):
v1 = v1.strip()
v2 = '^(?=^.{3,255}$)(?!^.*?-{2,}.*$)([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$'
return v1 if re.match... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> bool:
if len(v1) != len(v2):
return False
v3 = False
for v4 in v1:
for v5 in v2:
if v4 == v5:
v3 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int) -> None:
v2 = ' ' * v2
print(v2 + v1)
``` |
Imports:
```python
import torch as _torch
from torch.types import Number
import typing
```
Type definitions:
Input Types: Any, Union[int, List[int]], int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: Union[int, List[int]], v3: int=None):
if len(v1.shape) == 0 and v3 in [0, -1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict):
v2 = None
v3 = None
v4 = None
v5 = None
if 'fixation_id' in v1:
v2 = v1['fixation_id']
if 'room_code' in v1:
v3 = v1['... |
Imports:
```python
import ast
import typing
```
Type definitions:
Input Types: ast.FunctionDef
Output Type: Tuple[List[Any], List[Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: ast.FunctionDef) -> Tuple[List[Any], List[Any]]:
assert type(v1) == ast.FunctionDef, 'Incorrect node type. Expected... |
Imports:
```python
import numpy as np
from skimage.measure import regionprops
import typing
```
Type definitions:
Input Types: np.ndarray, typing.Union[tuple, int]
Output Type: typing.List[tuple]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: typing.Union[tuple, int]) -> typing.List[tu... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: List[stmt]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> List[stmt]:
v2: List[stmt] = []
for v3 in v1['fields']:
v2.extend(self._gen_skip(v3['type']))
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: logging.LogRecord
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: logging.LogRecord) -> str:
v2 = getattr(v1, 'with', None)
v3 = ''
if v2 is not None:
v3 = f': {v2}'
return f'({self.format... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.logger.debug('Disconnect called')
with self._sync_lock:
if not self._loop.is_running():
return
if self._is_connected... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'IOptionDict'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'IOptionDict':
v1 = self.ut._create_empty()
v2 = self.te._create_empty()
return self.__class__(v1, v2)
``` |
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: int
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: v0) -> int:
if not v3:
r... |
Imports:
```python
from itertools import chain, islice
import typing
```
Type definitions:
```python
class v0(Writeable):
v1 = ['_raw', 'lines', 'header', 'body', '__weakref__']
def __init__(self, v2: bytes, v3: MessageHeader, v4: MessageBody) -> None:
super().__init__()
self._raw = get_raw(mem... |
Imports:
```python
import typing
```
Type definitions:
Input Types: AssignmentStatement2Parser.Factor3Context
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: AssignmentStatement2Parser.Factor3Context):
(v1.type_attr, v1.value_attr) = self.visit(tree=v1.factor())
return (v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any) -> bool:
if v1 is None or not isinstance(v1, dict):
return False
if '_id' not in v1 or 'answer_count' not in v1 or 'content_license' not in v1 o... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, float, float, float, float
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray=None, v2: float=None, v3: float=None, v4: float=None, v5: float=None) -> np.ndarray:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, *v3, **v4):
if v1 in self._list:
return getattr(self._list[v1], v2)(*v3, **v4)
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> float:
v1 = self.tx_psd
for v2 in self._gain_cascade():
v1 *= v2
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, int, str
Output Type: List[Tuple[str, str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int=0, v3: int=None, v4: str=None) -> List[Tuple[str, str]]:
v5 = self._download_raw_files(self._datasources_api.g... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(BaseClient):
def __init__(self, v1, v2, v3, v4, v5=True, v6=False):
"""
Store username and password for authentication.
:type username: ``string``
:param username: username of salesforce account
:typ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if self.cell_properties.get(v1)['is_ill']:
self.cell_properties.get(v1)['heat_value'] = 1.0
elif any((self.cell_properties.get(n).get('is_... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: bool):
print('++++++++++++++++++')
print(f'{v1} malware result => {v2}')
print('++++++++++++++++++')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
v1 = self._image_uri.find('/')
return v1 == -1 or all((ch not in ['.', ':'] for v2 in self._image_uri[:v1]))
``` |
Imports:
```python
import numpy as np
from numpy import ndarray
import typing
```
Type definitions:
Input Types: nx.Graph
Output Type: Tuple[ndarray, ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: nx.Graph) -> Tuple[ndarray, ndarray]:
v1 = np.array(sorted(v1.edges))
return (v1[:, 0], ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, tuple, List[tuple], str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: tuple, v3: List[tuple], v4: str=None) -> int:
v5 = 'INSERT INTO {database}{table} ({columns}) VALUES ({params});'.format(d... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, Any, Any
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2=1, v3=255) -> float:
v1 = float(v1)
if v1 > v3 or v1 < v2:
raise ValueError(f"timeout '{v1}' lower than RFC spec limit '{v2}'"... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> Optional[int]:
if v1 == 0:
return None
v2 = (v1 - 1) // 2
(v3, v4) = (self.lst[v1], self.lst[v2])
if v3 < v4:
... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
if self.message_type in ['text', 'markdown']:
v1 = {'msgtype': self.message_type, self.message_type: {'content': self.message} if self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0(v1: int, v2: int, v3: int=32):
return v1 >> v2 | v1 << v3 - v2
```
Function Name: v4
Function:
```python
def v4(v5: int):
v5 = v0(v5, 7) ^ v0(v5, 18) ^ v5 >> 3
return v5
``` |
Imports:
```python
import pickle
from pathlib import Path
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: str):
v3 = Path('../../models/') / (v2 + '.pkl')
with open(v3, 'wb') as v4:
pickle.dump(v1, v4)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: dict[str, str]
Dependencies:
```python
def v0(v1: list[dict]) -> str:
for v2 in v1:
if v2['name'] == 'TUSD_OBJEKT_NAVN':
return v2['value']
raise NotImplementedError('TUSD_OBJEKT_NAVN er eneste som er stรธt... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: List[LookUpItem]=[]):
"""Initializes a variable lookup table
Args:
items (List[LookUpItem], optional): A list of variables(look up item). Defaults to [].
"""
self.items = v... |
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=None) -> str:
if v2 is None:
v2 = self.name
if not v1.endswith('/'):
v1 += '/'
v3: str = v1 + v2
self.__tg_fil... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[Exception]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[Exception]) -> None:
self._reader.feed_eof()
super().connection_lost(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: click.Context, List[str]
Output Type: Tuple[Union[str, None], Union[click.Command, None], List[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: click.Context, v2: List[str]) -> Tuple[Union[str, None], Union[click.Command, No... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'c.Context'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'c.Context') -> None:
self._did_retrieve_version = True
self._most_relevant_version = v1.version_index.generate_new_output_version(commit=v1.cu... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: dict, str, float, int, dict
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: str, v3: float, v4: int, v5: dict) -> np.ndarray:
print('Someone needs to write this method! Gen... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(NamedTuple):
v1: str
v2: Any
v3: Union[bool, str]
```
Input Types: Union[str, List[str]]
Output Type: Iterator[v0]
Dependencies:
Function Name: v4
Function:
```python
def v4(self, v5: Union[str, List[str]]) -> Iterator[v0]:
if is... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.screen.blit(self.background, (0, 0))
self.screen.blit(self.scene_manager.weapon_list[self.scene_manager.selected_weapon_index].image, (535 - sel... |
Imports:
```python
import numpy as np
import logging
import typing
```
Type definitions:
Input Types: list, Any
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2=1) -> list:
v1 = np.asarray(v1)
v3 = np.round(v1, decimals=v2)
if np.any(v1 != v3):
logging.warn... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if not self.use:
return False
while not self.__slide_out_orb_list():
logging.info('slide out orb list failed')
if ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> str:
v2 = self.os_release_attr('name') or self.lsb_release_attr('distributor_id') or self.distro_release_attr('name') or self.uname_attr('na... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: 'Series'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3=True) -> 'Series':
if v3:
v4 = self >= v1
v5 = self <= v2
else:
v4 = self > v1
v5 = self < v2
... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: int, str
Output Type: Tuple[Tuple[int, int], Tuple[int, int], str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: str) -> Tuple[Tuple[int, int], Tuple[int, int], str]:
v3 = self.driver.find_elements_b... |
Imports:
```python
import typing
```
Type definitions:
Input Types: t.Union[str, t.Iterable[str]], str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: t.Union[str, t.Iterable[str]], v2: str) -> str:
if isinstance(v1, str):
v1 = [v1]
v3 = '\x1b[' + ';'.join(v1) + 'm'
... |
Imports:
```python
import json
import logging
import re
import typing
```
Type definitions:
Input Types: adaccount.AdAccount
Output Type: Generator[List, None, None]
Dependencies:
```python
@rate_limiting
def v0(v1: adaccount.AdAccount) -> {}:
logging.info('get ad data for account {}'.format(v1['account_id']))
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.