text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Tuple[Union[int, str, Tuple[Union[int, str], ...]], ...]
```
Input Types: int, v0
Output Type: str
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: int=13, v3: v0=()) -> str:
if v2 not in (8, 13):
raise AssertionError... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], List[int]
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: List[int]) -> List[int]:
v1.sort()
v2.sort()
v3 = len(v1)
v4 = len(v2)
v5 = []
v6 = v7 = 0
whi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pytest.Parser
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pytest.Parser) -> None:
v2 = v1.getgroup('idf')
v2.addoption('--sdkconfig', help='sdkconfig postfix, like sdkconfig.ci.<config>. (Default: None, wh... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Any
```
Input Types: v0, Optional[int], Optional[int], int, int
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0, v3: Optional[int], v4: Optional[int], v5: int=1, v6: int=0) -> v0:
v7 = [0] * v2.ndim
v8 = lis... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: bytes
Dependencies:
```python
def v0(v1: bytes, v2=4) -> bytes:
return len(v1).to_bytes(v2, 'big') + v1
```
```python
def v3(v4: int) -> bytes:
v5 = bytearray()
v6 = abs(v4)
v5.append(v6 & 63 | (192 if v4 < ... |
Imports:
```python
import weakref
import inspect
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: Callable[[v0], None]
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Callable[[v0], None]):
v3 = weakref.WeakMethod if inspect.ismethod(v2) else we... |
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) -> None:
if v2 is True and (not self.is_requested(v1)):
self.log.debug(f'Variable {v1} was NOT requested by downstream app.')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, float, float
Output Type: Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: float, v3: float) -> Dict[str, str]:
v4 = {'AC0': {'Description': 'Allele count is zero after filtering out low-confidence g... |
Imports:
```python
import numpy as np
from pandas._libs import Timedelta, hashtable as libhashtable, lib
import pandas._libs.join as libjoin
from pandas.errors import MergeError
from pandas.util._decorators import Appender, Substitution
from pandas.core.dtypes.common import ensure_float64, ensure_int64, ensure_object, ... |
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, v3, v4) = (v1[0], 0, 0)
for v5 in v1:
v2 = max(v2, v5)
if v5 >= 0:
v3 += v5
v4 = m... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Union[int, str], typing.Union[int, str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: typing.Union[int, str], v2: typing.Union[int, str]):
if v1 > v2:
return 1
elif v1 < v2:
return -1
... |
Imports:
```python
from random import getrandbits
from random import randrange
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0(v1: int, v2: int=40) -> bool:
v1 = int(v1)
if v1 == 1 or v1 == 2:
return True
if v1 % 2 == 0:
return False
... |
Imports:
```python
from inspect import signature, iscoroutinefunction
import typing
```
Type definitions:
Input Types: Callable, Any, Any
Output Type: Any
Dependencies:
```python
def v0(*v1):
v2 = list(signature(target).parameters.values())[skip:]
v3 = tuple((self.deliver(p.annotation, strict) for v4 in v2))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
if v1.isupper():
return '~'
return ''
``` |
Imports:
```python
import os, sys, multiprocessing, hashlib, ast, time, re
from fractions import Fraction
import matplotlib.pyplot as plt
import typing
```
Type definitions:
Input Types: str, Callable, bool
Output Type: Any
Dependencies:
```python
def v0(v1):
v2 = v1.split('_')[-1]
v2 = v2.split('.')[0]
v3... |
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.session
try:
v3 = v1()
v2.commit()
except:
v2.rollback()
raise
else:
return v3
``` |
Imports:
```python
import torch
from torch import Tensor
from torch import nn
import numpy as np
import typing
```
Type definitions:
Input Types: Dict[str, Tensor]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Tensor]):
v2 = v1['all_layer_embeddings']
v3 = v2[... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[bool, int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[bool, int]):
self.item.hook_implementation.enabled = bool(v1)
self.opacity.setOpacity(1 if v1 else 0.5)
self.on_changed.emit()
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Iterable
Output Type: 'Iterable'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Iterable) -> 'Iterable':
self.x = v1
return self
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Text
Output Type: Dict[Text, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Text) -> Dict[Text, Any]:
if not v1:
v2 = '{}'
elif v1[0] != '{':
v2 = '{' + v1 + '}'
else:
v2 = v1
r... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: str
v2: Optional[str] = None
v3: Optional[str] = None
```
Input Types: list[v0]
Output Type: None
Dependencies:
Function Name: v4
Function:
```python
def v4(self, cls: type, v5: list[v0]) -> None:
v6 = {a.name: a ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(PurePosixPath):
def v1(cls, v2: SFTPClient, v3: str, v4: SFTPAttributes=None):
v5 = super().__new__(cls, v3)
v5.client: SFTPClient = v2
v5.path: str = v3
v5._stat: SFTPAttributes = v4
return v5
de... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
(v2, v3) = v1.split('..')
for v4 in range(int(v2), int(v3) + 1):
yield v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: JavaParser.ClassBodyDeclarationContext
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: JavaParser.ClassBodyDeclarationContext):
v1.modifiers = []
return super().visitClassBodyDeclaration(v1)
``` |
Imports:
```python
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.ticker import StrMethodFormatter
import re
import numpy as np
from scipy.interpolate import RectBivariateSpline
import typing
```
Type definitions:
Input Types: Any, np.ndarray, float, str, int
Output Type: Any
Dependencies:
``... |
Imports:
```python
import typing
```
Type definitions:
```python
@attr.s(auto_attribs=True, on_setattr=DENON_ATTR_SETATTR)
class v0:
v1: DenonAVRDeviceInfo = attr.ib(validator=attr.validators.instance_of(DenonAVRDeviceInfo), default=attr.Factory(DenonAVRDeviceInfo), kw_only=True)
v2: bool = attr.ib(converter=bo... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Model):
v1: str
v2: str
v3: str
v4: Union[str, StatusEnum]
v5: str
def v6(self, v7: str) -> v0:
self.epic_games_item_id = v7
return self
def v8(self, v9: str) -> v0:
self.item_id = v9
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, Optional[str]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False, v2: Optional[str]=None) -> int:
v3 = self.for_pod_type(v2)
v4 = v3.inference_replication_factor if v1 else v3.replication_fa... |
Imports:
```python
import typing
```
Type definitions:
Input Types: TimedTask.TimedTask
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: TimedTask.TimedTask):
v1.gravestone = True
self.cleanHead()
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> str:
if v2[0].isalnum() and v2[-1].isalnum():
v3 = '\\b{}\\b'.format(re.escape(v2))
else:
v3 = re.escape... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
assert self.loader._use_gt_extrinsics
assert self.loader._use_gt_sfmtracks
assert self.loader._max_frame_lookahead == 2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, Any]) -> Dict[str, Any]:
for (v2, v3) in v1.items():
if len(v3) == 1:
v1[v2] = v3[0]
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = 'Tomasz changed content of the document [New doc edit](https://3.basecamp.com/3688623/buckets/2957043/documents/432522214).'
self._send_and_test... |
Imports:
```python
import torch
from torch import nn, Tensor
import typing
```
Type definitions:
Input Types: Union[Tensor, List[Tensor]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[Tensor, List[Tensor]]):
if isinstance(v1, (list, tuple)):
for v2 in v1:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: IGameState):
self.state = v1
self.edges = []
```
Input Types: v0
Output Type: Any
Dependencies:
```python
def v2(v3: v0):
for v4 in v3.edges:
self._add_node(subtree, v4.out_node)
v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str):
v3: int = 0
for v4 in range(len(v1)):
if v1[v4:].startswith(v2):
v3 += 1
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str, 'Environment', T.Optional[T.List[str]], T.Optional[T.List['Dependency']]
Output Type: T.Tuple[bool, bool]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: 'Environment', *, v5: T.Optional[... |
Imports:
```python
import pandas as pd
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin, MetaEstimatorMixin
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder
from sklearn... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = datetime.strptime(v1, '%d.%m.%Y %H:%M')
v3 = datetime.strftime(v2, '%d %B %Y year %H hours %M minutes')
if '1 hou... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types: asyncio.Queue, asyncio.Queue
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: asyncio.Queue, v2: asyncio.Queue) -> None:
v3 = []
while True:
v4 = await v1.get()
if v4 ... |
Imports:
```python
import os
from os.path import relpath
import typing
```
Type definitions:
Input Types: Text, Text
Output Type: Dict[Text, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text, v2: Text=DEFAULT_TRAINING_DATA_OUTPUT_PATH) -> Dict[Text, Any]:
if not os.path.exists(v1):
... |
Imports:
```python
import cv2 as cv
import numpy as np
import typing
```
Type definitions:
Input Types: cv.VideoCapture, int, int, "'low' or 'high'", "'lower' or 'upper'"
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: cv.VideoCapture, v2: int) -> np.ndarray:
if not isinstance(v1, cv.VideoCapture):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
super()._initialize_http()
self._unique_key_url = 'https://music.163.com/weapi/login/qrcode/unikey?csrf_token='
self._check_scan_url = 'https://m... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Dict[Point, int]
```
```python
v1 = Tuple[int, int]
```
```python
v2 = List[str]
```
Input Types: v2, v2
Output Type: int
Dependencies:
```python
def v3(v4: v0, v5: v2, v6: Any=1) -> v0:
v7 = v8 = 0
for v9 in v5:
v10 = v9[0]
v... |
Imports:
```python
import logging
import typing
```
Type definitions:
```python
class v0:
v1 = dict(all='noarch', amd64='x86_64')
v2 = (('clickhouse-client', 'all'), ('clickhouse-common-static', 'amd64'), ('clickhouse-common-static-dbg', 'amd64'), ('clickhouse-server', 'all'), ('clickhouse-test', 'all'))
d... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v1 = v1.replace(':=', '=')
v1 = v1.replace('<=', '=')
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: ast.AnnAssign
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: ast.AnnAssign) -> None:
if self._in_namedtuple and v1.value is not None:
self.namedtuple_defaults.append((v1.lineno, v1.col_offset))
... |
Imports:
```python
import torch
import torch.distributed as dist
from torch.distributed.algorithms.join import Join, Joinable, JoinHook
from torch.distributed.optim import functional_optim_map
from torch.optim import Optimizer
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {}
for v2 in self._context_fillers:
v3 = {'{}_{}'.format(self.name, k): v for (v4, v5) in v2().items()}
v1.update(v3)
return... |
Imports:
```python
import urllib
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> str:
if v1[0] != '/':
v1 = self.root + '/' + v1
v2 = urllib.parse.urlsplit(v1)
v3 = v2.path.split('/')
if len(v3) < 2:
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
v3 = np.empty(v2.shape[0], dtype=v2.dtype)
quaternion_rotation(v1, v2, v3)
return v3
```
Function Name: v4
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: int):
if v2 < 0 or v2 >= v1:
raise IndexError(f'start={v2} is out of bounds for sequence of size {v1}')
if v3 < v2 or v3 >... |
Imports:
```python
import pandas as pd
from xarray.core import duck_array_ops, formatting, utils
from xarray.core.dataarray import DataArray
from xarray.core.dataset import Dataset
from xarray.core.indexes import Index, PandasIndex, PandasMultiIndex, default_indexes
from xarray.core.variable import IndexVariable, Varia... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.capacity - sum(self.volume)
if v1 > 0:
self.score = -abs(v1 * 9)
elif v1 < 0:
self.score = -abs(v1 * 6)
else:
... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: int
Output Type: bytearray
Dependencies:
```python
def v0(v1: int=0, v2: int=10) -> int:
return random.randint(v1, v2)
```
Function Name: v3
Function:
```python
def v3(v4: int) -> bytearray:
v5 = bytearray()
for v6 in range(v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list):
v2 = []
for v3 in v1:
for (v4, v5) in zip(v3['codes'], v3['effective_at']):
v2.append((v4, v5))
return list(set(v2))
``` |
Imports:
```python
import gzip
import json
import typing
```
Type definitions:
Input Types: str
Output Type: Iterator
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> Iterator:
if v1.endswith('.gz'):
v2 = gzip.open(v1, 'rt')
else:
v2 = open(v1, 'rt')
for v3 in v2:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2=200):
if not isinstance(v1, str):
raise ValueError
self.figure.savefig(v1, dpi=v2)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Any
```
```python
v1 = List
```
Input Types: Any, v1[v0]
Output Type: v0
Dependencies:
Function Name: v2
Function:
```python
def v2(v3: Any, v4: v1[v0]) -> v0:
if v3.end < v4[0] or v3.start > v4[-1]:
return None
if v3.start < v4[0]:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray, int, int
Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: int, v3: int) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, bool
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float, v2: bool) -> float:
v3 = self.scenario.intensification_percentage
if v3 <= 0 or v3 >= 1:
raise ValueError('The value for intens... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> dict:
v2 = {'article_id': v1}
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, Callable[[int], int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: Callable[[int], int]) -> int:
for v3 in range(3):
v1 = v2(v1)
return v1
``` |
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.state['expect_segment'] = True
self.state['byterange'] = self.parse_byterange(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: object, dict, dict, Config.logger
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: object, v2: dict, v3: dict, v4: Config.logger) -> None:
if not v3:
return
try:
v5 = v1.conversations_repl... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, float
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: float=1e-10) -> float:
assert v1.ndim == 2, f'Expected array of dim 2, got {v1.ndim}'
assert np.all(v1.shap... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, Real
Output Type: Tuple[float, float]
Dependencies:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: bool=False) -> np.ndarray:
(v4, v5) = np.shape(v1)
if not v3:
v6 = np.zeros((v5, 2, 2))... |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.rnn import pad_sequence
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, torch.Tensor, bool, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: t... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[str]) -> str:
if v1 is None:
return ''
v1 = v1.lower()
return {'c++': 'cpp', 'objective-c': 'objc'}.get(v1, v1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: float
Output Type: np.matrix
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float) -> np.matrix:
(v2, v3) = (self.H, self.Q0)
return np.array([v2 / v3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> dict:
v2 = v1.shape[0]
v3 = [str(i + 1) for v4 in range(v2)]
v5 = {'name': v3}
return v5
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: ord_schema.FieldDescriptor, Union[ord_schema.Message, ord_schema.ScalarType], Tuple[str]
Output Type: Dict[str, ord_schema.ScalarType]
Dependencies:
```python
def v0(v1: ord_schema.Message, v2: Optional[Tuple[str]]=None) -> Dict[str, ord_schema.Scalar... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: str) -> None:
v5 = (v1, v2, v3)
self.expected_responses[v5] = v4
``` |
Imports:
```python
from pandas._libs.indexing import NDFrameIndexerBase
from pandas._libs.lib import item_from_zerodim
from pandas.errors import AbstractMethodError, InvalidIndexError
from pandas.util._decorators import doc
from pandas.core.dtypes.common import is_array_like, is_bool_dtype, is_hashable, is_integer, is_... |
Imports:
```python
import glob
import json
import os
import requests
import tarfile
from pathlib import Path
from tqdm import tqdm
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: Any
Dependencies:
```python
def v0(v1: str, v2: Path, v3: str, v4: int=8 * 1024, v5=False):
v6 = v2 / v3
... |
Imports:
```python
import argparse
import os
import typing
```
Type definitions:
Input Types: Optional[Sequence[str]]
Output Type: int
Dependencies:
```python
def v0(v1, v2: str, v3: bool, v4: Optional[bytes]) -> bool:
try:
with open(v2, mode='rb') as v5:
v6 = v5.readlines()
v7 = [p... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types: typing.Coroutine
Output Type: asyncio.Task
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: typing.Coroutine) -> asyncio.Task:
v2 = asyncio.get_event_loop()
return v2.run_until_complete(v1)
``` |
Imports:
```python
from PIL import Image
import os
import typing
```
Type definitions:
Input Types: str, np.ndarray, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: np.ndarray, v3: int, v4: int):
v5 = os.path.join(v1, str(v3))
if not os.path.exists(v5):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
super().mutate_weights()
if self.fito_genome.config.maex_counter != self.config.maex_counter:
self.fito_genome.config.update_mass_extinction(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool) -> None:
self.window_finish.start(v1)
self.stop()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='Chime') -> None:
if v1 not in self.sounds:
v1 = 'Chime'
self.sounds[v1].play()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> None:
v2 = self._get_partitions(v1)
for v3 in range(1, len(v2) + 1):
self.node.execute(f'(echo d; echo ; echo w) | {self.command} {v1}'... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='⮁\n') -> str:
if any(self.auxiliary_categories.values()):
v2 = [f'{aux_categorization} in {[c.codes[0] for v3 in sorted(categories)]}' for (v4,... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Tuple[Node, Node]
```
Input Types: Optional[Dict[v0, float]]
Output Type: Optional[List[List]]
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: Optional[Dict[v0, float]]) -> Optional[List[List]]:
if v2 is None:
return None
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: 'ConsoleOptions'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> 'ConsoleOptions':
v2 = self.copy()
v2.max_height = v2.height = v1
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.store_fetch_offers()
v2 = self.store_fetch_price()
v3 = []
v4 = []
v5 = []
for v6 in v1:
v7 = self.session.get(f'ht... |
Imports:
```python
from torch import nn, Tensor
import torch
import typing
```
Type definitions:
Input Types: Tensor, Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor, v2: Tensor):
v3 = self.score_dict[self._score_name](v1, v2)
v4 = nn.functional.softmax(v3, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> None:
self._init_prototypes(v1, v2)
self._init_relevances()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = '\nabc = 42\ndef modify(new_value):\n global abc\n abc = new_value\n'
v2 = self.compile_to_strict(v1)
self.assertEqual(v2.abc, 42)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[str]:
v1 = f'sitemap {self.sitemapname} label="{self.label}" {{'
v2 = [v1]
if self.children:
v2 += self.convert_to_string_child(self.... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
assert os.path.isabs(v1)
if not v1 in self._pluginsDirs:
self._pluginsDirs.append(v1)
self._loadPlugins()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str, int
Output Type: List[str]
Dependencies:
```python
def v0(v1: str, v2: int=4096) -> List[str]:
v3 = []
if utf8len(v1) > v2:
for v4 in range(0, len(v1), v2):
v3.append(v1[v4:v4 + v2])
else:
v3.append(v1... |
Imports:
```python
from functools import reduce
from operator import mul
import typing
```
Type definitions:
Input Types: Union[_MaxPoolNd, _AvgPoolNd], Tensor, Tensor
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[_MaxPoolNd, _AvgPoolNd], v2: Tensor, v3: Tensor) -> int:
if ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, np.array, np.array
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: np.array, v3: np.array) -> int:
if v1 < 0 or v1 > 3:
ValueError('color_index has to be within 0 and 3')
for v4 in v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List:
if not self.courses.items():
return [self.CWID, self.name, self.major, None, None, None, None]
else:
return [self.CWID, self.name, se... |
Imports:
```python
import numpy as np
import cvxpy as cvx
import typing
```
Type definitions:
Input Types: Any, Any, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3: float=1):
v4 = cvx.Variable(v1)
v5 = cvx.Parameter(v1, nonneg=True)
v5.value = v2
v6 = cvx.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[dict]
Output Type: List[dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[dict]) -> List[dict]:
v2: List[dict] = []
v3: List[str] = []
for v4 in v1:
if not v4['login'] in v3:
v3.append(v4['... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: bytes, int, str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes, v2: int, v3: str) -> int:
v4 = self.op2
v5 = self.size
v6 = np.frombuffer(v1[v2:], v4.idtype8)
v7 = np.fro... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Segmentation'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Segmentation'):
self.segmentation.pop(v1.id)
self.com.segmentation_list_changed.emit()
``` |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: Path, str
Output Type: Optional[Path]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str) -> Optional[Path]:
v3 = [(f, f.stat().st_mtime) for v4 in v1.glob(v2)]
v3.sort(key=lambda f: v4[1], reverse=Tru... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.