text stringlengths 190 325k |
|---|
Imports:
```python
import numpy as np
from pandas._config import get_option
from pandas._libs import NaT, NaTType, Timedelta, iNaT, lib
from pandas._typing import ArrayLike, Dtype, DtypeObj, F, Scalar, Shape
from pandas.compat._optional import import_optional_dependency
from pandas.core.dtypes.common import get_dtype, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0():
while _input_ready():
_next_input()
```
```python
def v1():
v2 = _next_input()
while len(v2) <= _MAX_ESCAPE_SEQUENCE_LENGTH and v2 in _ESCAPE_SEQUENCES[len(v2) - 1]:
v2 +... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: str):
try:
del self.data[v1]
except KeyError:
pass
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: pd.DataFrame
Dependencies:
```python
def v0(v1: pd.DataFrame, v2: str, v3: str) -> pd.DataFrame:
v4 = ['-']
v4.extend(list(v1[v2].unique()))
if None in v4:
v4.remove(None)
v5 = st.sidebar.selectbox(v3,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
v2 = '@'
for (v3, v4) in enumerate(v1):
if abs(ord(v4) - ord(v2)) == 32:
return self.makeGood(v1[:v3 - 1] + v1[v3 + 1:]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: List[Tuple[str, str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> List[Tuple[str, str]]:
v2 = []
with open(v1, 'r', encoding='utf-8') as v3:
for v4 in v3.readlines():
if v4[0] ==... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = len(self.get_item_list_from_soup(page_number=1))
self.logger.info(f'num_items_per_page = {v1}')
return v1
``` |
Imports:
```python
import sys
import ast
import os
import re
import subprocess
import traceback
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: 'ArchSettings'
v2: bool
v3: bool
v4: bool
v5: str
v6: bool
v7: int
v8: int
v9: 'Formatter'
v10: Optional[str]
... |
Imports:
```python
import configparser
from io import StringIO
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = self.get_peer_data('database')
if not v1:
return ''
v2 = configparser.ConfigParser()
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.cleanup_keep_in_db()
self.cleanup_keep_in_memory()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, float, bool
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: float, v3: bool=True) -> float:
v4: float = v2 - v1
if v3:
v4 = v4 / (v1 * 1e-06)
return v4
``` |
Imports:
```python
import numpy as np
from sklearn.model_selection import StratifiedKFold, train_test_split
import typing
```
Type definitions:
Input Types: Sequence[str], Sequence[str], float, int, int
Output Type: dict
Dependencies:
```python
def v0(v1: Sequence[Union[str, int]], v2: Sequence[Union[str, int]], v3: i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Gtk.TreeSelection
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Gtk.TreeSelection) -> None:
(v2, v3) = v1.get_selected()
if v3 is not None:
if v2.get_value(v3, 0) == 0:
v4 = 'mode'
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> int:
if self.__core.state.scheduling_mode == 0:
return self.__sequencing_optimizers[v1].get_action(self.__core.state)
else:
retu... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
v2 = self.transparent_width / 2.0
if v1 < 0:
return np.array([v2 + self.opaque_width, 100000000.0])
if v1 >= self.s... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, Optional[str], Optional[str], Optional[bool], Optional[bool], Optional[bool], Optional[str], Optional[bool]
Output Type: Response
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[str]=None, v3: Opt... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, Optional[str]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[str]=None) -> None:
if v2 is not None:
v1 += v2
else:
v1 += self.building_label + '.nc'
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = v3 = 0
v4 = False
v1 = ' {} '.format(v1)
while v3 < len(v1):
v5 = v1[v3]
if not v4:
if v5 == ';':
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Sequence[Awaitable[Any]]
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: float) -> Sequence[Awaitable[Any]]:
v2 = [self.stats_refresh(v1)]
v2.extend([b.listen() for v3 in self.batteries])
retu... |
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():
self.entry_services[v3.entry_service].append(v2)
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
```python
def v0(v1, *v2):
pass
```
```python
def v3(v4, v5):
v0("find configuration for '%s' ...", v4)
v0(' found %d folders %s', len(v5) if v5 else 0, v5)
if v4 is None:
return No... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> str:
v2 = f"SELECT column_name, data_type, is_nullable \nFROM INFORMATION_SCHEMA.COLUMNS \nWHERE TABLE_NAME = '{v1}'"
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: tx_attribute.TransactionAttribute
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: tx_attribute.TransactionAttribute):
if v1 not in self._attributes:
self._attributes.append(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[str, int, float]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[str, int, float]) -> bool:
v1 = str(v1)
v2 = ''
for v3 in v1:
v2 = v3 + v2
return True if v2 == v1 else False
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, np.ndarray
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray, v2: np.ndarray, v3: np.ndarray) -> np.ndarray:
v4 = np.sum([np.multiply(v3[i], v2[i].re... |
Imports:
```python
import polars as pl
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: pl.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame) -> pl.DataFrame:
v1 = v1.reset_index().rename({'index': 'Index'}, axis=1)
return pl.DataFrame(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> list:
with open(v1) as v2:
v3 = []
v4 = v2.read().split()
for v5 in range(0, len(v4), 4):
v3.append(v4[v5])
retur... |
Imports:
```python
import subprocess
import typing
```
Type definitions:
Input Types: str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> None:
self.LogPrint('Running git apply {0} in {1}'.format(v1, v2))
v3 = [self.GitCommand, 'apply', v1, '--white... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Tuple[bpy.types.FCurve], bpy.types.Object, Any, typing.Union[str, None], typing.Union[str, None]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: typing.Tuple[bpy.types.FCurve], v2: bpy.types.Object, v3, v4: typi... |
Imports:
```python
from urllib.parse import urlencode
from urllib.request import HTTPError, Request, URLError, urlopen
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
```python
def v0(v1: str, v2: str=None) -> str:
v3 = {'User-Agent': USER_AGENT}
v4 = Request(v1, headers=v3)
... |
Imports:
```python
import logging
import requests
import typing
```
Type definitions:
Input Types: str, str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> bool:
logging.debug('util.download(): url = %s, local = %s', v1, v2)
v3 = requests.get(v1)
with open... |
Imports:
```python
import typing
```
Type definitions:
Input Types: StreamReader, Callable[..., Any]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(v1: StreamReader, v2: Callable[..., Any]) -> None:
while True:
v3 = await v1.readline()
if v3:
v2(v3)
... |
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 * 2 + 1 > self.size:
return v1 * 2
elif self.heap[v1 * 2].weight <= self.heap[v1 * 2 + 1].weight:
return v1 * 2
else:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
return v1[0].lower() + v1[1:]
```
Function Name: v2
Function:
```python
def v2(self, v3: bool=False) -> str:
v4 = f'{v0(self.name)}Serializers'
if v3:
v4 += f': ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Optional[Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Any, v2: str) -> Optional[Any]:
if hasattr(v1, v2):
return getattr(v1, v2)
else:
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: fiepipe3dcoat.data.workfile.WorkFileVersion, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: fiepipe3dcoat.data.workfile.WorkFileVersion, v2: str):
v3 = self.GetMultiManager()
v4 = self.GetManager(v3)... |
Imports:
```python
import csv
import typing
```
Type definitions:
Input Types: str, float, list, int, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: float, v3: list, v4: int, v5: str) -> None:
v6 = [v1, v2, v3, v4]
with open(v5, 'a+') as v7:
v8 = csv.writ... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, Callable[str, bool], Callable[str, bool], bool
Output Type: Sequence[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: Callable[str, bool]=lambda x: True, v3: Callable[str, bool]=lambda x: True, v4: bool=True... |
Imports:
```python
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data
from torch.utils import model_zoo
import typing
```
Type definitions:
Input Types: Any, str
Output Type: Any
Dependencies:
```python
def v0(v1, v2: str):
(v3, v4) = get_avg_traces_with_int4_layers_indexes(v1, v2)
r... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
(v1, v2, v3) = range(3)
assert v1 < v2
assert v2 < v3
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1 = 'log.txt'
v2 = 'input.txt'
v3 = 'build'
v4 = '__FAILURE__'
v5: str
v6: Dict[File, int]
v7: int
v8: int
v9: int
v10: List[Rule]
v11: Dict[ActionWithInputs, ActionWithInputs]
v12: Optional[Rule]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: [[float]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> [[float]]:
v3 = open(v1)
v4 = 0
for v5 in v3:
v4 += 1
v3.seek(0)
v6 = []
for v5 in range(v4):
v7 = []
... |
Imports:
```python
import inspect
import typing
```
Type definitions:
Input Types: Iterable[str]
Output Type: Tuple[str, ...]
Dependencies:
Function Name: v0
Function:
```python
def v0(cls: Any, v1: Iterable[str]=()) -> Tuple[str, ...]:
v2 = set()
for v3 in cls.__dict__:
if callable(cls.__dict__[v3]) ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, list, list
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: list, v3: list):
v4 = list()
v5 = list()
v6 = 0
for v7 in v1:
for v8 in v7:
if (v8['deprel'] == 'ccomp' or ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> list:
self._add_tql_imports()
v1 = 'GroupAttributeFilter'
v2 = 'group_attributes.group_attribute_filter'
if self.type_.lower() == 'indicators':
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float):
v2 = self.time_now_s()
v3 = self.SHORT_POLL_INTERVAL if v2 - self._user_stream_tracker.last_recv_time > 60.0 else self.LONG_POLL_INTERVAL
... |
Imports:
```python
import math
from random import randint
from selenium.common.exceptions import MoveTargetOutOfBoundsException
from selenium.webdriver import ActionChains
import typing
```
Type definitions:
Input Types: Any, int, int, int, int, Any
Output Type: tuple
Dependencies:
```python
def v0(v1: int, v2: int, v... |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: int, int, float, torch.Tensor, torch.device
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: float, v4: torch.Tensor, v5: torch.device... |
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 = sum(v1)
v3 = 0
for v4 in range(len(v1)):
if v3 * 2 == v2 - v1[v4]:
return v4
v3 += v1[v4]
retu... |
Imports:
```python
import ast
import typing
```
Type definitions:
Input Types: Union[str, int], int, Tuple[int, int], Tuple[int, int], str, bool, bool
Output Type: Union[Tuple[int, int], None]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[str, int], v2: int=0, v3: Tuple[int, int]=(0, 0), ... |
Imports:
```python
from datetime import date, datetime
import polars as pl
from polars import testing
from polars.datatypes import Float64, Int32, Int64, UInt32, UInt64
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0(v1: pl.Series, v2: pl.Series, v3: str, *v4: Any, **... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2: str):
if self._row_win(v1, v2) or self._col_win(v1, v2) or self._diag_win(v1, v2):
return True
return False
``` |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = tuple[Coord, Coord, Coord]
```
Input Types: v0, v0
Output Type: list[v0]
Dependencies:
```python
def v1(v2: v0) -> int:
return v2[0][0]
```
```python
def v3(v4: v0) -> int:
return v4[0][1]
```
```python
def v5(v6: v0) -> int:
return v6[1]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[int]) -> List[int]:
v2 = len(v1)
v3 = int(''.join(map(str, v1)), 2)
return [bin(v3 & x).count('1') % 2 for v4 in range(2 ** v2)]
``` |
Imports:
```python
from base64 import urlsafe_b64encode
from hashlib import sha256
import typing
```
Type definitions:
Input Types: bytes
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes) -> str:
v2 = urlsafe_b64encode(sha256(v1).digest()).rstrip(b'=')
return v2.decode('as... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: Any
Dependencies:
```python
def v0(v1, v2=300):
v3 = v1.loc['RETARD MINUTES']
v4 = v1.loc["NOMBRE D'INDEMNITES DEMANDEES"]
v5 = 0
if 10 < v3 < 45:
v5 = v2 / 3 * v4
elif 60 < v3 < 180:
v5 = ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int):
v2 = []
self.helper(v2, '', 0, 0, v1)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Builder):
def __init__(self) -> None:
super().__init__()
self.classroom = ClassroomBuilderForTest().build()
self.repository: ClassroomRepository = None
self.date: datetime = self.classroom.schedule.start.repla... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[Any], Any, bool
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[Any], v2: Any, v3: bool=False) -> int:
try:
v4 = v1.index(v2)
if v3:
v1.pop(v4)
return v4
except Val... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> None:
if self._test_mode or not v1:
return
v2 = self.telegram_bot.getWebhookInfo()
if v2.get('url') != v1:
self._logger.inf... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
v2 = re.findall('[a-zA-Z0-9]+', v1)
return ''.join((''.join([w[0].upper(), w[1:]]) for v3 in v2))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[int, int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[int, int]:
v1 = self.args[0].shape[0] * self.args[1].shape[0]
v2 = self.args[0].shape[1] * self.args[1].shape[1]
return (v1, v2)
``` |
Imports:
```python
import io
import typing
```
Type definitions:
Input Types: 'Relationship'
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Relationship') -> str:
v2 = io.StringIO()
v2.write('LEFT OUTER JOIN ')
v2.write(self.foreign_table.alias_table.__quoted_name__... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool, bool, bool, bool, int, bool, bool, str
Output Type: Union[str, AsyncIterator[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, *, v2: bool=False, v3: bool=False, v4: bool=False, v5: bool=False, v6: int=0, v7: ... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: str, str
Output Type: Union[torch.dtype, torch.device]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str) -> Union[torch.dtype, torch.device]:
if v2 == 'device':
return torch.device(v1)
if v2 == ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
v1 = [['fortnite', 'outfit_mimic_for'], ['fortnite', 'outfit_lock_for'], ['fortnite', 'backpack_mimic_for'], ['fortnite', 'backpack_lock_for'], ['f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: int):
v3 = len(v1)
v4 = {v2}
v5 = set(range(v3))
v6 = [0 if i == v2 else v1[v2][i] for v7 in range(v3)]
v8 = [v2] * v3
v8[v2] ... |
Imports:
```python
from datetime import datetime, timedelta
import typing
```
Type definitions:
Input Types: typing.Any
Output Type: typing.Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Any) -> typing.Any:
if self.__low_prio_value is not None:
self.__low_prio_value = v1
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Iterable) -> None:
v2 = len(self.content)
v3 = self.cols_count
self.fills_defs = {}
for v4 in v1:
v5 = v4['color']
v6 = v4... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclasses.dataclass
class v0:
v1: Optional['MovementsNode']
v2: 'Movement'
v3: List['MovementsNode'] = dataclasses.field(default_factory=list)
def v4(self) -> int:
return len(self.children)
def v5(self, v6: 'Movement') -> ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str], float, str, bool, int
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str], v2: float=0.2, v3: str='kmeans', v4: bool=True, v5: int=None) -> np.ndarray:
(v6, v7, v6) = self.cluster_runn... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, int, int, bool, str
Output Type: Response
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=None, v2: int=None, v3: int=None, v4: bool=None, v5: str=None) -> Response:
v6 = {'overwriteExisting': v1, 'silenceTimeout':... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: dict
Output Type: logging.Logger
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict) -> logging.Logger:
try:
logging.basicConfig(level=logging.INFO, format=v1['logs']['log_format'])
except KeyError:
... |
Imports:
```python
from collections import Counter
import typing
```
Type definitions:
Input Types: str, int
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int) -> bool:
v3 = Counter(v1)
v4 = 0
for v5 in v3.values():
if v5 & 1:
v4 += 1
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self._make_section('Dataset Summary')
v1 = [['Dataset', self.dataset_name], ['Date', self.stats['processing_statistics']['date']], ['Area Covered', f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Union[tuple, list]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Union[tuple, list]=None) -> bool:
v3 = self.attributes.getAttribute(v1)
if v3 is None:
return False
elif v2:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=True):
v2 = ''
v3 = False
if not self.headers_send:
for v4 in self.array_headers:
if v4.startswith('Content-Type'):
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1 = 0
v2: T.Dict[TestProtocol, T.Type['TestRun']] = {}
def v3(cls, v4: TestSerialisation, *v5: T.Any, **v6: T.Any) -> T.Any:
return super().__new__(v0.PROTOCOL_TO_CLASS[v4.protocol])
def __init__(self, v7: TestSerialis... |
Imports:
```python
import inspect
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0() -> str:
v1 = inspect.currentframe()
if v1:
v2 = inspect.getouterframes(v1)[-1]
return f'{v2[1]}:{v2[2]}'
v3 = inspect.stack(0)
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: Optional[bool]=None, v2: Optional[List['LogicNode']]=None, v3: Optional['LogicNode']=None, v4: Optional[str]='temp', v5: Callable=None):
"""
A logic node represents a node in our functional equivalent ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, str
Output Type: tuple[np.ndarray, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray, v2: np.ndarray, v3: str='center') -> tuple[np.ndarray, np.ndarray]:
(v4, v5) = self.ds.xy(v1, ... |
Imports:
```python
import random
import numpy as np
import torch
from torch import nn
from torch.utils.data.dataloader import DataLoader
from torch.utils.data.dataset import Dataset
from torch.utils.data.distributed import DistributedSampler
from torch.utils.data.sampler import RandomSampler, SequentialSampler
import t... |
Imports:
```python
import csv
import os
import typing
```
Type definitions:
Input Types: Dict[str, float], str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, float], v2: str) -> None:
v3 = False if os.path.exists(v2) else True
v4 = v1.keys()
with open(v2, 'a') a... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict) -> list:
if isinstance(v1, dict):
return [x for v2 in v1.keys()]
else:
return []
``` |
Imports:
```python
import numpy as np
from scipy.linalg import eigh, pinv, qr
from scipy.stats import pearsonr
from scipy.sparse import block_diag, identity, vstack, spmatrix
from scipy.sparse.linalg import eigsh
from numpy import ndarray
import typing
```
Type definitions:
Input Types: ndarray, Optional[ndarray], Opt... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Stmt.Call
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Stmt.Call):
v2 = self._expr(v1.target)
if v1.args:
for v3 in v1.args:
v2 = self._expr(v3)
if v1.ret_expr:
self.sta... |
Imports:
```python
import argparse
import sqlite3
import sys
import typing
```
Type definitions:
Input Types:
Output Type: argparse.ArgumentParser
Dependencies:
Function Name: v0
Function:
```python
def v0() -> argparse.ArgumentParser:
v1 = argparse.ArgumentParser(description='Generate a vega bar chart')
v1.... |
Imports:
```python
import os
import tensorflow as tf
from tensorflow.keras.models import Model
import typing
```
Type definitions:
Input Types: Model, Any
Output Type: Model
Dependencies:
```python
def v0(v1: Model) -> Model:
v2 = tf.keras.models.clone_model(v1)
v2.set_weights(v1.get_weights())
v2.compile(... |
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]:
self.current_ckpt_depth = self.finetuningscheduler_callback.curr_depth
if self.current_score == self.best_model_score:
se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: model.television.Episode
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: model.television.Episode):
if v1.series is None or v1.series.title is None:
return None
v2 = v1.series.title
if v1.season is ... |
Imports:
```python
import copy
import typing
```
Type definitions:
Input Types: List[Dict[str, Any]]
Output Type: List[Dict[str, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
v2 = [copy.deepcopy(event) for v3 in v1 if v3['type'] in {'Plenary Se... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Optional[str]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[str]) -> int:
if v1 != '\u3000' and (v1 not in self.kansuji_kurai_to_power_val or not self.is_kansuji_kurai(v1)):
raise ValueErro... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes, v2: int) -> None:
v3 = self.get_payment_info(v1)
if v3 is None:
return
v3 = v3._replace(status=v2)
self.save_payment_info... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tuple[List[int], List[int]], Tuple[List[int], List[int]], Optional[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tuple[List[int], List[int]], v2: Tuple[List[int], List[int]], v3: Optional[int]):
if v3 ... |
Imports:
```python
import copy
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: Callable[[np.ndarray, float], np.ndarray]
Dependencies:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3: float):
return v1 + half_step * (a @ (v1 + v2) + b @ (r(v3) + r(v3 + step)))
```
Function Nam... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> bool:
v2 = re.search('\\b(grossesse)\\b', v1)
return bool(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union['Geometry2d', Type['Geometry2d']]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union['Geometry2d', Type['Geometry2d']]) -> None:
for v2 in self.points:
v3 = False
for v4 in v1.keypoi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Optional[str]
Output Type: Optional[Mapping[str, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[str]=None) -> Optional[Mapping[str, Any]]:
v3 = self._output_metadata.get(v1)
if v2 and v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Document'
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Document') -> None:
self.extend_page_size(v1.page_size)
for (v2, v3) in v1.layers.items():
self.add(v3, v2)
``` |
Imports:
```python
import pandas
import typing
```
Type definitions:
Input Types: pandas.DataFrame
Output Type: pandas.DataFrame
Dependencies:
```python
def v0() -> List[str]:
return [str(i).zfill(2) for v1 in range(24)]
```
Function Name: v2
Function:
```python
def v2(v3: pandas.DataFrame) -> pandas.DataFrame:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.