text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame, str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: str) -> dict:
v3 = v1['Name'] == v2
v4 = {}
if v3.any():
v4 = v1[v3].iloc[0].to_dict()
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False):
self._proxy_aircraft_controls.invalidate_data(clear=v1)
self._data_valid = False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'DLinkedList.Node'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'DLinkedList.Node') -> None:
if self.head is None:
self.tail = v1
else:
self.head.prev = v1
v1.next = self.head
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: str) -> None:
with open(v2, 'w') as v3:
v4 = 'Project CSlicer Static Test Query\n'
for (v5, v6) in v1.items():
v7 = r... |
Imports:
```python
from itertools import groupby
import sys
import typing
```
Type definitions:
Input Types:
Output Type: List[Dict[str, Any]]
Dependencies:
```python
def v0(v1: Item) -> int:
if v1.group_id is None:
return sys.maxsize
return v1.group_id
```
Function Name: v2
Function:
```python
def v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.identifier in type(self)._instances:
type(self)._instances.pop(self.identifier)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float):
if v1.is_integer():
return int(v1)
else:
raise ValueError(f'val={v1} is no integer')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: qlast.CreateMigration
Output Type: None
Dependencies:
```python
def v0(v1: str) -> str:
return edgeql_quote.quote_ident(v1)
```
Function Name: v2
Function:
```python
def v2(self, v3: qlast.CreateMigration) -> None:
self.write('CREATE MIGRATION... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[str], str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[str], v2: str):
with open(v2, 'w') as v3:
for (v4, v5) in enumerate(v1):
v3.write(v5)
v3.write('\n')
... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Callable
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Callable=dict) -> None:
for v2 in self.DIRS:
v3 = Path(v2)
if not v3.exists():
v3.mkdir(parents=T... |
Imports:
```python
import numpy as np
from numpy.core.numeric import zeros_like
import typing
```
Type definitions:
Input Types: float, np.ndarray, np.ndarray, Callable, scipy.stats.distributions.rv_frozen
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: np.ndarray, v3: np.nd... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: str
v2: str
v3: str
v4: str
v5: str
```
Input Types: v0
Output Type: str
Dependencies:
Function Name: v6
Function:
```python
def v6(v7: v0) -> str:
v8 = v7.cpp_name
v9 = v7.arg_name
return f'std::u... |
Imports:
```python
import typing
```
Type definitions:
Input Types: deque, deque, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: deque, v2: deque, v3=None):
if len(v1) == 0 or v3 == 'b':
v4 = v2
else:
v4 = v1
v5 = 1
v6 = 0
while len(v4) > 0:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Model):
v1: int
v2: int
v3: int
v4: int
v5: int
def v6(self, v7: int) -> v0:
self.available_sale_count = v7
return self
def v8(self, v9: int) -> v0:
self.last_batch_no = v9
return self... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = _ty.Tuple[_ty.Union[_np.ndarray, MyArray], ...]
```
```python
v1 = _ty.Tuple[BaseArray, ...]
```
```python
v2 = _ty.TypeVar('BaseArray')
```
```python
v3 = _ty.List[bool]
```
```python
v4 = _ty.TypeVar('MyArray')
```
```python
v5 = _ty.Callable[[v4],... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Generator[Tuple[np.ndarray, np.ndarray], None, None]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> Generator[Tuple[np.ndarray, np.ndarray], None, None]:
for v2 in range(self.split_index, self.num_us... |
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):
self.path = self.path[:-len(self.name) - 1] + v1 + os.path.sep
self.name = v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Optional[str]:
if self._tokens[0] != '<instance>':
return None
self._tokens.pop(0)
v1: str = self._tokens.pop(0)
if not v1.isalnum... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> bool:
self.validator.validate_word_length(v1)
self.validator.validate_pattern_length(v2)
return self.dp_match_top_down(v1, v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, bool
Output Type: 'Workplane'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float, v2: bool=False) -> 'Workplane':
v3 = self._findFromPoint(True)
return self.lineTo(v3.x, v1, v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = {'generation-i': 1, 'generation-ii': 2, 'generation-iii': 3, 'generation-iv': 4, 'generation-v': 5, 'generation-vi': 6, 'generation-vii': 7, 'ge... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Dict, int
Output Type: Dict
Dependencies:
```python
def v0(v1: int=0) -> np.ndarray:
v2 = PatternMatrix(pattern_type=v1)
v3 = np.array(1 * (v2.matrix[:, v2.dim_of_signal] > 0))
v3[v2.matrix[:, v2.dim_of_signal] < 0] = -1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Dict[str, Type[ModuleParser]]'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Dict[str, Type[ModuleParser]]'):
self._tasks = []
self._rescue_tasks = []
for v2 in self._kwargs.get('block', [self._kw... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> float:
if v1 >= 0:
v3 = self._joystick.get_axis(v1 + v2)
if abs(v3) > self._deadzone:
return v3
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: Optional[Tuple]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> Optional[Tuple]:
v1 = super().cancel(v1)
self._event.set()
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass(frozen=True)
class v0:
v1: Dict[str, str]
v2: StreamReader
v3: str
v4: str
v5: str
```
Input Types: StreamWriter, v0
Output Type: Any
Dependencies:
Function Name: v6
Function:
```python
def v6(self, v7: StreamWriter, v8: v0... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: TextIO
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> TextIO:
self.log.close()
return self.terminal
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: BaseParser
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: BaseParser) -> str:
try:
v2 = v1.option_strings
except AttributeError:
v2 = self.format_option_strings(v1)
if v1.help:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False):
self.docs_store.connect(force_reset=v1)
for v2 in self.additional_stores.values():
v2.connect(force_reset=v1)
``` |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: Dict[str, torch.LongTensor], str, Any
Output Type: torch.FloatTensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, torch.LongTensor], v2: str='', v3=False) -> torch.FloatTensor:
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[List, pd.Series, np.ndarray]
```
Input Types: v0, Optional[v0]
Output Type: 'StringCluster'
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0, v3: Optional[v0]=None) -> 'StringCluster':
self.similarity_ = self._get_co... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: str):
v3 = {}
for v4 in v1:
v5 = v1[v4][v2]
if v5 not in v3:
v3[v5] = 0
v3[v5] += 1
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(TeiElementWrapper):
def v1(self) -> str:
return '\n'.join(get_tei_xpath_text_content_list(self.element, '//tei:head'))
def v2(self) -> List[str]:
return get_tei_xpath_text_content_list(self.element, '//tei:p')
def v... |
Imports:
```python
from collections import deque
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1=0, v2=None, v3=None):
self.val = v1
self.left = v2
self.right = v3
```
Input Types: v0, int
Output Type: bool
Dependencies:
Function Name: v4
Function:
```python
d... |
Imports:
```python
import torch
import torch.nn as nn
import torch.overrides
from torch.nn.modules.module import _addindent
from torch.package import PackageImporter, PackageExporter
from torch.package import Importer, sys_importer
import typing
```
Type definitions:
Input Types: str, torch.nn.Module
Output Type: bool... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=-1) -> bytes:
v2 = self._read(v1)
if v1 > 0:
v3 = sum((len(chunk) for v4 in v2))
while v3 < v1:
self.data_waiting.wait()
... |
Imports:
```python
from functools import partial
import multiprocessing as mp
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.metrics import euclidean_distances, pairwise_distances
from sklearn.metrics.pairwise import cosine_distances
from sklearn.utils.validation import check_is_fitted, check_ar... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
if len(v1) < 1:
raise ValueError('No control qubit specified.')
self.sub_gate.validate_args(v1[1:])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[List[int], Dict[str, List[int]]]
Output Type: Tuple[List[int], List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[List[int], Dict[str, List[int]]]) -> Tuple[List[int], List[int]]:
if isinstance(v1, list):
... |
Imports:
```python
import os
from datetime import datetime
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = os.path.join(self._config.path, datetime.now().strftime('%Y-%m-%d_%H-%M-%S'))
os.makedirs(v1)
return v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict[str, Mapping]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict[str, Mapping]:
v1 = self._storage.read()
if v1 is None:
return {}
try:
v2 = v1[self.name]
except KeyError:
... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str=None, v2: str=None, **v3):
locals().update(v3)
return await self.api.request('messages.send', dict(peer_id=self.peer_id, re... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> int:
(v2, v3, v4) = (0, 0, 0)
for (v5, v6) in v1:
if v5 == 'down':
v4 += int(v6)
elif v5 == 'up':
v4 -= int(... |
Imports:
```python
import numpy as np
import pandas._libs.window as libwindow
from pandas.compat._optional import import_optional_dependency
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender, Substitution, cache_readonly
from pandas.core.dtypes.common import ensure_float64, is_... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
self.output.write("WARNING: your terminal doesn't support cursor position requests (CPR).\r\n")
self.output.flush()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[int], Optional[int]
Output Type: Any
Dependencies:
```python
def v0(v1: int, v2: int) -> bool:
return num_episodes is not None and v1 >= num_episodes or (num_steps is not None and v2 >= num_steps)
```
Function Name: v3
Function:
```python... |
Imports:
```python
import numpy as np
from sklearn.neighbors import NearestNeighbors
import typing
```
Type definitions:
Input Types: pd.DataFrame, pd.DataFrame, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: pd.DataFrame, v3: float):
v1 = v1.dropna()
v... |
Imports:
```python
import textwrap
import typing
```
Type definitions:
Input Types: str, int, int, int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int, *, v3: int=None, v4: int=0) -> str:
if not v1:
return ''
if v3 is None:
v3 = v4
v1 = v1.repla... |
Imports:
```python
import re
from collections import defaultdict
import typing
```
Type definitions:
Input Types: Dict[str, str]
Output Type: Dict[str, List[Tuple[str, Match]]]
Dependencies:
```python
def v0(v1: str) -> List[Match]:
v2 = list(re.finditer('\\[\\[([^\\]\\n]+)\\]\\]', v1))
v2.extend(re.finditer('... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray) -> np.ndarray:
v2 = v1.shape[1]
v3 = np.zeros((1, v2))
v4 = np.vstack((v3, v1))
v4 = v4 - v4.mean(axis=0)... |
Imports:
```python
from asyncio.subprocess import STDOUT
from asyncio.subprocess import DEVNULL, PIPE, create_subprocess_exec, create_subprocess_shell
from subprocess import CompletedProcess, Popen
from typing import AnyStr, Iterable, Optional
import typing
```
Type definitions:
Input Types: models.CommandArgs, Option... |
Imports:
```python
import threading
import logging
import typing
```
Type definitions:
Input Types: scrapy.Spider
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: scrapy.Spider):
v2 = v1.settings.get('CRAWL_TIMEOUT', 5)
logging.info('Crawl Timeout Started! Timeout: ' + str... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: str, pd.DataFrame
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: pd.DataFrame):
v3 = self._get_filename(v1, self._instance_id)
if not v3.startswith('gs://'):
Pat... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str=None, v3: str=None):
v4 = v1
if v2 is not None:
v4 = ' '.join([(v4 + ' ').ljust(50, '.'), v2])
if v3 is not None:
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int):
for (v3, v4) in enumerate(v1.splitlines(keepends=True), 1):
if v2 < len(v4):
return f'{v3}.{v2}'
v2 -= len(v4)
``` |
Imports:
```python
from scipy.optimize import fsolve
import typing
```
Type definitions:
Input Types: Any
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> np.ndarray:
v2: np.array = fsolve(v1.equacoes_massa_carga, v1.junta_chutes_iniciais())
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[Dict], bool
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[Dict]=None, v3: bool=False) -> List:
v2 = self.transform_criteria(v2) if isinstance(v2, dict) else v2
v1 = f'me... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, **v1: [str, ty.Any]) -> str:
self.__dict__.update(**v1)
return self.save()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
```python
def v0(v1: str, v2: str, v3: Optional[str]=None, v4: Optional[str]=None, v5: str=SPACER) -> str:
v6 = f'{v1}{v5}{v2}'
if v3 and v4:
v6 = f'{v6}{v5}{v3}{v5}{v4}'
elif v3 or v4:
ra... |
Imports:
```python
import torch
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = self._best_state_dict
v3 = self._training_log
v4 = self._kwargs
v5 = {'model': v2, 'trai... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Path, int
Output Type: None
Dependencies:
```python
def v0(v1: Path, v2: int, v3: int) -> bool:
if not v1.exists():
return True
if v1.is_file():
v4 = f'{v1.resolve()}γ―γγ‘γ€γ«γ§γγ'
raise FileExistsEr... |
Imports:
```python
from math import floor
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0(v1: int):
return floor(v1 / 3) - 2
```
```python
def v2(v3: int, v4: int):
v5 = v0(v3)
if v5 < 0:
return v4
return v2(v5, v4 + v5)
```
Function Name: v6... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame) -> None:
print(f'Max node number: {v1.index.max()[1]}')
print(f'Available time steps: \n\t{list(v1.index.levels[0])}')
print(f'Ava... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2: ISalinity):
self.grav = v1
self.sality_method = v2
self.sality = v2.calculateSality(v1)
```
Input Types: Any, Any, v0
Output Type: float
Dependencies:
Function Name: v3
Function:
```python... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=False) -> None:
self._epsilone = max(self._epsilone * self._EPS_DECAY, self._EPS_MIN)
if v1:
self.__logger.debug(f'Epsilone: {self._epsilone}')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[Dict]
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[Dict]) -> Dict:
v2 = {}
for v3 in v1:
for (v4, v5) in v3.items():
v2.setdefault(v4, []).append(v5)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: xr.Dataset, Sequence[float]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: xr.Dataset, v2: Sequence[float]):
try:
v3 = abs(v1.lon[1] - v1.lon[0])
v4 = v2[0] - v3 / 2
v5 = v2[2] + v3 / 2
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int
Output Type: Dict[str, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> Dict[str, np.ndarray]:
v2 = np.random.uniform(low=0, high=1, size=2 * v1 // 3)
v3 = np.random.uniform(low=1, high... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(TabNode):
def __init__(self, v1: EditorBuffer):
assert isinstance(v1, EditorBuffer)
self.editor_buffer = v1
def __repr__(self):
return '%s(editor_buffer=%r)' % (self.__class__.__name__, self.editor_buffer)
```
In... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, **v1: Any) -> None:
self.call_turn_off()
self._attr_is_on = False
``` |
Imports:
```python
import argparse
import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: datetime.date
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> datetime.date:
try:
return datetime.datetime.strptime(v1, '%d-%m-%Y').date()
except ValueError:
... |
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 = super().get_state()
v1['mean'] = self.mean
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
while True:
v1 = self._spider_pipe.recv()
if isinstance(v1, SystemExit):
break
elif v1 == 'qsize':
self._... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('Self', bound='SQLTranslator')
```
Input Types: Sequence['PipelineStep']
Output Type: str
Dependencies:
Function Name: v1
Function:
```python
def v1(self: v0, *, v2: Sequence['PipelineStep']) -> str:
v3: str = self.get_query(steps=v2).ge... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: [dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> [dict]:
if self.found:
v2 = self.list_shops
v3 = []
for v4 in v2:
if float(v4['price']) <= v1:
... |
Imports:
```python
import asyncio
import functools
import typing
```
Type definitions:
Input Types: str, socket.AddressFamily
Output Type: asyncio.Future
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: socket.AddressFamily) -> asyncio.Future:
v3 = asyncio.Future(loop=self.loop)
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, Optional[int]
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: Optional[int]=None) -> Optional[int]:
if self.current_char == v2:
return 0
if v3 is None:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[List[dict]]
Output Type: List[Union['FieldNode', 'FragmentSpreadNode', 'InlineFragmentNode']]
Dependencies:
```python
def v0(v1: dict) -> Union['FieldNode', 'FragmentSpreadNode', 'InlineFragmentNode']:
return _SELECTION_PARSER_MAPPING[v1[... |
Imports:
```python
import torch
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[torch.Tensor, ...]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[torch.Tensor, ...]:
(v1, v2) = self.memory.sample_for_diltillation()
v1 = v1.float()... |
Imports:
```python
from pprint import pprint
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0():
v1 = {}
for v2 in wojewodztwa:
v3 = v1.get(v2.region, 0)
v1[v2.region] = v3 + v2.ludnosc2013
with open('wykres51.csv', 'w+') as v4:
v4... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, Optional[torch.Tensor], bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float, v2: Optional[torch.Tensor]=None, v3: bool=False):
if v3:
return (v1 - self.number, v2)
return (v1 + self.... |
Imports:
```python
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker as mticker
import typing
```
Type definitions:
Input Types: np.ndarray, plt.axis
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: plt.axis):
v3 = np.log10(v1)
(v4,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False):
v2 = []
for v3 in self.propsView.selectionModel().selectedRows():
v4 = self.proxyModel.mapToSource(v3)
if v4:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Tuple[int, int, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float) -> Tuple[int, int, float]:
v2 = -1 if v1 < 0 else 1
v1 = abs(v1)
v3 = int(v1)
v4 = int((v1 - v3) * 60)
v5 = (v1 - v3 -... |
Imports:
```python
import plistlib
import typing
```
Type definitions:
Input Types: str
Output Type: List[Dict[str, Any]]
Dependencies:
```python
def v0(v1: str) -> str:
v2 = v1.replace('k>', 'key>')
v2 = v2.replace('d>', 'dict>')
v2 = v2.replace('s>', 'string>')
v2 = v2.replace('r>', 'real>')
v2 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[Tuple[str, float]]
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[Tuple[str, float]]) -> Dict:
v2 = {}
for (v3, v4) in v1:
if v3 in v2:
v2[v3].append(v4)
else:
... |
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:
if not v1 or len(v1) < 3:
return 0
v2 = 0
v3 = [0] * len(v1)
v4 = [0] * len(v1)
v3[0] = v3[1] = v1[0]
v... |
Imports:
```python
import base64
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.create_model('meeting/110', {'name': 'name', 'is_active_in_organization_id': 1})
v1 = base64.b64encode(b'testtesttest').decode()
... |
Imports:
```python
import inspect
from inspect import Parameter, isclass, ismethod, ismethoddescriptor, ismodule
import typing
```
Type definitions:
Input Types: Any
Output Type: Optional[Dict]
Dependencies:
```python
def v0(v1: Any, v2: str, *v3: Any) -> Any:
try:
return getattr(v1, v2, *v3)
except Ex... |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: torch.Tensor, Any
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor, v2=False) -> torch.Tensor:
v3 = v1.dim() > 2
if not v3:
v1 = v1.unsqueez... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> bytes:
if v1 in self.reference_pages:
return self.apply_diffs(v2, self.reference_pages[v1])
return None
``` |
Imports:
```python
import torch
from torch import nn
import typing
```
Type definitions:
Input Types: Callable
Output Type: Callable
Dependencies:
```python
@functools.wraps(func)
def v0(self, *v1, **v2) -> Any:
self.eval()
torch.set_grad_enabled(False)
v3 = func(self, *v1, **v2)
self.train()
torch... |
Imports:
```python
import torch
import os
import typing
```
Type definitions:
Input Types: Optional[str], Optional[str], Optional[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]=None, v2: Optional[str]=None, v3: Optional[int]=None):
if v3 is not None:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Trace):
def v1(self, v2) -> 'JaxprTracer':
return self.new_const(v2)
def v3(self, v4) -> 'JaxprTracer':
return self.new_const(v4)
def v5(self, v6) -> 'JaxprTracer':
return JaxprTracer(self, v6.pval, FreeVar(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
super().setUp()
self.set_models({'assignment/1': {'title': 'test_assignment_ohneivoh9caiB8Yiungo', 'open_posts': 1, 'meeting_id': 113}, 'meeting/113'... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tensor, Tensor, Tensor, Any
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor, v2: Tensor, v3: Tensor, v4=None) -> Tensor:
if v4 == 'o':
return super().score_spo(v1, v2, v3, v4)
else:
... |
Imports:
```python
import re
import keyword
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Dict[str, Any]
Dependencies:
```python
def v0(v1: Dict[str, Any], v2: Optional[dict]=None) -> None:
v2 = v2 or {}
for v3 in list(v1.keys()):
if v3 in v2:
v4 = v2[v3]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[str], Optional[int]
Output Type: Generator
Dependencies:
```python
def v0(v1: Dict) -> bool:
return v1['status'] in ['running', 'not_run', 'failing', 'on_hold']
```
Function Name: v2
Function:
```python
def v2(self, v3: str='github/p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: aa.Array2D, aa.Array2D, aa.Array2D
Output Type: aa.Array2D
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: aa.Array2D, v2: aa.Array2D, v3: aa.Array2D) -> aa.Array2D:
v4 = self.contribution_map_from(hyper_model_image=v1, hyper... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> int:
v2 = [i for v3 in str(v1)]
if v2[0] == '-':
v2.pop(0)
v2.reverse()
if int(''.join(v2)) > 2 ** 31 - 1:
return 0
if... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.