text stringlengths 190 325k |
|---|
Imports:
```python
from z3 import BitVecRef, BitVec
import typing
```
Type definitions:
Input Types: str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int):
v3 = v2 * 8
v4 = BitVec(v1, v3)
self.potential_inputs.append(v4)
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, np.ndarray
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: np.ndarray) -> None:
self.__set_num_pcls(v2)
self.__mk_dset(name=v1, data=v2, shape=(self.num_pcls,), dtype=self.__types.bool)
``` |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, int
Output Type: float
Dependencies:
```python
@torch.no_grad()
def v0(v1: torch.Tensor, v2: torch.Tensor, v3: int=15, v4: float=0.001) -> float:
(v5, v6) = v1.size()
v7 = torch.zeros(1, device=v1.devic... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
```python
def v0(v1: str):
if v1 is not None:
return v1.replace("'", "''")
return str
```
Function Name: v2
Function:
```python
def v2(self, v3) -> int:
v4 = 'TAG'
v5 = f"SELECT ID FROM {v4} W... |
Imports:
```python
import torch
import torch.nn as nn
import typing
```
Type definitions:
Input Types: torch.FloatTensor, torch.ByteTensor
Output Type: List[List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.FloatTensor, v2: torch.ByteTensor) -> List[List[int]]:
assert v1.dim() ... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Tuple[str, ...]
```
```python
v1 = Dict[str, Any]
```
Input Types: Match, v1
Output Type: v0
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: Match, v4: v1) -> v0:
(v5, v6, v7) = v3.groups()
return ('image_link', v6, v7, ... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: float
Dependencies:
```python
def v0(v1: np.ndarray, v2: np.ndarray):
if len(v1) != len(v2):
raise ValueError(f'u and v must be of the same size')
```
Function Name: v3
Function:
```py... |
Imports:
```python
import typing
from typing import Any, Dict, Iterable, List, Optional, Set, Type, Union
import typing
```
Type definitions:
```python
v0 = Union[Type[bpy.types.Panel], Type[bpy.types.Operator], Type[bpy.types.PropertyGroup], Type[bpy.types.AddonPreferences], Type[bpy.types.Header], Type[bpy.types.Menu... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.array
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.array):
v2 = self.__filter_for_highest(v1)
v3 = np.count_nonzero(v2, axis=0)
return v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, bool
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: bool) -> dict:
v3 = v1.json()[0]
if v2:
while 'order_id' not in v3.keys():
print('Answering yes to ...')
prin... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> str:
if v1 > 0:
v2 = f'Thanks {self.giver.username} for the extra karma, my karma is {self.receiver.karma_points} now'
else:
v2 = f'N... |
Imports:
```python
from collections import deque
import typing
```
Type definitions:
Input Types: Any, tuple, tuple
Output Type: Any
Dependencies:
```python
def v0(v1):
v2 = len(v1)
v3 = len(v1[0]) if v2 else 0
v4 = {(i, j): [] for v5 in range(v3) for v6 in range(v2) if not v1[v6][v5]}
for (v7, v8) in ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, str, bytes, Optional[dict]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: str, v4: bytes, v5: Optional[dict]=None) -> None:
v6 = self._get_client(v1)
v6.put_object(Bucket=v2,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[str]]
Output Type: bool
Dependencies:
```python
@cache
def v0(v1: int, v2: int, v3: int) -> bool:
if v1 >= m or v2 >= n:
return False
v3 += 1 if grid[v1][v2] == '(' else -1
if v3 < 0:
return False
if v1 == m -... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: bytes, int
Output Type: bytes
Dependencies:
```python
def v0(v1: bytes) -> bytes:
v2 = hashlib.sha256()
v2.update(v1)
return v2.digest()
```
Function Name: v3
Function:
```python
def v3(v4: bytes, v5: int) -> bytes:
for ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(models.Model):
v1 = 40
v2 = 40
v3 = 3000
v4 = 10000
v5 = ['Google', 'Email', 'GitHub', 'LDAP', 'Dev', 'RemoteUser', 'AzureAD', 'SAML', 'GitLab', 'Apple']
v6 = ''
v7: int = models.AutoField(auto_created=True, primary_ke... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes, Any, int
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: bytes, v2, v3: int=None) -> bytes:
v4 = len(v1)
v1 += b'\x80'
v1 += b'\x00' * ((56 - (v4 + 1) % 64) % 64)
v5 = (v3 if v3 else v4) * 8
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = ['/api/v1/users/me/apns_device_token', '/api/v1/users/me/android_gcm_reg_id', '/api/v1/users/me/enter-sends', '/api/v1/users/me/hotspots', '/api/v1/... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1) -> bool:
v2 = await self.get_current_storage_data(v1)
if v2 is None:
return False
for (v3, v4) in self.storage_data.items():
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
v2 = v1.replace('_', '--')
if v2.startswith('--'):
v2 = v2.replace('--', 'underscore-', 1)
return v2.lower()
```
Function Name: v3
Function:
```python
def v3... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str, str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> bool:
v3 = '^' + v1.replace('*', '.*') + '$'
return bool(re.match(v3, v2))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, Any, Any, Any, Any, Any, Any, Any, Any
Output Type: None
Dependencies:
```python
def v0(v1: str, v2='eng', v3='0:00', v4='', v5=65, v6=90, v7=False, v8=constants.OCR_ENGINE_TESSERACT) -> str:
if v8 == constants.OCR_ENGINE_TESSERACT:
u... |
Imports:
```python
import numpy as np
from sklearn.base import TransformerMixin, BaseEstimator
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.linear_model import LinearRegression
from sklearn.pipeline import make_pipeline, FeatureUnion
from sklearn.preprocessing impo... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: list[str]
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list[str]) -> pd.DataFrame:
v2 = list()
v3 = -1
for (v4, v5) in enumerate(v1):
v6 = list(v5.splitlines())
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: int) -> int:
v3 = sorted([c for v4 in v1.columns if 'state' in v4])
v5 = 0
for v6 in range(len(v3)):
v5 += 3 ** v6... |
Imports:
```python
import subprocess
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> None:
subprocess.check_call(['jar', 'xfv', v1, 'META-INF/MANIFEST.MF'])
with open('META-INF/MANIFEST.MF', 'r+', encoding='utf-8') a... |
Imports:
```python
import numpy as np
from cvxpy import Minimize, Problem, Parameter, Maximize
from cvxpy.atoms import QuadForm, abs, power, quad_over_lin, sum, sum_squares, norm, huber, matrix_frac
from cvxpy.reductions.solvers.defines import QP_SOLVERS, INSTALLED_SOLVERS
from cvxpy.expressions.variable import Variabl... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
self.async_write_ha_state()
async with self._image_cond:
self._image_cond.notify_all()
``` |
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 = requests.get('https://api.digitalocean.com/v2/1-clicks', headers={'Authorization': f'Bearer {v1}'}).json()
v3 = v2['1_clicks... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.do_test_bad_target_name('a:')
self.do_test_bad_target_name('a::')
self.do_test_bad_target_name('//')
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.elapsed = {}
self._starts = {}
``` |
Imports:
```python
import matplotlib
import matplotlib.pyplot as plt
import typing
```
Type definitions:
Input Types: np.array, List, List
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.array, v2: List, v3: List):
(v4, v5) = plt.subplots(2)
v5[0].plot(v1, v2)
v5[1].plot... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bool, bool
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool, v2: bool) -> str:
v3: List[str] = []
v3.append('Summary Report')
v3.append('=' * 80)
v3.append('')
v4: Dict[str, str] = {}
... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.optim.Optimizer
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.optim.Optimizer):
v2 = self.cfg.get('step_size', 40)
v3 = self.cfg.get('gamma', 0.01)
return torch.optim.lr_sch... |
Imports:
```python
import argparse
import re
from argparse import ArgumentTypeError
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = re.match('(\\d+)(?:-(\\d+))?$', v1)
if v2 is None:
raise ArgumentTypeError... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any], str, bool
Output Type: None
Dependencies:
```python
def v0(v1: str) -> str:
return str(v1).replace(' ', '_MFASPACE_')
```
Function Name: v2
Function:
```python
def v2(v3: Dict[str, Any], v4: str, v5: bool=False) -> None:
if not... |
Imports:
```python
import heapq
import typing
```
Type definitions:
Input Types: List[List[int]]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[List[int]]) -> int:
v2 = []
v3 = []
for (v4, v5, v6) in v1:
if v6 == 0:
while v5 > 0:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
while len(self.queue):
with self.lock:
self.call_count = 0
v1 = self.queue.popleft()
v1()
self.running = Fals... |
Imports:
```python
from tensorflow import keras, ones
import typing
```
Type definitions:
Input Types: Any, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: int):
v3 = keras.Sequential()
v3.add(keras.layers.Dense(units=v1.Choice('units', [8, 16, 24, 32, 64]), activation=... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Element'
Output Type: 'Element'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Element') -> 'Element':
if v1 not in self.children:
v1.parent = self
self.children.append(v1)
return self.children[self.chi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int):
v1 = v1.lstrip('<').rstrip('>').rstrip('/')
for v3 in (f'https://discord.com/channels/{v2}/', f'https://www.discord.com/channels/{v2}/'):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list) -> tuple:
v2 = {}
v3 = None
v4 = 0
for v5 in v1:
if v5 == 0:
v2[v3] = v4
break
if v3 == v5:
... |
Imports:
```python
import operator
import numpy as np
from pandas._config import get_option
from pandas._typing import Axis, FilePathOrBuffer, FrameOrSeries, IndexLabel, Level, Scalar
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
import pandas as pd
from pandas i... |
Imports:
```python
import csv
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
with open(self.log_path, mode=self.mode) as v2:
v3 = csv.DictWriter(v2, fieldnames=v1.keys(), delimiter=self.delimiter)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, dict
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: dict) -> dict:
if 'columns' not in v2:
raise Exception('Missing columns param')
v1[v2['df']] = v1[v2['df']].rename(columns=v2['colum... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int=-1):
if not isinstance(v1, int):
raise TypeError(f'Expected argument index to be an int, instead it is {type(v1)}.')
return self.__content.p... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict) -> Dict:
v2 = {}
for (v3, v4) in v1.items():
if v4:
v3 = v3 or None
if v3 not in v2:
v2[v3] = v4
v... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types:
Output Type: float
Dependencies:
```python
def v0(v1: List[float]) -> float:
return sum(v1) / len(v1)
```
```python
def v2(v3: List[float]) -> float:
v4 = v0(v3)
v5 = sum([(val - v4) ** 2 for v6 in v3])
return math.sqrt(v5... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict) -> Dict:
if v1 is not None:
v2 = 'documentResults'
v3 = v1['analyzeResult'][v2][0]['fields']
v4 = dict()
for v5 in v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list, int, list, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list, v2: int, v3: list, v4: str):
if v3 is None:
return
if v2 < len(self._tokenized):
v5 = self._tokenized[v2]
... |
Imports:
```python
import re
import typing
```
Type definitions:
```python
v0 = Callable[[Url], bool]
```
Input Types: Any
Output Type: v0
Dependencies:
```python
def v1(v2: str) -> bool:
return rc.search(v2) is not None
```
Function Name: v3
Function:
```python
def v3(v4) -> v0:
if isinstance(v4, str):
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[int]:
v1 = self.get_configurable_sorted_nodes()
v2 = [n.find_min_candidates_indices() for v3 in v1]
assert all([len(lst) == 1 for v4 in v2]),... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = Union[Paragraph, Article, Question]
```
Input Types: list[v0]
Output Type: None
Dependencies:
Function Name: v1
Function:
```python
async def v1(self, v2: list[v0], /) -> None:
v3: list[str] = []
for v4 in v2:
v3.append(self.entry_te... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[float, float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[float, float, float]:
v1 = self.fiducial_time + self.latency
(v2, v3, v4) = self._get_pose_delta(v1)
v5 = self.fiducial_x -... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, Optional[object], bool
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[object]=None, v3: bool=True) -> str:
v1 = self.ResolveAbsolutePathWithLeadingEnvironmentVariablePath(v1,... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Union[List[datetime], np.ndarray]
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[List[datetime], np.ndarray]) -> np.ndarray:
if isinstance(v1, np.ndarray):
return self... |
Imports:
```python
from copy import deepcopy
from tqdm import tqdm
import typing
```
Type definitions:
Input Types: Any, str, str, List[str], Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: str='tokens', v3: str='grad_input_1', v4: List[str]=None, v5=None):
if v5 is n... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[int, float], Dict[str, str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[int, float]=1.0, v2: Dict[str, str]=None):
if not isinstance(v1, (int, float)):
raise TypeError(f'value must be ... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self) -> v0:
if self._data == []:
raise IndexError('Index out of range, the stack is empty.')
else:
v2 = self._data.pop... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str, v3: str):
v4 = v1 / f'{v2}'
v4.rename(v1 / f'{v3}')
``` |
Imports:
```python
import inspect
import torch
from torch.optim import Optimizer, lr_scheduler
from torch.optim.lr_scheduler import _LRScheduler as LRScheduler
import typing
```
Type definitions:
Input Types:
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0() -> List:
v1 = []
for ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: t.Union[int, str], t.Sequence[t.Any], t.Mapping[str, t.Any]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: t.Union[int, str], v2: t.Sequence[t.Any], v3: t.Mapping[str, t.Any]) -> str:
if isinstance(v1, str):... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[int, float]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[int, float]) -> bool:
if self.left_boundary['open']:
if self.left_boundary['value'] >= v1:
return False
elif se... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Persistent):
def __init__(self, *, v1: List[Person]=None, v2: List[DatasetFile]=None, v3: datetime=None, v4: datetime=None, v5: datetime=None, v6: str=None, v7: str=None, v8: str=None, v9: str=None, v10: List[ImageObject]=None, v11: Language... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclasses.dataclass
class v0:
v1: str
v2: int
v3: int
v4: str
v5: Optional[int] = None
@classmethod
def v6(cls, v7: dict, v8: str):
v9 = v7['Val']
if isinstance(v9, list):
v9 = v9[0]
retu... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = random.randint(1, 6)
if v1 == 1:
self.red += 1
return 'red'
elif v1 == 2:
self.green += 1
return... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: int, v3: int):
if self.verbose:
v4 = 50
v5 = int(v2 / v3 * v4)
v6 = '\n' if v2 == v3 else '\r'
print(f'{v... |
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 = self._node.execute(f'readlink /sys/class/net/{v1}/device')
v2.assert_exit_code()
v3 = self._node.execute(f'basename {v2.stdout}')
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=False) -> bool:
if self.opr in ['continue', 'break']:
return True
if self.opr in ['while', 'for', 'do']:
return False
if v1 and len(... |
Imports:
```python
from rdkit.Chem import rdmolops
import json
from collections import Counter
from collections import defaultdict
import numpy as np
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import rdFMCS, rdMolAlign, rdmolops
from rdkit.Geometry.rdGeometry import Point3D
import typing
```
... |
Imports:
```python
import os
import subprocess
import typing
```
Type definitions:
```python
class v0(object):
v1 = 'git'
v2 = '.'
v3 = None
v4 = const.ERROR_VERBOSITY
v5 = False
```
Input Types: v0
Output Type: Optional[str]
Dependencies:
```python
def v6(v7: v0, *v8) -> typing.Tuple[int, bytes, by... |
Imports:
```python
import hashlib
import json
import typing
```
Type definitions:
Input Types: Dict, str
Output Type: List[Dict]
Dependencies:
```python
def v0(v1: Any, v2: str) -> str:
v3 = json.dumps(v1, allow_nan=False, ensure_ascii=False, indent=None, separators=(',', ':'), skipkeys=False, sort_keys=True)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = self.find_url()
if not v1:
return None
for v2 in self.get_words():
if v2['text'] in v1 or v1 in v2['text']:
retu... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> list:
v2 = None
v3 = None
for v4 in v1:
v5 = self.objective_function(v4)
if v2 is None:
v2 = v4
if v3... |
Imports:
```python
from collections import OrderedDict
from shapely.geometry import LineString, Polygon, shape
import typing
```
Type definitions:
Input Types: fiona.Collection, fiona.Collection
Output Type: Tuple[List[Dict], Dict]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: fiona.Collection, v2: f... |
Imports:
```python
from os import getenv
import typing
```
Type definitions:
Input Types: str, str, str, str
Output Type: bool
Dependencies:
```python
def v0(v1: str) -> list:
try:
v2 = setup_connection()
v3 = v2.cursor()
v3.execute(v1)
v4 = v3.fetchall()
finally:
if 'co... |
Imports:
```python
import typing
```
Type definitions:
Input Types: interface.Project
Output Type: dict[str, dict[str, Any]]
Dependencies:
```python
def v0(v1: MutableMapping[Hashable, Any], v2: Sequence[str]) -> dict[str, Any]:
v3 = v2 + tuple([configuration._DESIGN_SUFFIX])
return {k: v for (v4, v5) in v1.it... |
Imports:
```python
from http import HTTPStatus
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.delete_device(self.user_tok, self.device_id, HTTPStatus.UNAUTHORIZED)
v2 = v1.json_body['session']
self.del... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bytes:
if self.__ratchet_count > 2 ** 128:
raise ValueError('Keys Exhausted')
v1 = self.__hkdf.digest()
return v1
``` |
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 = self.create_hashed_preview_id(v1)
return f'{self.application_name}-{v2}-preview'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0() -> dict:
v1 = {'displayName': 'Delete S3 Permissions', 'description': 'Deletes all ACLs and Bucket Policies from an S3 bucket', 'resourceTypes': ['S3 Bucket'], 'param... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
```python
def v0(v1: dict, v2):
v3 = dict(v1)
for v4 in v2:
try:
del v3[v4]
except KeyError:
continue
return v3
```
Function Name: v5
Function:
```python
def v5(v6... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: str
Output Type: pd.DataFrame
Dependencies:
```python
def v0(v1):
v1 = v1.drop(v1[v1.Temp < -15].index)
v1['DayOfYear'] = [i.dayofyear for v2 in v1['Date']]
v3 = list(v1)
(v3[len(v3) - 2], v3[len(v3) - 1]) = (v3[len... |
Imports:
```python
import numpy as np
import os
import pickle
import typing
```
Type definitions:
Input Types: int, int, int, np.array, List[List[np.matrix]], float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: int, v4: np.array, v5: List[List[np.matrix]], v6: float... |
Imports:
```python
import typing
```
Type definitions:
Input Types: xr.DataArray, xr.DataArray, str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: xr.DataArray, v2: xr.DataArray, v3: str, v4: str):
if v2.sizes[v4] != v1.sizes[v3] - 1:
raise ValueError('f_in must have ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> list:
if v1 in self.version_history:
return self.version_history[v1]
else:
return []
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 1
v2 = 2
v3 = 3
```
Input Types: List
Output Type: Dict
Dependencies:
```python
def v4(v5: np.array, v6: v0):
v7 = {}
if v6 == v0.TENSOR:
v7['tensor'] = {'shape': v5.shape, 'values': v5.r... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[Union[Tensor, Dict[str, Any]]], str
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[Union[Tensor, Dict[str, Any]]], v2: str) -> np.ndarray:
for v3 in v1:
if v2 in v3:
retu... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = self.re.compile('\\.co/[^_]+_(.+)\\.html?')
return v1.search(self.chapter).group(1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[int]], int, int, int
Output Type: List[List[int]]
Dependencies:
```python
def v0(v1, v2, v3, v4, v5):
v6 = len(v1)
v7 = len(v1[0])
if v2 < 0 or v2 >= v6 or v3 < 0 or (v3 >= v7) or (v1[v2][v3] != v5) or (v1[v2][v3] == v4):
... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: aiohttp.web.Request
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: aiohttp.web.Request) -> bool:
for v2 in self._whitelist:
if re.match(v2, v1.path):
return True
return Fal... |
Imports:
```python
import typing
```
Type definitions:
Input Types: route_guide_pb2_grpc.RouteGuideStub, route_guide_pb2.Point
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(v1: route_guide_pb2_grpc.RouteGuideStub, v2: route_guide_pb2.Point) -> None:
v3 = await v1.GetFeature(v2... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
v1: ClassVar[bool] = True
v2: ClassVar[List[ItemCallbackType]] = []
def v3(cls) -> None:
v4: List[ItemCallbackType] = []
for v5 in reversed(cls.__mro__):
for v6 in v5.__dict__.values():
if... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int]) -> int:
v2 = len(v1)
if 0 == v2:
return 0
v3 = [[0 for v4 in range(2)] for v4 in range(v2)]
v3[0][1] = v1[0]
for v5... |
Imports:
```python
import os
import cv2
import numpy as np
from tqdm import tqdm
import typing
```
Type definitions:
Input Types: list, int, Any, Any, Any, Any, Any, Any
Output Type: str
Dependencies:
```python
def v0(v1, v2, v3, v4, v5, v6):
v7 = list()
v8 = []
v9 = True
v10 = False
while True:
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(_Node):
v1 = None
v2 = ''
v3 = ''
v4 = ''
v5 = ''
v6 = ''
v7 = None
v8 = False
```
Input Types: v0
Output Type: v0
Dependencies:
Function Name: v9
Function:
```python
def v9(self, v10: v0) -> v0:
if v10 not in... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Dict:
v2 = self.get_url('analysis_results')
return self.session.post(v2, data=v1, headers=self._HEADER_JSON_CONTENT).json()
``` |
Imports:
```python
import itertools
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: 'Checkout'
v2: Optional['User']
v3: 'Channel'
v4: Optional['Address']
v5: Optional['Address']
v6: 'DeliveryMethodBase'
v7: List['ShippingMethodData']
v8: List['Warehouse']
v9: O... |
Imports:
```python
from math import log2, ceil
import torch
from torch import Tensor
from torch.nn.functional import pad
from torch.fft import fft, fftshift, ifft
import typing
```
Type definitions:
Input Types: Tensor, Tensor, Optional[bool], Optional[int]
Output Type: Tensor
Dependencies:
```python
def v0(v1: Tensor... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, int, np.dtype
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: int, v3: np.dtype=np.int32):
v4 = np.zeros(shape=[len(v1), v2], dtype=v3)
for (v5, v6) in enumerate(v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.