text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2=True) -> None:
super().load_single(v1, v2)
self._load_classes()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = 'wdom_id="{}"'.format(self.wdom_id)
v2 = super()._get_attrs_by_string()
if v2:
return ' '.join([v1, v2])
return v1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bytes
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: bytes) -> None:
with open(v1, mode='wb', encoding='utf-8') as v3:
v3.write(v2)
return
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, Any, Any
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2, v3, v4) -> pd.DataFrame:
v5 = self.processor.download_data(ticker_list=v1, start_date=v2, end_date=v3, time_interval=v4)
ret... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
if self.isEmpty():
return -1
else:
return self.arr[self.tail - 1]
``` |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]) -> None:
v1 = self.validator(v1)
with open(self.commit_file, 'w') as v2:
json.dump(v1, v2)
``` |
Imports:
```python
import itertools
import tokenize
import typing
```
Type definitions:
Input Types: List[tokenize.TokenInfo], int
Output Type: bool
Dependencies:
```python
def v0():
for (v1, v2) in enumerate(reversed(tokens[:index])):
if v2.type == tokenize.NEWLINE:
return index - v1
retur... |
Imports:
```python
import os
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: str
v2: str
```
```python
@dataclass
class v3:
v4: v0
v5: SecretDoc
```
```python
@dataclass
class v6:
v7: str
```
Input Types:
Output Type: v3
Dependencies:
```python
def v8(v9: str) -> v0:
v10 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: callable
Output Type: Any
Dependencies:
```python
def v0(*v1, **v2):
if v2['date']:
pass
```
Function Name: v3
Function:
```python
def v3(v4: callable):
def v5(*v6, **v7):
if v7['date']:
pass
return v5
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Protocol):
def __call__(self, v1: str, v2: str, v3: str) -> Any:
pass
```
Input Types: str, str, v0
Output Type: Any
Dependencies:
Function Name: v4
Function:
```python
def v4(self, v5: str, v6: str, v7: v0):
v8 = self._users[v5... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.log_trace()
v1 = self.contract.functions.clear()
v2 = v1.transact()
v3 = self.web3.eth.waitForTransactionReceipt(v2)
if v3['status']... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, any]
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, any]) -> Optional[str]:
if 'app_type' not in v1:
return None
elif v1['app_type'] == 'APP_IOS':
return 'io... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: Union[torch.device, str], bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[torch.device, str], v2: bool=False):
v1 = torch.Tensor().to(v1).device
if not v2 and self.device == v1:
... |
Imports:
```python
import re
from urllib.parse import urlencode, urlunparse, urlparse
import typing
```
Type definitions:
Input Types: requests.Response, dict, int
Output Type: dict
Dependencies:
```python
def v0(v1: requests.Response, v2: dict, v3: str) -> dict:
v4 = []
v5 = v2.get('limit', None)
try:
... |
Imports:
```python
from collections.abc import Mapping, Sequence
import torch
from torch.nn import Module
import typing
```
Type definitions:
Input Types: Callable
Output Type: Callable
Dependencies:
```python
def v0(v1: Any, v2: Union[type, tuple], v3: Callable, *v4, **v5) -> Any:
v6 = type(v1)
if isinstance(... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> float:
v1 = self._get_alazar()
v2 = v1.get_sample_rate()
v3 = self.filter_settings['numtaps'] - 1
return v3 / v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List['CreateSampleRequest']
Output Type: Tuple[list[str], list[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List['CreateSampleRequest']) -> Tuple[list[str], list[str]]:
v2: list = []
v3: list = []
for v4 in v1:
... |
Imports:
```python
import argparse
import sys
import typing
```
Type definitions:
Input Types:
Output Type: argparse.Namespace
Dependencies:
Function Name: v0
Function:
```python
def v0() -> argparse.Namespace:
v1 = argparse.ArgumentParser(description='Animate the construction of a segment tree build with the Su... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str], transformers.PreTrainedTokenizer, List[str], int, str
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], v2: transformers.PreTrainedTokenizer, v3: List[str], v4: int=0, v5: str='O') -> List[str... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[Dict, List[int]], Union[Dict, List[int]]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[Dict, List[int]], v2: Union[Dict, List[int]]):
v3 = self.parent
for v4 in self.modules:
if v4 i... |
Imports:
```python
import numpy as np
import numpy.ma as ma
import typing
```
Type definitions:
Input Types: []
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: []):
self.predictions = []
for v2 in v1:
self.predictions.append(self.model.predict(np.array([v2], dtype... |
Imports:
```python
from typing import Union, Sequence, Mapping, Tuple, List, Optional
import typing
```
Type definitions:
```python
v0 = Sequence[float]
```
```python
v1 = Union[Sequence[float], Mapping[str, float]]
```
Input Types: Sequence[v1], bool, bool
Output Type: Union[bool, Tuple[bool, Sequence[v1]], Tuple[bool... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Class'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Class') -> None:
for v2 in v1.classes.keys():
if v2 in self.classes.keys():
self.classes[v2]._extend(v1.classes[v2])
else:... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int):
if v2 == 3:
return v3
if v1 == len(self.nums):
return float('inf')
if (v1, v2, v3) in self.memory:... |
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('get', 'http://python.org/', headers={'ACCEPT-ENCODING': 'deflate'})
assert v2.headers['ACCEPT-ENCODING'] == 'deflate'
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: backends.InstallData
Output Type: T.Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: backends.InstallData) -> T.Dict[str, str]:
v2 = {}
if v1 is not None:
for v3 in v1.targets:
v2[os.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if self.type_registry.get('runtime_upgrades'):
if self.type_registry['runtime_upgrades'][-1][1] == -1:
self.type_registry['runtime... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'NodeGroup'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'NodeGroup'):
v2 = self.node_type == v1.node_type and self.provider == v1.provider or (self.provider == v1.provider and (self.node_type == 'any' or ... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
assert v1[0].isupper() or v1[-1:] == '_', v1
return v1[0].lower() + (v1[1:-1] if v1[-1:] == '_' else v1[1:])
```
Function Name: v2
Function:
```python
def v2(self, ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(ABC):
@abstractmethod
def v1(self) -> Dict[str, Any]:
pass
@abstractmethod
def v2(self) -> Dict[str, str]:
pass
@abstractmethod
def v3(self) -> Dict[str, str]:
pass
@abstractmethod
def v... |
Imports:
```python
import subprocess
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = ['E:/SteamLibrary/steamapps/common/Factorio/bin/x64/Factorio.exe', '--rcon-bind=127.0.0.1:9889', '--rcon-password=pass', '--start-... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Path
Output Type: Any
Dependencies:
```python
def v0(v1: Path):
assert v1.exists, f'{v1} does not exist'
v2 = []
for v3 in v1.rglob('index.json'):
with open(v3) as v4:
v5 = json.load(v4)
if 'doc'... |
Imports:
```python
from threading import Thread, Lock
import logging
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.__blinkThread is None:
logging.info('[PANEL-%s] - Action: start signaling', self.__gpio... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: (str, str)
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> (str, str):
v3 = self.experiment.datadirs[self.experiment.iteration]
v4 = self.experiment.parted_metrics[self.experiment.iteration]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: argparse.Namespace
Output Type: Any
Dependencies:
```python
def v0(v1: argparse.Namespace) -> NodeClient:
v2 = NodeConnectionInfo(host=v1.node_host, port_rpc=v1.node_port_rpc)
return NodeClient(v2)
```
```python
def v3(v4: argparse.Namespace, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self: QtWidgets.QMainWindow) -> None:
self.mic1.addmag = self.addmag1.value()
self.mic2.addmag = self.addmag2.value()
self.update_plot()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> bool:
if self.conn is None:
return False
else:
return not self.conn.is_closed()
``` |
Imports:
```python
from tempfile import NamedTemporaryFile
import typing
```
Type definitions:
Input Types: Any
Output Type: NamedTemporaryFile
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> NamedTemporaryFile:
v2 = NamedTemporaryFile(delete=False)
v1.savefig(v2.name, format='png')
v2.c... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str) -> None:
if v1 not in self._component_statuses:
self._component_statuses[v1] = {}
v4 = self._component_statuse... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: dict):
for (v3, v4) in v2.items():
if v3.lower() not in {k.lower() for v5 in v1.keys()}:
v1[v3] = v4
``` |
Imports:
```python
import numpy as np
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 = np.array(v1)
v3.sort()
v2 -= 1
return (v3[v2:] - v3[:v3.size - v2]).min()
``` |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame) -> pd.DataFrame:
(v2, v3, v4) = (v1.iloc[:, c] for v5 in range(3))
v6 = v2 * np.sin(v3)... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[Tuple[Text, int]], int
Output Type: None
Dependencies:
```python
def v0(v1: List[Tuple[Text, int]]) -> ModelProto:
v2 = helper.make_graph([], 'my graph', [], [])
return helper.make_model_gen_version(v2, opset_imports=[helper.make_opsetid(... |
Imports:
```python
import socket
from contextlib import closing
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if not self.is_running():
return False
with closing(socket.socket(socket.AF_INET, socket.SOCK_ST... |
Imports:
```python
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import typing
```
Type definitions:
Input Types: list, list, str, 'None or matplotlib figure', 'None or matplotlib axis', 'None or tuple', 'None or tuple'
Output Type: 'matplotlib FuncAnimation'
Dependen... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.start_time = None
self.job.elapsed += self.time_elapsed
self.time_elapsed = None
``` |
Imports:
```python
from collections import defaultdict
import typing
```
Type definitions:
```python
v0 = TypeVar('X')
```
Input Types: Iterable[Tuple[v0, v0]]
Output Type: Collection[Collection[v0]]
Dependencies:
```python
def v1(v2: v0, v3: Mapping[v0, v0]) -> v0:
if v2 not in v3:
raise ValueError(f'Unkno... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> None:
v2.info(f'Forcing quorum of cluster {self.cluster.name} using {v1.name}...')
self.connect_to_primary(v1, v2)
self.dba_cluster.for... |
Imports:
```python
import typing
```
Type definitions:
Input Types: (str, list)
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: (str, list)) -> list:
if isinstance(v1, str):
return self.idx2vec(self.token2idx(v1))
elif isinstance(v1, list):
return self.id... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: typing.Dict[str, str], typing.Iterable[str]
Output Type: typing.Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: typing.Dict[str, str], v2: typing.Iterable[str]=constants.SAFE_ENV_VARS) -> typing.Dict[str, str]:... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
for v1 in range(self._node_num_start, self._node_num_start + self._node_count):
yield self._name_template.format(path=self._path.path, node_num=v1)... |
Imports:
```python
from random import randint
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: str
v2: List[str]
v3: int = 0
v4: List[int] = field(default_factory=lambda : [0 for v5 in range(NB_PLAYERS)])
v6: List[int] = field(default_factory=lambda : [0 for v5 in range(NB_PLAY... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> str:
for (v2, v3) in enumerate(v1):
self._letters[v2]._fixed = v3.get('fixed')
self._letters[v2]._blacklist = v3.get('blacklist')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[str]], int
Output Type: List[List[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List[str]], v2: int) -> List[List[str]]:
v3 = len(v1)
v4 = len(v1[0])
v5 = [['.'] * v2 for v6 in range(v3 + 2 * v2)]
... |
Imports:
```python
import re
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.msg_map:
v2 = self.msg_map[v1]
if isinstance(v2, dict):
v3 = self.msg_map[v1].get('single_rule')
... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types: asyncio.Future
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: asyncio.Future) -> None:
try:
v1.result()
except asyncio.CancelledError:
pass
self.stop()
``` |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.closed:
return
if not self.mark_end_on_close:
self.closed = True
return
if self.handler is None:
... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.DataFrame, int, int
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: int, v3: int=None) -> pd.DataFrame:
if len(v1.index.levels[1]) < 2:
return v1
v4 = v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if self._is_leaf is None:
self._is_leaf = self._src.is_leaf(self._root)
return self._is_leaf
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(NodeVisitor):
v1: str
v2: UserConfiguration
def __init__(self, v3: str, v4: EdgeNode, v5: UserConfiguration):
self.current_node = v4
self.node_history = ConfinedList()
self.identifier = v3
self.config ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: List[Optional[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> List[Optional[int]]:
v2 = v1.split('-')
if len(v2) == 2:
try:
return [int(v2[0]), int(v2[1])]
except Value... |
Imports:
```python
import torch
import torch.utils.data
from torch import nn
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Funct... |
Imports:
```python
import torch
from torch.nn import CrossEntropyLoss
import typing
```
Type definitions:
Input Types: List[str], List[str], float, float, bool, int, int
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str], v2: List[str], v3: float=50, v4: float=0.01, ... |
Imports:
```python
import os
import re
import requests
import typing
```
Type definitions:
Input Types: str, List
Output Type: int
Dependencies:
```python
def v0(v1: str, v2: str) -> int:
v3 = v2.split('/')[-1]
if not os.path.exists(f'{v1}/{v3}'):
v4 = requests.get(v2, stream=True)
if v4.ok:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any, v2: int=4, **v3: Any) -> None:
with open(self.file, 'w') as v4:
self.writefuncs[self.file.extension](v1, v4, indent=v2, **v3)
``` |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, List[str], Optional[str], List[str]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: List[str], v3: Optional[str], v4: List[str]) -> List[str]:
v5 = '^(.*?)([mts]e|l[aeo]s?|n?os)$... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: 'CommandFunctionType', **v2):
self.name: str = v2.get('name') or v1.__name__
if not isinstance(self.name, str):
raise TypeError('Name of a command must be a string.')
self.callback ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0(v1: Path) -> None:
if v1.exists():
v1.unlink()
```
Function Name: v2
Function:
```python
def v2(self) -> None:
for v3 in [self._checksum_path, self._validation_path, self._iso_path]:
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Dict, Dict
Output Type: Tuple[Dict, Dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict, v2: Dict) -> Tuple[Dict, Dict]:
v3 = v1['global_orient'].copy()
v4 = v1['body_pose'].copy()
v5 = v1['betas']... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: bool=False) -> None:
if not self.digest_active:
self.collector = self.collector if v2 else self._keccak(self.collector)
self... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.anykey()
if v1:
self.trigger_key(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Callable[[Any], Any], List[Any]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Callable[[Any], Any], v2: List[Any]):
while self.has_next():
try:
self.get_next(timeout=0, ignore_if_timedou... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable, Iterable
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable, v2: Iterable):
v3 = 0
while True:
v4 = 0
for v5 in v2:
if v4 == v3:
v6 = v5
... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if not self.exists():
raise FileNotFoundError
Path(self.__filename).unlink()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pandas.DataFrame
Output Type: None
Dependencies:
```python
def v0() -> logging.Logger:
v1 = plottrlog.getLogger('plottr.apps.inspectr')
return v1
```
Function Name: v2
Function:
```python
def v2(self, v3: pandas.DataFrame) -> None:
if v3.e... |
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 = 'https://api.uyiban.com/base/c/auth/yiban'
self.sess.headers.update({'origin': 'https://app.uyiban.com', 'referer': 'https:... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: int, str
Output Type: datetime
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: str) -> datetime:
if v1:
try:
return datetime.fromtimestamp(v1)
except ValueErr... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str], List[str], Optional[datetime.date], Optional[datetime.date]
Output Type: str
Dependencies:
```python
def v0(v1: List[str]) -> List[str]:
return [term + ' [MH] ' for v2 in v1]
```
```python
def v3() -> str:
v4 = entrez_date_str(first... |
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 not self.check('checkout', v1):
return False
self.command('checkout', self._default_branch)
return True
``` |
Imports:
```python
import pickle
import typing
```
Type definitions:
Input Types: pathlib.Path
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pathlib.Path):
with v1.open('rb') as v2:
return pickle.load(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = collections.namedtuple('ActionInfo', 'original_action has_stone has_potion')
```
```python
v1 = stones_and_potions.PerceivedStone
```
Input Types: utils.TypeBasedAction, Optional[v1], v0
Output Type: None
Dependencies:
Function Name: v2
Function:
``... |
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 = v1[v2]
for v4 in range(len(v1)):
if v1[v4] < v3:
v3 = v1[v4]
v2 = v4
return v2
``... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Dict[str, Any]
```
```python
v1 = Tuple['Attr', List['Tree']]
```
Input Types: v0, List[v1]
Output Type: v1
Dependencies:
Function Name: v2
Function:
```python
def v2(v3: v0, v4: List[v1]=None) -> v1:
if v4 is None:
v4 = []
return (v... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = namedtuple('Album', 'id artist title year songs')
```
```python
v1 = namedtuple('Song', 'track title length play_count')
```
Input Types: v0
Output Type: int
Dependencies:
```python
def v2(v3: v1) -> int:
return v3.play_count * v3.length
```
Func... |
Imports:
```python
import os
import pandas as pd
import typing
```
Type definitions:
Input Types: Dict[str, List[Any]], str, Optional[Dict[str, Union[str, pd.DataFrame]]]
Output Type: Dict[str, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, List[Any]], v2: str, v3: Optional[Dict[str, Un... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: dict[int, int] | Generator
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bool=False) -> dict[int, int] | Generator:
v2 = list(range(192, 255 + 1))
v3 = list(range(192 + 848, 255 + 1 + 848))
v2.extend([12... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, List
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: List) -> None:
v3 = []
for v4 in self.subtrees:
if len(v3) == v1:
break
if not v4.is_leaf():
v5 ... |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: Any
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(v1=None, **v2) -> bytes:
v3 = requests.get('https://thispersondoesnotexist.com/image', headers={'User-Agent': 'My User Agent 1.0'}).content
retu... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, List[List[int]], int, int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: List[List[int]], v4: int, v5: int) -> bool:
v6 = 0
v7 = 0
v8 = len(v3) - 1
v9 = len(v3[0]) - 1
... |
Imports:
```python
import csv
import signal
import sys
from pathlib import Path
from multiprocessing import Pool
import typing
```
Type definitions:
```python
class v0(abc.ABC):
def __init__(self, v1: List[str]) -> None:
"""
Creates a Mapper.
:param fieldnames: the field names to create in... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
for v1 in range(0, 9):
for v2 in range(1, 10):
if np.count_nonzero(self.sudoku[v1, :] == v2) > 1:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Callable[[Any], Any], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v4, v1: Any, v2: Callable[[Any], Any], v3: str='default') -> None:
if len(v4) <= 2:
raise ValueError('Path too short.')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, bool, Any, Any, bool, bool, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False, v2: bool=False, v3=None, v4=None, v5: bool=False, v6: bool=False, v7: bool=False):
yield ('__class__', self._... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path):
self.folder = v1
return self
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False) -> dict:
v2 = {}
if hasattr(self, 'namespace') and self.namespace:
v2['namespace'] = str(self.namespace)
elif v1:
v2['... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: Callable
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> Callable:
v1 = __import__(v1, fromlist=[v2])
return getattr(v1, v2)
``` |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: List[str], DefaultDict[str, str], int
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str], v2: DefaultDict[str, str], v3: int) -> str:
v4 = ''.join(v1[-(v3 - 1):])
v5 = v2[v4]
return ran... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
if len(str(v1)) != 11:
raise Exception('手机号必须是11位数')
self.__phoneNumber = v1
v2 = self.__getSms(v1)
self.__token = v2['token_id']
... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict) -> None:
if v1['os'] in 'WINDOWS':
os.system('CLS')
else:
os.system('clear')
``` |
Imports:
```python
from functools import cmp_to_key
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
```python
def v0(v1: Any, v2: Any) -> int:
if type(v1) == type(v2):
if type(v1) == tuple:
if len(v1) < len(v2):
return -1
elif len(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.