text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: tuple
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> tuple:
(v3, v4, v5) = v1
(v6, v7, v8) = v2
return (v3 + v6, v4 + v7, v5 + v8)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.assert_join(self.fx_contra.ga, self.fx_contra.ga, self.fx_contra.ga)
self.assert_join(self.fx_contra.ga, self.fx_contra.gb, self.fx_contra.gb)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.clear()
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()
v2 = self.data['spike_ids'].copy()
v1['run_data'] = self.get_run_spike_and_pos_data(v2, self.data['spike_times_s'], self.data['pos_xy... |
Imports:
```python
import os
import shutil
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0(v1: str, v2: list[str]) -> list[str]:
return [file for v3 in ignore_override_func(v1, v2) if os.path.exists(os.path.join(v1, v3))]
```
```python
def v4(v5: str, v6: list[str... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass
class v0:
v1: str
v2: str
v3: str = ''
v4: bool = False
v5: bool = False
v6: bool = False
v7: bool = False
@property
def v8(self):
v9 = self.version
v10 = True
while v10:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Dict[str, Union[str, List[str]]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Dict[str, Union[str, List[str]]]:
if 'color' in v1:
return self.get_palette(v1)
return {k: getattr(v, v1) f... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Collection[str]
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Collection[str]) -> bool:
v2 = set(v1)
if len(v2) < len(v1):
return False
for v3 in self.disjoints:
if v2.issubset({var... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
for v1 in self._selectables:
if v1.deadline:
if self._deadline is None:
self._deadline = v1.deadline
else... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str, Optional[int], Optional[Iterable[str]], Optional[Iterable[str]], Optional[Iterable[str]]
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: Optional[int]=None, v3: Optional[Iterable[str]]=... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: int, int, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: bool):
v4 = 1 / (1 + math.pow(10, -((v1 - v2) / 400)))
v5 = 1 if v3 else 0
return round(v1 + 60 * (v5 - v4)... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.sync_dirty_scheduled = False
for v1 in self.dirty_views.values():
self.sync(v1)
``` |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: float, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: int=2):
v3 = -int(math.log10(v1))
v4 = round(v1, v3 + 2)
return v4
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: dict) -> None:
await super().initialize(v1)
for v2 in self.job_definition['elements']:
if v2.get('project', None) is None:
v... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types: int, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: int, v2: bool) -> None:
v3 = 1 << v1
if (not not self.reg.value & v3) != v2:
v4 = asyncio.Event()
self.watch... |
Imports:
```python
from pandas._typing import Scalar
from pandas.api.extensions import ExtensionArray
import pandas as pd
from pandas.core.window import ExponentialMovingWindow
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
```python
def v0(v1, **v2):
pass
```
Function Name: v3
F... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if not self._step_string.name:
return
self.write(str(self._step_string), '\n')
self._step_string.name = ''
self._step_string.error = ... |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types: subprocess.CompletedProcess
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: subprocess.CompletedProcess) -> None:
print(f' Command: {v1.args}', file=sys.stderr)
if v1.stdout:
print(f' ... |
Imports:
```python
import numpy as np
import pandas as pd
import typing
```
Type definitions:
```python
v0 = Union[pd.DataFrame, pd.Series]
```
Input Types: Optional[Union[list, str]], int, Optional[float]
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: Optional[Union[list, str]]=N... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: dict | None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> dict | None:
if (v2 := self.requests.filter(scope=v1).exclude(count=0).order_by('timestamp').last()):
return v2.most_recent_object
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: int):
v3 = {}
for v4 in range(len(v1)):
v3[v1[v4]] = v4
for v4 in range(len(v1)):
if v2 - v1[v4] in v3 and v3[v2 - v1[v4]] ... |
Imports:
```python
import numpy as np
import re
from datetime import datetime
import typing
```
Type definitions:
Input Types: defaultdict, fasttext.FastText
Output Type: List
Dependencies:
```python
def v0(v1: np.array) -> np.array:
v2 = np.ones(shape=v1.shape, dtype=np.int32)
v2[1:] += to_seconds(v1[1:] - v1... |
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.get_entry(v1)
if v2 is None:
self.add_entry(v1, perms_lock=False)
return ':warning: **Les administrateurs ont désormais ... |
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 = 'not a valid tag name'
try:
v3 = self.pb.dcm.data_element(v1)
except KeyError:
v3 = f':{v2}'
if not v3:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: grpclib.server.Stream
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1: grpclib.server.Stream) -> None:
v2 = await v1.recv_message()
v3 = {'repo': v2.repo, 'description': v2.description, 'update': v2... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Dict, Dict, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict, v2: Dict, v3: str='') -> None:
v4 = v3
for (v5, v6) in sorted(v1.items()):
if v3 + v5 in self.LIST_PROHIBITED_SET... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray):
assert v1.shape == (v1.shape[0], v1.shape[0]), 'This test is meaningful only for square matrices'
v2 = np.diag(v1).mean... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: np.ndarray
Dependencies:
```python
@numba.guvectorize([(numba.float64[:], numba.float64[:], numba.float64[:]), (numba.complex128[:], numba.complex128[:], numba.complex128[:])], '(n),(n)->()', nopy... |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes) -> str:
if v1:
v2 = self._crypto.decrypt(v1)
return v2.decode()
``` |
Imports:
```python
from datetime import datetime, timedelta
import typing
```
Type definitions:
Input Types: datetime, timedelta
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: datetime, v2: timedelta):
v3 = datetime.min.replace(year=2000)
v4 = v2.total_seconds()
v5 = (v1 -... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'Dict[str, Any]', 'Order'
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'Dict[str, Any]', v2: 'Order'):
v3 = v1['menu_item'].price * v1['quantity']
return {'order': v2, 'menu_item': v1['menu_item'], 'qu... |
Imports:
```python
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:
v2 = self.pretrained_model(v1)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
if v1[2] < v2[1]:
v2[1] = v1[2]
v2[4] = min(v1[2], v2[4])
elif v1[2] > v2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list[int], int, list[int], int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list[int], v2: int, v3: list[int], v4: int) -> None:
(v5, v6) = (v2 - 1, v4 - 1)
for v7 in range(v4 + v2 - 1, -1, -1):
... |
Imports:
```python
import requests
from requests.exceptions import ConnectionError
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
try:
return requests.put(url=self.create_url(), json=self.params, headers=self.he... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict) -> None:
self.patience = v1['patience']
self.cooldown = v1['cooldown']
self.cooldown_counter = v1['cooldown_counter']
self.mode = v1['mo... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass(frozen=True)
class v0(object):
v1: List[bool]
v2: Tuple[Pred]
def v3(self, v4: Term) -> FrozenSet[Lit]:
v5 = set()
for (v6, v7) in enumerate(self.preds):
v8 = v7(*[v4] * v7.arity)
if self.cod... |
Imports:
```python
import matplotlib.pyplot as plt
import numpy as np
import typing
```
Type definitions:
Input Types: Optional[plt.Axes], str, bool, bool
Output Type: plt.Axes
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Optional[plt.Axes]=None, v2: str='', v3: bool=True, v4: bool=False) -> p... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = typing.TypeVar('EventT', bound='base_events.Event')
```
Input Types:
Output Type: typing.Sequence[v0]
Dependencies:
Function Name: v1
Function:
```python
async def v1(self) -> typing.Sequence[v0]:
await self.open()
v2 = [event async for v3 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: 'Vector'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=True) -> 'Vector':
if v1:
return self.to_polar().normal().to_cartesian().unit()
return self.to_polar().normal().to_cartesian()
``` |
Imports:
```python
from math import sqrt, pi
import typing
```
Type definitions:
Input Types: int, int, int
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int, v3: int) -> float:
v4 = float(v1 + v2 + v3) / 2
return round(sqrt(v4 * (v4 - v1) * (v4 - v2) * (v4 - v3)),... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2) -> None:
try:
assert v1 == v2
except AssertionError:
print(f'{v1!r} should have been {v2!r}')
raise
``` |
Imports:
```python
import requests
import typing
```
Type definitions:
Input Types: Any
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> dict:
if (v2 := requests.get(self.api_path, json={'query': f'{{ {v1} }}'}, headers=self.headers)):
return v2.json()
return {... |
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]):
v2 = self.int_or_reg_val(v1[1])
assert v2 != 0, 'Integer division by 0 is bad.'
self._vars[v1[0]] //= v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[str]:
v1 = []
for v2 in self.lines:
v1 += v2.attributes
return v1
``` |
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.db.update_one({'name': self.file_data['name'], 'namespace': self.file_data['namespace']}, {'$set': {'size': v1}})
if v2.matched_count ==... |
Imports:
```python
from pathlib import Path
import pickle
import typing
```
Type definitions:
Input Types: Union[str, Path], object, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[str, Path], v2: object, v3: bool=True) -> None:
if isinstance(v1, str):
v4 = Path... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
```python
@attr.s(auto_attribs=True)
class v0:
v1: str
v2: str
v3: str
v4: str
v5: str
v6: str
v7: str
v8: str = 'TimeGenerated'
v9: Optional[str] = None
v10: Optional[str] = None
v11: Optional[str] = ... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: Any, Union[List, str, None]
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
if isinstance(v2, str):
return re.search(v2, v1)
for v3 in v2:
if re.search(v3, v1):
return True
```
Function Name: v4
F... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path, str, str, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Path, v2: str, v3: str, v4: str) -> None:
with open(v1, 'a+') as v1:
v1.write(f'# Interface for class: {v2}\n')
v1.write(v3)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[int], List[int]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[int], v2: List[int]) -> int:
v3 = len(v1)
v4 = [v1[i] - v2[i] for v5 in range(v3)]
v6 = sum(v4)
if v6 < 0:
return ... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = 'dace.sdfg.nodes.Node'
```
```python
v1 = Dict[v0, List[v0]]
```
Input Types: v1, v0, v0
Output Type: bool
Dependencies:
Function Name: v2
Function:
```python
def v2(v3: v1, v4: v0, v5: v0) -> bool:
v6 = v5
v7 = v3[v4]
while v6 is not No... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Sequence
Output Type: Tuple[np.ndarray, np.ndarray]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Sequence) -> Tuple[np.ndarray, np.ndarray]:
v2 = np.vstack(v1)
(v3, v4) = self.model.predict(v2, retur... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: np.ndarray):
v2 = (v1.min(1) >= 0) * ((v1 < self.full_scale[1]).sum(1) == 3)
v3 = (v1.max(0) - v1.min(0)).astype(np.float32)
... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = List[Tuple[typing.Timestamp, str, str]]
```
Input Types: v0
Output Type: None
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0) -> None:
v3 = self.conn.cursor()
v3.executemany('INSERT INTO timed_location_data( time,... |
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 in v1:
self._context_vars[v2] = v1[v2]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.trainer.testing:
self.trainer._call_lightning_module_hook('on_test_model_train')
else:
self.trainer._call_lightning_module_ho... |
Imports:
```python
import typing
```
Type definitions:
Input Types: erdos.Message
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: erdos.Message):
self._logger.debug('@{}: received pose message'.format(v1.timestamp))
self._pose_msgs.append(v1)
self._ego_transform = v1.... |
Imports:
```python
import numpy as np
from datetime import datetime
import typing
```
Type definitions:
Input Types: Any, dict, float, bool
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(v1, v2: dict, v3: float=0.002, v4: bool=True) -> dict:
v5 = datetime.today()
v6 = [country fo... |
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._font is not None:
self.write('</span>')
self._font = self._fontstack.pop()
self.write('</div>')
return
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int):
v2 = 0
v3 = 0
for v4 in v1:
if v4 > 0:
v2 += v4
v3 += 1
elif v4 < 0:
raise Exception('No positiv... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str) -> List:
v3 = [{'loc': ['body', v2], 'msg': v1}]
return v3
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
if os.getpid() == os.getsid(0):
return
os.setpgid(0, 0)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2) -> None:
v3 = np.asarray(self.data, dtype=np.string_)
v4 = v1.create_dataset(v1.attrs['fieldname'], self.data.shape, dtype=... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[str]]
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[List[str]]) -> int:
v2 = 0
if len(v1) == 0 or not v1:
return 0
for v3 in range(0, len(v1)):
for v4 in range(0, len(... |
Imports:
```python
import itertools
from itertools import product, chain
import typing
```
Type definitions:
Input Types: List[LineString], int, Callable[[LineString], int]
Output Type: List[LineString]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[LineString], v2: int, v3: Callable[[LineString]... |
Imports:
```python
import sqlite3
import typing
```
Type definitions:
Input Types: str
Output Type: sqlite3.Connection
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> sqlite3.Connection:
v2 = sqlite3.connect(v1)
v2.execute('PRAGMA page_size = {}'.format(2 ** 16))
v2.execute('PRAGMA ... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> dict:
v2 = self._client.secrets.kv.v2.read_secret_version(path=v1, mount_point=self._secret_mount)
v3 = str(v2['data']['data'])
... |
Imports:
```python
import random
from collections import Counter
import typing
```
Type definitions:
Input Types: nx.classes.graph.Graph, argparse.Namespace
Output Type: Dict[int, int]
Dependencies:
```python
def v0(v1: list, v2: Dict[int, int]) -> int:
v3 = {}
for v4 in v1:
v5 = v2[v4]
if v5 i... |
Imports:
```python
import typing
```
Type definitions:
Input Types: list
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> int:
v2 = 0
for (v3, v4) in enumerate(sorted(v1)):
if v1[v3] != v4:
v2 += 1
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, List[str], int
Output Type: Dict[str, str]
Dependencies:
```python
def v0(v1: str, v2: int) -> Tuple[bool, Dict[str, Any]]:
v3 = ip_network(v1)
v4 = str(ip_address(v3.network_address) + 30 + v2)
return (v3.version == 6, {'enabled': Tr... |
Imports:
```python
from pathlib import Path
import requests
import typing
```
Type definitions:
Input Types: Optional[git.Repo], bool
Output Type: Dict[Path, bytes]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Optional[git.Repo], v2: bool) -> Dict[Path, bytes]:
if v2:
v3 = [Path('demisto... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: torch.Tensor, torch.Tensor, Any, Any, Any, bool
Output Type: Any
Dependencies:
```python
def v0(v1: torch.Tensor, v2: torch.Tensor, v3, v4=True, v5=1e-15, *v6, **v7):
v8 = v1.size(0)
v9 = v1.size(1)
if v4:
v10 = (v1 - ... |
Imports:
```python
import tensorflow
import typing
```
Type definitions:
Input Types: keras.Model
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: keras.Model):
v2 = tensorflow.constant(0, dtype=tensorflow.float32)
v3 = 0
v4 = 0
v5 = {}
for v6 in v1.layers:
v... |
Imports:
```python
import pandas as pd
import requests
import typing
```
Type definitions:
Input Types:
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0() -> pd.DataFrame:
v1 = 'https://data.eastmoney.com/DataCenter_V3/Chart/cjsj/reserverequirementratio.ashx'
v2 = {'r': '0... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> int:
if 2 * v1 + 1 > self.size:
return 2 * v1
return 2 * v1 if self.heap_list[2 * v1] < self.heap_list[2 * v1 + 1] else 2 * v1 + 1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str=None, v2: str=None) -> list:
if self.loggingEnabled:
self.logger.debug(f'starting getComponentTags')
v3 = '/componentmetadata/tags/sea... |
Imports:
```python
import argparse
import typing
```
Type definitions:
Input Types:
Output Type: argparse.ArgumentParser
Dependencies:
Function Name: v0
Function:
```python
def v0() -> argparse.ArgumentParser:
v1 = argparse.ArgumentParser(description='Merges rows with same indices')
v1.add_argument('-u', '--... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1=None) -> str:
v2 = [self.producer_abbreviated, self.platform_abbreviated, self.dataset.product_family]
return '_'.join(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = 1
v2 = 1
for v3 in range(self.length):
self.lines[v3] = v1
self.columns[v3] = v2
v4 = self.data[v3]
v5 = sel... |
Imports:
```python
import torch
from torch.utils.data.sampler import SubsetRandomSampler
import typing
```
Type definitions:
Input Types: float, int, int, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float, v2: int, v3: int, v4):
(v5, v6) = self._split(v1, shuffle=True... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = v1.split("var csrfToken = '")
v2 = v2[1].split("';")
self.erep_csrf_token = v2[0]
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Optional[int]:
v2 = next((v for v3 in self.vertices.values() if v3.label.lower() == v1.lower()), None)
if v2:
return v2.vidx
`... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> dict:
if self.check_row(v1):
return {'row': v1}
if self.check_col(v2):
return {'col': v2}
return {}
``` |
Imports:
```python
import socket
import typing
```
Type definitions:
Input Types: socket.socket, int
Output Type: bytes
Dependencies:
```python
def v0(v1: socket.socket, v2: float):
v3 = v2 - time.monotonic()
if v3 <= 0:
raise RuntimeError('Server took too long to respond')
v1.settimeout(v3)
```
``... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.subfiles.clear()
for v1 in self.nodes:
for v2 in v1.get_subfiles():
self.subfiles.add('{}/{}'.format(self.xml_dir, v2))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> bool:
if self.pipe is not None:
self.pipe.execute()
self.pipe = None
return True
else:
return False
``` |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types: dict, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: bool=False):
sys.stdout.write('Resource adapter: {}\n'.format(v1['resourceadapter']['name']))
sys.stdout.write('Profile: {}\... |
Imports:
```python
import re
import typing
```
Type definitions:
Input Types: str
Output Type: List[float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> List[float]:
v2 = '[-+]?[.]?[\\d]+(?:,\\d\\d\\d)*[\\.]?\\d*(?:[eE][-+]?\\d+)?'
v3 = re.findall(v2, v1)
v4 = [float(s) for v5 in ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: processing.TimestepPreprocessor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: processing.TimestepPreprocessor):
self._spec = v1.setup_io_spec(self._parent_spec)
self._timestep_preprocessor = 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):
v3 = {'tags': ['switch', 'configure', 'configTemplates', 'profiles'], 'operation': 'getOrganizationConfigTemplateSwitchProfiles'}
v4... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1):
self.val = v1
self.left = None
self.right = None
```
Input Types: v0, int, int
Output Type: int
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: v0, v4: int, v5: int) -> i... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: Iterable[int]
Output Type: tf.TensorShape
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Iterable[int]) -> tf.TensorShape:
v1 = tf.TensorShape(v1).as_list()
if self.data_format == 'channels_last':... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[str]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[str]) -> str:
v2 = ''
if len(v1) > 0:
v2 = v1[0]
for v3 in v1[1:]:
for v4 in range(len(v2)):
if v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: List[List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> List[List[int]]:
v1: List[List[int]] = []
for v2 in range(0, len(self._bonds)):
v3: List[int] = []
for (v4, v5) in enumerate(sel... |
Imports:
```python
import typing
```
Type definitions:
Input Types: v1, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: v1, v2=0):
v3 = list(v1.keys())[v2]
v4 = list(v1.values())[v2]
del v1[v3]
return ((v3, v4), v1)
``` |
Imports:
```python
import copy
import numpy as np
from pandas._libs import internals as libinternals
from pandas._typing import ArrayLike, DtypeObj, Manager, Shape
from pandas.util._decorators import cache_readonly
from pandas.core.dtypes.cast import ensure_dtype_can_hold_na, find_common_type
from pandas.core.dtypes.co... |
Imports:
```python
import torch
from torch import Tensor
import torch.nn.functional as F
from torch.utils.data import DataLoader, TensorDataset
import typing
```
Type definitions:
Input Types: Tensor, Tensor
Output Type: Tensor
Dependencies:
```python
def v0(v1: Tensor) -> Tensor:
v2 = torch.full(v1.shape, -1).cud... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]):
if 'from' in v1:
self.from_hour_combo.set_value(v1['from'])
if 'to' in v1:
self.to_hour_combo.set_value(v1['... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
with self.ix.writer() as v2:
v2.delete_by_term('url', v1)
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.