text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int, int, int, int, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int, v4: int, v5: int, v6: int, v7, v8):
v9: int = 0
v10: str = ' '
if v1 != -1:
v9 = v... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, Any, Any
Output Type: np.float64
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3=None, v4=None) -> np.float64:
v5 = 1
v6 = 1
if v3 is not None:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int) -> str:
v3 = v2 * 2
v4 = list(v1)
for v5 in range(len(v1) // v3 + 1):
v6 = v3 * v5
v7 = min(v6 + v2 - 1, len(v1) ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool, int, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=False, v3: int=None, v4: str=None, v5: str=None):
self.check_if_id_exists(v1)
v6 = {'id': v1, 'type': 'Input.Text', '... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Matcher):
def __init__(self, v1: dict[str, Any], v2: 'Scheme') -> None:
super().__init__(v1)
self.border_color: Color = Color(v2.get_color(v1['border_color']))
self.color: Color = v2.get_color('road_color')
if... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: int
Dependencies:
```python
def v0(v1, v2, v3, v4, v5):
for v6 in v2[v1[-1]]:
v7 = v1 + [v6]
if v6 == 'start':
continue
elif v6 == 'end':
v3.append(v7)
else:
... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0() -> List[str]:
v1 = ['Name']
v2 = pd.read_csv('files/tickers.csv', usecols=v1)
v2 = v2['Name']
return v2.tolist()
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T', bound='SdkParser')
```
Input Types: str
Output Type: str
Dependencies:
Function Name: v1
Function:
```python
def v1(self: Type[v0], v2: str) -> str:
if v2 == 'std::vector<std::pair<std::basic_string<char>, std::basic_string<char> >,... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: float, Optional[int]
Output Type: Tuple[float, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: Optional[int]=None) -> Tuple[float, str]:
v3 = {-15: 'f', -12: 'p', -9: 'n', -6: 'µ', -3: 'm', 0: '',... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dt.date, bool
Output Type: Optional[Union[str, Tuple[str, str]]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dt.date, v2: bool) -> Optional[Union[str, Tuple[str, str]]]:
v3 = self.get_calendars_on(v1)
if len(v3) == 0:... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> DataFrame:
self._check_file_exist(filepath=self.filepath)
return self._load(filepath=self.filepath)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, **v2):
if self.consent:
pass
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, str], List[str]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, str], v2: List[str]) -> bool:
v3 = v1.get('tags', [])
if len(v3) == 0:
return False
return not set(v3).isdisjoint... |
Imports:
```python
import random
import warnings
import typing
```
Type definitions:
Input Types: str, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2=False, v3=False, v4=None):
if type(v4) != int:
warnings.warn('int based key is preferred for ra... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> None:
with open(self.filename, 'w+') as v2:
v2.write('#!/usr/bin/env python3\n')
for v3 in v1:
v2.write(v3 + '\n')
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
if v1.startswith('AWS Account'):
return '111122223333'
if v1.startswith('AWS Region'):
return 'us-west-2'
if v1.startswith('U... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Callable[[Any], bool], Optional[Any]
Output Type: Optional[Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Callable[[Any], bool], v2: Optional[Any]=None) -> Optional[Any]:
v3 = next(filter(v1, self.image), v2)
return... |
Imports:
```python
import cv2
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2=0, v3=True) -> list:
v4 = []
if self.results.multi_hand_landmarks:
v5 = self.results.multi_hand_landmarks[v2]
f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=1 / 60):
super().update(v1)
v2 = self.state
if v2 == 'wander':
self.state_wander()
elif v2 == 'move_to':
self.state_move... |
Imports:
```python
import typing
```
Type definitions:
Input Types: PosixPath
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: PosixPath) -> None:
v2 = ['timeline']
try:
v1.mkdir()
except FileExistsError:
pass
for v3 in v2:
try:
v4 = ... |
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 = len(v1)
v3 = []
for v4 in range(v2):
if v3.count(v1[v4]) > 0:
continue
while v3 and ord(v1[v4]) < ord(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
if self.eop():
raise Exception(f"EOP at {self.index}. Program is empty, isn't it?")
v1 = self.program[self.index]
if not v1.isdigit():
... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: dict
v2: str
@property
def v3(self) -> Any:
try:
return self.where[self.name]
except KeyError:
raise RuntimeError(f'attempted to get property `{self.name}` of `{self.where}`... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: tf.Tensor, tf.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tf.Tensor, v2: tf.Tensor):
v1 = tf.cast(v1, dtype=tf.float32)
v2 = tf.cast(v2, dtype=tf.float32)
v3 = v1 > ... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if not isinstance(v1, int):
raise TypeError('the parameter t should be a natural number')
if v1 < 0 or v1 > self.__max_pdf_cdf... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, str, int
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: str='auto', v3: int=4) -> dict:
if v2 == 'auto':
if v1 < 60:
v4 = round(v1, v3)
v5 = 'seconds'
elif v1... |
Imports:
```python
import torch
from sklearn.preprocessing import normalize as sklearn_normalize
import typing
```
Type definitions:
Input Types: torch.LongTensor, Optional[scipy.sparse.csr_matrix], Optional[scipy.sparse.csr_matrix], int
Output Type: torch.FloatTensor
Dependencies:
Function Name: v0
Function:
```pyth... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.array
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.array):
v2 = {}
if self.three_d_window.selected_points is not None:
v3 = self.three_d_window.id[self.three_d_window.s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> str:
v2 = self.run(['remove', str(v1)])
return v2.stdout.decode('utf-8')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: discord.Message
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: discord.Message):
if v1.author == self.user:
return
await v1.channel.send(f'你在 {v1.channel} 說: {v1.content}')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2=False) -> int:
for v3 in v1:
if v3 == 0:
pass
elif v3 == 1:
self.speed += self.__accelerator
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: BaseEstimator
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: BaseEstimator):
for v2 in self.instrumentor.methods:
self._assert_instrumented_method(estimator=v1, method_name=v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tensor
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tensor) -> Tensor:
v2 = layers.ReLU()(v1)
v3 = layers.BatchNormalization()(v2)
return v3
``` |
Imports:
```python
import inspect
from typing import TypeVar, Generic
import typing
```
Type definitions:
Input Types: property
Output Type: Any
Dependencies:
```python
def v0(v1):
v2 = inspect.signature(v1).return_annotation
try:
v3 = inspect.signature(target.fget).return_annotation
except Attribu... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Observable):
def __init__(self, v1: List[Line], v2=None):
Observable.__init__(self)
if len(v1) == 0:
raise AttributeError('Need at least one point')
self.part_id = v2 or uuid4().hex
self._lines = v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, torch.Tensor]
Output Type: Dict[str, torch.Tensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, torch.Tensor]) -> Dict[str, torch.Tensor]:
v1[self.get_output_name('embedding')] = self.dropout(self.embed... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict) -> str:
v2 = v1['request']['intent']['slots']
v3: str = v2['commandA']['value']
v4: Optional[str] = v2.get('commandB', {}).get('value', None)
r... |
Imports:
```python
import datetime as dt
import typing
```
Type definitions:
Input Types: str, str
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> float:
v3 = dt.datetime.strptime(v2, '%Y-%m-%d %H:%M:%S') - dt.datetime.strptime(v1, '%Y-%m-%d %H:%M:%S')
return... |
Imports:
```python
import pickle
from datetime import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Any:
try:
v2 = self._conf.get_option(v1, 'refresh', '0')
v3 = int(datetime.utcnow().time... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
if self._pool:
v1 = self._pool
self._pool = None
await v1.close(10)
self.log.debug('Closed connection pool %s with ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes, int, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes, v2: int, v3: int) -> int:
v4 = len(v1)
if v1[v3 - 2] != 2:
raise ValueError('scalar must be an integer')
v5 = v1[v3 - 1]
if... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None):
v2 = {'Content-Type': 'application/json'}
v3 = None
v4 = self.config.get_team(v1 or self.default_team, raise_on_inval... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float) -> float:
v2 = round(v1, 3)
if not -2800 <= v2 <= 2800:
self.connection.raise_exception(f'Invalid {self.alias!r} wavelength of {v1} n... |
Imports:
```python
import asyncio
from datetime import date, datetime, time as time_, timedelta, timezone
import typing
```
Type definitions:
Input Types: Union[time_, datetime], Union[time_, datetime], float
Output Type: Iterator[datetime]
Dependencies:
```python
def v0(v1: Union[time_, datetime]) -> datetime:
if... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Operation):
v1: str = '/lobby/v1/admin/notification/namespaces/{namespace}/templates/{templateSlug}'
v2: str = 'GET'
v3: List[str] = ['application/json']
v4: List[str] = ['application/json']
v5: List[List[str]] = [['BEARER_AUT... |
Imports:
```python
from bisect import bisect_left, bisect_right
import typing
```
Type definitions:
```python
v0 = TypeVar('_T')
```
Input Types: Sequence[v0], v0
Output Type: int
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: Sequence[v0], v3: v0) -> int:
v4 = bisect_left(v2, v3)
if v4 != len(... |
Imports:
```python
from sys import platform
import os
import sys
import webbrowser
import subprocess
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
while v1 and (not os.path.isdir(v1)):
(v1, v2) = os.path.split(v1)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.removed_fatherships:
for v1 in self.removed_fatherships:
if v1[2].age >= 18 and self.random.random() < 6 / v1[0]:
... |
Imports:
```python
import copy
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
@icontract.require(lambda _ARGS: True)
def v0(v1: Any) -> None:
pass
```
Function Name: v2
Function:
```python
def v2(self) -> None:
v3 = None
v4 = None
def v5(v6: Tuple[Any, ...]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: (True, str) or (False, int)
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> (True, str) or (False, int):
if not self.corresponds_to_keyboard(v1):
raise Exception
v2 = v1.split(self.SEPARAT... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3):
v4 = self.target_config_manager.get_sources_base_directory(v3, self.config)
self.class_files_helper.rename_class_source(v1,... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: np.darray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame) -> np.darray:
v2 = v1.dropna(how='any').mean(axis=1)
v3 = np.log(v2 + 1)
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: Optional['BSP']
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> Optional['BSP']:
if not self.contains(v1, v2):
return None
for v3 in self.children:
v4 = v3.find_node(... |
Imports:
```python
import difflib
import itertools
import typing
```
Type definitions:
Input Types: List[str], List[str], str, str, int, Any, Any, Any, Any, Any
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
v3 = v1 + 1
v4 = v2 - v1
if v4 == 1:
return str(v3)
if not v4:
v3 -= ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: SixMansQueue
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: SixMansQueue):
v2 = '{}'.format(', '.join([player.mention for v3 in v1.queue.queue]))
if v2 == '':
v2 = 'No players currently in the qu... |
Imports:
```python
import inspect
import typing
```
Type definitions:
Input Types: object, list, str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: object, v2: list, v3: str, v4):
if v3 not in ['method', 'function']:
return None
v5 = inspect.getsource(v1).st... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=HTTPStatus.OK, v2: dict={'Content-type': 'application/json'}):
self.send_response(v1)
for v3 in v2.items():
self.send_header(*v3)
... |
Imports:
```python
import os, sys
import glob
import shutil
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = self.comm.project.current_iteration
if self.comm.project.inversion_mode == 'mini-batch':
v3 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: ast.ImportFrom
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: ast.ImportFrom) -> None:
if v1.module == 'collections.abc':
v2 = v1.names
if any((cls.name == 'Set' for v3 in v2)):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes):
if self.msg is not None:
self.msg.body += v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if not hasattr(self, '_attributes'):
self._attributes = []
return
assert isinstance(v1, str) and v1 is not None and v1.isalnum(), ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'Tabular'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v1: Iterable[Color]) -> 'Tabular':
v2 = self.get_columns()
for (v3, v4) in zip(v1, v2):
v4.set_color(v3)
return self
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=True):
v2 = self.orientation
if v1:
v2 += 1
else:
v2 += -1
v3 = v2 % len(self.field_with_rotations)
self.orientation =... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: os.PathLike
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: os.PathLike):
v1 = Path(v1)
with v1.open(mode='r') as v2:
for (v3, v4) in enumerate(v2, start=1):
s... |
Imports:
```python
import binascii
import typing
```
Type definitions:
Input Types: bin
Output Type: bin
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bin) -> bin:
self.ws.send(str(binascii.hexlify(v1)))
v2 = binascii.unhexlify(self.ws.recv()[2:-1])
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'SweepCopy'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'SweepCopy':
if self.crossMinimizer.isDeterministic:
return self.currentlyBestNodeAndPortOrder
else:
return self.bestNodeAndPortOrde... |
Imports:
```python
from typing import TYPE_CHECKING, Hashable, Literal, Sequence, cast, final
import numpy as np
from pandas._libs import algos, hashtable as htable, iNaT, lib
from pandas._typing import AnyArrayLike, ArrayLike, DtypeObj, IndexLabel, TakeIndexer, npt
from pandas.util._decorators import doc
from pandas.u... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, requests.Session
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: requests.Session) -> dict:
v3 = v2.get(url=f'{v1}/licensing/productKeys')
v4 = v3.json()
return v4
``` |
Imports:
```python
import numpy as np
import logging
import typing
```
Type definitions:
Input Types: dict
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict) -> list:
v2 = []
if bool(v1) and len(list(v1.keys())) > 0:
v3 = list(v1.keys())
v4 = len(v3)
... |
Imports:
```python
import re
import subprocess
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str, v2: str, v3: List[str], v4: str, v5: bool, v6: bool):
self.name = v1
self.min_version = v2
self.command = v3
self.version_regex_pattern = v4
sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Response, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Response, v2: str, v3: str) -> None:
v4: Any = v1.json()
v5: str = ''
if 200 <= v1.status_code < 300:
return
if 'message... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
assert len(v1) == 1
if v1 == '\n':
self.x = 1
self.y += 1
if self.x > self.w:
self.x = 1
self.y += 1
if se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, BinaryIO
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: BinaryIO) -> dict:
v3 = f'file-{str(len(self.file_uploads))}'
v4 = v2.read().decode('utf-8')
self.file_uploads[v3] = {'headers':... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = 'MISS' in v1
v3 = v1.split(' ')
return v3[1] if v2 else v3[0]
``` |
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.stepping = False
self.interact = False
``` |
Imports:
```python
from datetime import timedelta
import typing
```
Type definitions:
```python
v0 = Union[timedelta, DDS_Duration_t, int]
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0):
if isinstance(v2, timedelta):
v3 = v2 // timedelta(seconds=1)
... |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
Input Types: list, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2: str):
v3 = self._parse_sightings(v1)
if 'sighting' in v3:
v4: defaultdict = defaultdict(int)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: [int]
Output Type: [[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: [int]) -> [[int]]:
v2 = []
v1.sort()
for v3 in range(0, len(v1) - 2):
if v3 > 0 and v1[v3 - 1] == v1[v3]:
continue
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Callable[..., np.ndarray], Callable[..., int], float, float, int, int, int, int
Output Type: [float, np.ndarray]
Dependencies:
```python
def v0(v1):
return raised_density_func(v1) / division_factor
```
```python
def v2(v3: Calla... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple, str, List[str], List[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple, v2: str, v3: List[str], v4: List[int]):
v5 = min(self._capacity, len(v3)) if self._capacity >= 0 else len(v3)
return... |
Imports:
```python
import sys
from os import environ, stat, chmod
from os.path import dirname, realpath
from os import remove
from shutil import copyfile
from pathlib import Path
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0() -> str:
return environ.get('APP_DIR... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str, str, str, str, Any, t.List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str='pdq', v4: str='photo', v5='', v6: t.List[str]=[]):
v7 = {'content_id': v1, 'content_type... |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[List[str]]
Dependencies:
```python
def v0(v1: str, v2: str):
if len(v1) != len(v2):
return False
v3 = Counter(v1)
for v4 in v2:
v3[v4] -= 1
for v5 in v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if isinstance(v1, str) and v1 and self.base.strip:
v1 = v1.strip()
super().force_set(v1)
``` |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
import typing
```
Type definitions:
Input Types: Tensor, Tensor, float, List[int], float
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tensor, v2: Tensor, v3: float, v4: ... |
Imports:
```python
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from datetime import datetime
import typing
```
Type definitions:
Input Types: tp.Union[str, datetime]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1... |
Imports:
```python
import array
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> int:
v2: int = 0
for v3 in v1['glyf'].glyphs.values():
v3.expand(v1['glyf'])
if hasattr(v3, 'program') and v3.program.bytecode... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[pd.DataFrame, ks.DataFrame], Union[pd.Series, ks.Series]
Output Type: Tuple[Union[pd.DataFrame, ks.DataFrame], Union[pd.Series, ks.Series]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[pd.DataFrame, ks.DataFrame], ... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, dict
Output Type: Response
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: dict=None) -> Response:
v3 = os.path.join(self.api, v1)
v2 = self.__prepare_data(v2)
v4 = self.session.post(v3, data=v... |
Imports:
```python
from ..logging import default_logger
import numpy as np
import typing
```
Type definitions:
Input Types: Callable, Any
Output Type: Callable
Dependencies:
```python
def v0(v1: Union[Iterator[Any], List[Any], np.ndarray], v2: int=0) -> int:
if isinstance(v1, np.ndarray):
v3 = v1.shape[v2]... |
Imports:
```python
import sys
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: typing.NoReturn
Dependencies:
```python
@nb.njit
def v0(v1: int) -> int:
v2 = v1 & -v1
v3 = v1 + v2
return (v1 & ~v3) // v2 >> 1 | v3
```
```python
@nb.njit((nb.i8,) * 4 + (nb.i8[:, :],), cache=T... |
Imports:
```python
import typing
```
Type definitions:
Input Types: nodes.NodeNG
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: nodes.NodeNG) -> str:
if self._py310_plus or 'annotations' in v1.root().future_imports:
return ''
return ". Add 'from __future__ import... |
Imports:
```python
from copy import copy
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1: Dict[str, DbtNode] = {}
for v2 in self.persisted_node_map:
v3 = copy(self.persisted_node_map[v2])
v4 = []
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> float:
v2 = self.lookup_data().df
try:
return v2.loc[v2['metric_name'] == v1].iloc[0]['mean']
except IndexError:
raise Val... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = u':notebook: TomaszKolek renamed user story from UserStory to **UserStoryNewSubject**.'
self.send_and_test_stream_message('userstory_changed_sub... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=1) -> bool:
if self.left_literal is not None and int(self.left_literal) > 9:
self.split_left()
self.explode(v1)
return True
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> bool:
(v3, v4) = self._size
if 0 <= v1 < v3 and 0 <= v2 < v4:
return self._grid[v1][v2] == '#'
else:
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> str:
v2 = f'"{v1.from_db}"."{v1.from_schema}"'
v3 = f'"{v1.to_db}"."{v1.to_schema}"'
v4 = []
for v5 in range(len(v1.from_cols)):
v4.append(... |
Imports:
```python
from string import Template
import typing
```
Type definitions:
Input Types: neo4j.Session, List[Dict], str, str, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: neo4j.Session, v2: List[Dict], v3: str, v4: str, v5: int) -> None:
v6 = Template('\n UNWIND {... |
Imports:
```python
import math
from typing import Callable, List, Tuple, cast
import typing
```
Type definitions:
Input Types: float, bool, bool
Output Type: Tuple[float, str, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: bool=True, v3: bool=False) -> Tuple[float, str, float]:
v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.