text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: operations.Input
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: operations.Input) -> None:
self.generic_visit(v1)
self.print_op_id(v1)
print('Input(%s, dtype=%s)' % (v1.shape, v1.dtype.name))
``` |
Imports:
```python
from typing import Any
from typing import Callable
from typing import Dict
from typing import FrozenSet
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
from typing import get_type_hints
import typing
```
Type definitions:
```python
v0 = Optional[U... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, Path
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path, v2: Path) -> int:
v3 = self.new_container_command('run')
v4 = v3.mount(v1, f'patchee_{v1.name}')
v5 = v3.mount(v2, f'patch_{v2.name}')
... |
Imports:
```python
import pathlib
import typing
```
Type definitions:
Input Types:
Output Type: Iterable[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Iterable[str]:
yield from super()._iter_extra_repr()
yield f'num_triples={self.num_triples}'
for (v1, v2) in sorted(self.metada... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict):
self.traces[v1['container']]['x'].append(v1['master_index'])
self.traces[v1['container']]['y'].append(v1['container'])
self.traces[v1['conta... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict):
v2 = len(v1['selected_indexes'])
v3 = '{0} -> #{1:<%d} ({2})' % (2 if v2 >= 11 else 1)
v4 = zip(v1['history'], v1['selected_indexes'], v1['selecte... |
Imports:
```python
import pathlib
from pathlib import PurePath
import typing
```
Type definitions:
Input Types: bool, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=True, v2='/tmp'):
v3 = str(PurePath().joinpath(v2, self.id, 'attachments'))
pathlib.Path(v3).mkdi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str):
self.pin_offset = self.instance * 2 + 1
return await super()._launch_traj_rev(v1)
``` |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
Input Types: tp.List[str], int
Output Type: Any
Dependencies:
```python
def v0(v1: tp.List[str]) -> tp.Dict[str, tp.List[int]]:
v2 = map_bitstring(v1)
v3 = Counter(v1)
v4 = {}
for (v5, v6) in v3.items():
v7 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: GeoDataFrame, str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: GeoDataFrame, v2: str) -> bool:
assert v2 in ['LineString', 'Point', 'MultiLineString', 'MultiPolygon', 'Polygon'], ("Expected geomtype to be in ['... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any, Optional[str], Any
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3, v4, v5: Optional[str]=None, v6=None, **v7) -> dict:
v8 = dict(pair=v1, type=v2, ordertype=v3, volume=v4)
if ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int, int, np.matrix, np.matrix, Queue, float, float, float
Output Type: Any
Dependencies:
```python
def v0(v1: np.matrix, v2: np.matrix, v3: np.matrix, v4: float) -> float:
v5 = v1.shape[0]
v6 = sigmoid(v2 @ v3)
v7 = (-1... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Union['np.array', None], Union['np.array', None], Union[float, None], Union[float, None]
Output Type: 'np.array'
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union['np.array', None], v2: Union['np.array', None], v... |
Imports:
```python
import numpy as np
from numpy import ndarray
import typing
```
Type definitions:
Input Types: int, ndarray, ndarray, ndarray, float, float
Output Type: Tuple[ndarray, ndarray, float, float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: ndarray, v3: ndarray, v4: ndar... |
Imports:
```python
from hashlib import md5
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = md5(v1.encode()).hexdigest()[:10]
return super().create(url=v1, hashed_url=v2)
``` |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: List[int]
Output Type: None
Dependencies:
```python
def v0(v1: List[int], v2: int, v3: int) -> None:
if v2 < v3:
v4 = partition(v1, v2, v3)
v0(v1, v2, v4 - 1)
v0(v1, v4 + 1, v3)
```
```python
def v5(v6: List[i... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
while True:
(v1, v2) = await self.sub_socket.recv_multipart()
v3 = json.loads(v2)
v4 = v3['data']['platform']
... |
Imports:
```python
import tensorflow as tf
from tensorflow import keras
import typing
```
Type definitions:
Input Types: bytes, tf.TypeSpec
Output Type: tf.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes, v2: tf.TypeSpec) -> tf.Tensor:
v3 = tf.io.parse_tensor(v1, v2.dtype)
v3.set_s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = ''
if '^^^' in v1:
v2 = v1.split('^^^')[0] + ' ' + v1.split('^^^')[1]
else:
v2 = v1
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.thread.terminate()
self.thread.join()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes) -> None:
with open(self, 'wb') as v2:
v2.write(v1)
``` |
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 = 0
for v4 in v1:
if not v2 and v4 == ')':
v3 += 1
elif v4 == '(':
v2.append(1)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[str, Tuple[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[str, Tuple[str]]:
v1 = self.template_dirpath.name.split(self.key_val_delim)
return (v1[0], tuple(v1[1:-1]))
``` |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.init as init
import typing
```
Type definitions:
Input Types: nn.Linear
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: nn.Linear):
init.kaiming_normal_(v1.weight, mode='fan_out')
init.constant_(v1.bias, 0)
... |
Imports:
```python
import os
import pathlib
import typing
```
Type definitions:
Input Types: Any
Output Type: Tuple[pathlib.Path, ...]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> Tuple[pathlib.Path, ...]:
if not hasattr(v1, '__file__'):
return ()
v2 = v1.__file__
if v2 is Non... |
Imports:
```python
import itertools
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: 'OP_INFO_DICT'):
"""Create a JitOperator from the raw OP_INFO_DICT extracted from
the PyTorch JIT operator registry.
"""
(v2, v3, v4) = v1['name'][0].partition('::')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> list:
v2 = []
v3 = ['sender', 'recipient', 'subject']
for v4 in v1:
for v5 in v4.get('threatsInfoMap'):
v6 = {key: value fo... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.check('\n def embezzle(self, account, funds=MANY, *fake_receipts):\n # type: (str, int, *str) -> None # some comment\n ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.evaluations += self.offspring_population_size
v1 = self.get_observable_data()
self.observable.notify_all(**v1)
``` |
Imports:
```python
from skimage.graph import route_through_array
import typing
```
Type definitions:
Input Types: gdal.Dataset, (float, float), (float, float)
Output Type: [(float, float)]
Dependencies:
```python
def v0(v1: gdal.Dataset, v2: float, v3: float) -> (int, int):
v4 = v1.GetGeoTransform()
v5 = v4[0]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, float
Output Type: Tuple[np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: float) -> Tuple[np.ndarray]:
v4 = v2 @ v1
v5 = 1 + v1 @ v4 / v3
return (v4, v5)
``... |
Imports:
```python
import math
import torch
import torch.nn
import torch.nn.init
from torch.nn import functional
import typing
```
Type definitions:
Input Types: torch.Tensor, float
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: float=1.0) -> torch.Tensor:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=1) -> None:
(v2, v3) = self.num_of_pages_to_process(start_from_page=v1)
for v4 in v2:
self.process_page(v4)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=-1):
v2 = b''
v3 = 0
v4 = 0
v5 = True
while v5:
(v6, v7, v7, v7, v8, v9, v10, v11, v12, v13, v7) = self.scan_block_lines_offset(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: base_indexing.IndexEntryType
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: base_indexing.IndexEntryType) -> str:
v2 = str(v1['forecast_id'])
if 'model_description' in v1['extra_info']:
v2 += f": {v1['... |
Imports:
```python
from uuid import uuid4
import typing
```
Type definitions:
Input Types: str, bool
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool) -> str:
if not self._base_path:
raise ValueError('Base path must not be null')
v3 = self.KEY_PREFIX ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: int=DEFAULT_BUCKET_SIZE) -> list:
if len(v1) == 0:
raise Exception('Please add some elements in the array.')
(v3, v4) = (min(v1), max... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
print('Crack starting. Press enter to try again or any other key to exit.')
for v2 in range(1, 27):
v3: List[str] = []
for ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: bool
Dependencies:
```python
def v0(v1: int) -> int:
nonlocal a
v2 = 2
return v1
```
Function Name: v3
Function:
```python
def v3(v4: int) -> bool:
v5: int = 0
v6: int = 1
def v7(v8: int) -> int:
nonlo... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
assert self.parameter_model.built
super().build()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=False) -> str:
if self.properties:
v2 = "\n <h3>Alert: '{name}'</h3>\n <b>Alert_time:</b> {start},\n <b>Compr_entity... |
Imports:
```python
import cv2
import numpy as np
import typing
```
Type definitions:
Input Types: Any, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: bool=False):
v3 = None
v4 = np.frombuffer(v1, np.uint8)
if v2:
v5 = cv2.imdecode(v4, cv2.IMREAD_GRAYSCALE)... |
Imports:
```python
from functools import partial, reduce
from multiprocessing import Pool, cpu_count
import json
import typing
```
Type definitions:
Input Types: List[str], Path, bool
Output Type: None
Dependencies:
```python
def v0(v1: str, v2=15) -> Union[None, Example]:
v3 = convert_to_runnable(v1)
v4 = Exa... |
Imports:
```python
import math
import torch
from torch import nn, optim
from tqdm import tqdm
from torch.utils.data import DataLoader, Dataset
import typing
```
Type definitions:
Input Types:
Output Type: dict[str, torch.tensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict[str, torch.tens... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str):
v4 = '/folders/'
v5 = self.handle_as_user(as_user_arg=v3)
self._headers.update({'As-User': v5})
return self._h... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: dict, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2):
logging.info(v1)
logging.info(v2)
print(v1)
print(f'Processed order. Response received: {v2}')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = {'mnist': 55000, 'fashion_mnist': 55000, 'cifar10': 50000, 'cifar100': 50000, 'smallNORB': 23400 * 2, 'modelnet40': 9840}
return v2[v1]
``` |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: Tuple[int, int, int]
Output Type: Tuple[float, float, float]
Dependencies:
```python
def v0(v1):
return v1 * math.pi / 180.0
```
```python
def v2(v3, v4, v5):
v6 = v3 / 2.0 ** v5 * 360.0 - 180.0
v7 = math.atan(math.sinh(math.pi... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('LogicalIndex', int, ops.Qid)
```
Input Types: Dict[ops.Qid, v0], Sequence['cirq.Qid']
Output Type: None
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Dict[ops.Qid, v0], v3: Sequence['cirq.Qid']) -> None:
v4 = self... |
Imports:
```python
import h5py
from h5py._hl.files import File as h5File
import typing
```
Type definitions:
Input Types: str, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool=False) -> None:
if v2:
self.labels = self.activation_labels.keys()
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=None):
v3 = f'You have chickened at {v1}'
self._send(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pygitea.API, string, int
Output Type: bool
Dependencies:
```python
def v0(v1, v2, v3=bcolors.ENDC, v4=False):
if v4:
return bcolors.BOLD + v0(v1, v2, v3, False)
return v1 + v2 + v3
```
```python
def v5(v6: pygitea.API, v7: int) -> T.Li... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[float, float]:
if self.number_tracks() == 0:
return (0, 0)
v1 = self.get_track_lengths()
return (np.mea... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.List
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.List):
for v2 in range(0, len(v1)):
self.neuron_row_array[0][v2] = v1[v2]
self.neuron_col_array = self.neuron_row_array.T
``` |
Imports:
```python
from copy import deepcopy
import math
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2, v3):
self.board = v1
self.heights = v2
self.n_moves = v3
@staticmethod
def v4():
v5 = [[NONE] * ROWS for v6 in range(COLS)]
re... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, bool
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
v2 = ('mm', 'cm', 'km', 'um', 'ms', 'ml', 'mg', 'kg')
v3 = [w.capitalize() if w != w.upper() and w not in v2 else w for v4 in re.split('\\W', v1, flags=re.UNI... |
Imports:
```python
import shutil
import typing
```
Type definitions:
Input Types: Path
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path):
print(f'Removing: {str(v1.absolute())}')
shutil.rmtree(v1, ignore_errors=True)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[Tuple[float, any]]
Output Type: None
Dependencies:
```python
def v0(v1):
return v1[0]
```
Function Name: v2
Function:
```python
def v2(self, v3: Iterable[Tuple[float, any]]) -> None:
def v4(v5):
return v5[0]
v6 = max(v3, ... |
Imports:
```python
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.rdchem import Mol
from rdkit.Chem.rdmolfiles import MolFromSmiles
import typing
```
Type definitions:
Input Types: str
Output Type: Mol
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> Mol:
v2 = MolFromS... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Request', 'RequestResponseEndpoint'
Output Type: 'Response'
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: 'Request', v2: 'RequestResponseEndpoint') -> 'Response':
try:
v3 = await v2(v1)
finally:
s... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int=1) -> list:
v3 = self.session.get(f'{self.host}/page/{v2}', params={'s': v1}, verify=False, allow_redirects=True)
v4 = self.soup(v3)
... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
if self.atomic_weight_uncertainty is None:
if self.is_radioactive:
return '[{aw:.0f}]'.format(aw=self.atomic_weight)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Tuple[List[str], Generator[str, None, None]]
Dependencies:
```python
def v0() -> Generator[str, None, None]:
v1: str
for v1 in link_list:
driver.get(v1)
v2: OneSpecialtyPage = get_page(driver)
v3: str
... |
Imports:
```python
from requests import get
import typing
```
Type definitions:
Input Types: str, str, str, str, str, str, bool, bool, str, Dict[str, str], Union[str, int], Union[Tuple[str], str]
Output Type: Dict
Dependencies:
```python
def v0(v1: Dict[str, str]=None, v2: str='search') -> Dict:
return query(url='... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, int, Any
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray, v2: np.ndarray, v3: int, v4='real') -> np.ndarray:
if v4 == 'real':
return np.fft... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
print('=' * len(v1))
print(v1)
print('=' * len(v1))
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types:
Output Type: Iterator[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Iterator[str]:
if self.distribution.packages:
v1 = self.distribution.package_dir or {}
for v2 in self.distribution.packages:... |
Imports:
```python
import torch
import torch.nn as nn
from torch.nn import Embedding
from torch.nn.functional import relu
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: torch.Tensor):
v3 ... |
Imports:
```python
import logging
import os
import typing
```
Type definitions:
Input Types: str, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: bool):
if v1 and os.path.exists(v1):
if not v2:
v3 = 'File "{}" already exists! If you want to overwri... |
Imports:
```python
from typing import TYPE_CHECKING, Sequence, cast
import numpy as np
from pandas._libs import NaT, internals as libinternals
from pandas._typing import ArrayLike, DtypeObj, Manager, Shape
from pandas.util._decorators import cache_readonly
from pandas.core.dtypes.cast import ensure_dtype_can_hold_na, f... |
Imports:
```python
import json
import re
from pathlib import Path
import multiprocessing
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: List[str]) -> dict:
v2 = {}
v3 = {}
with multiprocessing.Pool() as v4:
v5 = v4.map(normalize, v1, chunksi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: int) -> bytes:
v3 = b''
while len(v3) < v2:
v4 = v1.recv(v2 - len(v3))
if not v4:
return b''
v3 += v4
retur... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
if self.head and self.head.value == v1:
self.head = self.head.next
self._size -= 1
return True
else:
v2 = self... |
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.fluid.thermal_expansion(self.background_temp_C)
if v1.dim < self.Nd:
v3 = -v2
else:
v4 = self.rock.THERMAL_EXP... |
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:
v2 = 0
for (v3, v4) in zip(v1, sorted(v1)):
if v3 != v4:
v2 += 1
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Optional[str]:
v1 = self.data_source_scan.data_source
'\n Returns an aggregation SQL expression for the given metric as a str or None if It... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: tf.Tensor
Output Type: tf.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: tf.Tensor) -> tf.Tensor:
v2 = [tf.image.decode_png(v1[i], channels=1) for v3 in range(4)]
v2 = tf.squeeze(tf.stack(v2, axi... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self._create_pc_instance()
v2 = [{'input_base_path': v1.data_processing_output_path, 'output_base_path': v1.compute_stage_output_base_path, 'fil... |
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 = ['ffprobe', '-loglevel quiet', '-show_streams', '-print_format json', f'{v1}/{v2}']
return v3
``` |
Imports:
```python
import requests, json, threading, select, multiprocessing, time, datetime
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if not v1 in self.servers_viewing:
self.servers_viewing.append(v1)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, np.ndarray, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: np.ndarray, v3: str):
v4 = f"{self._config.general['name']} Found {v1} at {v3}"
self._send(v4)
``` |
Imports:
```python
from collections import UserDict, UserList, UserString, OrderedDict
from collections.abc import MappingView
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any, Any
Output Type: v3
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2=v2, v3=v3, v4=v4, v5=v5) -> v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
v2 = self._get_secret_value_response(v1)
v3 = v2['SecretString']
return v3
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=False) -> None:
v2 = {'last_updated_chatters': self.last_updated_chatters, 'number_of_registered_members': len(self.channel_list_to_check)}
... |
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):
with open(os.path.join(v1, 'checkpoint.data'), 'w') as v2:
v2.write('Data')
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[float, float]:
(v1, v2) = self._read(self.TEMPERATURE_HUMIDITY_CHARACTERISTIC_UUID, '<hh')
return (v1 / 100.0, v2 / 100.0)
``` |
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 = 10
v3 = len(v1)
return np.interp(np.linspace(0, v3, v2 + 1), np.arange(v3), np.sort(v1))
... |
Imports:
```python
import itertools
import typing
```
Type definitions:
```python
v0 = Tuple[int]
```
Input Types: v0
Output Type: int
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0) -> int:
v3 = sum((i * j for (v4, v5) in itertools.permutations(v2, 2)))
v6 = v2[0] * v2[1]
return v3 + v6... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(NamedTuple):
v1: str
v2: int
```
Input Types:
Output Type: List[v0]
Dependencies:
Function Name: v3
Function:
```python
def v3(self) -> List[v0]:
if len(self.__addresses) > 0:
return self.__addresses
v4 = []
v5 = sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pygitea.API, string, string
Output Type: T.List
Dependencies:
```python
def v0(v1, v2, v3=bcolors.ENDC, v4=False):
if v4:
return bcolors.BOLD + v0(v1, v2, v3, False)
return v1 + v2 + v3
```
```python
def v5(v6, v7, v8=bcolors.ENDC, v9=... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self._length == 1:
self.clear()
else:
v1 = self._get_node(self._tail_id)
v2 = v1.get_prev()
self._tail_id = v2
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, 'SortKeyT'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: 'SortKeyT') -> Any:
if v2 is None or callable(v2):
raise NotImplementedError(f'Table sort key must be a column name, was: {v2}'... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str, v2: Operator, v3: Submodel, v4: Inbox) -> None:
super().__init__()
self.element_name = v1
self.operator = v2
self.implementation = v3
self.inbox = deepcopy(v4)
self... |
Imports:
```python
from math import sqrt
from scipy.stats import norm
import typing
```
Type definitions:
Input Types: np.ndarray, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: float=0.05):
v3 = v1.shape[0]
v4 = 50
v5 = [0.0] * v4
for v6 in range... |
Imports:
```python
import typing
```
Type definitions:
Input Types: ll.Node
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: ll.Node) -> None:
while v1 != None and v1.next != None:
v1.element = v1.next.element
v1.next = v1.next.next
v1 = v1.next
``` |
Imports:
```python
from collections import Counter
from collections import defaultdict
import typing
```
Type definitions:
Input Types: str, List[str]
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: List[str]) -> List[int]:
v3 = Counter(v2)
v4 = len(v2)
... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int=0, v3: int=MAX_INT):
if v1 > v3 - v2:
return None
if v2 > v3:
return None
v4 = set([random.randint(v2... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Callable
```
Input Types: str, v0, Any
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: str, v3: v0, v4=None):
v5 = self.__find__(v2)
v4 = v4 or {}
if v5 == -1:
raise KeyError(f'Parser rule no... |
Imports:
```python
import typing
```
Type definitions:
Input Types: cst.ClassDef
Output Type: cst.ClassDef
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: cst.ClassDef) -> cst.ClassDef:
self.classes.append(v1.name.value)
return super().visit_ClassDef(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
if self._top is None:
return 0
v1 = self._top._prev
v2 = 0
if v1 is not None:
while True:
if v1 is not None:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.