text stringlengths 190 325k |
|---|
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: {str: Optional[float]}
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> {str: Optional[float]}:
v1 = self.get_policy_inputs(self.get_initial_state())
v2 = self.policy_model().inputs
for ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = 'https://drive.google.com/open?id='
v3 = 'https://drive.google.com/uc?export=download&id='
v4 = 'https://drive.google.com/file/d/'
i... |
Imports:
```python
import functools
import tensorflow as tf
import typing
```
Type definitions:
Input Types: bool, Optional[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bool=True, v2: Optional[int]=None):
v3 = 'channels_last'
if v2 is not None:
tf.random.set_see... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> None:
with self.conn:
self.conn.execute('DELETE FROM scanned_files WHERE sdid=?', (v1,))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, int, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: int, v3: str):
v4 = int(v1) // v2
v1 -= v4 * v2
return (f'{v4} {v3}', v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: tree.SyntaxTreeNode
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tree.SyntaxTreeNode):
if v1.value:
return v1.value
v2 = []
for v1 in v1.children:
v2.append(self.list_repr(v1))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, Sequence[Any]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: Sequence[Any]):
for v3 in v2:
if v3 in v1.keys():
return v1[v3]
else:
pass
``` |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as f
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor, v2: torch.Tensor):
v3 = f.linear(f.normalize(v1), f.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> str:
self.__check_rc_range(v1, v2)
v3 = self.__rc_to_i0(v1 - self.base, v2 - self.base)
return self.__well_name0(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.tyre_set_cb['values'] = tuple((i for v2 in range(1, len(v1) + 1)))
self.tyres_data = v1
``` |
Imports:
```python
import torch
from torch import Tensor
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> Tensor:
v3 = torch.float32
v1 = torch.as_tensor(v1, dtype=v3)
v2 = torch.as_tensor(v2, dtype=v3)
... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Optional[Dict]
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[Dict]) -> Optional[str]:
if v1:
v2 = f'```\n{json.dumps(v1, indent=2)}\n```'
return v2
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes):
v2 = v1[:-2 * self.num_test_chars]
v3 = v1[-2 * self.num_test_chars:-self.num_test_chars]
v4 = v1[-self.num_test_chars:]
if self.mode ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v1, **v2) -> None:
super()._fill_properties(*v1, **v2)
self.radius = v2.get('radius', 0.15)
self.resolution = v2.get('resolution', 15)
self.loop = v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> int:
if v1 == -2147483648:
return 0
v2 = v1 < 0
if v2:
v1 = -v1
v3 = []
while v1 > 0:
v3.append(v1 % 10)
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: pd.DataFrame, str, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: str, v3: bool=False) -> None:
v4 = f'{v2}_eta' in v1.columns
try:
v5 = v1[f'{v2}_pT']
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool):
if v1:
v2 = self.only_valids
v3 = self.only_errors
v4 = self.only_non_terminals
return v4 or v2 or v3
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.input_pipe_open:
self.input_pipe_open.close()
self.input_pipe_open = None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Any) -> str:
v2 = self.dsdl_loader.type_to_template(type(v1))
if v2 is None:
raise RuntimeError('No template found for type {}'.fo... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: torch.Tensor) -> float:
with torch.no_grad():
v3 = v2.size(0)
v4 = (v1 >= 0.5).float().t()... |
Imports:
```python
import subprocess
import typing
```
Type definitions:
Input Types: List[str], bool, Optional[Dict[str, str]]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], v2: bool=False, v3: Optional[Dict[str, str]]=None) -> str:
if v3 is None:
v3 = {}
v... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
class v0(NamedTuple):
v1: str
'The (unique) name of the label in the annotations.'
v2: int
'The label ID.'
v3: str
'The category from which to select samples for the label'
```
Input Types: v0, List[PIL.Image.Ima... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = None
if self.device:
self.stop_acquisition()
self._release_data_streams()
v1 = self._device.id_
if self.remote_d... |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
```python
def v0(v1) -> List[List[str]]:
v2 = defaultdict(list)
for v3 in v1:
v4 = v3['last_name']
v2[homoglyph(v4[0])].append(v3)
v5 = []
v6 = list... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, int, int, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int=3, v2: int=2, v3: int=100, v4: float=0):
v5 = np.empty(v3)
v6 = int(np.random.rand(1) > 0.5) * 2 - 1
v7 = sorted(n... |
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._data.column_names:
raise ValueError(f'Column name {v1} not in the dataset. Current columns in the dataset: {self._data.colu... |
Imports:
```python
import re
from textwrap import dedent, indent, wrap
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
```python
def v0(v1: str) -> str:
v2 = re.sub('[^0-9a-zA-Z_]', '', v1)
v2 = re.sub('^[^a-zA-Z_]+', '', v2)
if not v2:
raise ValueError(f'Coul... |
Imports:
```python
import os
import tempfile
import typing
```
Type definitions:
Input Types: str, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: bool=True) -> None:
if not os.path.isdir(v1):
if v2:
os.makedirs(v1, exist_ok=True)
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Entity', 'Entity'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Entity', v2: 'Entity'):
self._ptr.add_pair(v1.ptr, v2.ptr)
return self
``` |
Imports:
```python
import glob
import typing
```
Type definitions:
Input Types:
Output Type: Generator[str, None, None]
Dependencies:
Function Name: v0
Function:
```python
def v0() -> Generator[str, None, None]:
v1 = glob.glob('./data/pypi/*.tar.gz') + glob.glob('./data/pypi/*.zip') + glob.glob('./data/pypi/*.tg... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: List[str]
Dependencies:
```python
def v0(v1, v2):
v3 = v1[len(v2) + 1:]
return parse_expr(v3, ManifestContext.ALLOWED_VARIABLES)
```
Function Name: v4
Function:
```python
def v4(self, v5, v6=None) -> List[str]:
v7 = [... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'TradeEvent'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: 'TradeEvent'):
print(v1.symbol)
for v2 in v1.trade_list:
print(v2.price)
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None) -> None:
v2 = f"aws s3 sync s3://{self.bucket}/{self.key} ~/.ness/{self.key} --exclude '*' --include '*{v1 or ''}.{self.format}*' --del... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1 = ['txn', 'name', 'database_engine', 'after_callbacks', 'exception_callbacks']
def __init__(self, v2: Cursor, v3: str, v4: BaseDatabaseEngine, v5: Optional[List[_CallbackListEntry]]=None, v6: Optional[List[_CallbackListEntry]]=None):... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, int, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3, v4: int, v5, v6=sp.Symbol('x'), v7=sp.Symbol('y')):
v8 = []
v8.append([v2, v3, v1.evalf(subs={v6: v2, v7: v3})])
for... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
print('excuting MoveLiftArmToLimitSwitch')
self.climb.setLiftArm(self.power)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, UserInterface.KeyboardModifiers, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: UserInterface.KeyboardModifiers, v4: bool) -> None:
if self.__delegate and self.__mouse_press... |
Imports:
```python
from copy import deepcopy
import typing
```
Type definitions:
Input Types:
Output Type: 'CameraData'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'CameraData':
v1 = deepcopy(self)
v1.__is_immutable = False
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {}
if hasattr(self, 'result') and self.result is not None:
v1['result'] = self.result if isinstance(self.result, (dict, list)) else 'HTT... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: 'VariantDataset'
Dependencies:
```python
def v0(v1, *, v2=None, v3=None) -> 'VariantDataset':
if v2 or not v3:
v4 = hl.read_matrix_table(VariantDataset._reference_path(v1), _intervals=v2)
v5 = hl.read_matrix_table(... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Path, str, str, str
Output Type: Tuple[Path, int, str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str='movie', v3: str='%03d', v4: str='') -> Tuple[Path, int, str, str]:
if v4:
v... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(object):
def __init__(self, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10):
self.id = int(v1)
self.form = v2
self.lemma = v3
self.cpos_tag = v4
self.pos_tag = v5
self.feats = v6
self.head = i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes) -> Optional[str]:
if len(v1) != 6:
return None
v2 = [format(c, '02x') for v3 in list(reversed(v1))]
return ':'.join(v2).upper()... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path
Output Type: Path
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path) -> Path:
v2 = v1.parent
while v2.parent != v2:
if next(v2.glob('*.sln'), None) is not None:
return v2
v2 = v2.parent... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, bool
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: bool) -> tuple:
v4 = []
v4.append(v1)
v5 = v1
for v6 in range(2, v2):
v7 = v5 * v1 % v2
v4.append(v7)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='rgb', *v2, **v3) -> np.ndarray:
assert v1 in ['rgb', 'depth'], 'only rgb and depth rendering is implemented'
if v1 == 'rgb':
v4 = se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes):
self._body.extend(v1)
self._chunk.set()
``` |
Imports:
```python
import torch
from torch import nn
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor, v2: torch.Tensor):
if isinstance(v2, torch.Tensor):
v2 = v2.to(torch.int64)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: requests.Response
Output Type: Iterable[Mapping]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: requests.Response, **v2) -> Iterable[Mapping]:
for v3 in super().parse_response(v1, **v2):
v4 = self.model.parse_obj(v3)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: 'EntityLink'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str=None) -> 'EntityLink':
v3 = [entity_link for v4 in self.entity_links if v4.target_entity.name == v1 and (v2 is None or v2 == v4.p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
self.connection_manager.increment(self, v1, 'user_votes')
self.connection_manager.increment(self, 'users_voted')
``` |
Imports:
```python
from queue import Queue
import queue
import typing
```
Type definitions:
Input Types: int, float, float, float, float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: float, v3: float, v4: float, v5: float) -> None:
self.fps_label.text = f'FPS: {v1... |
Imports:
```python
import threading
import traceback
import typing
```
Type definitions:
Input Types: str, Callable[[], bool], Optional[tuple], Optional[dict]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Callable[[], bool], v3: Optional[tuple]=None, v4: Optional[dict... |
Imports:
```python
import torch
from torch import distributed
from torch.utils.data import DataLoader, DistributedSampler
from torch import Tensor
from torch.nn import Module
from torch.optim.optimizer import Optimizer
import typing
```
Type definitions:
Input Types: Tensor
Output Type: None
Dependencies:
Function Na... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, List[int], List[int]
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: List[int], v3: List[int]) -> np.ndarray:
v4 = v3[0] + v2[0] * (v1 // 2)
v5 = v3[1] + v2[1] * (v1 // 2... |
Imports:
```python
from multiprocessing.pool import ThreadPool
import typing
```
Type definitions:
```python
class v0(object):
def __init__(self, v1: int, v2: Bounds, v3: PsoParameters, v4: float, v5: float, v6=False, v7: Logger=Logger(verbose=False)):
"""
Constructs a swarm
:param swarm_si... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: bool
Dependencies:
```python
def v0(v1, v2) -> (int, int):
v3 = 0
v4 = 0
for (v5, v6) in zip(v1, v2):
if v5 == v6:
v3 += 1
v2 = list(v2)
for v6 in v1:
if v6 in v2:
... |
Imports:
```python
import itertools
import typing
```
Type definitions:
Input Types: List[int], List[str]
Output Type: Dict[str, List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[int], v2: List[str]) -> Dict[str, List[int]]:
v3 = {}
v2 = [int(group) for v4 in v2]
for (v5, v6) ... |
Imports:
```python
import multiprocessing
import re
import tempfile
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0(v1: str, v2: int) -> None:
with SimpleUnixFileLock(f'{v1}.lock'):
for v3 in f'foo-{v2}\n':
with open(v1, 'a') as 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 = self.url + '/lol-lobby/v1/custom-games/refresh'
if v1 is False:
return self.check_200(v2, 'POST')
if v1 is True and self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: argparse.Namespace
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: argparse.Namespace):
if v1.directory:
for (v2, v3) in enumerate(self.combinations):
print(v2, self.compute_working_dir(v3... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: memoryview
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: memoryview) -> int:
try:
return os.write(self.fd, v1)
finally:
del data
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> bool:
if not self.keyword('if'):
return False
self.condition(v1)
if not self.keyword('then'):
raise self.error('Syn... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, Optional[str]
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: Optional[str]=None) -> dict:
if 'folder' in v1 and v1['folder']:
v1['folder_id'] = v1.pop('folder')['id']
else:
v1[... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Transaction'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Transaction'):
v2 = v1.from_address.hex_hx()
return self.add_tx_to_list_by_address(v2, v1.hash.hex())
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: Dict[str, Any]):
"""Initialize with JSON glucose reading from Dexcom Share API."""
self.value = v1['Value']
self.mg_dl = self.value
self.mmol_l = round(self.value * MMOL_L_CONVERTION_FA... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
v3 = 'SELECT tsvector_to_array(to_tsvector(%s))'
v1.execute(v3, (v2,))
v4 = v1.fetchall()
return '{' + ', '.join(v4[0][0]) + '}'
```
Function Name: v5
Function:
```pytho... |
Imports:
```python
from datetime import date, datetime
from pathlib import Path
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, *v2, **v3) -> None:
if 'model' in v1:
v4 = v1['model']
(v5, v6, v6, v6,... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: Path, str
Output Type: Path
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str) -> Path:
v3 = os.path.join(v1, v2)
if os.path.isdir(v3):
v4 = 1
v5 = os.path.join(v1, f'{v2} ({v4})')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: torch.Tensor
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor) -> torch.Tensor:
v2 = self.actor_body_conv(v1)
v3 = v2.unsqueeze(1)
v3 = v3.transpose(0, 1)
v4 = self._hs
(v... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1):
self.val = v1
self.left = None
self.right = None
```
Input Types: v0, int
Output Type: [[int]]
Dependencies:
```python
def v2(v3):
v4 = []
while v3:
v4.append(v3.val)
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None) -> dict:
if v1 is None:
return None
return {'product_id': v1}
``` |
Imports:
```python
import copy
import typing
```
Type definitions:
```python
v0 = dict[Point, bool]
```
```python
v1 = tuple[int, int]
```
Input Types: v0
Output Type: v0
Dependencies:
```python
def v2(v3: v0, v4: v1) -> bool:
v5 = live_around(v3, v4)
return v5 == 0 or v5 > 2
```
```python
def v6(v7: v0, v8: v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.verify_response('accept', 'No active invites. Type `help` for commands.', 0)
self.verify_response('decline', 'No active invites. Type `help` for... |
Imports:
```python
import torch
from torch.utils.data import Subset
from torch.utils.data import DataLoader
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if isinstance(self._data, Subset):
v2 = torch.nonzero... |
Imports:
```python
import ast
import typing
```
Type definitions:
```python
v0 = Union[None, Value, CombinedReturn]
```
Input Types: ast.Expr
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: ast.Expr) -> v0:
if isinstance(v2.value, ast.Call) and isinstance(v2.value.func, ast.Nam... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str='') -> None:
if v1:
self._content.append(' ' * self._indentation)
self._content.append(v1)
self._content.append('\n')
``` |
Imports:
```python
import logging
import sys
from copy import copy
import typing
```
Type definitions:
Input Types: Namespace, str
Output Type: Any
Dependencies:
```python
def v0(v1: Dict) -> List:
v2 = []
v3 = copy(PARAM_TABLE_HEADER)
v3[0] = v3[0].format('**General parameters**')
v3.append('')
v3... |
Imports:
```python
import datetime
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.lastTriggered = datetime.datetime.min
self.cooldown = 300
``` |
Imports:
```python
import importlib
import typing
```
Type definitions:
Input Types:
Output Type: 'amici.Model'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> 'amici.Model':
v1 = importlib.import_module(self.model_name)
v2 = v1.getModel()
return v2
``` |
Imports:
```python
from os.path import join, isfile, basename, isdir
import os
import typing
```
Type definitions:
Input Types: Union[str, List[str]]
Output Type: Tuple[Dataset, Dataset, Dataset]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[str, List[str]]) -> Tuple[Dataset, Dataset, Dat... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, Path
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path, v2: Path) -> None:
self.curr_folder = v1
self.curr_path = v2
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Dict[str, np.ndarray], Union[Tuple[str], List[str]]
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: List[np.ndarray]) -> np.ndarray:
assert len(v1) == 6
assert sum((face.shape == v1[0].shape for v2 in v1)) == 6
... |
Imports:
```python
import logging
import os
import sys
from logging import CRITICAL
from logging import DEBUG
from logging import ERROR
from logging import FATAL
from logging import INFO
from logging import NOTSET
from logging import WARN
from logging import WARNING
import typing
```
Type definitions:
Input Types:
Ou... |
Imports:
```python
import numpy as np
import numpy.lib.recfunctions as rf
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = np.array([self._sin_dec_bins, self._log_energy_bins])
(v2, v3, v3) = np.histogram2d(self.... |
Imports:
```python
import torch
import torch.distributed as dist
from torch import Tensor
from torch.nn import Parameter
import typing
```
Type definitions:
Input Types: Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor):
v2 = 0
for (v3, v4) in enumerate(v1):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str], Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], v2=eval_expr):
if '(' not in v1:
return v1
(v3, v4) = (None, None)
for v5 in range(len(v1))[::-1]:
if v1[v5] == '(':... |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: dict, nn, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: nn, v3: bool=False):
v4 = nn.ModuleList([self.conv_op(**v1)])
if v3:
v4.append(nn.BatchN... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.start_end_run:
self.write('Finished run.')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
self.tracer.info('initializing environment for rfc sdk...')
self._setEnvironmentVariables()
self.tracer.info('rfc sdk environment configured succ... |
Imports:
```python
import logging
import requests
import os
from zipfile import ZipFile
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: list, v2: str, v3: str='https://s3.amazonaws.com/tripdata/', v4: str='2018'):
for v5 in v1:
if v4 in v5:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> None:
self.eventmgr.sock.sendjson({'type': '_.ping', 'data': {'callback': 'ping'}})
self.eventmgr.hook_event('ping', self.on_ping_recv)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: (float, float)
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2=5) -> (float, float):
try:
v3 = np.shape(v1)[0]
except IndexError:
print('huh')
raise ValueError... |
Imports:
```python
import typing
```
Type definitions:
Input Types: targets.Build, mpkg.BasePackage, str
Output Type: dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: targets.Build, v2: mpkg.BasePackage, v3: str) -> dict[str, str]:
v4 = super().get_package_ld_env(v1, v2, v3)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1, v2: int, v3: str) -> None:
v4 = {'UserID': v2, 'Name': v3, 'Data': {}}
if await v1.exists(self.DB, v4, json=True):
raise ValueE... |
Imports:
```python
import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = ''
for v3 in v1:
v4 = datetime.datetime.strptime(v3, '%Y%m%d %H%M').isoformat()
if v4 > v2:
v2 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tuple) -> str:
v2 = ' '.join(v1)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if not self.api_key or self.flush_queue_size <= 0 or self.flush_interval_millis <= 0 or (not self.is_min_id_length_valid()):
return False
ret... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, float, str
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: float, v3: str) -> np.ndarray:
v4 = (v1, v1)
v5 = None
if v3.__eq__('sym'):
v5 = (1 - v2) * np.iden... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = [self._provider_params['execute_path'], '--uri', self._connection_uri, '--gzip', f'--archive={self.backup_filepath}']
return ' '.join(v1)
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.