text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: str
Dependencies:
```python
def v0(v1: int) -> int:
(v2, v3) = divmod(v1, 26)
if v3 == 0:
return (v2 - 1, v3 + 26)
return (v2, v3)
```
Function Name: v4
Function:
```python
def v4(v5: int) -> str:
v6 = ''
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tensor, Tensor, Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor, v2: Tensor, v3=False, v4=False) -> None:
super().update_model(v1, v2, v3, v4)
v5 = self._expand(v1, self.num_states + self... |
Imports:
```python
import pathlib
import typing
```
Type definitions:
Input Types: datastore.Key
Output Type: pathlib.PurePath
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: datastore.Key) -> pathlib.PurePath:
v2 = str(v1)
v2 = v2.replace(':', '/')
v2 = v2[1:]
if not self.case_se... |
Imports:
```python
import itertools
import typing
```
Type definitions:
Input Types: int, Iterable
Output Type: Iterable[List]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: Iterable) -> Iterable[List]:
v2 = iter(v2)
while True:
v3 = list(itertools.islice(v2, v1))
if l... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Union[str, Path], bool, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[str, Path], v2: bool=False, v3: bool=False) -> None:
v1 = Path(v1)
if v1.exists() and (not v2):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[float]], List[float]
Output Type: List[float]
Dependencies:
```python
def v0(v1: float, v2: float) -> Tuple[float, float]:
v3 = pow(v1 ** 2 + v2 ** 2, 0.5)
return (v1 / v3, v2 / v3)
```
```python
def v4(v5: float, v6: float, v7: floa... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[dict]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[dict]):
v2 = [set(d.keys()) for v3 in v1]
assert all((k == v2[0] for v4 in v2))
v5 = {v4: [] for v4 in v2[0]}
for v3 in v1:
for (v... |
Imports:
```python
import tarfile
import typing
```
Type definitions:
Input Types: Any, github3.repos.repo.Repository, typing.Callable, str, typing.IO
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: github3.repos.repo.Repository, v3: typing.Callable, v4: str, v5: typing.IO):
v6... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str, v2: dict):
v3 = dict(new_message=self._on_new_message)
await v3[v2['event_tag']](v1, v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
self._idx = self._idx + 1
if self._idx == self.block_size:
self._idx = 0
self._block = self._generate_block().tolist()
return self.... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: tf.Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tf.Tensor):
for v2 in self.validation_losses.values():
v2.reset_states()
for v3 in self.validation_metrics.values(... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1 = ['children', 'total', 'count', 'is_parallel']
def __init__(self):
self.children: Dict[str, v0] = {}
self.total: float = 0.0
self.count: int = 0
self.is_parallel = False
def v2(self, v3: str) -> ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1, v2) -> None:
await self.stop()
self.cfg = v2
await self.start()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Dict:
v1 = dict()
v1['grid'] = self.grid.to_dict()
v1['next_pt'] = self.next_pt.to_dict()
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: any) -> str:
v2: str = str(v1)
print(f'DEBUG: {v2}')
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Generator[bytes, None, None]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Generator[bytes, None, None]:
with self._zip.open(self._filename) as v1:
while True:
v2 = v1.read(64 * 1024)
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> str:
if not v1 or len(v1) < 1:
return '0'
if not v2 or len(v2) < 1:
return '0'
if 0 == v2 o... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = {'tags': ['appliance', 'monitor', 'dhcp', 'subnets'], 'operation': 'getDeviceApplianceDhcpSubnets'}
v3 = f'/devices/{v1}/appliance/dhcp/subne... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Size
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Size) -> bool:
v2 = len(v1)
if v2 == 1:
return v1[0] > 1
if v2 == 2:
return v1[0] > 1 or v1[1] > 1
return False
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> list:
v2 = [47200, v1 + 22000, v1, v1 + 100, v1 + 5, v1 + 1, 48888, v1 + 6, v1 + 8, v1 + 15, v1 - 5, v1 - 15, v1 - 23000]
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[int]]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List[int]]) -> None:
print("Sorry, that's 10 tries. Here's where they're hiding.")
for (v2, v3) in enumerate(v1, 1):
if v3[0] != -1... |
Imports:
```python
import collections
import typing
```
Type definitions:
Input Types: List[int]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int]) -> bool:
v2: DefaultDict[int, int] = collections.defaultdict(int)
for v3 in v1:
v2[v3] += 1
return len(... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable, int
Output Type: Iterable[Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable, v2: int) -> Iterable[Any]:
if len(v1) < v2:
v1 += (v2 - len(v1) + 1) * [v1[-1]]
return v1
``` |
Imports:
```python
from tqdm import tqdm
import typing
```
Type definitions:
Input Types: Union[nn.Module, nn.Sequential], Callable, DataLoader, torch.device, Callable, float, int, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[nn.Module, nn.Sequential], v2: Callable, v3: D... |
Imports:
```python
import nltk
import typing
```
Type definitions:
Input Types: {}, {}
Output Type: {}
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: {}, v2: {}) -> {}:
v3 = nltk.word_tokenize(v1['content'])
v4 = nltk.pos_tag(v3)
v5 = {'tokens': [], 'labels': []}
for v6 in v4:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
```python
def v0(v1, v2, v3, v4, v5):
return not (v3[v2] or v4[v1 + v2] or v5[v1 - v2])
```
```python
def v6(v7, v8, v9, v10, v11):
if v7 == n:
return v11 + 1
for v12 in range(n):
if v0(v7... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float=None, v2: bool=None):
for v3 in list(self._executing_pod_loggers.values()):
v3.stop(timeout=v1, throw_error_if_not_running=v2)
``` |
Imports:
```python
from urllib.request import urlopen
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
try:
v2 = urlopen(v1)
v3 = v2.info()
v4 = dict(v3)
v5 = v4['Content-Length']
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Any:
if not hasattr(self, 'body') or self.body is None:
return None
return [i.to_dict() for v1 in self.body]
``` |
Imports:
```python
import numpy as np
from sklearn.metrics import roc_auc_score
import typing
```
Type definitions:
Input Types: Model, Any, Any, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Model, v2, v3, v4, v5=None):
if v5 is None:
v5 = v2.__len__()
v6 = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: nn.Module
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: nn.Module) -> None:
assert v1 == 0, 'not working, remove this after fix to https://github.com/pytorch/pytorch/issues/25723'
if not hasattr(v1, 'autogra... |
Imports:
```python
import typing
```
Type definitions:
Input Types: any, any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: any, v2: any):
self.minutes_var.set(v1)
self.last_updated_var.set(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[int]]
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[List[int]]) -> float:
v2 = 0
v3 = self.vocab.token_type(v1[0][0])
v4 = []
v5 = -1 if not self.additional_tokens['Tempo'] else... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> None:
v2 = open(f'{v1}/{self.sequence.name}.qual', 'w')
v2.write(f'> {self.sequence.name}\n\n')
v2.writelines([i for v3 in self.sequence.da... |
Imports:
```python
import requests
import json
import typing
```
Type definitions:
Input Types: list, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: str, **v3) -> str:
v4 = '%l;%Y;%j;%J;%V;%p;%q;%K;%pp;%pc;%R;%S;%T;%u\n'
v5 = {'bibcode': v1, 'format': v4}
v6 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
(v2, *v3) = [int(v) for v4 in v1.split('x', 1)]
v3 = v2 if not v3 else v3[0]
return (v2, v3)
``` |
Imports:
```python
import re
import string
import random
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
```python
def v0(v1) -> List[str]:
v1 = v1.strip()
v2 = re.compile('[{0}]+'.format(string.whitespace))
v1 = re.sub(v2, ' ', v1)
if len(v1) == 0:
return []... |
Imports:
```python
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: MIMEMultipart
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str) -> MIMEMultipart:
v4 = MIMEMu... |
Imports:
```python
import datetime
from datetime import datetime, timedelta
import typing
```
Type definitions:
Input Types: float, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2):
v3 = 24
v4 = 3600
v5 = 60
v6 = 60
v7 = timedelta(seconds=v1)
retur... |
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:
for v2 in range(15, len(v1)):
v1['UpAverage'][v2] = (v1['UpAverage'][v2 - 1] * 13 + v1['UpMove'][v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any) -> None:
if v1 is not None:
raise ValueError('None expected')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: types.DataDict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: types.DataDict) -> None:
for v2 in v1:
if 'id' in v2.lower():
assert isinstance(v1[v2], int) or v1[v2] is None
assert v1.g... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: int) -> int:
v3 = v1[0]
v4 = 0
for v5 in range(1, len(v1)):
if v1[v5] > v3:
v3 = v1[v5]
v4... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str]) -> List[str]:
v2 = self._number_filenames(v1)
v3 = sorted(v2, key=lambda nf: nf.number)
return [nf.name for v4 in v3]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Java9_v2Parser.PrimaryContext
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Java9_v2Parser.PrimaryContext):
if v1.getChildCount() == 2:
if v1.getText() == 'this.' + self.field_identifier or v1.getTe... |
Imports:
```python
import pathlib
import os
import urllib
import pandas as pd
import sys
import tarfile
import typing
```
Type definitions:
Input Types: str, bool
Output Type: Any
Dependencies:
```python
def v0(v1, v2, v3=v3):
if sys.version_info < (3, 0):
import urllib
urllib.urlretrieve(v1, v2, v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str]):
while len(v1) != 0 and v1[0].strip() + '\n' == '\n':
v1.pop(0)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, bool
Output Type: Any
Dependencies:
```python
def v0(v1: bool):
assert (root_folder / FOLDER).exists(), f'No folder {FOLDER} found!'
v2 = list((root_folder / FOLDER).glob('**/*'))
v3 = [root_folder / str(file)[len(FOLDER) + 1:] for v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
try:
int(v1)
except ValueError:
raise ValueError('ERROR: Ticket number is not a number')
if len(self.cars) == 0:
raise... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str='.json') -> str:
v3 = re.sub('\\s+', '_', v1)
v3 = re.sub('\\W+', '-', v3)
return v3.lower().strip() + v2
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, list
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: list):
v3 = 0
v4 = float('+inf')
for v5 in range(len(v2)):
v6 = np.sum((np.array(v1) - np.array(v2[v5])) ** 2)
... |
Imports:
```python
import torch
from torch import Tensor
import torch.nn as nn
import typing
```
Type definitions:
Input Types: Tensor, Tensor, str, Optional[Tensor], int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor, v2: Tensor, v3: str, v4: Optional[Tensor]=None, v5: i... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = ''
v3 = requests.get(f'https://raw.githubusercontent.com/fedora-java/javapackages-bootstrap/master/project/{v1}.properties')... |
Imports:
```python
import dataclasses
import typing
```
Type definitions:
Input Types: str, Union[int, float]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Union[int, float]) -> None:
try:
v1 = v1.lower()
self.__getattribute__(v1)
except Attrib... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: int):
self.val = v1
self.next = None
def __repr__(self):
return print(f'Node({self.val})')
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v2
Function:
```python
def v2(... |
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 = []
for v3 in range(self.FIRST_RECORDED_YEAR, self.current_year + 1):
v2.extend(self.get_groups_for_year(v3, enrich=v1))
r... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
self._client.message_callback_remove(sub=v1)
self.logger.info(f"Unregister CALLBACK topic='{v1}'")
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any) -> None:
v2 = v1.add_resource('/plain')
v3 = v1.add_resource('/variable/{name}')
v4 = [v2, v3]
assert list(v4) == list(v1.resources())
``` |
Imports:
```python
import requests
from os import getenv
import typing
```
Type definitions:
Input Types: str, int, Any
Output Type: Any
Dependencies:
```python
def v0():
v1 = getenv('SOCIALSERVER_TEST_SERVER_ADDRESS', default=None)
v2 = getenv('SOCIALSERVER_TEST_SERVER_PORT', default=None)
return f"http:/... |
Imports:
```python
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
import typing
```
Type definitions:
Input Types: pandas.DataFrame, str, bool, float, float, float, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any
Output Type: Any
Dependencies:
Funct... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.validator_monitor._session_index = self.dummy_session_index
self.validator_monitor.node._no_of_blocks_authored = self.dummy_no_of_blocks_authore... |
Imports:
```python
import logging
from .abc.doc import DocDataSource, DocKeyPair, DocKeyType, DocValDict, DocKeyVal, DocIdPair
import typing
```
Type definitions:
Input Types: Text, dict, Text
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Text='metadata', v2: dict=None, v3: Te... |
Imports:
```python
import collections
import inspect
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
```python
def v0(v1: Generator[Any, Any, Any]):
v2 = None
while True:
try:
v3 = v1.send(v2)
except StopIteration as e:
v4 = v2 if e.... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: str, str, str, str, bool, bool
Output Type: Tuple[bool, str, str, str, List]
Dependencies:
```python
def v0(v1, v2):
if v1 == v2:
return True
if isinstance(v1, str) and isinstance(v2, str):
return v1.lower().repl... |
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.esvc.list(calendarId=v1).execute()['items']
v3 = []
for v4 in v2:
v3.append(self.esvc.delete(calendarId=v1, eventId=v4['id']... |
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:
v1 = self._get_pose_pairs()
v2 = self._get_mapping_part_affinity_fields()
v3 = -1 * np.ones((0, 19))
for v4 in range(len(v... |
Imports:
```python
import operator
from functools import reduce
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
import typing
```
Type definitions:
Input Types: anndata.AnnData
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: anndata.AnnData):
(v2, v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: float) -> None:
self.window.scroll_x = round(v1)
self.hscroll.position = round(v1)
``` |
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):
self.SendCommand('Rename ' + '"' + v1 + '"' + ' ' + '"' + v2 + '"' + '\n')
return None
``` |
Imports:
```python
from matplotlib.axes import Axes
from matplotlib import pyplot as pl
from matplotlib import gridspec
import typing
```
Type definitions:
Input Types: Optional[bool]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[bool]=None):
self.make_figure()
... |
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 = len(v1)
assert v2 >= 3
v3 = [[0 for v4 in range(v2)] for v4 in range(v2)]
for v5 in range(v2):
v3[v5][v5] = 1
for ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> np.ndarray:
v1 = np.zeros(self.shape, dtype=self.dtype)
np.fill_diagonal(v1, self._scalar)
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, *v3, v2=None, **v4):
print(f'Attempted to fetch os environment variable during parse, returning a mocked value for {v1}')
if v2:
return v2
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: None
Dependencies:
```python
def v0() -> None:
try:
config.instance.read_yaml()
except configexc.ConfigFileErrors:
raise
except configexc.Error as e:
v1 = configexc.ConfigErrorDesc('Error', e)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: builtins.bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> builtins.bytes:
with open(self, mode='rb') as v1:
return v1.read()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: str=None):
v3: list
if isinstance(v1, tuple):
v3 = self._driver.find_elements(*v1)
else:
v3 = self._driver.find_elements(v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Tuple[dict, dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> Tuple[dict, dict]:
v2 = {}
v3 = {}
v4 = v1['ti'].get_dagrun()
v5 = v4.get_task_instances()
for v6 in v5:
v7 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
for (v1, v2) in self.folds[:1]:
self.fold(v1, v2)
return len(self.transparent_paper.values())
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: argparse.ArgumentParser
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: argparse.ArgumentParser):
v2 = v1.add_argument_group(title='Loss function arguments', description='Loss function arguments')
v2.add_argume... |
Imports:
```python
from pandas.compat.numpy import function as nv
from pandas.errors import AbstractMethodError
from pandas.util._decorators import cache_readonly, doc
from pandas.core.dtypes.common import is_dtype_equal, is_object_dtype
from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries
from pandas.core.ar... |
Imports:
```python
import importlib
import typing
```
Type definitions:
Input Types:
Output Type: Union[dict, List[dict]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Union[dict, List[dict]]:
v1 = self._schema_regex.match('\n'.join(self.content))
v2 = '.'.join(['platypush.schemas', *v1... |
Imports:
```python
import os
import logging as log
import typing
```
Type definitions:
Input Types: str, Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2=512) -> int:
log.debug('-> check_sector_size()')
v3 = os.path.getsize(v1)
v4 = -(-v3 // v2)
log.debug('Se... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: str, float, float, int, float, float, str, int, Any
Output Type: Dict[str, Optional[float]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: float, v3: float, v4: int, v5: float, v6: float, v7: str, v8: int=2... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: Tuple[float, float], Tuple[float, float], float
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Tuple[float, float], v2: Tuple[float, float], v3: float=earthR1) -> float:
v4: float
v5: float
v... |
Imports:
```python
import matplotlib.pyplot as plt
from statsmodels.api import OLS
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
import typing
```
Type definitions:
Input Types: int, (float, float), float
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=25, v2... |
Imports:
```python
import torch
import torch.nn as nn
from torch.nn.init import xavier_uniform_, constant_
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: torch.Tensor, v3):
v4 = v1[N... |
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(self, v1: np.ndarray) -> np.ndarray:
assert v1.ndim == 2
assert v1.shape[0] == self.nsim
assert (self.index < v1.shape[1]).al... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
v1 = requests.get(f'https://discordapp.com/api/v9/users/@me', headers=self.headers)
if v1.status_code == 401:
raise ValueErro... |
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 = {}
for v2 in self.chunks:
if v2.group is None:
v1[v2.label] = v2.get_value()
elif v2.group in v1... |
Imports:
```python
import calendar
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
try:
v1 = int(self.month)
return calendar.month_name[v1]
except ValueError:
return 'every month'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: Any
Dependencies:
```python
def v0(v1: str, v2: str, v3: str):
v4 = f'{v2}_{v1}_history.csv'
if v3 is not None:
v4 = f'{v3}{v4}'
return v4
```
```python
def v5(v6: str, v7: str, v8: str=None):
if v8 i... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: str
Output Type: Tuple[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> Tuple[str, str]:
v2 = Path(v1)
v3 = str(v2.parent)
v4 = str(v2.name)
return (v3, v4)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.ends('y') and self.vowelinstem():
self.b = self.b[:self.k] + 'i' + self.b[self.k + 1:]
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, int
Output Type: np.ndarray
Dependencies:
```python
def v0(v1: np.ndarray, v2: int=1) -> np.ndarray:
assert v2 <= v1.shape[0], 'n_instances must be less or equal than the size of utility'
v3 = np.random.permutati... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, List[str], str, str, str
Output Type: Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: List[str], v4: str, v5: str, v6: str) -> Dict[str, str]:
v7 = {'function': v1, 'datatype': v6, '... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, int
Output Type: List[int]
Dependencies:
```python
def v0(v1: str, v2: str, v3: List[List[int]], v4: List[int]) -> List[int]:
v5 = []
for v6 in v4:
v7 = len(v3) - 1
v8 = v6
while v7 > 0:
v9 = v3[v7... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str]) -> List[str]:
v2: List[str] = []
v3: str = ''
v4: Pattern[str] = re.compile('^[ \t]*<')
for v5 in v1:
if v4.s... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
v1 = []
for v2 in self.__extension_cap.keys():
v3 = self.__plugin.execute_module_function(v2, 'init', {'sas_if': self.__sas_if})
if l... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._circuit = []
self._gate_info = {}
``` |
Imports:
```python
from collections import defaultdict
import torch
import typing
```
Type definitions:
```python
v0 = TypeVar('StateType', bound=DecoderState)
```
Input Types: List[v0]
Output Type: Dict[int, List[List[int]]]
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: List[v0]) -> Dict[int, L... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.