text
stringlengths
190
325k
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: self.db_query('SELECT time FROM master_time WHERE id IS 1') v1 = self.cur.fetchone()[0] return v1 ```
Imports: ```python import os import typing ``` Type definitions: ```python class v0: v1: bool = True v2: str v3: Dict[str, str] = {} @classmethod def v4(cls, v5: str, v6) -> str: v7 = urllib.parse.urlparse(v5) v8 = urllib.parse.urlunparse([*v7[:2], urllib.parse.urljoin(v7.path, v6),...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: str): self.delete_user(v1, v2) v4 = self.db.cursor() v4.execute('\n INSERT INTO userdata (guild_id, user_id, ...
Imports: ```python import torch from torch.utils.data import DataLoader import typing ``` Type definitions: Input Types: List[torch.Tensor] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[torch.Tensor]): (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)...
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[str], None] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable[[str], None]) -> None: self._message_handlers_lock.acquire() try: if v1 in self._message_handlers: self....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: 'Node' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> 'Node': v2: Node = self try: for (v3, v4) in enumerate(v1): v2 = v2.children[v4] except KeyError: return None...
Imports: ```python from itertools import zip_longest import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: List[str], v2: List[str]) -> bool: for (v3, v4) in zip_longest(v1, v2, fillvalue='Filler'): if v3 == 'Filler' or v4 == 'Filler': return F...
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 = self.get_entity_by_iri(v1) if v3.get_original_label() == v2: v3.user_set_label = '' elif v2 == '': v3.user_...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Union[Any, int]] Output Type: Dict[str, Union[Any, int]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[str, Union[Any, int]]) -> Dict[str, Union[Any, int]]: v1['batch'] = self.batch_to_device(v1['batch'], sel...
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=None): if v1 is None: v1 = self._delay_offsets v2 = np.array([], dtype=np.int) v3 = np.array([]) se...
Imports: ```python import numpy as np from numpy import ndarray import typing ``` Type definitions: Input Types: str, ndarray Output Type: Any Dependencies: ```python @njit(nogil=True, cache=__cache) def v0(v1: ndarray): (v2, v3, v4, v5, v6, v7, v5, v5, v8) = v1.flatten() v9 = v2 * v6 * v8 + 2 * v3 * v4 * v7 -...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): try: self.client.messages.create(body=v1, from_=self.twilio_did, to=self.cell_number) except: pass ```
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: nn.Module Output Type: nn.Module Dependencies: Function Name: v0 Function: ```python def v0(v1: nn.Module) -> nn.Module: if torch.cuda.device_count() > 1: print(f'> Using "nn.DataParallel(model)" on {tor...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = [] (v2, v3) = self._p.getBasePositionAndOrientation(self.robotUniqueId) v4 = self._p.getEulerFromQuaternion(v3) v1.extend([v4[1]]) r...
Imports: ```python from random import randint import typing ``` Type definitions: Input Types: Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0() -> tuple: v1 = randint(0, 255) v2 = randint(0, 255) v3 = randint(0, 255) return (v1, v2, v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.search: self.search = False if self.current_completed: self.text = self.current_completed self.current_co...
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=1): v3 = (self.weight.shape[-1] - 1) // 2 return self.conv(v1, weight=self.weight, groups=self.groups, padding=v3, stride=v2) ```
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 = ['get', 'contract', 'script', 'hash', 'for', v1] return self.run(v2).strip() ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2): v3 = v2.pageSize * (v2.pageNumber - 1) return v1 + f' OFFSET {v3} LIMIT {v2.pageSize}' ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, int, float Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: int, v3: float) -> np.ndarray: v4 = v1 / np.float64(v2) * np.float64(v3) return v4.astype(np.floa...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str, v2: str, v3: str): try: v4 = db_conn.cursor() v4.execute(v1, (v3, v2)) v4.close() db_conn.commit() db_log.info('Updated va_status %s', v2) ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python async def v0(self, v1) -> None: v2 = v1.conversation_id.id v3 = self.get_conversation(v2) if v3 is None: v3 = await self._client.fetch_conversation(v2) ...
Imports: ```python from random import randrange, randint, choice import typing ``` Type definitions: Input Types: int, float Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: float=0.0, **v3) -> None: print(f'kwargs: {v3}') if v2 > 100: v2 = 100.0 v4 = v3.ge...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): try: for v2 in v1: v2.close() except AttributeError: print('ERROR: Um elemento da lista não é um arquivo.') ```
Imports: ```python import subprocess import typing ``` Type definitions: Input Types: subprocess.CompletedProcess Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: subprocess.CompletedProcess): try: v1.check_returncode() return True except subprocess.CalledProcess...
Imports: ```python import cv2 import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, float Output Type: float Dependencies: ```python def v0(v1: np.ndarray, v2: float, v3: int, v4=cv2.INTER_NEAREST) -> np.ndarray: (v5, v6) = v1.shape v7 = v5 * v2 v6 = v6 + int(abs(v7)) v8 = max...
Imports: ```python import os import pickle import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: v2 = os.path.join(v1, 'obj') if not os.path.exists(v2): with open(v2, 'wb') as v3: pickle.dum...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('LogLine', 'path line_range msg_code') ``` Input Types: Output Type: List[v0] Dependencies: Function Name: v1 Function: ```python def v1(self) -> List[v0]: with open(self.get_out_path()) as v2: return [self.parse_line(l) for ...
Imports: ```python import pandas as pd from sklearn.model_selection import cross_val_score from sklearn.metrics import precision_recall_curve, average_precision_score from sklearn.model_selection import GridSearchCV import typing ``` Type definitions: Input Types: list, np.ndarray, np.ndarray, list Output Type: 'DataF...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: if v1 in self.indexTable: return False self.indexTable[v1] = len(self.nums) self.nums.append(v1) return True ```
Imports: ```python import torch import torch.nn.functional as Fnn import typing ``` Type definitions: Input Types: torch.Tensor, Any Output Type: Any Dependencies: ```python def v0(v1: torch.Tensor): v2 = torch.empty_like(v1) for v3 in range(3): v2[..., v3, :] = torch.cross(v1[..., v3 - 2, :], v1[..., ...
Imports: ```python import torch import torch.nn as nn import torch.utils.tensorboard import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): v2 = v1 // 2 v3 = nn.Sequential(self.make_conv(v1, v2, kernel_size=1, padding=0,...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: with self.test_app.test_client() as v1: v2 = self.__post_ingest_endpoint(test_client=v1, authorization_header=self.__create_ingest_authorization_...
Imports: ```python import hashlib import typing ``` Type definitions: Input Types: pathlib.Path Output Type: None Dependencies: ```python def v0(v1: str) -> str: v2 = hashlib.md5() v2.update(v1.encode()) return v2.hexdigest() ``` Function Name: v3 Function: ```python def v3(self, v4: pathlib.Path) -> None:...
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._vessels[v1] return self._data_cntr.reachable_stops[v1, v2.route_idx, v2.next_loc_idx] ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Union[int, float], Union[int, float] Output Type: Tuple[Callable, Callable] Dependencies: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> np.ndarray: assert isinstance(v1, np.ndarray), f'In the si_to_uni_dyn function created...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, Sequence[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: Sequence[int]): assert set(v2) == set(range(int(v1.ndim))), 'All axes must be provided.' return np.mo...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: cyberbattle_env.Action Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> cyberbattle_env.Action: assert 0 <= v1 < np.prod(self.nvec) v2 = self.mapping[v1] (v3, v4, v5, v6, v7,...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterator[ArrayLike] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator[ArrayLike]: for v1 in range(len(self.columns)): yield self._get_column_array(v1) ```
Imports: ```python import requests from requests.exceptions import RequestException import typing ``` Type definitions: Input Types: str, Any Output Type: Dict Dependencies: ```python def v0(v1): return {k: v for (v2, v3) in v1.items() if v3} ``` Function Name: v4 Function: ```python def v4(self, v5: str, *, v6, *...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> str: v3 = v2[2:4].lower() v4 = ''.join(v1.split('-')[1:2]).lower() v5 = {'nl': 'Synthetic Leather', 'co': 'Component', 'pu': 'PU Mix...
Imports: ```python import typing ``` Type definitions: Input Types: datetime Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: datetime) -> bool: v2 = all((filter_fn(v1) for v3 in self.filters)) v4 = any((v3(v1) for v3 in self.or_filters)) if self.or_filters else True ...
Imports: ```python import torch import torch.nn as nn import typing ``` Type definitions: Input Types: torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, Union[List[torch.Tensor], torch.Tensor] Output Type: torch.Tensor Dependencies: ```python def v0(v1, v2=0): return v1.repeat_interleave(repeat...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: for v2 in self.onefuzz.jobs.list(): if v2.config.project != v1: continue if v2.config.build != 'base': ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int=-1) -> None: self._epoch_start = None self.epoch = v1 if self.verbose: print('stats: epoch %d - hard reset' % self.epoch) self.stat...
Imports: ```python import typing ``` Type definitions: ```python class v0(InputDescriptor): def __init__(self, v1: int, v2: datetime, v3: Optional[datetime]=None, v4: Optional[str]='', v5: Optional[Dict]=None): """Initialize the snapshot meta-data. Parameters ---------- version: in...
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 = self.number_of_reviews_retrieved() + self._start v3 = v2 / v1 assert isinstance(v3, float) return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): if v1.endswith('cm'): return 150 <= int(v1[:-2]) <= 193 if v1.endswith('in'): return 59 <= int(v1[:-2]) <= 76 return False ```
Imports: ```python import typing ``` Type definitions: Input Types: float, float, str Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(v1: float, v2: float, v3: str) -> float: v4 = v1 + v2 / 60 return v4 * (-1 if v3 in ['S', 'E'] else 1) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[List['Package']], Sequence['Package'] Output Type: List[Tuple['System', List['Package']]] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[List['Package']], v2: Sequence['Package']) -> List[Tuple['System', List['Package'...
Imports: ```python import z3 import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int) -> None: while self._highest_depth_var < v2: v3 = self._highest_depth_var self.solver.add(z3.Implies(z3.Bool(f...
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int) -> int: if v1[0] >= v2: return 0 return v2 - min(v1) ```
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[complex, float] ``` ```python v1 = TypeVar('TVector') ``` Input Types: Output Type: ItemsView[v1, v0] Dependencies: Function Name: v2 Function: ```python def v2(self) -> ItemsView[v1, v0]: v3 = self.copy().clean(atol=0) return v3._ter...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Optional[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> Optional[int]: if v1 < 10000000 or v1 > 999999999999999: return None else: return v1 ```
Imports: ```python import typing ``` Type definitions: Input Types: Callable[[], None] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable[[], None]) -> None: if v1 is not None: self._callbacks.append(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> bool: v3 = v2.split() return len(v1 + ' ' + v3[0]) < len(v2) * 0.8 or len(v1 + ' ' + v3[0]) < 50 or len(v1) < len(v3[0]) ```
Imports: ```python import typing ``` Type definitions: Input Types: list, str, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list=None, v2: str='', v3: int=-2): if v2: v1.append(v2) else: del v1[v3:] ```
Imports: ```python import typing ``` Type definitions: Input Types: str, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2=None, v3=''): v4 = "globals()['{}'] = imp('{}')" if v2: if v3: v3 = '.' + v3 v4 = v4.format(v2, v1) + v3 els...
Imports: ```python import typing ``` Type definitions: Input Types: logging.LogRecord Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: logging.LogRecord) -> str: v1.__dict__['levelname'] = v1.levelname[0].upper() return super().formatMessage(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.Dict[str, typing.Any] Dependencies: Function Name: v0 Function: ```python async def v0(self) -> typing.Dict[str, typing.Any]: v1 = self.get_api_url(action='Ryver.Info()', format='json') async with self._session.get(v1) as...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: v2 = self.motor.getSelectedSensorPosition() v3 = self.current_target_counts - v2 self.motor.setSelectedSensorPosition(v1) for v4 in se...
Imports: ```python import typing ``` Type definitions: Input Types: mp.Pipe, mp.Pipe, gym.Env Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: mp.Pipe, v2: mp.Pipe, v3: gym.Env): v1.close() while True: (v4, v5) = v2.recv() if v4 == 'step': (v6, v7, v8...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.get_schema() self.connector.execute_query(query=v1) ```
Imports: ```python import tensorflow as tf import typing ``` Type definitions: Input Types: tf.Tensor, tf.Tensor Output Type: tf.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: tf.Tensor, v2: tf.Tensor) -> tf.Tensor: (v3, v4, v5) = v1.get_shape() (v6, v7, v5) = v2.get_shape() assert ...
Imports: ```python import typing ``` Type definitions: ```python v0 = Union[Shape, Location] ``` ```python v1 = TypeVar('T', bound='Sketch') ``` Input Types: List[v0] Output Type: List[v0] Dependencies: Function Name: v2 Function: ```python def v2(self: v1, v3: List[v0]) -> List[v0]: v4 = {hash(v): v for v5 in v3}...
Imports: ```python import os import typing ``` Type definitions: Input Types: 'Context' Output Type: str Dependencies: ```python def v0(v1: str) -> None: v2 = os.listdir(v1) for v3 in v2: if v3.endswith('.yaml'): os.remove(os.path.join(v1, v3)) ``` ```python def v4(v5: 'Context') -> str: ...
Imports: ```python 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 = self.get_my_projects_under_org(v1) v4 = [] for v5 in v3: print('Adding `%s` project to project list' % v5.display_n...
Imports: ```python import shelve import typing ``` Type definitions: Input Types: str, str Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str) -> list: try: with shelve.open(v1) as v3: return v3[v2] except KeyError: return [] ```
Imports: ```python import typing ``` Type definitions: Input Types: rule.LogFilePosition, ET.Element Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: rule.LogFilePosition, v2: ET.Element): if v2.text is not None: pass ```
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: Dict[str, Any] v2: int def v3(self, v4: Dict[str, Any]) -> v0: self.custom_attribute = v4 return self def v5(self, v6: int) -> v0: self.updated_at = v6 return self def v7(self, v8...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Iterator[Tuple[str, str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Iterator[Tuple[str, str]]: v2 = [] v3 = v1.split('/') while v3: v4 = v3[-1] v5 = '/'.join(v3) v2.app...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str, v3: int) -> int: self.db_cursor.execute('INSERT INTO "main"."file" ("name", "checksum", "directory_id") VALUES (?, ?, ?);', str(v1),...
Imports: ```python import socket from contextlib import closing import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: int) -> bool: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as v2: try: v2.bin...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: int Dependencies: ```python def v0(v1, v2, v3, v4) -> set: v5 = set() v6 = {v1} while len(v6) != 0: v7 = v6.pop() v5.add(v7) v8 = {n for v9 in get_neighbors(v7, v2, v3) if v4[v9] != 9 and ...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Output Type: pd.Series Dependencies: Function Name: v0 Function: ```python def v0(self) -> pd.Series: v1 = (self._close - self._lband) / (self._hband - self._lband) v1 = self._check_fillna(v1, value=0) if self._offset...
Imports: ```python import typing ``` Type definitions: Input Types: Gio.SimpleAction, None Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Gio.SimpleAction=None, v2: None=None) -> bool: if self.document.original_url: return self.save() else: return self.s...
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 = 0 v3 = 2147483647 v4 = False if v1 < 0: v1 = -v1 v4 = True while v1: if v2 > v3 // 10 or v2 * 10 >...
Imports: ```python import typing ``` Type definitions: ```python class v0: v1: 'EquipmentNode' v2: Iterable['EquipmentNode'] def __init__(self, v3, v4: str, v5: dict, v6: str, v7, v8): self.binary = v3 self.wtype = v4 self.name = v5 self.tree = v6 self.craft = v7 or ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, np.ndarray Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray, v3: np.ndarray=None) -> tuple: v4 = v1.shape[1] v5 = v1.shape[0] v6 = roun...
Imports: ```python import typing ``` Type definitions: Input Types: 'MPCTensor' Output Type: 'MPCTensor' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: 'MPCTensor') -> 'MPCTensor': v1 = self.__check_or_convert(v1, self.session) return 1 - self.eq(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: v2 = v1.get('target', '') if self.get_param_in_url(v2, 'targetPools') != '': return True else: return False ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self._queuedSpeech.append(v1) if not self._isProcessing: self._processQueue() ```
Imports: ```python import math import torch import typing ``` Type definitions: Input Types: torch.Tensor, float, str, bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: float=2.0, v3: str='FAN_IN', v4: bool=False): v5 = v1.size() v6 = float(v5[-2]) if len(v...
Imports: ```python import os import tempfile import platform import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self._orig_env = dict(os.environ) self._valid_cmd = 'where' if platform.system() == 'Windows' else 'echo' ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> None: self.isOrigin = False self.i = (self.i + v1) % len(self.pos) ```
Imports: ```python import typing ``` Type definitions: Input Types: List[Set[Any]] Output Type: float Dependencies: ```python def v0(v1: Set[Any], v2: Set[Any]) -> float: return len(v1.intersection(v2)) / len(v1.union(v2)) ``` Function Name: v3 Function: ```python def v3(v4: List[Set[Any]]) -> float: v5 = len(...
Imports: ```python import typing ``` Type definitions: Input Types: GlacierParser.BexprContext Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: GlacierParser.BexprContext): v1.target_code = f'{v1.expr(0).target_code} {v1.binOp().getText()} {v1.expr(1).target_code}' self.ex...
Imports: ```python from sklearn.metrics.pairwise import cosine_distances import typing ``` Type definitions: Input Types: Any Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> tuple: v2 = self.get_centroid(v1) v3 = cosine_distances(v2.reshape(1, -1), self.get_vectors(v...
Imports: ```python import typing ``` Type definitions: Input Types: retries.Retry, float Output Type: list Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: retries.Retry=gapic_v1.method.DEFAULT, v2: float=None) -> list: (v3, v4) = self._prep_commit(v1, v2) v5 = await self._client._fi...
Imports: ```python import typing ``` Type definitions: Input Types: types.UInt160 Output Type: Optional[contracts.ContractState] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: types.UInt160) -> Optional[contracts.ContractState]: try: return self._internal_contract_get(v1) except ...
Imports: ```python from datetime import datetime, timedelta import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): if type(v1) is not dict: raise ValueError(str('Data date should be json, not str')) v2 = datetime.now...
Imports: ```python import math import typing ``` Type definitions: Input Types: int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> bool: v2 = 0 v3 = int(math.sqrt(v1)) + 1 for v4 in range(1, v3): if v1 % v4 == 0: if v1 / v4 == v4: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str='', **v2) -> str: v3 = self.date(**v2) if not v1: v1 = self._data['formats'].get('date') return v3.strftime(v1) ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): super().init(v1 + '-summary.csv') self.roundTotals = [0 for v2 in range(20)] ```
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, Any Output Type: discord.Role Dependencies: Function Name: v0 Function: ```python async def v0(v1, v2: str, v3) -> discord.Role: if v3 > 1: v3 = v3 / 100 if v3 > 1: raise ValueError('`percent` must be <= 1 or <= 100'...
Imports: ```python import math import typing ``` Type definitions: Input Types: Union[int, float] Output Type: Union[int, float] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[int, float]) -> Union[int, float]: if isinstance(v1, str) and v1 in self.null_values: return self.medi...
Imports: ```python from skimage import color, data, measure, segmentation from skimage.future import graph import typing ``` Type definitions: Input Types: Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> np.ndarray: v2 = segmentation.felzenszwalb(self.image_tenso...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, *v2): print(f'proc {self.rank}: {v1}', *v2) return ```
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = self.__config.get('wsgi', 'reference_housenumbers').strip().split(' ') return [os.path.join(self.root, relpath) for v2 in v1...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: self._first_execution_run_id = v1 self._start_fut.set_result(None) ```