text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any, *v2: Iterable[Any]) -> None:
for v3 in v2:
assert not list(v3), 'Signal PCollection should be empty.'
self._run_component()
``` |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: int, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> int:
v3 = math.ceil(v2 / v1)
v4 = v2
for v5 in range(0, v1):
v4 -= v3 - self.shrink(v5, v3)
v4 = self.... |
Imports:
```python
import functools
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
(v3, v4) = v1
if v2.isspace():
return ('', max(v3, v4, key=len))
return (v3 + v2, v4)
```
Function Name: v5
Function:
```python
def v5(v6: str):
def... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Snapshot'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Snapshot') -> None:
v1.simulation = self
v1.initialize()
v1.update()
self.snapshots.append(v1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = np.random.rand() - 0.6
self._state = self.make_state(v1, 0.0)
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: Optional[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[int]):
if 'WORLD_SIZE' in os.environ and int(os.environ['WORLD_SIZE']) != v1:
raise ValueError(f"--world-size ({v1}) and WORL... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Scenario'
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Scenario') -> bool:
v2 = v1.attributes
return all((v2.get(k, None) == v for (v3, v4) in self.attributes.items() if v3 != 'id'))
``` |
Imports:
```python
from functools import partial
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self._get_selected_notes()
if v1:
self._modal.choose_color(partial(self._change_color, v1), initial_color=... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int=3000):
self.statusbar.showMessage(v1, v2)
return
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = []
for (v2, v3) in self.profiles.items():
for v4 in v3.mediatypes:
if v4 != '_internal':
if v2 == self.default... |
Imports:
```python
from pandas._config.config import get_option, set_option
from pandas._libs import lib
from pandas._libs.tslib import format_array_from_datetime
from pandas._libs.tslibs import NaT, Timedelta, Timestamp, iNaT
from pandas.core.dtypes.common import is_categorical_dtype, is_complex_dtype, is_datetime64_d... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, float, int, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: float, v4: int, v5: str):
self.method = v1
self.payload = v2
self.RTT = float('%.6f' % v3)
self.requestI... |
Imports:
```python
import typing
```
Type definitions:
Input Types: tg.types.User, bool, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: tg.types.User, v2: bool=False, v3: bool=False):
if v3:
return f'<user id="{v1.id}" first_name="{v1.first_name}" last_name="{v1.last_... |
Imports:
```python
import torch
from torch import fx, nn
from torch.fx.passes.shape_prop import ShapeProp
import typing
```
Type definitions:
```python
v0 = Any
```
```python
v1 = Callable[[fx.GraphModule, v0], fx.GraphModule]
```
Input Types:
Output Type: v1
Dependencies:
```python
def v2(v3: fx.GraphModule, v4: v0) ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Optional[str]:
v1 = self.get_owner()
return v1['owner_dag']
``` |
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 v3 is None:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: bytes) -> None:
assert isinstance(v1, (bytes, bytearray, memoryview)), 'data argument must be byte-ish (%r)' % type(v1)
if self._eof_sent:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[str], str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[str], v2: str) -> str:
v3 = []
v4 = []
for v5 in v1:
if v5 == v2:
return v5
elif v5.rsplit('.', 1)[-1]... |
Imports:
```python
import json
import os
import requests
import typing
```
Type definitions:
```python
@dataclass(frozen=True)
class v0:
v1: str
v2: int
v3: str
v4: States
v5: t.Optional[str]
v6: t.Optional[str]
```
Input Types: str, v0
Output Type: None
Dependencies:
```python
def v7() -> t.Dic... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'MultiAgentManager'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'MultiAgentManager':
v1 = self.list_agents(running_only=True)
self.stop_agents(v1)
return self
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3, v4, v5: bool=False):
v1.subheader('The number of infected and recovered individuals in the hospital catchment region at any given mom... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
```python
def v0(v1: bytes) -> int:
assert len(v1) >= 8
return int.from_bytes(v1[:8], byteorder='little', signed=False) & 18446744073709551615
```
```python
def v2(v3: bytes) -> int:
v4 = len(v3)
for ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: xr.DataArray, Union[str, Path], Optional[bool]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: xr.DataArray, v2: Union[str, Path], v3: Optional[bool]=True):
if v3:
v1.meca.to_wide_dataframe().to_csv(v2)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
```python
def v0(v1):
if v1:
if v1.missing_values:
v2 = data_source.literal_list(v1.missing_values)
validity_clauses.append(f'{column_name} IN {v2}')
v3 = v1.missing_format
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if len(self.component_config.get(self.CONFIG_FEATURES, [])) % 2 != 1:
raise ValueError('Need an odd number of crf feature lists to have a center ... |
Imports:
```python
from urllib.parse import urlencode
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any, Any, Any
Output Type: tuple
Dependencies:
```python
def v0(v1, v2, v3) -> Request:
return Request(method='GET', url=v1, params=v2, headers=v3)
```
```python
def v4(v5, v6, v7, v8=None, v9=None... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool):
for v2 in self.rootItem.children:
for v3 in v2.children:
v3.copy_data = v1
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: list
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> np.ndarray:
if len(v1) != 3:
raise ValueError('Expected a list of length 3.')
return np.array(v1[0], v1[1], v1[2])... |
Imports:
```python
import numpy
import typing
```
Type definitions:
Input Types:
Output Type: numpy.ndarray
Dependencies:
```python
def v0(v1: float, v2: int) -> float:
v1 += v2 / 2
v1 %= v2
v1 -= v2 / 2
if v1 <= -v2 / 2:
v1 += v2
return v1
```
Function Name: v3
Function:
```python
def v3(... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[discord.Member, discord.User]
```
Input Types: discord.Guild, v0
Output Type: bool
Dependencies:
Function Name: v1
Function:
```python
async def v1(self, v2: discord.Guild, v3: v0) -> bool:
if not v2.me.guild_permissions.ban_members:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = {'cmd': 'set/mode/heating', 'code': 0, 'status': 'heating'}
v2 = {'cmd': 'set/mode/cooling', 'code': 1, 'status': 'cooling'}
v3 = {'cmd': 'set/mode/dehumidification', 'code': 3, 'status': 'dehumidification'}
v4 = {'cmd... |
Imports:
```python
import os
import warnings
import numpy as np
import typing
```
Type definitions:
```python
v0 = Union[str, np.ndarray]
```
Input Types: v0
Output Type: bool
Dependencies:
```python
def v1(v2: np.ndarray) -> bool:
return False if v2.dtype != 'float32' else not v2[:, 1].any()
```
```python
def v3(v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Sequence[int], str, Client
Output Type: List[FriendRequest]
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: Sequence[int], v2: str='inbox', *, v3: Client) -> List[FriendRequest]:
assert v2 in ('sent', 'inbox')
v4 = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {}
if hasattr(self, 'channel'):
v1['channel'] = self.channel
if hasattr(self, 'ext_tx_id'):
v1['extTxId'] = self.ext_tx_id
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
self.mouse_state = self.kMouse_left_down
if self.unplayed_area_surface_rect.collidepoint(v1.pos):
self.handle_click_in_unplayed_area(v... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclasses.dataclass
class v0:
v1: Callable
v2: Optional[Type[MidiMessage]]
v3: Optional[int]
v4: bool = False
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v5
Function:
```python
def v5(self, v6: v0):
v7 = self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Route'
Output Type: List[openapi.Parameter]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Route') -> List[openapi.Parameter]:
v2 = []
for (v3, v4) in self._query_arguments(v1):
v5 = self._convert_argument_to_o... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if (v1.startswith("'") or v1.startswith('"')) and (v1.endswith("'") or v1.endswith("'")):
v1 = v1[1:-1]
if self.data_type == str:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
```python
def v0(v1: bool=False):
v2 = '`@gargbot_3000 hvem [spørsmål]`: svarer på spørsmål om garglings \n`@gargbot_3000 pic [lark/fe/skating/henging] [kun] [gargling] [år]`: random bilde\n`@gargbot_3000 forum [ga... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.bands = self.__src_data.RasterCount
self.width = self.__src_data.RasterXSize
self.height = self.__src_data.RasterYSize
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Response
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None) -> Response:
v2 = {'message': v1}
return self.PostRequest('bluetooth/rfcomm/sendmessage', json=v2)
``` |
Imports:
```python
from datetime import date, timedelta
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> bool:
v2 = None
try:
v2 = date.fromisoformat(v1)
except Exception:
v2 = None
if v2 is No... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Any
```
Input Types: Dict[str, Any], v0, str
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Dict[str, Any], v3: v0, v4: str):
if not v2:
return
if v4 in v3:
v3[v4]['failed'] += v2['faile... |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
```python
class v0:
v1 = {}
def __init__(self, v2: str, v3: str, v4: Optional[List['SlateLineupExperimentModel']]=None):
self.id = v2
self.description = v3
self.experiments = v4 or []
@staticmeth... |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types: IO | None
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: IO | None=None) -> None:
if v1 is None:
v1 = sys.stdout
v2 = []
v2.append('xarray.Dataset {')
v2.append('dimensions:')... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> str:
v2 = v1.group('pre')
v3 = v1.group('size')
v4 = v1.group('color')
v5 = v1.group('post')
if v4 is None or v4 == 'ffffff':
v6 = ''
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[float, int]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[float, int]) -> str:
v2 = int(v1)
v3 = ['th', 'st', 'nd', 'rd', 'th'][min(v2 % 10, 4)]
if 11 <= v2 % 100 <= 13:
v3 = 'th'
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self: object, v1: dict, **v2):
for (v3, v4) in v2.items():
if v3 in v1:
v1[v3] = v4
else:
raise KeyError('Key: {}, can not be... |
Imports:
```python
import torch
from torch.utils.data import Dataset
import typing
```
Type definitions:
Input Types: torch.tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.tensor):
v2 = torch.empty(size=[v1.size()[0], 3])
v2[:, 0] = v1[:, 0]
v2[:, 1] = v1[:, 1]... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if not self._not_logged:
self._refresh_token()
if not (self._disconnected or self._not_logged):
return True
if self._not_logged:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict[str, Any]:
v1 = {'cirq_type': self.__class__.__name__, 'parity_keys': sorted(self.parity_keys), 'coordinate_metadata': self.coordinate_metadata}... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: nn.Module
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> nn.Module:
for v2 in self.models:
if v2.tag == v1:
return v2.model
``` |
Imports:
```python
from scipy.optimize import minimize
from scipy.spatial.transform import Rotation as R
from scipy.spatial.transform import Slerp
import typing
```
Type definitions:
Input Types: Union[List[float], np.ndarray], Union[List[float], np.ndarray]
Output Type: Any
Dependencies:
Function Name: v0
Function:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[str, Path]
Output Type: List[Tuple[int, int, int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[str, Path]) -> List[Tuple[int, int, int]]:
with open(str(v1), 'r', encoding='utf-8') as v2:
v3 = set()
f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, list, float, bool
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: list, v3: float, v4: bool=True) -> int:
(v5, v6, v7, v8, v9, v10) = self.simulateTransfersByUtility(v1, v2, v3, v4)
return v... |
Imports:
```python
import copy
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict):
if v1['freestanding']:
return v1
v1 = copy.deepcopy(v1)
v1['cflags'] += ' -fsanitize=address -fsanitize=undefined'
v1['cxx... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[tf.train.Example, tf.train.SequenceExample, bytes]
```
```python
v1 = TypeVar('_K')
```
Input Types: List[Tuple[v1, v0]]
Output Type: Iterable[Tuple[v1, prediction_log_pb2.PredictionLog]]
Dependencies:
Function Name: v2
Function:
```python
def... |
Imports:
```python
import numpy
from numpy.polynomial import polynomial
import typing
```
Type definitions:
Input Types: numpy.ndarray
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: numpy.ndarray) -> Tuple[float, float]:
v2 = numpy.min(v1)
v3 = numpy.max(v1)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: discord.ext.commands.Context
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: discord.ext.commands.Context) -> str:
try:
if v1.command.full_parent_name:
v2 = f'{v1.command.full_parent_name} '
... |
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(v3: v0) -> [int]:
v4 = []
v5 = []
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[str], Optional['SCMInfo'], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: Optional[str], v3: Optional['SCMInfo']=None, v4: str=_TEMPLATE) -> None:
v5: Dict[str, Any] = {'version': v2}
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
(v2, v3) = (False, False)
for v4 in v1:
if v4.isalpha():
v2 = True
if v4.isdigit():
v3 = True
if ... |
Imports:
```python
import textwrap
from collections import defaultdict
import typing
```
Type definitions:
```python
v0 = Dict
```
```python
v1 = Dict[str, List[v0]]
```
Input Types: List[v0]
Output Type: str
Dependencies:
```python
def v2(v3: v1) -> str:
return textwrap.indent('\n'.join((f"{package}: {' '.join((v[... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Collection[str]
Output Type: Set
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Collection[str]) -> Set:
v2 = set()
for v3 in v1:
v4 = v3.replace('ape_', '')
v2.add(v4)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
self.worker_ip = v1
self.worker_node = self._get_kubernetes_node_by_ip(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> float:
v1 = 0.0
for v2 in range(len(self._anomalies)):
v3 = self._anomalies[v2]
v4 = self._ambiguous_inst[v2]
v5 = self._sum_of_fu... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame, Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2=None, v3: str=None):
if v2 is None and v3 is None:
raise ValueError('time_descriptor and index_attribute cannot be bot... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float) -> None:
v2 = self.root_instrument.horizontal.sample_rate()
v3 = int(v2 * v1)
self.set_trace_length(v3)
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: Optional[str], Optional[str]
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[str], v2: Optional[str]) -> Optional[str]:
if v1 is None:
return None
if v2 is None:
ret... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> int:
v2 = self.get_device_property(v1, 'aquarea_cool_consumption')
if v2:
return int(v2)
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes, v2=()):
self.buf.write(v1)
self.fds.extend(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, int, int, Path, Path
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: int, v3: int, v4: Path, v5: Path) -> None:
v6 = 'Multiple sequences file (source): {0}\nNumber of individual sequences read from... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, List[str], List[str]
Output Type: Callable
Dependencies:
```python
def v0(v1):
def v2(*v3, **v4):
v5 = v1(*v3, **v4)
return v5
v2.IS_VALIDATOR = True
v2.VALIDATOR_KIND = kind
v2.args = v1.__code__.co_varnames[:v1.... |
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 v1 not in self._decor_enabled.keys():
raise IndexError(f'decoration<"{v1}"> was not found')
return self._decor_enabled[v1]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list[list[Scalar]], str, str
Output Type: list[list[Scalar]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list[list[Scalar]], v2: str, v3: str) -> list[list[Scalar]]:
v4 = []
for v5 in v1:
v6 = []
for (... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> str:
v2 = v2.encode('utf-8')
with open(v1, 'wb') as v3:
v3.write(v2)
v4 = hashlib.sha1()
v4.update(v2)
re... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(abc.ABC):
v1 = ()
@abc.abstractmethod
def v2(self, v3: Request):
raise NotImplementedError
@staticmethod
def v4() -> Iterable[Mapping]:
return ()
@staticmethod
def v5() -> Iterable[Tuple[str, Mapping... |
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 = '0123456789'
v3 = ''
v4 = ['']
v5 = [1]
v6 = ''
for (v7, v8) in enumerate(v1):
if v8 in v2:
v6 += ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int=1):
for v4 in range(v3):
self.queues[v2][v1].task_done()
``` |
Imports:
```python
import logging
import sklearn
from sklearn.metrics import precision_recall_fscore_support, make_scorer
import numpy as np
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: float
Dependencies:
```python
def v0(v1, v2) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
(v3, v4, v5)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, datetime.time
Output Type: Any
Dependencies:
```python
def v0(v1):
v1._daily_run_name_decorator = name
v1._daily_run_time_decorator = time
return v1
```
Function Name: v2
Function:
```python
def v2(v3: str, v4: datetime.time):
de... |
Imports:
```python
import numpy as np
from numpy import vectorize, ndarray
import typing
```
Type definitions:
Input Types: Union[ndarray, float], float
Output Type: Union[ndarray, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[ndarray, float], v2: float=1.0) -> Union[ndarray, float]:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Set[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> Set[str]:
v2 = set()
for v3 in ('makedepends', 'makedepends_{}'.format('x86_64' if self.x86_64 else 'i686'), 'depends', 'depends_{}'.form... |
Imports:
```python
from collections import deque
import typing
```
Type definitions:
Input Types: str, str
Output Type: []
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str=None) -> []:
v3: list = list()
if v1 not in self.adj_list:
return v3
if v2 not in self.adj_li... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: dict, list
Output Type: pd.DataFrame
Dependencies:
```python
def v0(v1: pd.DataFrame, v2: list) -> pd.DataFrame:
for v3 in v2:
if v3 in v1.columns:
v1.drop(columns=[v3], inplace=True)
v1.dropna(inplace=Tr... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, Optional[str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: Optional[str]=None) -> None:
v3 = self.path_to_save / v2
v4 = v1.get('is_video')
if not v2:
v2 = v1.get('perma_su... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[int, Optional[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[int, Optional[int]]:
if not self.profiling_enabled():
return (0, 0)
return (self['profiling']['begin_on_batch'], self['p... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Dict[str, Tuple[Callable, Any]]
```
Input Types: List[str], v0
Output Type: Tuple[List[str], str, Any]
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: List[str], v3: v0) -> Tuple[List[str], str, Any]:
v4: List[Tuple[List[str], str... |
Imports:
```python
import re
import typing
```
Type definitions:
```python
@dataclasses.dataclass
class v0:
v1: str
v2: GuardSource
v3: Callable
def v4(self):
return hash((self.name, self.source, id(self.create_fn)))
def v5(self):
return (self.source.value, len(self.name), self.nam... |
Imports:
```python
import typing
```
Type definitions:
Input Types: type
Output Type: typing.Tuple[type, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: type) -> typing.Tuple[type, str]:
try:
v2 = v1.__name__
except AttributeError:
v2 = v1.__origin__.__name__
return v2
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[PullRequest.PullRequest, Issue.Issue]
```
Input Types: str, Dict[int, v0], Dict[int, List[Issue.Issue]], Dict[int, Set[str]]
Output Type: Any
Dependencies:
```python
def v1(v2: str, v3: Dict[str, Any], v4: bool=True, v5: bool=False) -> str:
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[_TableStream, Literal['ERROR']]
```
Input Types: Union[v0, None]
Output Type: None
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Union[v0, None]) -> None:
for v3 in self._table_q_subscribers:
v3.put_nowait(v2... |
Imports:
```python
from base64 import b64encode
import typing
```
Type definitions:
Input Types: str, List[Tuple[str, int, str]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: List[Tuple[str, int, str]]):
v3 = b64encode(v1.encode('ascii')).decode('ascii')
for (v4, v5,... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self):
"""
The constructor initializes a new builder with no items in the population and runs in constant time.
"""
self.__heap: list[Weighted] = []
self.__weight_sum: float = 0
def ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int):
v3 = self.find(v1)
v4 = self.find(v1)
if v3 == v4:
return True
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int):
if v1 < 0 or v1 >= self._num_layers:
raise ValueError(f'Cross-layer index {v1} is out of valid range. Expected to be within [0, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: MySqlBaseParser.KeywordsCanBeIdContext
Output Type: Any
Dependencies:
```python
def v0(v1, v2=None):
if debug:
print(v1, v2)
```
Function Name: v3
Function:
```python
def v3(self, v4: MySqlBaseParser.KeywordsCanBeIdContext):
v0('visitK... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, str
Output Type: md.Trajectory
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: str='min_rmsd') -> md.Trajectory:
if v1 == 0:
raise ValueError('process_num must be >=1. Processes are indexed from 0 (stati... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: str
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, **v2) -> pd.DataFrame:
v3 = self._download_data(v1)
return pd.read_csv(v3, **v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.make_target_with_origin([self.needs_config_source])
(v2, v3) = self.run_isort([v1], config='[settings]\ncombine_as_imports=True\n')
ass... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.