text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: str()
Output Type: dict()
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str()) -> dict():
v2 = self.getLabNodesID(v1)
v3 = dict()
if len(v2) != 0:
for v4 in v2:
v3[self.getNodeNameByID(v1, v4)] =... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: v0
Output Type: bool
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0) -> bool:
for (v3, v4) in enumerate(self.matchers):
if v4.matches(v2):
del self.matchers[v3]
... |
Imports:
```python
import copy
import json
import re
import tensorflow as tf
import typing
```
Type definitions:
Input Types: config_pb2.MetricConfig, Dict[Text, Type[tf.keras.losses.Loss]]
Output Type: tf.keras.losses.Loss
Dependencies:
```python
def v0(v1: Dict[Text, Any], v2: Text) -> Dict[Text, Any]:
if 'name'... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
print(f'\nself.requests={self.requests!r}')
print(f'self.seconds={self.seconds!r}')
print(f'self.mode={self.mode!r}')
print(f'self.early_coun... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: (str, str)
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> (str, str):
if len(v1) == 2:
return (v1[0], v1[1])
else:
v2 = v1.split(',', 1)
if len(v2) == 2:
return (v2[... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Any
```
```python
v1 = Any
```
Input Types: Sequence[v0], v0
Output Type: Tuple[Sequence[str], Sequence[v1]]
Dependencies:
```python
def v2(v3, v4):
if not v3.__class__.__module__.startswith('pytype.'):
return False
if isinstance(v4, ... |
Imports:
```python
import numpy as np
from pandas._config import get_option
from pandas._libs import lib, properties, reshape, tslibs
from pandas._typing import Label
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender, Substitution, doc
from pandas.util._validators import valida... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: str) -> str:
if v3:
return f'{v3}&$skip={v1}&$top={v2}'
return f'$skip={v1}&$top={v2}'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: list[list[int]], str, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list[list[int]], v2: str, v3: int) -> int:
v4: int = 0 if v2 == 'x' else 1
v5: int = 0
for v6 in range(len(v1)):
v7: bool = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str, str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: str, v3: str) -> dict:
(v4, v5) = (x.strip() for v6 in v3.split(':'))
v7 = {v7['name']: v7 for v7 in v1['teams']}[v4]
(v8, v9) = (v6... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
v0 = Dict[str, str]
```
```python
v1 = Dict[str, Any]
```
Input Types: v0
Output Type: v1
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: v0) -> v1:
v4 = np.array((float(v3['pos_x']), float(v3['pos_y']), float(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, Optional[Union[str, Sequence[str]]], bool
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=0.95, v2: Optional[Union[str, Sequence[str]]]=None, v3: bool=True) -> pd.DataFrame:
v4 = len(sel... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: ndarray
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: ndarray) -> float:
v2 = v1.shape[0]
v3 = {}
for v4 in v1:
if v4 in v3:
v3[v4] = v3[v4] + 1
else:
... |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = defaultdict(set)
for v3 in v1.splitlines():
(v4, v5) = v3.split('-')
if v4 != 'end' and ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3=-1, v4=False) -> int:
v5 = 0
if v4:
print('\nDEBUG counting : ' + v2)
for v6 in v1:
(v7, v8) = (v6.split(':', 1)[0],... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: list
Output Type: typing.Any
Dependencies:
```python
def v0(v1, v2):
return tf.concat([v1, v2], axis=3)
```
Function Name: v3
Function:
```python
def v3(self, v4: list, **v5) -> typing.Any:
v6 = v4[0]
v7 = v4[1]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> None:
v2 = v1.splitlines()
if len(v2) > 10:
for v3 in v2[:10]:
print(v3)
print('...')
else:
print(v2[0][:80])... |
Imports:
```python
from datetime import date
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.DataFrame, int
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: int) -> pd.DataFrame:
v3 = date.today()
v4 = v3.replace(year=v3.year - ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, Dict[str, List[Union[float, str]]], Callable[[np.ndarray], np.ndarray], List[str], Dict[int, List[str]], List[str], Any
Output Type: List[np.ndarray]
Dependencies:
```python
def v0(v1: 'Union[np.ndarray, torch.Tensor, tf... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union['PolylinePath', 'EdgePath']
```
Input Types: v0, Iterable['DXFEntity']
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0, v3: Iterable['DXFEntity']):
self.dxf.associative = 1
v4 = self.dxf.handle
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: str
Dependencies:
```python
def v0(v1: int, v2: int, v3: str='') -> str:
if v1 not in Z_DICT.keys():
raise ValueError(str(v1) + ' is not a valid atomic number')
v4 = f'{Z_DICT[v1]}-{v2}{v3}'
return v4
```
Function ... |
Imports:
```python
import numpy as np
import tensorflow as tf
from tqdm import tqdm
import typing
```
Type definitions:
Input Types: np.ndarray, int, int, bool, bool
Output Type: None
Dependencies:
```python
def v0(v1, v2: int, v3: float=1):
return tf.cast(tf.exp(-4 / v2 * v3 * v1), tf.float64)
```
```python
def v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'StrictTransportSecurity'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'StrictTransportSecurity':
self._build('preload')
return self
``` |
Imports:
```python
import ast
import typing
```
Type definitions:
Input Types: t.List[ast.AST]
Output Type: ast.AST
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: t.List[ast.AST]) -> ast.AST:
if len(v1) == 1:
return v1[0]
return ast.JoinedStr(v1)
``` |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: IO[bytes], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: IO[bytes], v2: str) -> None:
v3 = logging.getLogger(v2)
v4 = logging.FileHandler(self._log_file_path, mode='a')
v4.setLev... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: Tuple[int, int], Tuple[int, int], Dict[Tuple[int, int], str]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple[int, int], v2: Tuple[int, int], v3: Dict[Tuple[int, int], str]) -> int:
(v4, v5) ... |
Imports:
```python
import torch
from torch import Tensor
import typing
```
Type definitions:
Input Types: Tensor, Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tensor, v2: Tensor):
v3 = torch.atleast_2d(v1)
if v2 is not None:
v2 = torch.atleast_2d(v2)
v... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: dict, str
Output Type: Any
Dependencies:
```python
def v0(v1: dict, v2: str) -> bool:
if v2 in v1.keys():
logging.debug('CHECKING: ' + str(v2))
if v1[v2] is not None and bool(v1[v2]) is True:
if isinstanc... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
self._query_store.import_file(v1)
self._add_query_functions()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, **v3):
v3.update(locals())
if 'mode' in v3:
v4 = ['none', 'spoke', 'hub']
assert v3['mode'] in v4, f'''"mode" cannot ... |
Imports:
```python
import numpy as np
import scipy.sparse as sp
import typing
```
Type definitions:
Input Types: bool
Output Type: List[sp.spmatrix]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> List[sp.spmatrix]:
v2 = np.hstack((self.bloch, np.ones((3 - self.ndim,), dtype=se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2: ta.List[ta.Optional[int]] = [i for (v3, v4) in enumerate(v1) if v4.isupper()]
return '_'.join([v1[l:r].lower() for (v5, v6) in zip([None] + v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
v1 = self._subscriptions.copy()
for v2 in v1.values():
v3 = v2.service
await self.async_unsubscribe(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], Optional[List[int]], bool
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: Optional[List[int]]=None, v3: bool=False) -> List[int]:
if v3:
return super().get_special_toke... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: float, np.ndarray, np.ndarray, float, Union[np.ndarray, complex]
Output Type: Tuple[np.ndarray, float, complex]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float, v2: np.ndarray, v3: np.ndarray, v4: float, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=0.5, v2: bool=True):
v3 = self.get_family() if v2 else [self]
for v4 in v3:
v5 = 1.0 - v1
v4.set_fill(opacity=v5 * v4.get_... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types: datetime
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: datetime) -> None:
if self._process_updates is None:
self._process_updates = asyncio.Lock()
if self._process_updates.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int=75) -> str:
if len(v1) < v2:
return v1
return v1[0:72] + '...'
``` |
Imports:
```python
import datetime
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[datetime.time]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str]) -> List[datetime.time]:
v2 = v1[0]
v3 = '%H:%M'
if v2.count(':') == 2:
v3 += ':%S'
if '.' in ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: dict, dict, pd.DataFrame
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: dict, v3: pd.DataFrame):
v3 = v3.values[:, np.argsort(v3.columns.to_numpy())]
v4 = v2[self.n_layers]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: object
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str=None) -> object:
for v3 in self._layers:
if v3.name == v1:
return v3.parameters[v2]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Ontology.Concept
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Ontology.Concept):
v2 = self.create_or_get('include')
(v3, v4, v5) = v1.attrs[v2]
v6 = self.create_or_get(f'have argument #{v4.name}')
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: DataFrame, Any, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: DataFrame, v2, v3, v4, v5):
(v6, v7) = self.model.fit_transform(train_data=v1, is_pred=False, cate_cols=v4, lab... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[str]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[str]) -> List[str]:
v2 = set()
for v3 in v1:
try:
v4 = v3.split(':')[0]
except IndexError:
pa... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[str, list, dict]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: Union[str, list, dict]):
if isinstance(v1, str):
return (await self(v1)).lang
elif isinstance(v1, list):
return... |
Imports:
```python
from pathlib import Path
import numpy as np
import torch
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: Union[str, BinaryIO], Any
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: np.ndarray, v2: int, v3=80) -> Optional[np.ndarray]:
try:
from ka... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, **v1) -> None:
self.event_replacements.update(v1)
self._process_text(self.original_text)
``` |
Imports:
```python
import requests
import os
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str, v2: str, v3: List[str], v4: int):
self.title = v1
self.description = v2
self.articles = v3
self.index = v4
self.epubpress_id = None
def v5(se... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._buffer_list.clear()
self._size = [0, 0]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0() -> str:
with open('/proc/cpuinfo', 'r') as v1:
for v2 in v1:
if v2[0:6] == 'Serial':
return v2.split(':')[1].strip()
return '00... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict=None):
v2 = v1['iters']
v3 = self.params['trainer'].model
v4 = self.params['trainer'].valloader
v5 = self.params['trainer'].trainloader
... |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, int
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: torch.Tensor, v3: int=20) -> float:
v4 = v1.argsort(descending=True)[:, :v3]
... |
Imports:
```python
import numpy as np
from scipy.optimize import minimize
import typing
```
Type definitions:
Input Types: Any, Any, Any, float, float
Output Type: Any
Dependencies:
```python
def v0(v1, v2, v3):
v4 = v2.shape[0]
v5 = np.repeat(1 / v4, v4)
v6 = ((0.0, 1.0),) * v4
v7 = {'type': 'eq', 'ar... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: tuple
Dependencies:
```python
def v0(v1: bool) -> tuple:
GPIO.output(pin, v1)
return ()
```
Function Name: v2
Function:
```python
def v2() -> tuple:
v0(False)
return ()
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: bool
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> float:
if v1 or not hasattr(self, '_width'):
(v2, v3) = (np.inf, -np.inf)
for v4 in [self.ni_id, self.n... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = hashlib.md5()
v2.update(v1.encode('utf-8'))
v3 = v2.hexdigest()
v3 = int(v3, 16)
v3 = int(str(v3)[:10])
retur... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
v1: List[int] = []
for v2 in range(5):
v1.append(v2)
assert v1 == [0, 1, 2, 3, 4]
v1.clear()
for v2 in range(5, 10):
v1.appen... |
Imports:
```python
import numpy as np
import matplotlib.pyplot as plt
import typing
```
Type definitions:
Input Types: Tuple, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple=(12, 8), v2: str='distinct'):
assert v2 in ['distinct', 'self']
if v2 == 'distinct':
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: str, v0
Output Type: None
Dependencies:
Function Name: v1
Function:
```python
async def v1(self, v2: str, v3: v0) -> None:
if not await self.try_add_state(v2, v3):
raise ValueError(f'The actor state name {v2... |
Imports:
```python
import base64
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = '{0}:{1}'.format(self.username, self.password)
v2 = base64.b64encode(v1.encode('utf-8')).decode('utf-8')
return 'Basic {0}'.form... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
self.screenCap = v1
return ()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Optional[str]
Dependencies:
```python
def v0() -> Optional[str]:
return pulumi.Config().get('cloudsmith-repository-name')
```
Function Name: v1
Function:
```python
def v1() -> Optional[str]:
v2 = v0()
if v2:
return f'... |
Imports:
```python
import signal
import typing
```
Type definitions:
Input Types: bool, datetime
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool, v2: datetime):
self.__evaluateV(v1, self.config['signal'], self.signalState, v2)
return self.__evaluateS(self.signalState... |
Imports:
```python
import typing
```
Type definitions:
Input Types: cmd.Context
Output Type: Iterable[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: cmd.Context) -> Iterable[str]:
v2 = self.contexts.get(v1.guild.id)
if v2 is None:
return []
return (f'{len(v2.song_set)} s... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
class v0(object):
def __init__(self):
self.key: str = ''
self.key_short: str = ''
self.key_upper: str = ''
self.value: str = ''
self.bool_value: bool = False
self.is_a_bool: bool = False
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2, v3: int=VARIABLE_NUMERIC):
self.__type = v3
self.__env: SetaRuntime = v2
self.__value = None
self.__name = v1
@property
def v4(self):
return self.__name
@prope... |
Imports:
```python
import typing
```
Type definitions:
Input Types: aiohttp.ClientResponse
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: aiohttp.ClientResponse) -> dict:
v2 = v1.content_type
if v2 == 'text/html':
return {'Message': await v1.text()}
el... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple[Set[Tuple[int, int]], Set[Tuple[Tuple[int, int], Tuple[int, int]]]], Tuple[int, int], int, Tuple[int, int]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple[Set[Tuple[int, int]], Set[Tuple[Tuple[int, i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Exception
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Exception, **v3) -> None:
v4 = f'{self._prefix}.{v1}.error'
if self.stat is not None:
self.stat.incr(f'{v4}.total', 1)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Instance'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Instance') -> None:
self._instance_list.add(v1)
self.add_to_index(v1)
for v2 in self.parent_entities:
v2.add_instance(v1)
``` |
Imports:
```python
from datetime import datetime as DateTime
from datetime import timedelta
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
```python
def v0(v1: DateTime, v2: DateTime=DateTime.today()) -> bool:
if v1 <= v2:
return True
else:
return False... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: Iterable, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable, v2: int):
if not v1:
raise ValueError('N must be non-empty iterable')
if not (0 < v2 < 100 and type(v2) == 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 = self.get_revsersed_num(v1)
if v2 > 2 ** 31 - 1 or v2 < -2 ** 31:
v2 = 0
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.cloud_manager._modify_tag(self._api_name, self.description, self.server_uuids, self.name)
self._reset(**v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[torch.Tensor]
Output Type: List[Tuple[Union[None, float]]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[torch.Tensor]) -> List[Tuple[Union[None, float]]]:
v2 = []
for v3 in v1:
try:
v4 = v3.boun... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> tuple:
if v1 is None:
return None
return (int(v1[1:2], 16), int(v1[3:5], 16), int(v1[5:], 16))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, bool
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: bool) -> bool:
assert self.qtile is not None
if v2:
v3 = self.qtile.process_button_click(v1, self.seat.keyboard.modifier, int(se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: [str], [str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: [str], v2: [str]=[]):
if self.parsed_display is None:
raise ValueError('Called stop when no display parser yet!')
v3 = self.expand_to_i... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: int, v2: Union[int, OPCODE], v3: Optional[Union[str, CONST, TYPE]]):
self._index: int = v1
self._opcode: OPCODE = OPCODE(v2)
self._arg: Optional[Union[CONST, TYPE]] = self.prepare_arg(v3) if is... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = self._refresh_access_token()
if 'preferred_username' in v1:
pass
if 'access_token' in v1:
self.__access_token = v1['access_t... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> None:
v2 = {}
for v3 in v1:
if v3['category'] not in v2:
v2[v3['category']] = 0
v2[v3['category']] += v3['price'] * v3[... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types:
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0() -> list:
v1 = random.choices(range(1, 50), k=6)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.get_content_patch.stop()
del self.mock_get_content
del self.tempfile
del self.our_dataset
del self.config_loader
del self.user_a... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: Tuple[torch.Tensor, List[Tuple]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int=16) -> Tuple[torch.Tensor, List[Tuple]]:
for (v3, v4, v5) in self.tokenizer.consume_text(v1, batch_size=v2):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any, v2: str) -> Optional[int]:
try:
v3 = v1[v2]
except KeyError:
return None
else:
return v3 and int(v3)
``` |
Imports:
```python
from itertools import count
import numpy as np
import typing
```
Type definitions:
Input Types: str, Optional[str], bool, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[str]=None, v3: bool=False, v4: bool=True) -> None:
if not self.... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 0
v2 = 1
v3 = -1
```
Input Types: int, List[v0]
Output Type: None
Dependencies:
Function Name: v4
Function:
```python
def v4(self, v5: int, v6: List[v0]) -> None:
assert len(v6) == self.size
for (v7, v8) in enumer... |
Imports:
```python
import os
import shutil
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self._var is None:
os.environ.pop('TORCH_EXTENSIONS_DIR', None)
else:
os.environ['TORCH_EXTENSIONS_DIR'] =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> str:
v2 = 'word,count'
v3 = '\n'.join(['{word},{times}'.format(word=word, times=count) for (v4, v5) in v1])
return '\n'.join([v2, v3]) + '\n'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str]):
v2 = v3 = 0
v4 = {}
for v5 in v1:
if v5.startswith('mask ='):
v6 = v5[6:]
v2 = int(''.join(('1' if x == ... |
Imports:
```python
from typing import Callable
import typing
```
Type definitions:
Input Types: Callable
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Callable):
assert isinstance(v1, Callable)
self.status_report_callback = v1
``` |
Imports:
```python
import sqlite3
from os import chdir
from sys import exit
import logging
import typing
```
Type definitions:
Input Types: str
Output Type: sqlite3.Connection
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> sqlite3.Connection:
v1 = v1.strip()
if v1.startswith(('.e... |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
```python
v0 = dict[Point, int]
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self) -> v0:
v2 = self.input.as_list()
v3 = defaultdict(int)
for (v4, v5) in enumerate(v2):... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = self.token_incoming_txs_for_address(v1)
v3 = self.ether_incoming_txs_for_address(v1)
return self.union_ether_and_token_txs(v2, v3)
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Any, dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: dict):
v3 = []
v4 = dict()
with open(v1, 'r') as v5:
for v6 in v5:
v6 = v6.strip('\n')
if v6.startswit... |
Imports:
```python
import math
import tensorflow as tf
import typing
```
Type definitions:
Input Types: List[int], List[int]
Output Type: Dict[str, tf.tpu.experimental.embedding.FeatureConfig]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[int], v2: List[int]) -> Dict[str, tf.tpu.experimental.emb... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=None, v2: str=None):
v3 = {'realms': ','.join(v1)} if v1 else None
return self._iget('/realm/status', v3, locale=v2)
``` |
Imports:
```python
import numpy as np
from numpy import ndarray
import typing
```
Type definitions:
Input Types:
Output Type: ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> ndarray:
v1 = self.get_max_length()
v2 = []
for v3 in self.tracks:
if v3.pianoroll.shape[0] < v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1: ColorButton = self.sender()
if v1 == self.btnPanelFader:
self.stackedWidget.setCurrentIndex(0)
elif v1 == self.btnPanelHSB:
s... |
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) != str:
raise TypeError('Expected a string but received ', type(v1))
self.index_keys.append(v1)
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.