text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list=None) -> dict:
v2 = '/componentmetadata/tags/tagitems'
if v1 is None or type(v1) != list:
raise ValueError('Require a list of elements to... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = np.load(v1, allow_pickle=True).item()
v2['goals'] = np.unique(v2['models_data'][0][['goal_x', 'goal_y']].values, axis=0)
ret... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types:
Output Type: Optional[dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Optional[dict]:
if not self.object_data:
return
return json.loads(self.object_data)
``` |
Imports:
```python
from subprocess import PIPE, STDOUT, Popen
import typing
```
Type definitions:
Input Types: Logger, List[str], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Logger, v2: List[str], v3: str) -> None:
with Popen(v2, cwd=v3, stdout=PIPE, stderr=STDOUT) as v4:
... |
Imports:
```python
import logging
import numpy as np
from sklearn import metrics
from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn.neighbors import KNeighborsClassifier
from sklearn... |
Imports:
```python
import csv
import typing
```
Type definitions:
Input Types: str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> list:
v2 = list()
v3 = list()
with open(v1, newline='') as v4:
v5 = csv.Sniffer()
v6 = csv.reader(v4)
if v5:
... |
Imports:
```python
import torch
import torch.utils.data
import typing
```
Type definitions:
Input Types: torch.utils.data.DataLoader, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.utils.data.DataLoader, v2=float('inf')):
(v3, v4) = ([], [])
for (v5, v6) in v1:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray, Union[int, float], Union[int, float], np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray, v2: Union[int, float], v3: Union[int, float], v4: np.ndarray=None):
(v5, v6) = v1.shape... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> str:
v3 = ''
with open(v1) as v4:
v5 = json.load(v4)
v3 = v5.get(v2)
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = input(v1).strip()
v3 = v2.replace(',', '.')
v4 = v2.replace(',', '').replace('.', '')
if v4.isnumeric():
return float(v3)
else:... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if self.isEmpty():
return False
if self.front == self.limit - 1:
self.front = 0
else:
self.front += 1
self.size -= 1
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: ShipyardId, v2: Point, v3: PlayerId, v4: 'Board', v5: Optional[ShipyardAction]=None) -> None:
self._id = v1
self._position = v2
self._player_id = v3
self._board = v4
self._next_... |
Imports:
```python
import typing
```
Type definitions:
Input Types: aiosqlite.Cursor, int, str, EmailMessage
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
async def v0(v1: aiosqlite.Cursor, v2: int, v3: str, v4: EmailMessage) -> int:
v5 = "\n INSERT INTO message_part\n (me... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: bool):
if not v3:
v5 = self.view.primary_key.sql_query(v2, alias_only=v4)
v3 = self._get_sql_dist... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: Dict, str
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict, v2: str) -> pd.DataFrame:
v3 = v2.strip().split('\t')
v4 = {v2: [] for v2 in v3}
for v5 in v1.values():
v... |
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 self.sub_exist(v1):
if v1 != self.subreddit.display_name:
self.subreddit = self.reddit.subreddit(v1)
print... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: Iterable[Iterable[Any]]) -> None:
self.pixels: np.ndarray = np.array([list(r) for v2 in v1])
def v3(self, v4: v0) -> bool:
if self.shape != v4.shape:
return False
return bool(c... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: (int, int)
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> (int, int):
try:
v2: int = self.nums.index(v1)
except:
print(f'Invalid X in getTwoAfterX()')
return (None, None)
... |
Imports:
```python
import re
from io import BytesIO
import typing
```
Type definitions:
Input Types: bytes
Output Type: BytesIO
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes) -> BytesIO:
v2 = re.search('Content-Disposition: attachment;.+?\r\n\r\n(.+?)\r\n--uuid:.+?--'.encode('utf-8'), v1, r... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = self.read_stream.readline()
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: plt.Axes, str, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: plt.Axes, v2: str, v3=None, v4=False, v5=None, v6=None, v7='-', v8=None, v9=None, v10='linear', v11=... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Callable
Output Type: Callable
Dependencies:
```python
@wraps(fn)
def v0(v1: np.array, v2: Callable=rescale) -> np.ndarray:
v1 = fn(v1)
return v2(v1)
```
Function Name: v3
Function:
```python
def v3(v4: Callable) -> Callable:
@wraps(v4)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any, v2: Any) -> bool:
if len(v1) != len(v2):
raise ValueError(f'Arguments must have the same length. len(items1): {len(v1)}, len(items2): {len(v2)}... |
Imports:
```python
import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> float:
for v2 in ('%H:%M:%S.%f', '%H:%M:%S'):
try:
v3 = datetime.datetime.strptime(v1, v2)
v4 = datetime... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None) -> str:
if v1 is None:
v1 = 'var'
v2 = self._internal_var_iter
self._internal_var_iter += 1
return f'{v1}{... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> bool:
if v1 < 0:
return False
v2 = v1
v3 = 0
while v2 > 0:
v3 = v3 * 10 + v2 % 10
v2 = v2 // 10
return v1 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='{:.2}', v2: str='x_{dim}^{exp}', *v3, **v4) -> str:
v5 = ''
if not self.compute_representation:
self.representation = v5
retur... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Callable[[str], None]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Callable[[str], None]) -> None:
global _CONSOLE_LOG_FN
v2 = v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Sequence
Dependencies:
```python
def v0(v1: Any) -> None:
if v1 in low:
return
v2 = len(low)
low[v1] = v2
v3 = len(stack)
stack.append(v1)
for v4 in self[v1]:
v0(v4)
low[v1] = min(low[v1], ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[float, float]:
if len(self.deck.cards) < 15 or self.matta_drawn:
self.matta_drawn = False
self.deck.shuffle_deck()
sel... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, float, float, np.dtype
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: np.ndarray, v2: float=0.0, v3: float=1.0, v4: Optional[np.dtype]=np.float32) -> np.ndarray:
if v4 is not None:
v1 = v1.astype(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict[str, str], dict[str, str]
Output Type: dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict[str, str], v2: dict[str, str]) -> dict[str, str]:
if v1.get('font-size'):
v1['font-size'] = self.size_to_... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict[str, Dict[str, snt.Module]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict[str, Dict[str, snt.Module]]:
v1 = self.create_actor_variables()
v2 = self.create_critic_variables()
v1.update(v2)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str, Any, Any
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1, v2: str=None, v3=None, v4=None) -> dict:
v5: dict = {'name': v2, 'avatar': v3, 'channel_id': v4}
v5: dict = {k: v for (v6, v7) in ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> bool:
v1 = type(self)
if self._id:
await v1.update_one(criteria={'_id': self._id}, **self.__dict__)
return True
v2 = await v1.cre... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str, v2: str):
v3 = {'tags': ['organizations', 'configure', 'admins'], 'operation': 'deleteOrganizationAdmin'}
v4 = f'/organizations/{v1}/adm... |
Imports:
```python
from scipy.interpolate import interp1d
import typing
```
Type definitions:
Input Types: npt.NDArray[np.floating], npt.NDArray[np.floating], npt.NDArray[np.floating]
Output Type: npt.NDArray[np.floating]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: npt.NDArray[np.floating], v2: npt... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = list(v1)
v3 = (int(v2[0]) + int(v2[10])) * 7 + (int(v2[1]) + int(v2[11])) * 9 + (int(v2[2]) + int(v2[12])) * 10 + (int(v2[3]) + int(v2[13])) * 5 + ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3, v4: float=0.5):
v5 = (v2 > 0).nonzero()
v1[v5] = v1[v5] * (1 - v4) + v4 * v3 * 255
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: mne.Epochs, int, int
Output Type: np.array
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: mne.Epochs, v2: int=110, v3: int=140) -> np.array:
v4 = v1.copy()
v4.pick_types(eeg=True, exclude='bads')
v4.filter(v2, v3, fi... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.widget:
if self.widget.winfo_class() in ('Button', 'TButton', 'Label', 'TLabel', 'Radiobutton'):
self.widget['text'] = self.e... |
Imports:
```python
import typing
```
Type definitions:
Input Types: TextIO, str, int, int
Output Type: Tuple[str, int, str, str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: TextIO, v2: str, v3: int, v4: int) -> Tuple[str, int, str, str, str]:
v5 = v1.tell()
v6 = ''
v7 = v1.readline... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict):
self.actor_cell_id: int = v1['actorCellId']
self.champion_id: int = v1['championId']
self.completed: bool = v1['completed']
self.id: int... |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray) -> tuple:
v2 = v1.min(axis=0)
v3 = v1.max(axis=0) - v1.min(axis=0)
return (v2, v3, (v1 - v2) / v3)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(DiagramEntity):
v1 = 'package'
```
Input Types: str, nodes.Module
Output Type: v0
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: str, v4: nodes.Module) -> v0:
for v5 in self.modules():
v6 = v5.node.name
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> int:
v2 = input(v1)
try:
v3 = int(v2)
return v3
except ValueError:
return 0
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Set[claripy.ast.Base]
Output Type: Optional[claripy.ast.Base]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Set[claripy.ast.Base]) -> Optional[claripy.ast.Base]:
v2 = set()
v3: Optional[int] = None
for v4 in v1:
... |
Imports:
```python
import operator
import numbers
import torch
from torch import fx
import typing
```
Type definitions:
Input Types: fx.Node
Output Type: Tuple[fx.Node, Optional[numbers.Number]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: fx.Node) -> Tuple[fx.Node, Optional[numbers.Number]]:
if... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Union[None, int, List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Union[None, int, List[int]]:
if self.need_pad:
return self.element2repr(self.PAD_ELEMENT)
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, int, int, bool, bool
Output Type: Response
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None, v2: str=None, v3: int=None, v4: int=None, v5: bool=None, v6: bool=None) -> Response:
v7 = {'fileName': v1, 'data':... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str]
Output Type: Iterator[Tuple]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str]) -> Iterator[Tuple]:
for v2 in self.linter.templater.sequence_files(v1, config=self.config, formatter=self.linter.formatter):
... |
Imports:
```python
from collections import Counter
import numpy as np
import typing
```
Type definitions:
Input Types: List, List
Output Type: Any
Dependencies:
```python
def v0(v1: List[int], v2: List[Counter], v3: int=5, v4: int=4) -> None:
v5 = v3 * v4
if not isinstance(v5, int):
assert np.floor(v5)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: [int, datetime]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> [int, datetime]:
v1 = self.conn.cursor()
v1.execute('\n SELECT id, strftime(\'%Y-%m-%d 00:00:00\', date) as "[timestamp]" FROM messag... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Any, str
Output Type: (str, str)
Dependencies:
```python
def v0(v1, v2: str, v3=[]) -> (str, str):
if isinstance(v1, str):
v4 = v2.find(v1)
v3.append(len(v1))
elif isinstance(v1, re.Pattern):
v5 = v1.search(v2... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: Any, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: float=0.5):
v3 = {idx + 1: value for (v4, v5) in enumerate(self.class_mapping.keys())}
v6 = v1.argmax(dim=0)[None]
v7 = torc... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes) -> bytes:
v2 = self._algorithm(v1)
try:
v2 = v2.digest()
except AttributeError:
pass
if self.args.text:
v2 = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> list:
v2 = {'type': 'ServiceIdentity', 'page': 0, 'size': 100, 'searchText': v1}
return self.britive.get(self.base_url, v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: List[Any]
Dependencies:
```python
def v0(v1: Any, v2):
v3 = []
if v2 == layer_number:
v3.append(v1)
elif v1.nodes_from:
for v4 in v1.nodes_from:
v3.extend(v0(v4, v2 + 1))
return v3
```
Funct... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'h_l', Any, Any
Output Type: 'p_e'
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: 'h_l', v2, v3=9.81) -> 'p_e':
v4 = v2 * v3 * abs(v1)
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = v1.lower().split(' ')
v3 = 0
for v4 in v2:
if v4.endswith('h'):
v3 += int(v4[0:len(v4) - 1]) * 60
elif v4.endswith(... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2='ep', v3='-'):
v4 = sorted(os.listdir(v1))
v5 = 0
if len(v4) > 0:
v5 = 1 + int(v4[-1].split(v3)[1])
v6 = os.path.j... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float):
self._t += v1
if self._t - self._n >= self._dt:
self._n = self._t
self.update_constraints(self.t)
self._y = self.map_f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=False):
v3 = {'sync': v2, 'keep_metadata': True}
v4 = self._make_url(f'collections/{v1}', params=v3)
return self._request('DELET... |
Imports:
```python
import os
import re
import shutil
import typing
from os import PathLike
from typing import Any, Collection, Dict, Iterable, List, Literal, Mapping, Optional, Sequence, Tuple, Union, cast
import typing
```
Type definitions:
```python
v0 = Literal['14.1', '14.2']
```
```python
v1 = Literal['15.0', '16.... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Domain, SingleAgent, Sequential, DeterministicTransitions, UnrestrictedActions, DeterministicInitialized, Markovian, FullyObservable, Renderable, Rewards):
pass
```
Input Types: v0.T_memory[v0.T_state]
Output Type: Any
Dependencies:
Function... |
Imports:
```python
import typing
```
Type definitions:
```python
@flatten_handlers
class v0(PartialMessage, Hashable):
v1 = ('_state', '_edited_timestamp', '_cs_channel_mentions', '_cs_raw_mentions', '_cs_clean_content', '_cs_raw_channel_mentions', '_cs_raw_role_mentions', '_cs_system_content', 'tts', 'content', 'c... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict):
v2 = type(self)(**v1)
for v3 in self:
v2.add(self[v3])
self.__dict__ = v2.__dict__
``` |
Imports:
```python
import inspect
import typing
```
Type definitions:
Input Types: Generator
Output Type: 'Iter'
Dependencies:
```python
def v0(v1):
collector.send(v1)
```
Function Name: v2
Function:
```python
def v2(self, v3: Generator) -> 'Iter':
if inspect.getgeneratorstate(v3) == 'GEN_CREATED':
nex... |
Imports:
```python
from string import ascii_lowercase, ascii_uppercase
import typing
```
Type definitions:
Input Types: str, bool
Output Type: str
Dependencies:
```python
def v0(v1: int) -> str:
return ascii_uppercase[v1:] + ascii_uppercase[:v1]
```
Function Name: v2
Function:
```python
def v2(v3: str, *, v4: bool... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
if v1:
return v1
else:
return 'default'
``` |
Imports:
```python
from shapely.geometry import Point, Polygon
import typing
```
Type definitions:
Input Types: Polygon, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Polygon, v2, v3, v4=0):
if v4 == 0:
v5 = Point(v2, v3)
return v1.contains(v5) or v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: int
Dependencies:
```python
def v0(v1: int):
return len(str(v1)) % 2 == 0
```
Function Name: v2
Function:
```python
def v2(self, v3: List[int]) -> int:
def v4(v5: int):
return len(str(v5)) % 2 == 0
v6: int =... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._eof_received = True
super().feed_eof()
``` |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: List[List[v0]]
Output Type: Counter
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: List[List[v0]]) -> Counter:
v3 = []
for v4 in v2:
v3.extend(v4)
v5 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = False
if not self.sensors:
return v2
v3 = self.get(v1)
if v3:
self.sensors.remove(v3)
v2 = True
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 = '\n INSERT INTO queue_log (uuid, is_consumed, topic, published_time, content_format, content, org_content, consumed_time)\n VAL... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> dict:
v1 = super()._validate_args(v1)
return dict(**v1, value_columns_str=', '.join([f'`{column}`' for v2 in v1['value_columns']]), hash_expr... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Collection
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Collection):
for v2 in v1:
self.move_item(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[int]
Output Type: Iterator[Tuple[int, int]]
Dependencies:
```python
def v0(v1: Iterable[int]) -> Iterator[Tuple[int, int]]:
(v2, v3) = (0, 1)
(v4, v5) = (1, 0)
for v6 in v1:
v7 = v6 * v4 + v2
v8 = v6 * v5 + v3
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any, bool
Output Type: str
Dependencies:
```python
def v0(v1):
return v1.replace('`', '``')
```
Function Name: v2
Function:
```python
def v2(v3, v4, v5, v6=None, v7: bool=False) -> str:
if v6:
if v7:
v8 = '/*... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Model):
v1: str
v2: str
v3: str
v4: str
v5: str
v6: str
v7: str
v8: str
v9: bool
v10: int
v11: str
v12: str
v13: str
v14: str
v15: int
v16: int
v17: int
v18: int
v19: int... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str, str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: str) -> dict:
v5 = {'table_name': v4, 'table_sys_id': v1, 'file_name': v3}
return self.send_request('attachme... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[study_pb2.Episode, study_pb2.StepMetadata], str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[study_pb2.Episode, study_pb2.StepMetadata], v2: str) -> bool:
v3 = v1.tags
v4 = len(v3)
v1.ClearF... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str='Camera1', v2: float=0.75, v3: float=4.54, v4: int=1, v5: str='CCD', v6: int=1, v7: float=1.0, v8: float=1.0, v9: float=0.005, v10: float=0.0) -> None:
"""
:param name: name of t... |
Imports:
```python
import typing
```
Type definitions:
Input Types: grid_lib.Loc
Output Type: Tuple[grid_lib.Loc, grid_lib.Loc]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: grid_lib.Loc) -> Tuple[grid_lib.Loc, grid_lib.Loc]:
v2 = list(self._grid.safe_locs)
v3 = [self._grid.manhattan_di... |
Imports:
```python
import pathlib
import typing
```
Type definitions:
Input Types: Union[str, pathlib.Path], bool
Output Type: pathlib.Path
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[str, pathlib.Path], *, v2: bool=False) -> pathlib.Path:
v1 = pathlib.Path(v1)
self._download(v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, float]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, float]):
for v2 in v1:
if v2 in self.motor_keys:
self.current_position[v2]['position'] = v1[v2]
``` |
Imports:
```python
from math import ceil
import typing
```
Type definitions:
Input Types: discord.Interaction
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: discord.Interaction) -> int:
v2 = len(self.saved_bans)
if v2 == 0:
return 1
if v2 % 1000 == 0:
... |
Imports:
```python
import importlib
import inspect
import typing
```
Type definitions:
Input Types: str, str
Output Type: Dict[str, Type]
Dependencies:
```python
def v0(cls: Type) -> str:
return cls.__name__[:cls.__name__.find(cls.__bases__[0].__name__)].lower()
```
Function Name: v1
Function:
```python
def v1(v2:... |
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.search('(.+)\\.\\S+', v1)
if v2:
return v2[1]
else:
return v1
``` |
Imports:
```python
import numpy
import typing
```
Type definitions:
Input Types: str
Output Type: Generator[dict, None, None]
Dependencies:
```python
def v0(v1: str) -> bool:
return ':' in v1
```
```python
def v2(v3: str) -> Iterator[str]:
v4 = filter(None, v3.split(';'))
v5 = map(lambda x: x.lstrip().rstr... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._drop_table_if_exist()
self._create_table_if_not_exist()
``` |
Imports:
```python
import numpy
import typing
```
Type definitions:
Input Types: numpy.ndarray, int, dict
Output Type: numpy.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: numpy.ndarray, v2: int, v3: dict=None) -> numpy.ndarray:
v4 = v1.shape[0]
if v2 < v4:
if v3 is not None an... |
Imports:
```python
import math
import numpy as np
import typing
```
Type definitions:
Input Types: int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int=None, **v2) -> list:
v1 = int(math.fabs(v1)) if v1 is not None else 2
v3 = v2.pop('weighted', False)
if v1 == 2:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'List[str]'
Output Type: 'bool'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'List[str]') -> 'bool':
self.match = []
for v2 in range(26):
self.match.append(v2)
for v3 in v1:
if v3[1] == '=':
... |
Imports:
```python
import numpy as np
from scipy.spatial import Delaunay, ConvexHull
import typing
```
Type definitions:
Input Types: Iterable, Iterable, Any
Output Type: Callable
Dependencies:
```python
def v0(v1):
v2 = pg.find_shape(v1)
if v2 > -1:
return interpf[v2](v1)
else:
return inte... |
Imports:
```python
import os
import pandas as pd
import plotly.express as px
import typing
```
Type definitions:
Input Types: list, Any, Any, Any, Any, Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2='values', v3='x', v4='y', v5='z', v6='val', v7: str=None):
if le... |
Imports:
```python
import shapely
from shapely.geometry import Polygon
from shapely import affinity
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3, v4) -> bool:
v5 = Polygon(self.get_corners()).conve... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: bool
Dependencies:
```python
def v0(v1: np.dtype) -> bool:
if not isinstance(v1, np.dtype):
raise TypeError('The input should be a numpy dtype object.')
if v1.names is not None:
raise ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, str]) -> None:
self.proxies = v1
self._proxy_handler.__init__(self.proxies)
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.