text stringlengths 190 325k |
|---|
Imports:
```python
import pickle
import typing
```
Type definitions:
Input Types: List[int], Dict[Any, Any], argparse.Namespace, List[Any], Dict[Any, Any]
Output Type: Any
Dependencies:
```python
def v0(v1: Dict[str, Any], v2: Dict[Any, Any], v3: List[Any]) -> None:
v4 = v1.get(v2['pattern_code'])
if v4:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: typing.Iterator[bytes]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> typing.Iterator[bytes]:
v1 = self._response.stream()
while True:
try:
yield self._loop.run_until_complete(v1.__anext_... |
Imports:
```python
from requests import get
from json import loads
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
try:
v2 = get(f'https://api.dictionaryapi.dev/api/v2/entries/en_US/{v1}')
v3 = loads(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Any:
try:
v1 = self.records[self.idx]
except IndexError:
raise StopIteration()
self.idx += 1
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Image.Image
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Image.Image):
v2 = self._parameters.get('excludeXPaths', [])
for v3 in v2:
self._exclude_element_from_image(v1, v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[int]) -> int:
v2 = 0
v3 = self.tokenizer._convert_token_to_id(self.tokenizer.mask_token)
while v2 < len(v1):
if v1[v2] == v3:
... |
Imports:
```python
from datetime import datetime, time
import typing
```
Type definitions:
```python
v0 = Callable[[SenderRoles], Union[bool, Awaitable[bool]]]
```
Input Types: time, time, bool, Any
Output Type: v0
Dependencies:
```python
def v1(v2: Any) -> bool:
v3 = datetime.now(tz_info).time()
if begin_time ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: [dict, Iterable]
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: [dict, Iterable]) -> dict:
if not self.serializer_class:
return v1
return self.serializer_class(many=isinstance(v1, list)).dump(v1... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[float, tuple]
```
Input Types: list
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: list=[]) -> v0:
if isinstance(v2, str):
return self.__library.SymGetTotalTravelDistanceEx(v2.encode('UTF8'))
... |
Imports:
```python
import torch
from torch import nn
from torch.nn import functional as F
import typing
```
Type definitions:
Input Types: Dict[str, torch.FloatTensor], Dict[str, torch.LongTensor], str
Output Type: Dict[str, torch.Tensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, ... |
Imports:
```python
import inspect
import typing
```
Type definitions:
Input Types: Callable
Output Type: Tuple[int, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Callable) -> Tuple[int, float]:
v2 = inspect.signature(v1).parameters.values()
(v3, v4) = (0, 0)
for v5 in v2:
i... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: str):
return os.path.isdir(v1)
```
Function Name: v2
Function:
```python
def v2(v3: str):
if not v0(v3):
os.makedirs(v3)
return True
else:
return Fal... |
Imports:
```python
import binascii
from textwrap import dedent, indent
import typing
```
Type definitions:
Input Types: str, BinaryIO, Callable[[int, int], None]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: BinaryIO, v3: Callable[[int, int], None]) -> None:
v4 = ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> bool:
v3 = np.logical_and(v1, v2)
return np.any(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
for v1 in self.modes:
self.topic_parser.conditions['topicGroup'] = v1
self.topic_parser.processGroupsNode()
self.topic_parser.fin... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: str
Output Type: pd.DataFrame
Dependencies:
```python
def v0(v1: str) -> list:
v2 = []
with open(v1, 'r') as v3:
v4 = v3.readlines()
for v5 in v4:
if v5[0] == '>':
v6 = int(v5.spl... |
Imports:
```python
import logging
import os
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
```python
def v0(v1) -> int:
v2 = os.path.join(v1, 'published/presentation')
try:
return len(os.listdir(path=v2))
except FileNotFoundError:
logging.info("Path %s d... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Iterator, dict
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterator, v2: dict) -> list:
v3 = []
for v4 in v1:
for v5 in v2['watch']:
if re.search(v5, v4['url']):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str, List[str]
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: str, v3: List[str]) -> dict:
v4 = []
for v5 in v3:
v4 += self.find_roms(v1, v2, v5)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> float:
self.fbo_reductor.computeMetric(v1)
v2 = self.fbo_reductor.readFromGPU()
return v2
``` |
Imports:
```python
import os
import shutil
import json
import zipfile
import typing
```
Type definitions:
Input Types: str, str, str, typing.Optional[str]
Output Type: Any
Dependencies:
```python
def v0(v1: str, v2: str, v3: str):
v2 = v2.lower()
v4 = os.path.join(v3, 'p2rank-predictions', f'{v2}.pdb_predictio... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, np.ndarray, Optional[np.ndarray], float, Optional[int], Optional[float]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray, v2: np.ndarray, v3: np.ndarray, v4: ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> dict:
v2 = dict([(__, _) for (v3, v4) in enumerate(v1.strip('\n').split('\t'))])
return v2
``` |
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 in self._spiderDict:
return self._spiderDict[v1]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = v1[:-1]
if v2.endswith('r') and v2 != 'er':
return ' '.join([f'{v2[:-1]}{v1[-1]}', 'er5'])
else:
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict) -> int:
v2 = 0
for v3 in v1['documents']:
for v4 in v3['annotations']:
if v4['validated']:
v2 += 1
return v2
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, List[int], int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: List[int], v3: int) -> bool:
v4 = v3 / v1
for (v5, v6) in enumerate(v2):
if v5 + v1 > len(v2):
break
v7 ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Optional[np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: str) -> Optional[np.ndarray]:
v3 = v1.get(v2.encode())
if not v3:
return None
return np.frombuffer(v3... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0(v1: int):
assert v1 in LIST_OF_DEIDS, '{} is not a valid detection element ID'.format(v1)
v2 = [f for v3 in JSON if v3['properties']['deid'] == v1]
return v2[0]
```
Function Name: v4
Func... |
Imports:
```python
from copy import deepcopy
import re
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]) -> Dict[str, Any]:
v1 = deepcopy(v1)
v2 = v1['machineType']
if not re.sear... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v1) -> None:
if self.has_vid_or_audio() and self.player.pause:
self.player.command('cycle', 'pause')
self.btn_toggle_playback.setText('||')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> None:
v2 = v1 % 300
if self.times[v2] != v1:
self.times[v2] = v1
self.counts[v2] = 1
else:
self.counts[v2] += 1
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: str, int, bool
Output Type: np.array
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int, v3: bool) -> np.array:
v4 = {'A': [4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
v1 = list(v1)
v2 = []
for (v3, v4) in enumerate(v1):
if v4 not in '()':
continue
elif v4 == '(':
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.game_total += 1
self.win_total += 1
``` |
Imports:
```python
import ast
from ast import Str
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
```python
def v0(v1) -> str:
return '.'.join(_get_qualified_name_parts(v1))
```
```python
def v2(v3) -> List[str]:
v4 = []
while True:
if isinstance(v3, ast.Name):
... |
Imports:
```python
import pickle
import os
import typing
```
Type definitions:
Input Types: str, str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> dict:
v3 = {'date': v2, 'ids': dict()}
if os.path.exists(self.__id_file):
with open(self.__id_fil... |
Imports:
```python
from pandas._config import get_option
from pandas._libs import lib
from pandas._libs.interval import VALID_CLOSED, Interval, IntervalMixin, _warning_interval, intervals_to_interval_bounds
from pandas._libs.missing import NA
from pandas._typing import ArrayLike, Dtype, IntervalClosedType, NpDtype, Pos... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0() -> str:
v1 = datetime.utcnow()
v2 = v1.replace(minute=v1.minute // 10 * 10)
return f"clock︱∼{v2.strftime('%H꞉%M')}・𝖴𝖳𝖢"
``` |
Imports:
```python
import geopandas as gpd
from shapely.geometry import shape
import typing
```
Type definitions:
Input Types: list
Output Type: 'geopandas.geodataframe.GeoDataFrame'
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> 'geopandas.geodataframe.GeoDataFrame':
assert v1 != [], 'ER... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list[str]
Output Type: Any
Dependencies:
```python
def v0(v1: str):
return v1 in match_list
```
Function Name: v2
Function:
```python
def v2(v3: list[str]):
def v4(v5: str):
return v5 in v3
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[str], str, type
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: Optional[str], v3: str, v4: type) -> dict:
v5 = {'type': 'object', 'required': [v3], 'properties': {v3: {'type': v1}}, 'descri... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, int, Optional[torch.BoolTensor]
Output Type: Tuple[torch.IntTensor]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: int, v3: Optional[torch.BoolTensor]=None) -> Tuple[torch.IntTensor]:
v... |
Imports:
```python
import torch
from torch.nn.utils.rnn import PackedSequence, pad_packed_sequence
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: PackedSequence
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2=None, v3=None) -> PackedSequence:
v4 = v1[0].batch_sizes[0... |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
Input Types: Sequence[Sequence[float]], str, Union[float, int], str
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Sequence[Sequence[float]], v2: str=None, v3: Union[float, int... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
```python
def v0(v1: str):
return v1.lower().replace(' ', '')
```
Function Name: v2
Function:
```python
def v2(v3: str):
v4 = v0(v3)
v5 = {}
for v6 in v4:
v5[v6] = (lambda : 1, lambda : v5[v6]... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: Callable[..., v0]
Output Type: Callable[..., v0]
Dependencies:
```python
@functools.wraps(f)
def v1(self: Any, *v2: Any, **v3: Any) -> Any:
return f(self._instance, *v2, **v3)
```
Function Name: v4
Function:
```pytho... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, 'ParserElement', Exception, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int, v3: 'ParserElement', v4: Exception, v5: bool=False):
v6 = '*' if v5 else ''
print('{}Match {} failed, {} ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: bytearray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> bytearray:
if len(v1) % 8 != 0:
raise ValueError('bits_str should have the length of ')
v2 = [v1[i:i + 8] for v3 in range(0, len(v1), 8)... |
Imports:
```python
import sys
import requests as r
import typing
```
Type definitions:
Input Types: str, str, bool
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: bool=False) -> str:
with open(v2, 'wb') as v4:
v5 = r.get(v1, stream=True)
v6 = v5.he... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict=None) -> None:
if v1:
self.action = v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
if self.fullname:
return self.fullname
else:
return self.email
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.convert._generate_configs_from_default()
self.assertEqual(v1['CSV_NAME'], 0)
``` |
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 = sorted(v1)
v3 = len(v1)
if v3 < 2:
return 1
v2[0] = 1
for v4 in range(1, v3):
if v2[v4] > v4 +... |
Imports:
```python
from itertools import filterfalse, tee, zip_longest
import typing
```
Type definitions:
Input Types: Iterable[Any]
Output Type: Iterator[Tuple[Any, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[Any]) -> Iterator[Tuple[Any, Any]]:
v1 = iter(v1)
return zip_long... |
Imports:
```python
import plistlib
import subprocess
from typing import Dict, Iterable, List, Optional, cast
import typing
```
Type definitions:
```python
class v0(TypedDict, total=False):
v1: str
v2: str
```
```python
v3 = Dict
```
Input Types: str
Output Type: Optional[v0]
Dependencies:
```python
def v4(v5: I... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
if self.path_manager is None:
return v1
return self.path_manager.get_local_path(v1)
``` |
Imports:
```python
from sklearn.utils import check_array
from sklearn.utils.validation import _ensure_no_complex_data
import typing
```
Type definitions:
Input Types: Any
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, **v2) -> pd.DataFrame:
v3 = v1.select_dtypes(include='... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=None):
if v1 == None:
return self.p_y_given_x
else:
return self.p_y_given_x[v1]
``` |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: List[str], float
Output Type: (List[str], List[str])
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], v2: float) -> (List[str], List[str]):
v3 = int(round(v2 * len(v1)))
random.shuffle(v1)
v4 = v1[:v... |
Imports:
```python
import torch
import torch.nn as nn
from copy import deepcopy
import typing
```
Type definitions:
Input Types: nn.modules.batchnorm._BatchNorm, list, bool, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: nn.modules.batchnorm._BatchNorm, v2: list, v3: bool=True, v... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2, v3, v4, v5=None):
if len(v1.shape) == 1:
v1 = v1.reshape(1, -1)
self.data = v1
self.idx = v2
self.n_rep = v3
self.alpha = v4
self.labels = v5 if v5 is no... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List:
v1 = []
for v2 in self.soup.find_all('Vehicle'):
v3 = {'_id': v2.get('id'), 'make': v2.find('Make').text, 'vin_number': v2.find('VinNumber').... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(NamedTuple):
v1: str
v2: str
```
Input Types: List[v0]
Output Type: str
Dependencies:
Function Name: v3
Function:
```python
def v3(v4: List[v0]) -> str:
v5: str = ''
for v6 in v4:
v5 = v5 + ' - ' + (v6.display_name if v6.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.DataFrame) -> pd.DataFrame:
self.__df: pd.DataFrame = v1
for (v2, v3) in self.__df.iterrows():
self._current_row = v3
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
print(' [*] Starting input stream')
if self.in_channel is not None and self._input_func is not None:
self.ip_consuming_tag = self.start_consu... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = ''
v2 = []
v3 = []
if self.subservice == 130:
v1 = f'Parameter Information:{os.linesep}'
v2.append('Domain ID')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Any, Any, Any
Output Type: torch.nn.Module
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2, v3, v4) -> torch.nn.Module:
if getattr(v3, 'output_size', None) and getattr(v2, 'build', None):
v2 = v2.build(v3... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.mu = np.random.randn(self.size)
self.sigma = np.random.rand(self.size)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if v1 < 0 or v1 > self.__length:
print('Invalid index')
return
for v2 in range(v1, self.__length):
self.__nodes[v2 - 1] = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.assertEqual(422, self.client.post('/v1/important_words', json={'input_String': 'hæ'}).status_code)
self.assertEqual(422, self.client.post('/v1/i... |
Imports:
```python
from hashlib import md5
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str):
v1 = v1.encode('utf-8')
v2 = v2.encode('utf-8')
v3 = md5()
v3.update(v1)
v4 = md5()
v4.updat... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
if not v1:
raise ValueError('Topic parameter is missing.')
self.consumer.subscribe(v1)
for v2 in self.consumer:
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: tf.Session
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tf.Session):
super().load(v1)
self.input_x = v1.graph.get_operation_by_name('inputs/features').outputs[0]
self.decoded = v1.graph.get_tensor_... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._device_id = 'id5'
self._service_name = 'service_name'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
if '--port' in v1:
self.port = int(v1[v1.index('--port') + 1])
else:
self.port = 8000
if '--probe-port' in v1:
sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> str:
del table, current_date
return ''
``` |
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:
v1 = self._embedding(v1)
v1 = self._permute(v1)
v1 = self._conv1D_1(v1)
v1 = nn.ReLU()(v1)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int, int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: int, v3: int) -> bool:
assert v1 <= v2 and v1 >= v3, f'{v1} must be between {v2} to {v3}'
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Generic[MessageDataType]):
def __init__(self, v1: MessageType, v2: str, v3: MessageDataType, v4: Optional[str]=None, v5: Optional[int]=None, v6: Optional[float]=None):
"""Initialization.
The sent_timestamp is auto-set on sen... |
Imports:
```python
from os import path
import typing
```
Type definitions:
Input Types: Any
Output Type: Tuple[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> Tuple[str, str]:
v2 = self._formatCharacters(v1['tag_string_character'])
v3 = self._formatCopyrights(v1['tag_string_c... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[Tuple[int, int]]
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Iterable[Tuple[int, int]]) -> float:
v2 = self.max_gas_fee
for (v3, v4) in v1:
v2 = min(v2, self.get_gas_fee_percentile(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.batch_idx is None:
self.batch_idx = 1
else:
self.batch_idx += 1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
self.current_pos = self.get_start_point()
self.goal_pos = self.get_goal_point()
while True:
v1 = self.__get_next_possible_movement()
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Text, Optional[List[Text]]
Output Type: List['Features']
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text, v2: Optional[List[Text]]=None) -> List['Features']:
v3 = self.get_sparse_features(v1, v2)
v4 = self.get_dense_... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.DataFrame, pd.DataFrame, pyodbc.connect
Output Type: pyodbc.connect
Dependencies:
```python
def v0(v1: pd.DataFrame, v2: pd.DataFrame) -> Tuple[pd.DataFrame, dict]:
if any(v2.index.names):
v2 = v2.reset_index()
v... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, str
Output Type: set
Dependencies:
```python
def v0(v1: str, v2: str) -> str:
v3 = v1.strip()[len(v2):]
v4 = ''
if v3[0] == '[':
v4 = v3[2:-2]
elif v3[0:4] == '.get':
v5 = v3.split('(')[1]
v5 = v5... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: Any, tf.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: tf.Tensor):
v2 = v2 - v1.mean_
v3 = tf.keras.backend.dot(v2, tf.constant(v1.components_.T, dtype=v2.dtype))
return ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self):
self.child: Optional[v0] = None
self.parent: Optional[v0] = None
self.subscribers: list[Callable[[Any], None]] = []
def v1(self, v2: v0) -> v0:
self.child = v2
return self
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str='') -> None:
"""Initialises a Task object
:param task_uuid_str: UUID string of task
:raises:
TaskInvalidUUID: Invalid task UUID
"""
if not v0.is_valid_uuid(v1):... |
Imports:
```python
import random
import numpy as np
import typing
```
Type definitions:
Input Types: str, Any, Any, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2=1000, v3=100, v4=10, v5=100000, v6=0.9):
v7 = self.neural_example_collection.find(filter={... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(commands.Bot):
def __init__(self):
v1 = discord.Intents.all()
super().__init__(command_prefix=get_prefix, intents=v1)
v2 = self.loop
v3 = v2.run_until_complete
self.is_first_launch = True
self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None, v2: bool=False) -> Optional[int]:
v3 = [v1, v2]
if self._connection_initialised():
return self._safe(self.channel.exch... |
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.salesforce_query(f"SELECT PriceBook2.Name, Product2.Id, Product2.Name, UnitPrice, Name FROM PricebookEntry WHERE PriceBook2.Name = ... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
v1 = await self.createClient()
self.assertIsInstance(v1.transport, asyncio.WriteTransport)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path
Output Type: Tuple[List[Tuple[str, int]], List[List[Dict[str, List]]]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path) -> Tuple[List[Tuple[str, int]], List[List[Dict[str, List]]]]:
v2 = False
v3 = None
v4 = 0
... |
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 = 1
v3 = 2
if v1 == v2:
return v2
if v1 == v3:
return v3
for v4 in range(3, v1 + 1):
(v2, v3) = (v3,... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1=None, v2=None):
self.data = v1
self.next = v2
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v3
Function:
```python
def v3(self, v4: v0):
if self.head.next is not None:
v... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(typing.NamedTuple):
v1: typing.Any
v2: typing.List[int]
v3: typing.List[SSCScope]
```
Input Types: v0, float, float, float, niscope.VerticalCoupling, float, int, float, float, float, int, bool
Output Type: Any
Dependencies:
Function ... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
self.value = '%+d' % random.choice(self.timezone_range)
return self.value
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.