text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any], str, Dict[str, Dict[str, Any]]
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any], v2: str, v3: Dict[str, Dict[str, Any]]) -> None:
v4 = v3['layers'][v2]
if not v4['children']... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tensor, int, Optional[int]
Output Type: Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor, v2: int, v3: Optional[int]=None) -> Tensor:
if isinstance(v1, tuple) or isinstance(v1, list):
(v4, v5) = v1
el... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: list
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, *v2) -> list:
v3 = 'SELECT ' + self.select_prefix + ' FROM ' + self.table_name + ' WHERE ' + v1 + '=?'
return self.sqlite_control.process_select_list(v... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.grid_program.initialize()
self.text_program.initialize()
``` |
Imports:
```python
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import typing
```
Type definitions:
Input Types: list, list
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: list, v2: list):
v3 = plt.figure(num=1, figsize=(4, 4), dpi=70, facecolor='w', edgecol... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types:
Output Type: np.array
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> np.array:
if self.camera_intrinsic == None:
assert '相机内参未加载,调用BoundingBox_3d.load_camera_intrinsic()加载'
if self.camera_extri... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[bool, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[bool, float]:
(v1, v2) = self.hitting_second_ratelimit()
if not v1:
(v1, v2) = self.hitting_minute_ratelimit()
return (v1, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: 'BaseWrapper'
Dependencies:
Function Name: v0
Function:
```python
def v0(self, **v1) -> 'BaseWrapper':
v2 = dict()
for (v3, v4) in v1.items():
if any((v3.startswith(prefix + '__') for v5 in self._routing_prefixes)):
... |
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.plugins.values():
v1.clear()
self.plugins.clear()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: bytes
Output Type: layer.CommandGenerator[Tuple[bool, Optional[str]]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bytes) -> layer.CommandGenerator[Tuple[bool, Optional[str]]]:
yield from ()
return (True, None)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, typing.Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: typing.Any):
if v1 == 'id':
raise ValueError('Changing module id is not allowed.')
self._config[v1] = v2
self.set_confi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dd.Series
Output Type: dd.Series
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dd.Series) -> dd.Series:
v2 = v1.map(self.fillna)
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
await self.close()
if not self.nolimit:
self.sem.release()
await self.cancel_tasks()
await self.close_coros()
await self.su... |
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(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray) -> np.ndarray:
v1 = v1.astype(np.bool_)
v2 = v2.astype(np... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> Optional[str]:
v2 = 'SELECT url FROM playlist_urls WHERE user_id != %d ORDER BY RANDOM() LIMIT 1;' % v1
for v3 in self.conn.execute(v2... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Dict[str, Any]) -> str:
try:
return json.dumps(v1)
except Exception as ex:
raise ValueError(f'Ex Dumps JSON: {v1}... |
Imports:
```python
import logging
from typing import Any, Callable, cast, MutableMapping, Optional, Type, TYPE_CHECKING, TypeVar, Union
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types: str
Output Type: Callable[..., v0]
Dependencies:
```python
def v1(v2: Callable[..., v0]) -> Any:
@... |
Imports:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
import typing
```
Type definitions:
Input Types: torch.Tensor
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: torch.Tensor) -> torch.Tensor:
v2 = v1.size()[2:]
v1 = self.stem_bl... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str='()', v3: int=0, v4: int=None):
v5 = v2[:1]
v6 = v5 if len(v2) < 2 else v2[1:2]
v4 = len(v1) if v4 is None else v4
v7 = v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Path
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path) -> None:
self._logger.debug('BLDR build with {}'.format(v1))
v2 = self._init_bldr()
v2.build(package_dir=v1)
v3 = v2.local_repo_dir.join... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
while not self.is_closed:
await self.send_json({'op': self.HEARTBEAT})
await asyncio.sleep(30)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: [int]
Output Type: [float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: [int]) -> [float]:
v2 = 0
v3 = 255
v4 = 0
v5 = 0
v6 = 0
for v7 in range(len(v1)):
v2 += v1[v7]
v5 += v1[v7] * v7
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray) -> float:
v2 = v1[0]
v3 = v1[1]
v4 = v1[2]
v5 = np.dot(v2, v3)
v6 = np.dot(v2, v4)
v7 = np.dot(v3, v4)... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
```python
v0 = Union[da.Array, np.ndarray]
```
```python
v1 = Tuple[int, int, int, int]
```
```python
v2 = Tuple[int, int]
```
Input Types: int, int, v1
Output Type: v0
Dependencies:
```python
@deprecated(version='0.11.0', reason='no longer in us... |
Imports:
```python
import typing
```
Type definitions:
Input Types: g.Game, m.Square
Output Type: List[m.Square]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: g.Game, v2: m.Square) -> List[m.Square]:
v3: List[m.Square] = []
v4 = v2.x
v5 = v2.y
if v4 <= v1.state.pitch.width - 3:
... |
Imports:
```python
import asyncio
import typing
```
Type definitions:
Input Types:
Output Type: Optional[dict]
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> Optional[dict]:
v1 = None
v2 = await asyncio.gather(self._retrieve_provision_info(), self._retrieve_discovery_info(), return... |
Imports:
```python
import typing
```
Type definitions:
Input Types: torch.Tensor, bool, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: torch.Tensor, v2: bool, v3: bool) -> Any:
if v2:
v1 = v1.add_(1.0).div_(2.0)
if v3:
v1 = v1.half()
v4 = v1.mul_(255.0... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float, float, float, float
Output Type: Tuple[int, int, int]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float, v2: float, v3: float, v4: float) -> Tuple[int, int, int]:
v5 = 255 * (1.0 - v1) * (1.0 - v4)
v6 = 255 * (1.0 - ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, float, float, float, float
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1, v2: float=None, v3: float=None, v4: float=None, v5: float=None):
v6 = v2 if v2 is not None else 0
v7 = v3 if v3 is not... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1: str, v2: Optional[List[Arg]]=None, v3: Optional[List[Union[Part, Arg]]]=None, v4: int=0) -> None:
if v2 is None:
v2 = []
if v3 is None:
v3 = []
assert len(v1) > 0, f'Err... |
Imports:
```python
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.select import Select
import typing
```
Type definitions:
Input Types: bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool):
v2 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Iterable[Tuple[str, str]]
Output Type: Dict[str, Set[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[Tuple[str, str]]) -> Dict[str, Set[str]]:
v2: Dict[str, Set[str]] = {}
for (v3, v4) in v1:
v2.setdefaul... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Optional[Dict[str, str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> Optional[Dict[str, str]]:
if v1:
return self._get_linked_page(v1, 'u_in_reply_to')
return None
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: List
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> List:
try:
return list(v1[:])
except Exception:
return list(v1.toArray()[:])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self._drag_info
if v1.active:
v1.active = False
v2 = [v1.drag_card]
if v1.child_cards:
v2 += v1.child_cards
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict:
v1 = {}
if hasattr(self, 'action'):
v1['action'] = self.action
if hasattr(self, 'client_id'):
v1['clientId'] = self.client_id
... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(t.NamedTuple):
v1: int
v2: int
v3: int
def v4(self) -> v0:
""" Returns a cursor pointing to the beginning of the current line. """
return v0(self.offset - self.column + 1, self.line, 1)
```
Input Types: v0
Output ... |
Imports:
```python
import datetime
import random
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 'Sunday'
v2 = 'Monday'
v3 = 'Tuesday'
v4 = 'Wednesday'
v5 = 'Thursday'
v6 = 'Friday'
v7 = 'Saturday'
```
Input Types:
Output Type: str
Dependencies:
```python
def v8() -> v0:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict):
v2 = v1['files']
v3 = v1['env']
v4 = '\nfrom universum.configuration_support import Step, Configuration\n\nconfigs = Configuration([Step(name="Ste... |
Imports:
```python
from requests.exceptions import HTTPError
from requests.structures import CaseInsensitiveDict
import typing
```
Type definitions:
```python
class v0:
v1: CaseInsensitiveDict
v2: dict
v3: str
v4: dict
@property
def v5(self):
return self.__body
@property
def v6... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
assert self._refresh_token is not None
return self._auth_request('access_token', {'grant_type': 'refresh_token', 'client_id': self._client_id, 'client_... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, Dict[str, Any]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: Dict[str, Any]):
if self._train_step_metrics is not None:
v3 = {}
for v4 in self._train_step_metrics:
v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Union[int, List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> Union[int, List[int]]:
if v1 < 0:
return 5
return [3]
``` |
Imports:
```python
import subprocess
from pathlib import Path
from subprocess import run
import os
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> None:
print('Starting cleanup.')
os.chdir(v1)
print(f'Set w... |
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.mode_devices:
v1.device_removed_from_mode(self)
self.mode_devices = set()
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.request('motion_comment.create', {})
self.assert_status_code(v1, 400)
self.assertIn("data must contain ['comment', 'motion_id', 'sectio... |
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
Output Type: int
Dependencies:
Function Name: v2
Function:
```python
def v2(self, v3: v0) -> int:
if v3 == None:
... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: Iterable[str], dict[str, dict], Set[str]
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Iterable[str], v2: dict[str, dict], v3: Set[str]) -> Optional[str]:
v4 = set()
for v5 in v1:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
assert self.connected
assert not self.command_running
assert self._session is not None
self._session.get_pty()
self._session.exec_comm... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int) -> int:
for v3 in range(len(self.conn_genes)):
if self.conn_genes[v3].start == v1 and self.conn_genes[v3].end == v2:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: Tuple[Optional[bool], Optional[int], Optional[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> Tuple[Optional[bool], Optional[int], Optional[str]]:
v2 = self._remote_app_params.get('features')
if v2:
... |
Imports:
```python
from io import BytesIO
import typing
```
Type definitions:
Input Types:
Output Type: Iterator[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Iterator[str]:
v1 = BytesIO(self.get_game_lump(b'sprp'))
return self._read_static_props_models(v1)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
assert self._q_func is not None
assert self._imitator is not None
v1 = list(self._q_func.parameters())
v2 = list(self._imitator.parameters())... |
Imports:
```python
import numpy as np
from PIL import Image, ImageOps
import typing
```
Type definitions:
Input Types: Image.Image, int
Output Type: Image.Image
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Image.Image, v2: int=0) -> Image.Image:
v3 = np.array(v1)
if v3.shape[2] == 4:
... |
Imports:
```python
import glob
import hashlib
import os
import shutil
import subprocess
import traceback
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
```python
def v0(v1):
v2 = os.path.basename(v1)
return hashlib.sha256(v2.encode()).hexdigest()
```
```python
def v3(v... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types:
Output Type: torch.Tensor
Dependencies:
Function Name: v0
Function:
```python
def v0(self, *v1, **v2) -> torch.Tensor:
v3 = torch.cat(tuple((model.forward(*v1, **v2).unsqueeze(2) for v4 in self.models)), dim=2)
return torch.mean... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> str:
if not v1.isalpha():
raise ValueError(f'Value {v1} contains non-alphabetic chracters')
return v1
``` |
Imports:
```python
import tensorflow as tf
from tensorflow.keras.layers import *
from tensorflow.keras.models import *
from tensorflow.keras.applications.resnet50 import ResNet50
import typing
```
Type definitions:
Input Types: Any, int, int
Output Type: Any
Dependencies:
```python
def v0(v1, v2):
v1 = tf.cast(v1,... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
if self.visprotocol is not None:
return self.visprotocol.getPanelMode()
return 'Not Connected'
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Tensor
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Tensor):
for v2 in v1.reshape(-1):
self._ground_truth_classes_count[v2.item()] += 1
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
if self.loop:
raise Exception('show_and_wait(): Se ha detectado una llamada recursiva')
self.loop = True
self.show()
if self.eventloo... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Optional[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: Optional[str]):
if self._create_libspec(v1, target_file=v2):
self.synchronize_internal_libspec_folders()
return True
... |
Imports:
```python
from spacy.lang.en import English
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str]) -> List[str]:
v2 = English()
v3 = v2.Defaults.create_tokenizer(v2)
v4 = []
for v5 in v3.pipe(... |
Imports:
```python
import json
import os
import typing
```
Type definitions:
Input Types: str, List, bool, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: List, v3: bool, v4: int) -> None:
if not os.path.exists(os.path.dirname(v1)):
os.makedirs(os.path.dirname... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, int], Dict[Tuple[str, str], int]
Output Type: Dict[Tuple[str, str], float]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, int], v2: Dict[Tuple[str, str], int]) -> Dict[Tuple[str, str], float]:
v3: Dict[Tuple[st... |
Imports:
```python
import torch
import typing
```
Type definitions:
Input Types: List
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List):
v2 = [self.sp_model.encode(sample[2].lower().replace('<unk>', '<garbage>').replace('\n', '')) for v3 in v1]
v2 = [[ele if ele != 4 ... |
Imports:
```python
import numpy as np
import pandas as pd
from pandas.api.types import is_object_dtype
import typing
```
Type definitions:
Input Types: Any, Optional[str]
Output Type: pd.Series
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any, v2: Optional[str]=None) -> pd.Series:
if self.... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any
Output Type: np.ndarray
Dependencies:
```python
def v0(v1, v2, v3):
return sum([w * _l2dist(v1, x) for (v4, v5) in zip(v3, v2)])
```
```python
def v6(v7, v8):
if v7.ndim != v8.ndim:
raise RuntimeError('Tensor sha... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3='el'):
if v1 is None:
v1 = f'{v3}_{self._next_id()}'
self._results[v1] = v2
return v1
if v1 in self._... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> int:
v1 = 0
v2 = self.turn_count() - 1
while v2 in self.race_turns:
v1 += 1
v2 -= 1
return v1
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Union[List, np.ndarray], float
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Union[List, np.ndarray], v2: float=0.05) -> np.ndarray:
v1 = np.array(v1)
v1[v1 > v2] = 0
v1[(v1 < v2... |
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 = 1
while v1 >= v2:
v2 = v2 << 1
return v2 - 1 - v1
``` |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Path, Path
Output Type: None
Dependencies:
```python
def v0(v1: str) -> Template:
v2 = str(Path(__file__).parent / 'templates' / v1)
return Template(filename=v2)
```
Function Name: v3
Function:
```python
def v3(v4: Pat... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
if self.check_embeds and (not self.ctx.channel.permissions_for(self.ctx.me).embed_links):
await self.ctx.send('Bot does not have embed link... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int):
v3 = f'window.scrollTo({v1}, {v2})'
self.driver.execute_script(v3)
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11):
self.ms_client = MicrosoftClient(tenant_id=v1, auth_id=v2, enc_key=v3, app_name=v4, base_url=v5, verify=v6, proxy=v7, self_deployed=v8, scope='https://securitycenter.... |
Imports:
```python
import argparse
import subprocess
import typing
```
Type definitions:
Input Types: Optional[List[str]]
Output Type: int
Dependencies:
```python
def v0(v1: str, v2: str) -> None:
print(f'{v2}...')
subprocess.run(['curl', '--silent', '--location', f'https://unpkg.com/htmx.org@{v1}/dist/{v2}', ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: PySide2.QtGui.QMouseEvent
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: PySide2.QtGui.QMouseEvent) -> None:
self.currentState.mouseReleased(v1)
self.currentState.gameObjectHandler.mouseReleased(v1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: List[List]
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List]) -> np.ndarray:
v2 = len(v1)
if 0 < v2:
v3 = len(v1[0])
if 0 < v3:
v4 = np.zeros((v2, ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: 'dotmotif.Motif', Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: 'dotmotif.Motif', v2=None, v3=True):
v4 = self.motif_to_cypher(v1, static_entity_labels=self._entity_labels)
if v2:
v4 +=... |
Imports:
```python
from inspect import isawaitable
from typing import TYPE_CHECKING, Awaitable, Callable, Hashable, List, Optional, Sequence, Tuple, TypeVar, Union, cast
import typing
```
Type definitions:
Input Types: 'KeyPressEvent'
Output Type: None
Dependencies:
```python
async def v0() -> None:
v1 = await awa... |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types: Exception
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Exception=None):
if v1:
self._logger.exception(v1)
self._notify(str(v1))
else:
v2 = list(sys.exc_info())
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: T.Union[str, int, float, bool, None], Any, Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: T.Union[str, int, float, bool, None], v2=False, v3=False) -> bool:
v4 = ('on', 'true', '1')
v5 = ('off', 'false', ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[int]], int
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: List[List[int]], v2: int) -> int:
(v3, v4, v5) = (-1, 0, 0)
for v6 in sorted(v1):
if v4 >= v2 or v6[0] > v4:
break
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, np.ndarray, Any, int, float
Output Type: dict
Dependencies:
```python
def v0(v1: np.ndarray, v2: np.ndarray) -> dict:
v3 = dict()
for v4 in range(len(v2) - 1):
v3[v4] = np.where((v1 > v2[v4]) ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: mitmproxy.flow.Flow
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: mitmproxy.flow.Flow):
if v1.id in self._store:
if self.filter(v1):
if v1 not in self._view:
self._base_a... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: pd.DataFrame, str, str, np.array
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame, v2: str, v3: str, v4: np.array):
v5 = np.array(v1[v2])
v4 = np.array(v4)
if v3 is None:
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.assert_walk_dirs(['*'], ['a', 'c.ln', 'd.ln'])
self.assert_walk_dirs(['*/*'], ['a', 'a/b', 'c.ln', 'd.ln', 'd.ln/b'])
self.assert_walk_dirs(... |
Imports:
```python
import os
import json
import torch
import torch.utils.data as td
import h5py
import typing
```
Type definitions:
Input Types: str, int
Output Type: Any
Dependencies:
```python
def v0(v1: str, v2: int):
v3 = v2 // 100
v4 = v2 % 100
v5 = 'sample_%010d' % v3
v6 = 'sample_%03d' % v4
... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: str, Any
Output Type: tuple
Dependencies:
```python
def v0(v1: str, v2: list, v3=None) -> str:
v4 = []
for v5 in v1:
v4.append(v5)
if v3 == None or len(v3) == 0:
for v6 in range(len(v4)):
v7 = ord(... |
Imports:
```python
from hashlib import scrypt
import typing
```
Type definitions:
Input Types: str, bytes
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: bytes) -> bytes:
v3 = scrypt(bytes(v1, 'UTF-8'), salt=v2, n=16384, r=8, p=1)
return v3
``` |
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.compile('id=[\\d\\.\\-]*?;')
v3 = v2.sub('id=0;', v1)
return v3
``` |
Imports:
```python
import sys
import typing
```
Type definitions:
Input Types: set, list
Output Type: Tuple[int, int]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: set, v2: list) -> Tuple[int, int]:
v3 = sys.maxsize
v4 = 0
for (v5, v6) in enumerate(v2):
if v5 not in v1 and v6 < v3... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0:
def __init__(self, v1, v2, v3, v4):
self.sentence: Sentence = v1
self.label = v2
self.id = v3
self.spans = v4
self.attributes: List[Attribute] = []
def v5(self):
if len(self.spans) > 1:
... |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any
Output Type: np.array
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> np.array:
(v2, v3) = self._logsumexp_calc(v1)
v4 = self.constants[self.T] * self.constants[self.kb]
v5 = -1 / (v4 * self.... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = v1.strip().split(':')
if len(v2) == 3:
(v3, v4, v5) = v2
return int(v3) * 3600 + int(v4) * 60 + int(v5)
(v4, v5) = v2
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, str, bool
Output Type: mlrun.api.schemas.Project
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: str, v3: bool=False) -> mlrun.api.schemas.Project:
v4 = self._get_project_from_iguazio_without_parsing(v1, v2)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, *v2: Face):
v3 = self._named_faces.get(v1) or []
for v4 in v2:
v3.append(self._find_face_index(v4))
self._named_faces[v1] = v3
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: asyncio.Task
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: asyncio.Task) -> None:
self._statistic.task_added += 1
v1.add_done_callback(self.__task_store.remove)
self.__task_store.add(v1)
``` |
Imports:
```python
import csv
import typing
```
Type definitions:
Input Types: str
Output Type: list[dict[str, Any]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> list[dict[str, Any]]:
v2 = self.session.post(self.url('api/v2/query'), headers={'Content-Type': 'application/vnd.flux'},... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.