text stringlengths 190 325k |
|---|
Imports:
```python
from json import JSONDecoder
import typing
```
Type definitions:
Input Types: AbstractEventLoop, pytest_aiohttp.TestClient
Output Type: None
Dependencies:
```python
def v0(v1: AbstractEventLoop) -> web.Application:
return setup_app(CONF, v1)
```
Function Name: v2
Function:
```python
async def v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
try:
v2 = self.input_pin(v1)
except:
try:
v2 = self.output_pin(v1)
except:
raise ValueError(f'Coul... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple[float, float]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tuple[float, float]):
(v2, v3) = v1
return {'longitude': v2, 'latitude': v3}
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str='a'):
v1 = re.sub('\x1b.[0-9]+m', '', v1)
with open(f'{self.log_file}.log', v2) as v3:
v3.write(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = str
```
Input Types: List[v0], str
Output Type: Dict[v0, List[str]]
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: List[v0], v3: str) -> Dict[v0, List[str]]:
v4 = {}
for v5 in self.get_workplaces(v2, v3):
v4[v5[... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if not self._gst_thread:
return
self.stop()
self._gst_loop.quit()
self._gst_thread.join()
self._gst_thread = None
``` |
Imports:
```python
import numpy as np
from pandas._libs import lib
import pandas._libs.sparse as splib
from pandas._libs.sparse import BlockIndex, IntIndex, SparseIndex
from pandas._libs.tslibs import NaT
from pandas._typing import ArrayLike, AstypeArg, Dtype, NpDtype, PositionalIndexer, Scalar, ScalarIndexer, Sequence... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, int, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: int, v4: float):
assert v3 >= 0
assert v4 >= 0
for v5 in range(v3):
if self._is_template_on_screen(v2):
... |
Imports:
```python
import subprocess
import sys
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.config.snakemake if self.config.snakemake else 'snakemake'
v2 = subprocess.call([str(v1)] + self.snakemake_arg... |
Imports:
```python
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import MaxPool2D
from tensorflow.keras.models import M... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[str]]
Output Type: Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List[str]]) -> Dict[str, str]:
v2 = {}
for v3 in v1:
v4 = v3[0]
for v5 in v3[1:]:
v2[v5] = v4
retu... |
Imports:
```python
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:
if v3 in v2:
return v3
else:
v2[v3] = 0
return '\x00'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: Tuple[Callable, Dict, List]
Dependencies:
```python
def v0():
return self._res_(path, k, v)
```
Function Name: v1
Function:
```python
def v1(self, v2='', v3='') -> Tuple[Callable, Dict, List]:
if v2 in self.method_url_map... |
Imports:
```python
import os
import shutil
import subprocess
import typing
```
Type definitions:
Input Types: str, Optional[str]
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
v2 = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=v1).decode('ascii')
return v2.strip()
```
Function Nam... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int):
v2 = tf.keras.models.Sequential()
v2.add(tf.keras.layers.Input(shape=1000))
v2.add(tf.keras.layers.Dropout(rate=0.5))
v2... |
Imports:
```python
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutExcep... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = "document.body.innerHTML='';"
v2 += f'\n var qr = document.createElement("img");\n qr.src="{v1}";\n document.body.append... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: discord.Message
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: discord.Message) -> None:
if v1.author == self.user:
return
v2 = False
for v3 in v1.mentions:
if st... |
Imports:
```python
import pathlib
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> bool:
try:
v2 = pathlib.Path(v1).iterdir()
next(v2)
except StopIteration:
return True
else:
return... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict:
with self._open('r') as v1:
return dict(v1.meta)
``` |
Imports:
```python
from sklearn.preprocessing import LabelBinarizer
import typing
```
Type definitions:
Input Types:
Output Type: LabelBinarizer
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> LabelBinarizer:
v1 = LabelBinarizer()
return v1.fit(self.LABELS)
``` |
Imports:
```python
import pandas as pd
import glob
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
if v1[-1] != '/':
v1 += '/'
v2 = glob.glob(v1 + '*')
v3 = []
for v4 in v2:
v3.append(pd.read_csv... |
Imports:
```python
import typing
```
Type definitions:
Input Types: hvac.Client
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: hvac.Client) -> None:
if self.auth_mount_point:
v1.auth.radius.configure(host=self.radius_host, secret=self.radius_secret, port=self.radius... |
Imports:
```python
import re
import warnings
import numpy as np
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: np.array
Dependencies:
```python
def v0(v1, v2):
v3 = np.linspace(-v1, v1, 2 * v1 + 1)
v4 = np.linspace(-v2, v2, 2 * v2 + 1)[:, None]
v5 = (v3 * v2) ** 2 + (v4 * v1) *... |
Imports:
```python
import bisect
import typing
```
Type definitions:
Input Types: int, int, list
Output Type: Any
Dependencies:
```python
def v0(v1: int, v2: list, v3: int):
v4 = bisect.bisect_right(v2, v3)
if v4 < v1:
return sum(v2[v4:]) - v3 * (v1 - v4)
return 0
```
Function Name: v5
Function:
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
if v1 == 'mJy':
return '\\si{\\milli\\jansky}'
elif v1 == 'uJy':
return '\\si{\\micro\\jansky}'
elif v1 == 'ABmag':
return '... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 'QASE_API_TOKEN'
v2 = 'QASE_PROJECT'
v3 = 'QASE_RUN_ID'
v4 = 'QASE_RUN_NAME'
v5 = 'QASE_DEBUG'
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v6
Function:
```python
def v6(self, v7: v0... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'Dataset'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, **v1) -> 'Dataset':
for v2 in self.variables.values():
v2.persist(**v1)
return self
``` |
Imports:
```python
import os
import typing
```
Type definitions:
```python
class v0(TypedDict, total=False):
v1: str
v2: int
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v3
Function:
```python
def v3() -> v0:
v4: v0 = {'WEB_SERVER_HOST': os.environ.get('WEB_SERVER_HOST', 'localhost'), 'WE... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._distance_matrix = None
self._inverse_composed_permutation = {}
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: dsl.OpsGroup
Output Type: Dict[str, List[dsl.OpsGroup]]
Dependencies:
```python
def v0(v1: dsl.OpsGroup, v2: Dict[str, List[dsl.OpsGroup]]) -> None:
v3 = v1[-1]
for v4 in v3.groups:
if v4.recursive_ref:
continue
v2[... |
Imports:
```python
import tempfile
import os
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0() -> Tuple[str, str]:
v1 = 'ml-agents-binaries'
v2 = 'tmp'
v3 = 'binaries'
v4 = os.path.join(tempfile.gettempdir(), v1)... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Dict[str, List[Tuple[str, int]]]
```
Input Types: v0
Output Type: int
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0) -> int:
v3 = [('shiny gold', 1)]
v4 = 0
while v3:
(v5, v6) = v3.pop(0)
v3.extend([(x... |
Imports:
```python
import typing
```
Type definitions:
Input Types: string
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: string):
v1 = list(v1)
v2 = 0
v3 = len(v1)
while v2 < v3:
if v1[v2] == ' ':
del v1[v2]
v3 = v3 - 1
v2 =... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.List[str]
Output Type: Any
Dependencies:
```python
def v0(v1: typing.List[str]):
v2: typing.List[str] = []
for v3 in v1:
if '(' in v3:
v4 = v3.index('(')
if v4 > 0:
v2.append(v3[:v4])
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Any=None) -> Any:
if v1 == 'colours':
v1 = 'colors'
return super().get(v1, v2)
``` |
Imports:
```python
import glob
import os
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> None:
v2 = glob.glob(os.path.join('Processing', v1 + '*'))
for v3 in v2:
os.remove(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: frameQLParser.SimpleSelectContext
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: frameQLParser.SimpleSelectContext):
v2 = self.visitChildren(v1)
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 len(v1) > self.combo_width:
v1 = '{}...'.format(v1[:self.combo_width])
self.combo_vals.append(v1)
self.tk_combo.set(v1)
self.tk... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Optional[Dict[str, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Optional[Dict[str, Any]]:
v2 = self.http_session.get(v1, timeout=10)
if not v2.ok:
return None
return v2.json()... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Iterable[dict]
Dependencies:
```python
@paginated
def v0():
return get_json(Endpoints.COMPONENTS_ADMIN)
```
```python
@paginated
def v1():
return get_json(Endpoints.COMPONENTS_REGULAR)
```
Function Name: v2
Function:
```python
de... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], List[int], List[List[int]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: List[int], v3: List[List[int]]):
if not v1:
v3.append(v2)
for v4 in range(len(v1)):
if ... |
Imports:
```python
import requests
import requests.utils
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = [token for v2 in [self.private_token, self.oauth_token, self.job_token] if v2]
if len(v1) > 1:
rai... |
Imports:
```python
import inspect
import typing
```
Type definitions:
```python
v0 = typing.TypeVar('T')
```
Input Types: typing.Dict[type, v0], type
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: typing.Dict[type, v0], v3: type) -> v0:
for v4 in inspect.getmro(v3):
if v4 in... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any) -> bool:
if not isinstance(v1, str):
return False
return bool(re.search('^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$'... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, str, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: str, v3: str, v4: str):
if v1 and (not v1.get('image_detail')):
return True
else:
for v5 in v1.get('image_detail', [... |
Imports:
```python
import numpy as np
from numpy.typing import NDArray
import typing
```
Type definitions:
Input Types: Union[ArrayLike, Sequence[int]]
Output Type: Tuple[NDArray[np.int_], NDArray[np.int_]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[ArrayLike, Sequence[int]]) -> Tuple[NDArra... |
Imports:
```python
import torch as t
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: t.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2, v3, v4) -> t.Tensor:
v5 = t.pow(v1, 0.5 * t.arange(0, v2, dtype=v3, device=v4) / (v2 - 1))
return t.diag(v5)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(AttributedEntity, VocabularyResolverMixin, metaclass=SubclassRegisteringMetaclass):
v1 = None
v2 = {}
@classmethod
def v3(cls, v4) -> bool:
"""Guess if the file is of this type by inspecting the file's name and extension.... |
Imports:
```python
import os
import datetime
import typing
```
Type definitions:
Input Types:
Output Type: typing.Union[datetime.datetime, None]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> typing.Union[datetime.datetime, None]:
v1 = -1
v2 = [self.__wikiInstDirPath]
if self.__wikiD... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict):
for (v2, v3) in v1.items():
if v3 is not None:
self.sub_batch_metrics[v2].append(v3)
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, str, List[str]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str, v3: List[str]) -> bool:
v4 = os.path.isdir(v1)
v5 = False
for v6 in v3:
v5 = v5 or v2.find(v6) != -1
... |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.Index, str
Output Type: Tuple[pd.Series, pd.DataFrame]
Dependencies:
```python
def v0(v1, v2):
if pd.isnull(v2) or pd.isnull(v1):
return False
return pycountry.countries.get(alpha_2=v2).name ==... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> bool:
if v1 == 'training':
self.C.train()
self.R.train()
return True
if v1 == 'evaluation':
self.C.eval()
... |
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 = 0
while v2 < len(v1):
if v1[v2].isalpha():
break
v2 += 1
if v2 == len(v1):
raise ValueError('N... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dm.Cover
Output Type: Any
Dependencies:
```python
def v0(v1):
v1 = v1.replace('http://', 'https://')
if unslashed.match(v1) is not None:
return v1 + '/'
return v1
```
```python
def v2(v3):
v3 = v3.strip()
v3 = v3.replace('<... |
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 v2 not in self.__getByType(v1)['sources']:
self.__getByType(v1)['sources'][v2]: list = []
self.__getByType(v1)['count... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3) -> Optional[str]:
for v4 in self.list_pr_commits(v1, v2):
if v4.startswith(v3):
return self.get_commit_date(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[List[dict]], str, int
Output Type: 'JobCollection'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[List[dict]]=None, v2: str=None, v3: int=10) -> 'JobCollection':
v4 = self._helper_run_parallel_jobs(input_pa... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
(v2, v3, v4) = self.field_name_parts(v1)
if v3 and v3 != self.view.name:
return False
if self.field_type == 'dimension_group' and self... |
Imports:
```python
from logging import Logger
from os.path import join, exists
import numpy as np
from ..logging import log_stdout, log_verbose
import typing
```
Type definitions:
Input Types: str, list, list, bool, Logger
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: list, ... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor
Output Type: torch.Tensor
Dependencies:
```python
def v0(v1):
return (v1[2] - v1[0]) * (v1[3] - v1[1])
```
Function Name: v2
Function:
```python
def v2(v3: torch.Tensor, v4: torch.Tensor) -> torch.Tensor:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
```python
def v0(v1: str) -> bool:
return v1[-4:] == '.pdb'
```
```python
def v2(v3: str) -> bool:
return v3[-7:] == '.prmtop'
```
```python
def v4(v5: str) -> bool:
return v5[-4:] == '.psf'
```
```python... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
for v1 in ('initial_value', 'value'):
self.assertTrue(hasattr(self.signal, v1))
self.assertIsInstance(getattr(self.signal, v1), (int, flo... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2, v3, v4):
if v4 not in self.get_block_node_ids(v2):
self.commit_copy_block(v2, v4)
if v4 not in self.get_block_node_ids(v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None, v2: Dict=None):
if v1:
if v2:
raise Exception('get_project_ws_id: Sorry, you cannot specify both project and project nam... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: int):
v3 = [self.accuracy, self.loss]
v4 = v1.num_examples // v2
v5 = 0
v6 = 0
for v7 in range(v4):
(v8, v9) = v1.next_batc... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, Optional[str], Optional[str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=SEPARATOR_MID, v2: Optional[str]=None, v3: Optional[str]=None) -> None:
v4 = self._number_of_columns
if not v4:
... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: datetime, datetime, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: datetime, v2: datetime=None, v3: int=3):
v2 = v2 or datetime.utcnow()
return round((v2 - v1).total_seconds()... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: OrderType, v2: float, v3: int):
self.otype = v1
self.tspan = v2
self.speed = v3
```
Input Types: v0, list
Output Type: Any
Dependencies:
Function Name: v4
Function:
```python
def v4(... |
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._command_data.output
if not v2:
print(v1)
return
with open(v2, 'w') as v3:
v3.write(v1)
``` |
Imports:
```python
import pandas as pds
import typing
```
Type definitions:
Input Types: namedtuple, Any, Any
Output Type: Any
Dependencies:
```python
def v0(v1, v2: str):
if v1 is None:
return None
if v2 != 'str':
return eval(f'{v2}({v1})')
else:
return f'{v1}'
```
```python
def v3... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, list
Output Type: list
Dependencies:
```python
def v0(v1: list, v2: list) -> list:
v3 = v1.copy()
for v4 in v2:
if v4 not in v3:
v3.append(v4)
return v3
```
Function Name: v5
Function:
```python
def v5(v6: list, v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Dict[str, Any]:
v1 = v1.strip()
for v2 in self.user_cache.values():
if 'full_name' in v2.keys():
if v2['full_name... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
with open('prices_and_profits.txt', 'w') as v1:
for v2 in self.prices_and_profits:
v3 = self.prices_and_profits[v2]
if 'p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, list[list[int]]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: list[list[int]]) -> bool:
if not v2:
return True
self.graph = self.to_graph(v1, v2)
(v3, v4) = self.get_topologic... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float):
if not isinstance(v1, float):
raise ValueError('noiseVariance must be a float')
self.noise_variance_flag = True
self.noise_varianc... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float):
if v1 < -4:
v1 = -4
elif v1 > 4:
v1 = 4
return 1 / (1 + math.exp(-4.9 * v1))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = self.pc
v2 = next(self)
self.pc = v1
return v2
``` |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: str
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> List:
v2 = []
v3 = self._get_values(v1, 'BC')
for v4 in v3:
v2.append(datetime.strptime(v4, '%Y%m%d%H... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0() -> Any:
v1 = int(input('\nInsert temperature:\n> '))
v2 = (v1 - 32) * 5 / 9
return f'\n{v1}°F equals to {v2:.2f}°C'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2=sys.stdout) -> None:
for v3 in range(v1):
v2.write('\x1b[A')
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = namedtuple('Field', ['name', 'categories', 'default_category'])
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self) -> v0:
v2 = self.configuration_dictionary.get('default_field', self.default_config... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
if not self.is_solved:
self.solve()
return len(self._rejection_reason_lists)
``` |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: str
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> List[str]:
v2 = []
if v1 in self.__nzo_table:
v3 = self.__nzo_table[v1]
v3.pause()
logging.info('Pa... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: list
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list):
if not isinstance(v1, list):
raise TypeError('domains must be an instance of list')
return self.post_request('messenger_prof... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
self.failed_heartbeats = 0
if self.ws and (not self.ws.closed):
await self.ws.close()
if self.pacemaker and (not self.pacemaker.can... |
Imports:
```python
from importlib import import_module
import subprocess
import importlib
import sys
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
try:
importlib.import_module(v1)
except ImportError:
s... |
Imports:
```python
import itertools
import typing
```
Type definitions:
Input Types: float
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=None) -> bool:
if self.monofasc():
self.throw(41)
if v1 is None:
return False
else:
v2 = itertools... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3) -> Tuple[float, float]:
(v4, v5) = self._max_width_and_height(v3)
v6 = v2
for v7 in v3:
v8 = self._graph.p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Text
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text=''):
if not v1:
v1 = self.database
return [f'{x}' for v2 in ['-U', self.user, '-h', self.host, '-p', self.port, '-d', v1]]
``` |
Imports:
```python
import zlib
import typing
```
Type definitions:
Input Types: typing.Union[bytes, None]
Output Type: typing.Union[bytes, None]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Union[bytes, None]) -> typing.Union[bytes, None]:
if v1 is None:
return None
retu... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict[str, Any]:
v1 = self.custom_field.to_dict()
v2: Dict[str, Any] = {}
v2.update(self.additional_properties)
v2.update({'custom_field':... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: str) -> None:
v3 = self.bakers[v2][v1]
del self.endorsers[v2][v1]
v3.kill()
``` |
Imports:
```python
import cv2
import typing
```
Type definitions:
Input Types: Union[Any, List[Any]]
Output Type: Iterator[bytes]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[Any, List[Any]]=None) -> Iterator[bytes]:
while True:
v2 = self.get_frame(v1)
v2 = cv2.imenco... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: Union[str, datetime], Union[str, datetime], Optional[str], Optional[List]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[str, datetime], v2: Union[str, datetime], v3: Optional... |
Imports:
```python
from enum import Enum
from uuid import UUID
import typing
```
Type definitions:
```python
v0 = Union[int, str, UUID, Enum]
```
Input Types: v0
Output Type: str
Dependencies:
Function Name: v1
Function:
```python
def v1(v2: v0) -> str:
if isinstance(v2, str):
return v2
elif isinstance... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
```python
def v0(v1) -> None:
v1.set_translator('html', DPYHTML5Translator, override=True)
v1.add_builder(DPYStandaloneHTMLBuilder, override=True)
try:
v2 = v1.registry.builders['readthedocs']
... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: dict, datetime
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: datetime) -> tuple:
v3 = {}
v4 = {}
for v5 in v1['tournaments']:
if not v1['results'][v5]:
... |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: List[torch.Tensor], torch.Tensor, torch.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[torch.Tensor], v2: torch.Tensor, v3: torch.Tensor):
v4 = v2.max()
v5 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.