text
stringlengths
190
325k
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: float, int, float Output Type: Tuple[np.ndarray, np.ndarray, np.ndarray] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: float, v2: int=14, v3: float=0.95) -> Tuple[np.ndarray, np.ndarray, np.ndarray]: if s...
Imports: ```python import typing ``` Type definitions: Input Types: str, Dict, Optional[Dict] Output Type: Dict[str, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Dict, v3: Optional[Dict]=None) -> Dict[str, Dict]: try: v4: Dict = self._create_app_type(**v2) except...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Iterable['LabelNode'] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterable['LabelNode']: yield self for v1 in self.children: yield from v1.flat_iter() ```
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: Union[str, Path], type, bool Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path], v2: type=np.float32, v3: bool=True) -> np.ndarray: if v3: return ...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Iterable[Path] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str) -> Iterable[Path]: v3 = self.FS_OUTPUT_PATTERN.format(main_dir=v1, output_id=v2) return self.destination.rglob(v3) ```
Imports: ```python import re import typing ``` Type definitions: Input Types: pathlib.Path Output Type: Dict[str, List[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: pathlib.Path) -> Dict[str, List[str]]: v2 = False v3 = False v4 = {} v5: List[str] = [] with open(v1, 'r', enc...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray, int Output Type: None Dependencies: ```python def v0(v1: int, v2: int, v3: int) -> Tuple[slice, Union[slice, None]]: assert 0 < v2 <= v1, f'Must be: 0 < data_len {v2} <= buff_len {v1}' v4 = v3 % v1 v5 = (v3 + v2) % ...
Imports: ```python import typing ``` Type definitions: Input Types: List, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List, v2): v3 = self.top v4 = 0 v5 = len(self.rows) v6 = len(self.columns) for (v7, v8) in enumerate(self.rows): v9 = self.lef...
Imports: ```python import torch import typing ``` Type definitions: Input Types: Output Type: Iterator[Tuple[torch.Tensor, ...]] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Iterator[Tuple[torch.Tensor, ...]]: v1 = torch.stack(self.obs, 1) v2 = torch.stack(self.act, 1) v3 = torch.s...
Imports: ```python import typing ``` Type definitions: Input Types: Any, str, str, str Output Type: Any Dependencies: ```python def v0(v1, v2): if colored: return colored(v1, v2) else: return v1 ``` ```python def v3(v4: str, v5: list, v6: bool=False): v7 = [str(val).upper() for v8 in v5] ...
Imports: ```python import typing ``` Type definitions: Input Types: str, Callable, Optional[Any], bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: Callable, v3: Optional[Any]=None, v4: bool=True): if v4: v5 = self._transform_functions self._transf...
Imports: ```python import tensorflow.compat.v1 as tf import typing ``` Type definitions: Input Types: tf.Tensor, int, Any, Optional[Text] Output Type: tf.Tensor Dependencies: ```python def v0(v1, v2, v3=None): if v3 is None: v3 = v1.name v4 = {} if isinstance(v2, int): v4[v2] = True els...
Imports: ```python import sys import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='No reason given'): print(f'Error: {v1}!', file=sys.stderr) sys.exit(1) ```
Imports: ```python import typing ``` Type definitions: Input Types: Dict[str, Any] Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: Dict[str, Any]) -> str: v2 = len(v1['early_morning']) v3 = len(v1['morning']) v4 = len(v1['afternoon']) v5 = len(v1['night']) v6 = len(...
Imports: ```python import tensorflow as tf import typing ``` Type definitions: ```python v0 = NamedTuple('RNNSpec', [('size', int), ('direction', str), ('cell_type', str)]) ``` Input Types: tf.Tensor, tf.Tensor, v0 Output Type: Tuple[tf.Tensor, tf.Tensor] Dependencies: ```python def v1(v2: v0) -> Callable[[], tf.nn.rnn...
Imports: ```python import re 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 = 0 if v1 == 'char': v3 = 1 elif v1 == 'short': v3 = 2 elif v1 == 'int': v3 = 4 eli...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, dict, Any, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: dict, v3, v4): v5 = ['skewer', '-r', str(v2['max_error_rate']), '-d', str(v2['max_indel_rate']), '-m', str(v2['mode']), '-l', s...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> Dict: v1 = {'summary': self.title, 'start': self.formatted_begin_time, 'end': self.formatted_end_time, 'reminders': {'useDefault': True}} if self.location:...
Imports: ```python import torch import typing ``` Type definitions: Input Types: torch.Tensor, Tuple[int, ...], Optional[bool] Output Type: torch.Tensor Dependencies: Function Name: v0 Function: ```python def v0(v1: torch.Tensor, v2: Tuple[int, ...], v3: Optional[bool]=None) -> torch.Tensor: v4 = torch.reshape(v1...
Imports: ```python import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str='utf-8'): with open(v1, 'r', encoding=v2) as v3: for v4 in v3: yield v4.strip() ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int, v2: int, v3: int) -> int: if v1 <= v3: return v1 while v1 > v3: v1 -= 1 if v2 != self.srcCharCode[v1]: ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if self.driver.get_cookie('uid') is None: return False else: return True ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self) -> int: for v1 in range(len(self.queue) - 1): v2 = self.queue.popleft() self.queue.append(v2) self.rear = v2 if len(self.queue) > 1 else None ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.__begin_task_id.clear() self.__over_task_id.clear() ```
Imports: ```python import re import typing ``` Type definitions: Input Types: str, list Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: list) -> str: v3 = re.compile('\\b(' + '|'.join(v2) + ')\\b\\s*', re.IGNORECASE) return v3.sub('', v1) ```
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, **v2): v3 = {} v4 = v1[f'input/s_onehot'] v5 = v1[f'input/onehot.*'][..., ...
Imports: ```python import re import typing ``` Type definitions: ```python class v0: def __init__(self, v1='\n', v2=' ', v3=True, v4=None, v5=[], v6=[], v7='', v8=True): self.sep = v1 self.add = v2 self.printFirst = v3 self.callSource = v4 self.definedVars = v5 se...
Imports: ```python import typing ``` Type definitions: Input Types: np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray): v2 = self.pose2d_estimator.run_single_image(v1) return v2 ```
Imports: ```python import csv import json import typing ``` Type definitions: Input Types: List[Dict], IO, List[str], bool, Any Output Type: Any Dependencies: ```python def v0(v1: Any) -> Any: if v1 is None: return '' if isinstance(v1, list) or isinstance(v1, dict): return json.dumps(v1, cls=Dc...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = format(self.elem, '02X') if len(v1) % 2: v1 = '0' + v1 return v1 ```
Imports: ```python 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 = len(v1) v3 = len(v1[0]) v4 = float('inf') for v5 in range(v2): for v6 in range(v3): ...
Imports: ```python import typing ``` Type definitions: ```python class v0(Generic[T]): v1: int = -1 def __init__(self, v2: List[T]=None): self._path: List[T] = [] self._elements_in_path: Dict[T, int] = {} self._index_of_cyclic_root: int = self._ACYCLIC_INDEX self._hash = None ...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> Optional[str]: v1 = {} for v2 in self._GetNetworkDevices(): v3 = self._GetNetworkDeviceProperties(v2) v1[v2] = v3 ...
Imports: ```python from typing import cast, Iterable import typing ``` Type definitions: Input Types: Any Output Type: Iterable Dependencies: ```python def v0(v1, v2, v3, v4): if v3: if v4: for v5 in v3: if isinstance(v5, tuple) and isinstance(v5[0], OutputTag): ...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1, v2, v3='\r\n') -> bool: v4 = v2.split('\n') v5 = v1[:-1].split('\n') while len(v5) < len(v4): v5.append('') while len(v4) < len(v5)...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor, Optional[torch.Tensor] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor, *, v2: Optional[torch.Tensor]=None) -> None: for v3 in self._losses_with_target(): v3.set_target_ima...
Imports: ```python import numpy as np from sklearn.metrics import roc_auc_score import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: ```python def v0(v1: torch.Tensor): return v1.detach().cpu().numpy() ``` Function Name: v2 Function: ```python def v2(self, v3: int): def v4(v5: t...
Imports: ```python import torch import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: bool, *v2): if v1: return torch.cuda.FloatTensor(*v2) else: return torch.FloatTensor(*v2) ```
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str=None): self._local = v1 if os.path.isfile(v1): self._local_files = [v1] elif os.path.isdir(v1): if v2: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1=0, v2=None): self.val = v1 self.next = v2 ``` Input Types: v0 Output Type: int Dependencies: Function Name: v3 Function: ```python def v3(self, v4: v0) -> int: v5 = v4.val while v4.next: ...
Imports: ```python import os import os.path import shutil import stat import typing ``` Type definitions: Input Types: str, str Output Type: None Dependencies: ```python def v0(v1: str) -> bool: return stat.S_ISSOCK(os.lstat(v1).st_mode) ``` Function Name: v2 Function: ```python def v2(v3: str, v4: str) -> None: ...
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.__unregister_vision_listener(v1) if not self.__vision_listeners: self.stop_looking() ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> List[int]: v2: List[int] = [self.characters.find(c) for v3 in v1] return v2 ```
Imports: ```python import torch import typing ``` Type definitions: Input Types: Iterable[torch.Tensor] Output Type: torch.Tensor Dependencies: ```python def v0(v1: torch.Tensor, v2: Optional[int]) -> int: if v2 is None: v2 = v1.get_device() if v1.is_cuda else -1 else: v3 = False if v1....
Imports: ```python import typing ``` Type definitions: Input Types: T.Set[str] Output Type: T.Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: T.Set[str]=None) -> T.Any: if v1 is not None: v1.update(self.markers) return self.result ```
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 = v1.split(' ') for v3 in v2: self.perform_move(v3) ```
Imports: ```python import typing ``` Type definitions: Input Types: str, List[Dict[str, Any]], List[Dict[str, Any]] Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: List[Dict[str, Any]], v3: List[Dict[str, Any]]) -> bool: v4 = ''.join(('O' if item_in == item_out else 'X' f...
Imports: ```python import typing ``` Type definitions: ```python v0 = NewType('Weights01Array', np.ndarray) ``` ```python v1 = NewType('Weights12Array', np.ndarray) ``` Input Types: v0, v1 Output Type: None Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: v1) -> None: self.weights_01 -=...
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, float Output Type: int Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: float) -> int: v5...
Imports: ```python import typing ``` Type definitions: ```python v0 = namedtuple('EbookStatus', ['available', 'owned', 'always_available', 'copies_available', 'copies_owned', 'for_removal']) ``` Input Types: v0 Output Type: bool Dependencies: Function Name: v1 Function: ```python def v1(v2: v0) -> bool: if v2.alwa...
Imports: ```python import typing ``` Type definitions: Input Types: list, int Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: list, v2: int) -> None: try: v1 = list(v1) except: raise ValueError('Parameter 1, invalid file type. Value should be list') try: ...
Imports: ```python import os import typing ``` Type definitions: Input Types: ('a base filename', 'positional', None, str) Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: ('a base filename', 'positional', None, str)): if v1 != os.path.basename(v1): raise ValueError('Use onl...
Imports: ```python from math import log10 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 = self.unigram_cnts.get(v1, 0.0) v4 = self.unigram_cnts.get(v2, 0.0) v5 = self.bigram_cnts.get((v1, v2...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int): v2 = 1 v3 = 1 if v1 == 1: print('0') elif v1 == 2: print('0', '1') else: print('0') print(v2) print(...
Imports: ```python from itertools import cycle, islice import typing ``` Type definitions: Input Types: Optional[Dict] Output Type: Any Dependencies: ```python def v0(v1: Iterator, v2: int): for v3 in range(v2): try: next(v1) except StopIteration: raise RuntimeError('Trying ...
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: set Dependencies: Function Name: v0 Function: ```python def v0(self, v1: list) -> set: v2 = set() for v3 in v1: v4 = self._items.get(v3.mac) if v4 is not None: v4.update(event=v3) v2.a...
Imports: ```python import typing ``` Type definitions: Input Types: ArgumentParser Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: ArgumentParser): super().configure(v1) v1.add_argument('-i', '--include', metavar='PATTERN', action='append', type=str, required=True, help='...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, Optional[str] Output Type: Optional[str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int=1024, v3: Optional[str]='py') -> Optional[str]: v2 -= 8 + len(v3 or '') if not v1: return 'N/A' if len(...
Imports: ```python import typing ``` Type definitions: Input Types: list, list, list Output Type: list Dependencies: ```python def v0(v1: list): v2 = [] for v3 in v1: v2 += [ItemRecord.from_db_row(db_row=v3)] return v2 ``` Function Name: v4 Function: ```python def v4(self, v5: list, v6: list, v7: l...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: str): self.name = os.path.splitext(os.path.basename(v2))[0].split('[')[0].strip() self.path = v2 self.size = os.path.getsize(v2) def v3(self) -> str: return self.name + ' ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.headers.get('accept-encoding') if v1: self.headers['accept-encoding'] = ', '.join((e for v2 in {'gzip', 'identity', 'deflate', 'br'...
Imports: ```python import logging import numpy as np import typing ``` Type definitions: Input Types: Any Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> float: v2 = np.average([self.camera_matrix[0, 0], self.camera_matrix[1, 1]]) v3 = 19.939 v4 = v2 * v3 / v1 ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1: Dict[str, Any] = {'pid': self.pid, 'simids': [self.simid]} self.client._delete('simulations', v1) ```
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: int, v3=None, v4=None): self.key = v1 self.idx_loc = v2 self.prev = v3 self.next = v4 ``` Input Types: v0 Output Type: Any Dependencies: Function Name: v5 Function: ```python ...
Imports: ```python import typing ``` Type definitions: Input Types: dict, str Output Type: Any Dependencies: ```python def v0(v1: str): v2 = MongoClient(f'mongodb+srv://{DB_USERNAME}:{DB_PASSWORD}@cluster0-6gkyq.mongodb.net/test?retryWrites=true&w=majority&ssl_cert_reqs=CERT_NONE') v3 = v2[DB_NAME] v4 = v3...
Imports: ```python import pandas import typing ``` Type definitions: Input Types: pandas.DataFrame, [] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: pandas.DataFrame, v2: []): v3 = v1['cluster_label'].unique().tolist() v4 = pandas.DataFrame([]) for v5 in v3: v6 = ...
Imports: ```python import typing ``` Type definitions: ```python @dataclass class v0(Event): v1: str v2: Position v3: ast.AST ``` Input Types: str Output Type: Optional[List[v0]] Dependencies: Function Name: v4 Function: ```python def v4(self, v5: str) -> Optional[List[v0]]: v6 = self.namespace whi...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> bool: if v1 is None: return False v2 = self.__root for v3 in v1: if not v2.has_child(v3): return False ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(self) -> list: v1 = self.http_get(self.chapter) v2 = self.document_fromstring(v1) return self._images_helper(v2, '.chapter-img', 'data-original', 'src') ```
Imports: ```python import json import typing ``` Type definitions: Input Types: Output Type: bytes Dependencies: Function Name: v0 Function: ```python def v0(self) -> bytes: v1 = {'state': str(self.state.value), 'worker': self.worker} return json.dumps(v1).encode('utf8') ```
Imports: ```python import typing ``` Type definitions: Input Types: list Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: list): v2 = list() for v3 in v1: if v3.marker: v2.append(v3.marker) else: v2.append(v3.channel) return v2 ```
Imports: ```python import socket import ssl import sys import typing ``` Type definitions: Input Types: Any, Any, Any, callable, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2, v3, v4: callable, v5=60): self._hostname = v1 self._port = v2 self._token = v3 ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): v2 = self.dataframes[v1] v3 = v2.shape[0] v2.loc[v3 - 1, 'forward_af'] = 1.0 for v4 in range(v3 - 1): v2.loc[v3 - 2 - v4, 'forward...
Imports: ```python import re import typing ``` Type definitions: Input Types: list Output Type: list Dependencies: Function Name: v0 Function: ```python def v0(v1: list) -> list: v2 = [x.lower() for v3 in v1] v2 = [v3.replace('\\n', ' ') for v3 in v2] v2 = [v3.replace('\\t', ' ') for v3 in v2] v2 = [v...
Imports: ```python import os import typing ``` Type definitions: Input Types: Any, bool, Optional[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=False, v3: Optional[str]=None): if v2: v1.show() if v3 is not None: if not os.path.exists(f'{sel...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray) -> np.ndarray: (v2, v3, v4) = np.sin(v1) (v5, v6, v7) = np.cos(v1) return np.array([[v7 * v6, v7 * v3 * v2 - ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.get_body('message_info_missing_channel_name') v2 = self.build_webhook_url() v3 = self.client_post(v2, v1, content_type='application/x-w...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self) -> bool: if not self._device_info: v1 = None else: v1 = self._device_info.get('model') if v1 in {'temp_deck_v1', 'temp_deck_v1.1', 'temp_d...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> str: print('fastbpe', v1) return self.bpe.apply([v1])[0] ```
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, v4) = self.cells[v1][v2] if v4: return self.cells[v1][v2][1] = True if bool(v3): if self.isComplete(): ...
Imports: ```python import re from urllib.parse import urlparse, unquote import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: ```python def v0(v1: str): v2 = set_of_html_img_file_paths_from(v1) v3 = set_of_html_href_file_paths_from(v1) return v2 | v3 ``` ```python def v4(v5): ...
Imports: ```python import numbers import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self) -> dict: v1 = {'id': self.id} v2 = self.all_results() for (v3, v4) in v2.items(): if not isinstance(v4, numbers.Number): ...
Imports: ```python import typing ``` Type definitions: Input Types: fmf.Tree, str Output Type: Optional[fmf.Tree] Dependencies: Function Name: v0 Function: ```python def v0(v1: fmf.Tree, v2: str) -> Optional[fmf.Tree]: while v1.parent: if v1.get(v2) != v1.parent.get(v2): break v1 = v1....
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: 'ScalaTypeInfo' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> 'ScalaTypeInfo': if v1 is None: return self if self.template_type is None: self.template_type = [v1] else: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1: str, v2: str, v3: str, v4: str, v5: str): self.ticker = v1 self.ebit = self.parse_float(v2) self.pl = self.parse_float(v3) self.roe = self.parse_float(v4) self.liquidez = self.p...
Imports: ```python import numpy as np from numpy.typing import ArrayLike from sklearn.metrics import f1_score import typing ``` Type definitions: Input Types: ArrayLike, ArrayLike, float Output Type: Tuple[Union[str, float]] Dependencies: Function Name: v0 Function: ```python def v0(v1: ArrayLike, v2: ArrayLike, v3: ...
Imports: ```python import torch import typing ``` Type definitions: ```python class v0(NamedTuple): v1: List[int] v2: torch.Tensor v3: List[List[torch.Tensor]] v4: float v5: List[int] v6: int v7: str ``` Input Types: torch.Tensor, List[v0], torch.device Output Type: torch.Tensor Dependencies...
Imports: ```python import typing ``` Type definitions: Input Types: str, int, int, int Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: int, v3: int, v4: int=4) -> bool: if v4 is None: v5 = True else: v5 = len(v1) == v4 return v5 and v1.isdigit() an...
Imports: ```python import numpy as np from pandas._config import get_option from pandas._typing import Axis, FilePathOrBuffer, FrameOrSeries, IndexLabel, Scalar from pandas.compat._optional import import_optional_dependency from pandas.util._decorators import doc import pandas as pd from pandas import IndexSlice, Range...
Imports: ```python import random import typing ``` Type definitions: Input Types: int, Any, igraph.Graph, int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2, v3: igraph.Graph, v4: int): v5 = v2([None] * v4) v5.i_type = v1 v5.n_repro = 0 for v6 in range(v4): ...
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: str, int Output Type: Any Dependencies: ```python def v0(v1: str, v2: int=2): v3 = 0 with open(v1) as v4: v5 = v4.readlines() for v6 in v5: if '** BUILD SUCCEEDED **' in v6: v3 += 1 ...
Imports: ```python import typing ``` Type definitions: Input Types: int, int, str, bool, bool Output Type: dict Dependencies: ```python def v0(v1: bool=False) -> int: if v1: v2 = 1 else: v2 = 0 return v2 ``` ```python def v3(v4: str=None, v5: dict[str, dict]=None, v6: str=None, v7: bool=Tru...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: v1 = self.callmakervisitor.keywords self.print() with self.indent(): if not v1: self.print('@Override') self.prin...
Imports: ```python import copy import typing ``` Type definitions: Input Types: Any, bool Output Type: 'Volumes' Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2: bool=False) -> 'Volumes': if not v2 and self.device == v1: return self v3 = self.clone() if self.device != v1: ...
Imports: ```python import typing ``` Type definitions: Input Types: Image.Image, Image.Image Output Type: Tuple[float, int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Image.Image, v2: Image.Image) -> Tuple[float, int]: (v3, v4) = (self.x, self.y) (v5, v6) = v1.size (v7, v8) = v2....
Imports: ```python import typing ``` Type definitions: Input Types: str, int, bool Output Type: 'NeuralNetwork' Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: int=1, v3: bool=True) -> 'NeuralNetwork': if v3: self.train_set = self.train_set.drop(v1, v2) self.test_set ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int) -> List[int]: if v1 == 0: return [1] elif v1 == 1: return [1, 1] else: v2 = self.getRow(v1 - 1) v3 = len(...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> None: self._sorting_info = v1['SortingInfo'] v2 = ('SortingInfo',) v3 = v1.copy() for v4 in v2: del v3[v4] super()._init(**v3) ``...
Imports: ```python import pickle as binlib import typing ``` Type definitions: Input Types: str Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> Dict: with open('maps/' + v1 + '.bin', 'rb') as v2: return binlib.load(v2) ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> bool: if v1 in ['keystore', 'ps_keystore']: return False v2 = ['x%d/' % i for v3 in range(1, 16)] if v1 in v2: return False ...