text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> list:
v2 = []
if self.is_empty() or v1 > self.height():
return v2
elif v1 == 1:
v2.append(self._root)
return v2
... |
Imports:
```python
import numpy as np
from numpy.linalg import norm
import typing
```
Type definitions:
Input Types: float, np.ndarray, np.ndarray, np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: np.ndarray, v3: np.ndarray, v4: np.ndarray):
v5 = v2.copy()
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str], Any
Output Type: NoReturn
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None, v2=True) -> NoReturn:
v3 = self.__browser_options
v3.headless = False
if v1 is not None:
self.__veri... |
Imports:
```python
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import ListedColormap
import typing
```
Type definitions:
Input Types: Dict[str, Any], bool, Optional[str]
Output Type: plt.Figure
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any], v2: bool=... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
for v1 in iter(self):
v2 = {**v1.options.dict()}
self._write_metadata(v1.name)
self._write_metadata(v1.mask)
self._write_... |
Imports:
```python
from collections import Counter
import numpy as np
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 0
v2 = 1
v3 = 2
v4 = 3
v5 = 4
v6 = 5
```
Input Types: DataFrame, str, Logger
Output Type: DataFrame
Dependencies:
```python
def v7(v8: Union[float, Any]):
... |
Imports:
```python
from itertools import permutations
import typing
```
Type definitions:
Input Types: List[str], List[str]
Output Type: int
Dependencies:
```python
def v0(v1: str) -> int:
v2 = 0
for v3 in v1:
v4 = ord(v3) - ord('a')
v2 |= 1 << v4
return v2
```
```python
def v5(v6: List[str... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> bool:
for v2 in self.word_pattern.findall(v1):
if len(v2) < 3:
continue
v2 = v2.lower()
v2.replace('ё', 'е')
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1: BinaryIO
def __init__(self, v2: BinaryIO) -> None:
"""
reader is a Python object on which we can call read, seek, and tell.
"""
self._reader = v2
@property
def v3(self) -> BinaryIO:
r... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, Path, Any, Any
Output Type: Any
Dependencies:
```python
def v0():
try:
from PIL import Image
except ImportError as exc:
try:
import Image
except ImportError:
raise ExtensionError('Could not... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Class'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Class') -> None:
del self.classes[v1.name]
v1.parent = None
``` |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.DataFrame, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.DataFrame, v2):
v3 = v1[v1['label'] == 0]
v4 = v1[v1['label'] == 1]
v5 = v3['video'].count()
if self.mode =... |
Imports:
```python
import numpy as np
import scipy.stats as sp
from scipy.special import factorial
from scipy.special import gamma
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, float
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.nd... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclasses.dataclass
class v0(abc.ABC):
v1: str
v2: Resources
v3: Resources
def v4(self) -> List[Tuple[JobState, Optional[str]]]:
"""
The coordinator decides that agents should start workers for jobs, but doesn't
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
async def v0(v1: int):
return await models.Softban.query.where(models.Softban.user == v1).gino.first()
```
Function Name: v2
Function:
```python
async def v2(v3: int):
v4 = await v0(v3)
if v4:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self):
self.value: float = 0.0
self.asset_transaction: Optional[AssetTransaction] = None
self.date_time: dt.datetime = dt.datetime(dt.MINYEAR, 1, 1)
self.tick_yield: float = 0.0
self.pric... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Mapping[str, Any]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Mapping[str, Any]) -> bool:
if v1.get('managedTerraformResources'):
return True
if v1.get('managedExternalResources'):
return T... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> int:
v2 = 0
v3 = {}
v4 = 0
for v5 in range(len(v1)):
if v1[v5] in v3:
v2 = max([v3[v1[v5]], v2])
v4 = max([v... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0():
v1 = LogStore(prefs=ConsolePrefs(project_file=False, project_user_file=False, user_file=False))
assert not v1.table.prefs.show_python_file
v2 = MagicMock()
v2.new_logs... |
Imports:
```python
import random
import re
import string
import uuid
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
v2 = re.findall(__BOOLEAN_PATTERN, v1)
while v2:
v3 = 'true' if random.randint(0, 1) == 1 else 'false'
v1 = ... |
Imports:
```python
import json
import requests
import typing
```
Type definitions:
Input Types: str
Output Type: Dict
Dependencies:
```python
def v0(v1, v2):
v3 = v1 - datetime.fromtimestamp(v2)
return v3.seconds / 60
```
```python
def v4(v5=False):
v6 = datetime.now()
v7 = demisto.getIntegrationContex... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> float:
v2 = self._n_marketplaces__per_tick[v1]
v3 = self._consume_sales_per_marketplace_per_s__per_tick[v1]
v4 = v2 * v3
v5 = self.ss.netwo... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[res.Membership]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[res.Membership]:
v1 = self.get_paged_collection(f'memberships', page_size=100)
if v1:
return list(v1)
return None
``` |
Imports:
```python
import logging
import subprocess
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
```python
def v0(v1: list, v2: str=os.getcwd(), v3: dict=os.environ.copy(), v4: str=None, **v5) -> str:
v6 = None
try:
if v5.get('shell', False):
logging.... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[Any]:
v1 = []
for v2 in range(self.height):
for v3 in range(self.width):
v1.append(self[v3, v2])
return v1
``` |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: list, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: int, v3: int):
if v3 - v2 >= 2:
v4 = random.randint(v2, v3 - 1)
(v5, v6, v7) = (v2 + 1, v2, v2)
(v1[v2]... |
Imports:
```python
from functools import reduce
import typing
```
Type definitions:
```python
v0 = Callable[[Any], bool]
```
```python
v1 = Callable[[Any], Iterable[Any]]
```
Input Types: Any, v0, v1
Output Type: List[Any]
Dependencies:
```python
def v2(v3: List[Any], v4: Any) -> List[Any]:
if predicate(v4):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> None:
assert v1 >= 0
self.stack_per_priority[v1].append(v2)
``` |
Imports:
```python
import difflib
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: str):
return v1 in list_env()
```
```python
def v2():
return sorted(brax_envs._envs) + composer_envs.list_env() + sorted(ENVS)
```
Function Name: v3
Function:
```python
def... |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
Input Types: set
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: set):
v2 = v1 - set(self.embedding.index)
v3 = len(v2)
if v3 > 0:
v4 = self._dimensionality()
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = tp.TypeVar('MappedArrayT', bound='MappedArray')
```
Input Types: tp.PandasIndexingFunc
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self: v0, v2: tp.PandasIndexingFunc, **v3) -> v0:
(v4, v5, v6, v7, v8, v9, v9) = se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[int, pd.DataFrame], int, Optional[str], Optional[List[str]]
Output Type: List[Dict[str, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[int, pd.DataFrame], v2: int=0, v3: Optional[str]=None, v4: Optional[List[str]... |
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=True):
if not v2:
self.devices()
if v1 in self._devices_by_id:
return self._devices_by_id[v1]
if v1 in self._devices_by... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], int
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: int) -> List[int]:
v3 = dict()
for (v4, v5) in enumerate(v1):
v6 = v3.get(v2 - v5)
if v6 is not None:
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('KT', int, str, Hashable)
```
Input Types: Mapping[v0, Any], Any
Output Type: Iterator[Tuple[v0, Tuple[Any, ...]]]
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: Mapping[v0, Any], *v4, v3: Any=None) -> Iterator[Tuple[v0, Tupl... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: float) -> None:
v4 = self.scoped_session()
self._set_trial_intermediate_value_without_commit(v4, v1, v2, v3)
self._co... |
Imports:
```python
import socket
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
v2.settimeout(1.25)
v2.sendto(bytes(v1, 'utf-8'), (self.ip, self.port))
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> list:
v1 = [val.strip().replace(',', '') for v2 in v1]
return [v2 if v2 and v2 != 'N/A' else 0 for v2 in v1]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
print('The object of this game is to find 4 mugwumps\nhidden on a 10*10 grid. Homebase is position 0,0.\nAny guess you make must be two numbers with each\nn... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self._use_timer:
self._use_timer = False
self._change_timer.timeout.disconnect(self.slice)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> int:
if np.random.random() < self._rewards_probs[v1]:
return 1
else:
return 0
``` |
Imports:
```python
from datetime import datetime, timedelta
import typing
```
Type definitions:
Input Types: Union[numbers.Number, np.ndarray, pd.Series], Union[datetime, str], Union[datetime, str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[numbers.Number, np.ndarray, ... |
Imports:
```python
import matplotlib.pyplot as plt
from pathlib import Path
import typing
```
Type definitions:
Input Types: Union[Path, str], Optional[dict]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[Path, str], v2: Optional[dict]) -> None:
v3 = Path('./').joinpa... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.rounds = self.max_rounds
self.stake = self.init_stake
``` |
Imports:
```python
import polars as pl
from polars import testing
from polars.datatypes import Float64, Int32, Int64, UInt32
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
v1 = pl.Series(['Hello', 'WORLD'])
v2 = v1.str.... |
Imports:
```python
from math import floor
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float):
v2 = floor(v1)
v3 = floor(60 * (v1 - v2))
return '{:02d}:{:02d} h'.format(int(v2), int(v3))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> bool:
v2 = self.get_default_option()
v3 = self.get_default_option()
for v4 in v3:
if v4 not in v1:
raise RuntimeError('{} no... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Text, Text
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text, v2: Text) -> None:
v3 = self._tar_name(v1)
self._retrieve_tar(v3)
self._decompress(v3, v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: models.QuerySet | None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> models.QuerySet | None:
try:
return self.view.get_queryset()
except Exception:
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, *v2: Any) -> Any:
if v1 == 'get_session_key' or v1.startswith('system.'):
v3 = self._invoke(self._session, self.url, v1, *v2)
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: engine.math.Vector2
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: engine.math.Vector2):
self.__current_fire_location = v1
self.__current_phase = self.PHASE_REQUEST_HIT
``` |
Imports:
```python
import warnings
import typing
```
Type definitions:
Input Types: Dict[Text, Any]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[Text, Any], **v2: Any) -> None:
warnings.warn('Use of `utter_custom_json` is deprecated. Use `utter_message(json_message=<... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('AlgebraicNumberT', complex, float, int)
```
Input Types: v0
Output Type: v0
Dependencies:
```python
def v1(v2: v0) -> bool:
v3 = 1e-05
if isinstance(v2, complex):
v4 = all((abs(x) <= v3 for v5 in (v2.real, v2.imag)))
elif... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
```python
def v0(v1: str) -> bool:
if v1.startswith('AIDA'):
return True
if v1.startswith('AROA'):
return True
return False
```
Function Name: v2
Function:
```python
def v2(v3: str) -> bo... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> int:
(v2, v3) = (v1.count('1'), len(v1))
if v2 == 0:
return (v3 - 2) * (v3 - 1) // 2 % (10 ** 9 + 7)
if v2 % 3 != 0:
return ... |
Imports:
```python
from multiprocessing import Pool, cpu_count
import typing
```
Type definitions:
Input Types:
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list:
v1 = Pool(cpu_count())
v2 = v1.map(self.validate_stock, self.full_equity_list)
v1.close()
v1.join... |
Imports:
```python
import re
import subprocess
import typing
```
Type definitions:
Input Types: List[str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], **v2: Any) -> None:
v3 = subprocess.check_output(v1, **v2)
if re.search(b'finished command \\S+ task failed with... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = int(v1, 16)
v3 = bin(v2)[2:]
v4 = 4 - len(v3)
return '0' * v4 + v3
``` |
Imports:
```python
import logging
import sys
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
logging.info(f'[{self.name}] prepare_scenario function undefined, I QUIT !')
sys.exit(1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Union[list, np.ndarray]
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[list, np.ndarray]) -> float:
v2 = 1e-09
v3 = np.array(v1)
return (-v3 * np.log(v3 + v2) - (1 - v3) * np.log... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: list, str, str, 'int >=0'
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: str, v3: str, v4: 'int >=0'=0) -> list:
v5 = re.compile(v2)
v6 = ''.join(v1)
v7 = v5.finditer(v6)
for v8 in... |
Imports:
```python
import torch
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: Tuple[torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor, torch.Tensor], Dict[str, Any]
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple[torch... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[float]]
Output Type: Dict[str, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List[float]]) -> Dict[str, float]:
(v2, v3, v4) = (0, 0, 0)
for v5 in v1:
v2 += v5[0]
v3 += v5[1]
v4 +... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = self.instr_index << 2
if self.vram is None:
v1 |= 2147483648
else:
v1 |= self.vram + 4 & 4278190080
return v1
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> bool:
v2 = re.compile(u'[一-龥]+')
v3 = v2.search(v1)
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
self.data['filename'] = v1.get('filename') or self.local_path.name
self.data['path'] = v1.get('path') or '/'
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Sequence
Output Type: frozenset
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Sequence) -> frozenset:
if isinstance(v1, str):
for v2 in [' and ', ',', ';', '/']:
v1 = v1.replace(v2, ' ')
v1 =... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: list, float
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: float) -> list:
v3 = []
for v4 in v1:
if v4.shape[0] <= 2:
v3.append(v4)
continue
... |
Imports:
```python
import asyncio
from functools import partial, wraps
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: asyncio.Future
Dependencies:
```python
def v0(v1, *v2, **v3):
v4 = contextvars.copy_context()
return partial(v4.run, v1, *v2, **v3)
```
Function Name: v5
Funct... |
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 = self.__dict__.copy()
v1.update(self.class_attributes)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, list, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2: list, v3: int=2):
v4 = []
for v5 in range(len(v1)):
v6 = v1[v5]
if not v2 or v6 == v2[0]:
v7 = True
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: PMLParser.AttrValueContext
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: PMLParser.AttrValueContext):
v2 = v1.getText().strip('" \'')
if v2.startswith('#'):
self.res.append((v1.start.line, '_', ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Sequence
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Sequence:
v1 = 'SELECT * FROM {0}'.format(self._tableName)
v2 = []
if len(self._whereClause) > 0:
v1 += ' WHERE {0}'.format(self._whereClau... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.List[str]):
v2 = []
for v3 in v1:
for v4 in self.tests:
if v4.id == v3:
v2.append(v4)
... |
Imports:
```python
from pathlib import Path
import matplotlib.pyplot as plt
import seaborn as sns
import typing
```
Type definitions:
Input Types: str, str, int, float, float, Optional[bool]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='figures', v2: str='cdf.png', v3: in... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: str):
v2 = gh_s.get(v1)
if v2.status_code != 200:
raise Exception(f'(github) response: {v2.status_code} {v1}')
return v2.json()
```
```python
def v3(v4: str):
v5 = v4.inde... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, **v2) -> str:
v2['SecretId'] = v1
return self.client.get_secret_value(**v2)['SecretString']
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'dict[str, ]', 'dict[str, str]'
Output Type: 'dict[str, ]'
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: 'dict[str, ]', v2: 'dict[str, str]') -> 'dict[str, ]':
v3 = {}
for (v4, v5) in v1.items():
v6 = v2.get(v4)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: base.DocType
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: base.DocType, **v2) -> list:
if isinstance(v1, list):
v1 = ' '.join(v1)
v1 = self.tokenizer(v1.replace('\n', ' '), **v2)
if self.p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str, **v2):
v2.update(locals())
v3 = {'tags': ['Organizations'], 'operation': 'claimIntoOrganization'}
v4 = f'/organizations/{v1}/claim'
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Iterable[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Iterable[str]:
v2 = 0
for v3 in reversed(v1):
if v3 == '#':
v2 += 1
elif v2:
v2 -= 1
e... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> None:
self.flashes[v1, v2] = True
for (v3, v4) in self.get_neighbors(v1, v2):
self.curr_energy_levels[v3, v4] += 1
... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=0.05) -> None:
logging.info('Starting cron...')
self._listen_as_event(v1, self._handle_new_session_creation, self._filter_new_se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: argparse.Namespace
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> argparse.Namespace:
v1.add_argument('--data-folder', type=str)
v2 = v1.parse_args()
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = typing.TypeVar('PWN')
```
Input Types:
Output Type: str
Dependencies:
Function Name: v1
Function:
```python
def v1(self: v0) -> str:
v2 = []
for (v3, v4) in enumerate(self.field_names):
v5 = self.field_transliterators[v3].cql_type
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='sample') -> bool:
v2 = self.otu_data.to_dataframe()
if v1 == 'sample':
return bool(np.isclose(v2.sum(axis=0), 1.0).all(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Address, typing.Address
Output Type: typing.BlockNumber
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Address, v2: typing.Address) -> typing.BlockNumber:
v3 = self.detail_channel(v1, v2)
return v3.get('set... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1='Converting') -> None:
self.progress = 90
self.update(v1)
``` |
Imports:
```python
import numpy as np
import numpy.typing as npt
from astropy import units as u
from astropy.coordinates import Angle, SkyCoord
from astropy.wcs import WCS
from astropy.wcs.utils import pixel_to_skycoord, skycoord_to_pixel
import typing
```
Type definitions:
Input Types: SkyCoord, WCS
Output Type: npt.... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: int=0, v2: int=0, v3: str=None):
self.row: int = v1
self.column: int = v2
self.sheet_name = v3
def v4(self) -> str:
v5 = xl_rowcol_to_cell(self.row, self.column)
if self.sh... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(BaseClient):
v1 = ['all', 'malware']
v2 = {'IPv4 Address': FeedIndicatorType.IP, 'Domain Name': FeedIndicatorType.Domain, 'URL': FeedIndicatorType.URL, 'Email': FeedIndicatorType.Email}
def __init__(self, v3: str, v4: Tuple[str, str]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: [hex, int], Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: [hex, int], v2=False) -> str:
v3 = self.getMajorDeviceClass(v1)
if v1.__class__ == int:
v4 = str(v1).zfill(24)
elif v1.__class__... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'TreeNode'
Output Type: 'bool'
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: 'TreeNode') -> 'bool':
(v2, v3) = ([], float('-inf'))
while v2 or v1:
while v1:
v2.append(v1)
v1 = v1.left
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: tuple[Sequence[int], bool]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> tuple[Sequence[int], bool]:
v1 = dict[HandTuple, bool]()
return self.single_game(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 type(v1) is str and v1 != '_' and (v1 != ''):
self.names.add(v1)
``` |
Imports:
```python
import torch
from torch import Tensor
from torch import distributed as distrib
from torch import nn as nn
import typing
```
Type definitions:
Input Types: Tensor
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor) -> Tensor:
if self.training:
... |
Imports:
```python
import pickle
import typing
```
Type definitions:
Input Types: str, _t.Any, _t.Optional[int]
Output Type: _t.Optional[bool]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: _t.Any, v3: _t.Optional[int]=None) -> _t.Optional[bool]:
v4 = self._normalize_timeout(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 v1 not in self.trial_types:
raise ValueError(f'Designated trial is not a valid trial type: {v1}')
self.selected_trial_type = v1
ret... |
Imports:
```python
import datetime
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int=0):
v2 = datetime.datetime.now()
v3 = v2 + datetime.timedelta(days=v1)
v4 = v3.strftime('%Y-%m-%d')
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: errors.DockieError, str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: errors.DockieError, v2: str, v3: int):
assert v1.args[0] == v2
assert v1.error_number == v3
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.