text
stringlengths
190
325k
Imports: ```python import os import shutil import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1, v2, v3=1): for v4 in range(1, v2 + 1): if not os.path.exists(v1): return try: shutil.rmtree(v1) break except:...
Imports: ```python from ast import literal_eval import os import typing ``` Type definitions: Input Types: dict, bool Output Type: tuple Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict, v2: bool=False) -> tuple: v3 = ['taskRoleArn', 'executionRoleArn', 'volumes', 'placementConstraints', ...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray): print('Error rate / Misclassification Error:', np.mean(v1 != v2)) print('Accuracy:', np.mea...
Imports: ```python import typing ``` Type definitions: ```python @dataclasses.dataclass(frozen=True) class v0: v1: float v2: int v3: Dict[str, float] def v4(self, v5: v0) -> Optional[v0]: """ Subtracts "resources required" for a job from self, which is interpreted as "resources ...
Imports: ```python import csv import io import typing ``` Type definitions: Input Types: bytes Output Type: List[Dict[str, Any]] Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> List[Dict[str, Any]]: v2 = io.StringIO(v1.decode()) v3 = csv.DictReader(v2) return [row for v4 in v3] ``...
Imports: ```python import pandas as pd import typing ``` Type definitions: Input Types: Doc Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1: Doc) -> pd.DataFrame: v2 = ['matched_term', 'POS', 'tag', 'scispacy_object_category', 'object_id', 'object_category', 'object_label',...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: List[str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> List[str]: v1 = self._source or '' v2 = self._collection or '' v3 = self._description or '' v4 = [self._id, v1, v2, self._name, ','.join(sorte...
Imports: ```python import typing ``` Type definitions: Input Types: str, str, str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str, v2: str, v3: str) -> str: if '.' in v1: v1 = v1.replace('.', '') v4 = 6 - len(v1) v1 = '0' * v4 + v1 else: v4 =...
Imports: ```python import os import os.path as op import subprocess import typing ``` Type definitions: ```python class v0: def __init__(self, v1): self.revit_year = v1['<revit_year>'] self.model_path = v1['<model_path>'] self.ghdoc_path = v1['<ghdoc_path>'] self.add_rps = v1['--rps...
Imports: ```python import typing ``` Type definitions: Input Types: etree.Element Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: etree.Element) -> Tuple[str, str]: v2 = v1.nsmap v3 = v1.find('article-meta', v2) v4 = v3.find('fpage', v2) v5 = v3.find('lpage'...
Imports: ```python import typing ``` Type definitions: Input Types: Any, bool, bool Output Type: pd.DataFrame Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: bool, v3: bool) -> pd.DataFrame: if v2: v1 = v1.resample('1S').mean() if v3: v1 = v1.interpolate(method='linear') ...
Imports: ```python import collections import typing ``` Type definitions: Input Types: int, int, int, int Output Type: float Dependencies: ```python def v0(v1, v2): if v1 < 0 or v1 > N - 1 or v2 < 0 or (v2 > N - 1): return False return True ``` Function Name: v3 Function: ```python def v3(self, v4: int...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: int Output Type: np.ndarray Dependencies: ```python def v0(v1: int) -> np.ndarray: v2 = np.random.randn(v1, v1) (v3, v4) = np.linalg.qr(v2) v5 = np.diag(v4) return v3 * (v5 / abs(v5)) ``` Function Name: v6 Function: ...
Imports: ```python import typing ``` Type definitions: Input Types: torch.Tensor Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: torch.Tensor) -> None: v2 = self.layer1(v1) v2 = self.drop(v2) v2 = self.layer2(v2) v2 = v2.view(v2.size(0), -1) v2 = self.drop(v2...
Imports: ```python import typing ``` Type definitions: Input Types: pd.DataFrame, str, Any Output Type: Any Dependencies: ```python def v0(v1, v2=20, v3=2, v4=2): v5 = compute_sma(v1, window=v2) v6 = v1.rolling(window=v2, center=False).std() v7 = v5 + v3 * v6 v8 = v5 - v4 * v6 return (v5, v7, v8) `...
Imports: ```python import typing ``` Type definitions: Input Types: bool Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=None, *v2): if v1 is None: return self._autosave.set(v1) if not self._autosave.is_set(): self._save_img.set(False) sel...
Imports: ```python import nltk import re import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.text = nltk.tokenize.word_tokenize(self.text) self.text = [re.sub('[^A-Za-z]', '', token.lower()) for v1 in self.text] ...
Imports: ```python from urllib.parse import urlparse import typing ``` Type definitions: Input Types: str Output Type: Tuple[str, str] Dependencies: Function Name: v0 Function: ```python def v0(v1: str) -> Tuple[str, str]: v2 = urlparse(v1) if not v2.scheme == 'gs': raise NameError('gcs_path must be a...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Output Type: float Dependencies: Function Name: v0 Function: ```python def v0(self) -> float: v1 = self.sigma ** 2 v2 = self.nu return np.log(1 - self.theta * v2 - 0.5 * v1 * v2) / v2 ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = [] v3 = 0 for v4 in range(len(v1)): if v1[v4] == '-': v5 = v1[v3:v4] v3 = v4 + 1 v2.append(int(v5))...
Imports: ```python import typing ``` Type definitions: Input Types: list, list Output Type: list Dependencies: ```python def v0(v1: Any) -> dict: v2 = type(v1) v3 = {} if v2 == Calendar: for v4 in KEYS_FOR_CALENDAR: v3[v4] = v0(v1[v4]) elif v2 == Event: for v4 in KEYS_FOR_EV...
Imports: ```python import typing ``` Type definitions: Input Types: List[int], int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[int], v2: int) -> List[int]: v3 = self._binary_search(v1, v2, True) if v3 == len(v1) or v1[v3] != v2: return [-1, -1] ...
Imports: ```python import os import typing ``` Type definitions: Input Types: str, str, str Output Type: List[dict] Dependencies: ```python @config.retry def v0(v1: str, v2: str) -> List[dict]: v3 = sdk_cmd.cluster_request('GET', '/slave/{}/files/browse?path={}'.format(v1, v2), retry=False, raise_on_error=False, l...
Imports: ```python import typing ``` Type definitions: Input Types: Any, Any Output Type: (int, int) Dependencies: Function Name: v0 Function: ```python def v0(self, v1, v2=ceil) -> (int, int): if self.skipXY is not None: assert len(self.skipXY) == 2 return self.skipXY v3 = self.ratio (v4,...
Imports: ```python import typing ``` Type definitions: Input Types: s.While Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: s.While): self._resolve(v1.condition) self._resolve(v1.body) return None ```
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Tuple[np.ndarray, np.ndarray], Tuple[int, int], float, float Output Type: np.ndarray Dependencies: ```python def v0(v1: np.ndarray, v2: int, v3: float, v4: float) -> np.ndarray: v5 = np.floor((v1[v2] + v3 / 2.0) / v4).astype(int...
Imports: ```python from contextlib import redirect_stdout import io from textwrap import dedent import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0(v1: str) -> str: v2 = io.StringIO() with redirect_stdout(v2): Interpreter().run(v1) return v2.getvalue()...
Imports: ```python import typing ``` Type definitions: ```python v0 = TypeVar('TSerializable', bound='BaseSerializable') ``` Input Types: bytes Output Type: v0 Dependencies: Function Name: v1 Function: ```python def v1(cls: Type[v0], v2: bytes) -> v0: v3 = cls._meta.container_sedes.deserialize(v2) return cls(*...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, **v1) -> dict: v2 = 'tech_input_maint_total_costs_usd' self.create_new_question(keyword=v2, translation={'label': {'en': 'Total costs for maintenance of the T...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: None Dependencies: ```python def v0(): self.i3.command(f'[id="{self.workspaces.window(index).id}"] focus') self.i3.command(f'move container to workspace {workspace_to + 1}') ``` Function Name: v1 Function: ```python def v...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str): v2 = v1.split('/') v3 = v2[0] if len(v2) == 1: return v3 v4 = v2[1] if v4.__contains__('VGG'): v4 = 'VGG' elif v4.__cont...
Imports: ```python import numbers import logging import numpy as np import typing ``` Type definitions: Input Types: Dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict): for (v2, v3) in v1.items(): if v2 in self.is_numeric: if self.is_numeric[v2] !=...
Imports: ```python import logging import typing ``` Type definitions: Input Types: Any, Any, bool, str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2=logging.DEBUG, v3: bool=False, v4: str=None, v5=logging.WARNING): if v1 in logging.Logger.manager.loggerDict.keys(): ...
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> int: v2 = sorted(v1) return sum((v1[i] != v2[i] for v3 in range(len(v1)))) ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self) -> None: self.event.on_stop() self.running = False self.stream.disconnect() self.thread.join() ```
Imports: ```python import typing ``` Type definitions: Input Types: Any Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1) -> None: global dialog v2 = None ```
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: MutableMapping[str, Any] Dependencies: Function Name: v0 Function: ```python def v0(self) -> MutableMapping[str, Any]: v1 = super().get_config() v1['groups'] = self._groups v1['batch_norm_layer'] = self.batch_norm_layer ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[float] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[float]=None) -> None: if self.trainer.lr_scheduler._is_plateau: self.trainer.lr_scheduler.epoch_update(v1) else: s...
Imports: ```python import re import typing ``` Type definitions: Input Types: dict, str Output Type: str Dependencies: ```python def v0(v1: dict) -> int: v2 = 4 if 'indent_size' in v1: v2 = v1['indent_size'] if v2 == 'tab': v2 = get_tab_size(v1, no_recurse=True) else: ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4): assert v2 > v1 >= 0, 'Got invalid box with xmin: {0} and xmax {1}'.format(v1, v2) assert v4 > v3 >= 0, 'Got invalid box with ymin: {0} and ymax {1}'.format(v3, v4) self._xmin = v1 ...
Imports: ```python import os from pathlib import Path import typing ``` Type definitions: Input Types: Any, Any, Any Output Type: None Dependencies: ```python def v0(v1, v2, v3) -> None: try: v4 = apply_annotations.apply_stub_annotations(v2, v3) with open(v3, 'w') as v5: v5.write(v4) ...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[int] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Optional[int]=None): if v1 is None: v1 = 1 return self.fc1.weight.new(v1, self.hidden_dim).zero_() ```
Imports: ```python import json from datetime import datetime, timezone, tzinfo from uuid import uuid4 import typing ``` Type definitions: Input Types: Output Type: None Dependencies: ```python def v0() -> oscatalog.Catalog: v1 = common.Metadata(**{'title': 'My simple catalog', 'last-modified': datetime.now().asti...
Imports: ```python import typing ``` Type definitions: Input Types: Union[Image.Image, np.ndarray, 'torch.Tensor', List[Image.Image], List[np.ndarray], List['torch.Tensor']], bool Output Type: Dict[str, Dict] Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[Image.Image, np.ndarray, 'torch.Te...
Imports: ```python import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor import typing ``` Type definitions: Input Types: Tensor Output Type: Tensor Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Tensor) -> Tensor: (v2, v3, v2, v2) = v1.size() v4 = s...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: List['BaseTrainingParticipant'], float Output Type: List['BaseTrainingParticipant'] Dependencies: Function Name: v0 Function: ```python def v0(v1: List['BaseTrainingParticipant'], v2: float) -> List['BaseTrainingParticipant']: ...
Imports: ```python import pickle import typing ``` Type definitions: Input Types: str, str Output Type: Any Dependencies: ```python def v0(v1: str, v2: str): v3 = open(v1 + v2 + '.pickle', 'rb') v4 = pickle.load(v3) v3.close() return v4 ``` Function Name: v5 Function: ```python def v5(v6: str, v7: str)...
Imports: ```python 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: v1 = self.features(v1) v1 = self.avgpool(v1) v1 = v1.view(v1.size(0), -1) v1 = self.classifier(...
Imports: ```python import typing ``` Type definitions: Input Types: str, Any Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: str='<desconhecido>', v2=0): v3 = v1 v4 = v2 if len(v3.strip()) <= 0: v3 = '<desconhecido>' if len(v4.strip()) <= 0: v4 = 0 r...
Imports: ```python from glob import glob from pathlib import Path import typing ``` Type definitions: Input Types: Union[str, Path] Output Type: Optional[List[str]] Dependencies: Function Name: v0 Function: ```python def v0(v1: Union[str, Path]) -> Optional[List[str]]: v2 = Path(v1) / 'build' / 'contracts' / '*.j...
Imports: ```python import typing ``` Type definitions: Input Types: bool, bool, float Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=True, v2: bool=True, v3: float=None) -> bool: if self.monofasc(): return True if v1: if self.fascicle_fascicle_inter...
Imports: ```python import typing ``` Type definitions: Input Types: str, typing.Union[list, dict] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: typing.Union[list, dict], *v3): if isinstance(v2, dict): return super()._value_thru_fields(v1, v2, *v3) v4 = ...
Imports: ```python import typing ``` Type definitions: Input Types: List[int] Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[int]) -> List[int]: v2 = [] for v3 in v1: v4 = abs(v3) - 1 if v1[v4] > 0: v1[v4] *= -1 else: ...
Imports: ```python import torch from torch.utils.data.dataloader import DataLoader from torch.utils.data.sampler import SequentialSampler, RandomSampler import typing ``` Type definitions: Input Types: Trainer, torch.nn.Module, Dict[str, Union[torch.Tensor, Any]] Output Type: bool Dependencies: ```python def v0(v1: Tr...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): for v2 in self._traverse_overflow(v1): self._mem.del_node(v2) ```
Imports: ```python from io import BytesIO from wave import Wave_write, Wave_read import typing ``` Type definitions: Input Types: bytes Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(v1: bytes) -> dict: v2 = Wave_read(BytesIO(v1)) v3 = v2.getparams() if v3.comptype == 'NONE':...
Imports: ```python from datetime import datetime as dt from datetime import timedelta, timezone import typing ``` Type definitions: Input Types: Output Type: dt Dependencies: Function Name: v0 Function: ```python def v0(self) -> dt: try: v1 = dt.now().replace(minute=0, second=0, microsecond=0).date() ...
Imports: ```python import os import torch import torch.utils.data import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4, v5, v6, v7): self.id = v1 self.locations = v3 self.base = float(v3[0]) self.window_size = v7.window_size self.interval...
Imports: ```python import numpy as np import pandas as pd import typing ``` Type definitions: Input Types: Any, Any Output Type: pd.DatetimeIndex Dependencies: Function Name: v0 Function: ```python def v0(v1, v2='%Y%m%d%H%M') -> pd.DatetimeIndex: if not isinstance(v1, np.ndarray): raise TypeError v3 =...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str): if self.last_fetched_indicator__modified is None: self.last_fetched_indicator__modified = v1 else: v2 = self.stix_time_to_datetime...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = [] v2 = 0 for v3 in self.q_qubits: v1.append(f'[q{v2}]|ψβŒͺ = {round(v3[0][0], 3)}|0βŒͺ + {round(v3[1][0], 3)}|1βŒͺ') v2 += 1 v1...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: bool Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: bool=False) -> dict: if self.is_global: self._session_info = self._global_session_info self._session_start = self._global_...
Imports: ```python import numpy as np from numpy.linalg import pinv import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: NoReturn Dependencies: Function Name: v0 Function: ```python def v0(self, v1: np.ndarray, v2: np.ndarray) -> NoReturn: if self.include_intercept_: v3 = n...
Imports: ```python import warnings import typing ``` Type definitions: Input Types: str, str Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str, v2: str=None) -> bool: warnings.warn('`client.exists_table(name)` is deprecated, and will be removed in a future version of Ibis....
Imports: ```python import typing ``` Type definitions: Input Types: float Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: float) -> str: v2 = 1000 * round(v1 - int(v1), 3) (v3, v4) = divmod(v1, 60) (v5, v3) = divmod(v3, 60) return '%02d:%02d:%02d.%03d' % (v5, v3, v4, v2...
Imports: ```python import typing ``` Type definitions: Input Types: List[str], List[str], int, bool Output Type: int Dependencies: Function Name: v0 Function: ```python def v0(self, v1: List[str], v2: List[str], v3: int=32, v4: bool=False) -> int: (v1, v2, v5) = self.remove_eq_sents(v1, v2) v6 = self.ppl(v1, ...
Imports: ```python import numpy as np from matplotlib import patches import typing ``` Type definitions: Input Types: Any, list, str Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1, v2: list, v3: str='white'): for v4 in v2: v5 = patches.Polygon(np.array(v4).reshape(-1, 2), f...
Imports: ```python import numpy as np import typing ``` Type definitions: Input Types: Sequence, str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Sequence, v2: str) -> None: if not 8 < len(v1) < 65536: raise ValueError('data must be between 8 and 65536 samples') ...
Imports: ```python import typing ``` Type definitions: Input Types: int Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: int): (v2, v3, v4, v5, v6, v7, v8) = self.data[v1] v9 = [] if self.speed_perturb is None: v9.append([v2, v5, v4, v6, v7, v8]) else: ...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> None: with open(v1) as v2: v3 = ['#'] while v3[0][0] == '#': v3 = v2.readline().split() v4 = 0 v5 = 0 ...
Imports: ```python import typing ``` Type definitions: ```python class v0: def __init__(self, v1, v2, v3, v4): self._session = v1 self._attributes = v2 self._obj_id = v3 self._relationships = v4 def v5(self, v6): logging.debug('Attributes: {}'.format(self._attributes)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self.private._field_name is None: return '' return self.private._field_name ```
Imports: ```python import typing ``` Type definitions: Input Types: tuple[int | str, int | str] Output Type: pycep_typing.GreaterThanOrEquals Dependencies: Function Name: v0 Function: ```python def v0(self, v1: tuple[int | str, int | str]) -> pycep_typing.GreaterThanOrEquals: (v2, v3) = v1 return {'type': 'gr...
Imports: ```python import typing ``` Type definitions: Input Types: Optional[Dict] Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self: Any, v1: Optional[Dict]=None) -> None: v2: Any = {} self._hgp = v2 self._hgps = {} if v1: pass ```
Imports: ```python import numpy as np import sklearn import typing ``` Type definitions: Input Types: np.ndarray, np.ndarray Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: np.ndarray, v2: np.ndarray) -> Any: v2 = np.eye(30)[v2] v3 = np.zeros((30,)) for v4 in range(30): ...
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: if not len(v1): return '' v2 = re.search('[a-zA-Z]', v1) return v2.group() if v2 else '' ```
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: str='access_token.txt') -> str: with open(v1, mode='r') as v2: v3 = v2.readline().replace('\n', '') return v3 ```
Imports: ```python import typing ``` Type definitions: Input Types: int, int, int, int, int Output Type: List[int] Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int, v3: int, v4: int, v5: int=1) -> List[int]: assert v5 >= 1 assert v4 > 0 assert v1 > 0 assert v2 >= 0 asser...
Imports: ```python import typing ``` Type definitions: Input Types: pygame.display Output Type: Any Dependencies: ```python def v0(self, v1: int): self.rotation += v1 ``` Function Name: v2 Function: ```python def v2(self, v3: pygame.display): v4 = v0(self.image, self.rotation) (self.sx, self.sy) = v4.get_s...
Imports: ```python from pandas._config import get_option from pandas._libs import algos as libalgos, index as libindex, lib import pandas._libs.join as libjoin from pandas._libs.lib import is_datetime_array, no_default from pandas._libs.tslibs import IncompatibleFrequency, NaTType, OutOfBoundsDatetime, Timestamp, tz_co...
Imports: ```python from urllib.parse import urlparse import typing ``` Type definitions: Input Types: str Output Type: str Dependencies: ```python def v0(v1: str) -> bool: try: return bool(urlparse(v1).netloc) except Exception: return False ``` Function Name: v2 Function: ```python def v2(v3: s...
Imports: ```python import typing ``` Type definitions: Input Types: json Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: json): v2 = 0 if 'retem_ir' in v1: if v1['retem_ir'] == 'S': v2 += v1['valor_ir'] if 'retem_cofins' in v1: if v1['retem...
Imports: ```python import typing ``` Type definitions: ```python v0 = t.TypeVar('KT') ``` ```python v1 = t.TypeVar('VT') ``` Input Types: v0, v1 Output Type: t.Dict[v0, v1] Dependencies: Function Name: v2 Function: ```python def v2(self, v3: v0, v4: v1) -> t.Dict[v0, v1]: if len(self._cache) >= self.max_size: ...
Imports: ```python import os import typing ``` Type definitions: Input Types: dict Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(self, v1: dict) -> None: if not v1.get('displayName'): v2 = os.path.basename(os.getcwd()).replace(self.app_prefix, '') v2 = v2.replace('_'...
Imports: ```python import typing ``` Type definitions: Input Types: List[str] Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: List[str]) -> Any: v2 = {} for (v3, v4) in enumerate(v1): for (v5, v6) in enumerate(v4): v2[v5, v3] = int(v6) v7 = len(v1) v...
Imports: ```python import typing ``` Type definitions: ```python class v0(Model): v1: str v2: str v3: str v4: bool v5: str v6: str v7: str v8: str v9: str v10: str def v11(self, v12: str) -> v0: self.acs_url = v12 return self def v13(self, v14: str) -> v...
Imports: ```python import logging import logging.handlers import sys import typing ``` Type definitions: Input Types: T.Dict[T.Text, T.Any] Output Type: logging.Logger Dependencies: ```python def v0(v1: logging.Formatter, v2: int) -> logging.Handler: v3 = logging.StreamHandler(stream=sys.stdout) v3.setFormatte...
Imports: ```python import typing ``` Type definitions: Input Types: str Output Type: dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: str) -> dict: v2 = self._prep_settings()[v1] v3 = {k: v for (v4, v5) in v2 if v4 in ['port', 'password']} v3 += dict(username=v2['user'], hostname=...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: v1 = '' for (v2, v3) in sorted(self.zones_map.items()): v1 += v2 + '\n' return self.ZONES_FILE.format(invocation=self.invocation, tz_versio...
Imports: ```python import typing ``` Type definitions: Input Types: Dict[int, models.Host], List[models.ProcessStatus] Output Type: Dict Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Dict[int, models.Host], v2: List[models.ProcessStatus]) -> Dict: v3 = None v4 = None for v5 in v2: ...
Imports: ```python import typing ``` Type definitions: Input Types: Callable, Callable, Callable Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Callable, v2: Callable, v3: Callable): self.mc_button.config(command=v1) self.type_button.config(command=v2) self.select_gr...
Imports: ```python import typing ``` Type definitions: Input Types: int, int Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(v1: int, v2: int) -> str: if v2 == 16: return hex(v1)[2:] if v1 == 0: return '0' v3 = [] while v1: v3.append(str(v1 % v2)) ...
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: typing.Dict[int, str] Dependencies: Function Name: v0 Function: ```python def v0(self) -> typing.Dict[int, str]: v1 = {} for v2 in self.__records: v1[v2.groupID] = v2.groupName return v1 ```
Imports: ```python from pathlib import Path import typing ``` Type definitions: Input Types: List[Text], Text Output Type: None Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Text], v2: Text) -> None: for v3 in v1: v3 = v2 + '/' + str(v3) if not Path(v3).exists(): ...
Imports: ```python import asyncio import typing ``` Type definitions: Input Types: str Output Type: Union[Any, None] Dependencies: Function Name: v0 Function: ```python async def v0(self, v1: str, *v2) -> Union[Any, None]: async with self.asyncio_lock: self.invocation_event = asyncio.Event() self....
Imports: ```python import typing ``` Type definitions: Input Types: Output Type: bool Dependencies: Function Name: v0 Function: ```python def v0(self, *v1: str, **v2: Any) -> bool: v3 = True if not v1: for v4 in self._async_handlers: v3 = v4._async_join(**v2) and v3 else: for ...
Imports: ```python import typing ``` Type definitions: Input Types: List[Union[str, int, float]], [str, int, float], int Output Type: List[Union[str, int, float]] Dependencies: Function Name: v0 Function: ```python def v0(v1: List[Union[str, int, float]], v2: [str, int, float]=None, v3: int=5) -> List[Union[str, int,...
Imports: ```python import typing ``` Type definitions: Input Types: Union[GaussianMixture, KMeans] Output Type: np.ndarray Dependencies: Function Name: v0 Function: ```python def v0(self, v1: Union[GaussianMixture, KMeans]) -> np.ndarray: if self.algorithm == 'gmm': return v1.means_ return v1.cluster_...
Imports: ```python import os import typing ``` Type definitions: Input Types: Output Type: str Dependencies: Function Name: v0 Function: ```python def v0(self) -> str: if self.compiler_type: return self.compiler_type v1 = [] for v2 in ['clang', 'gcc']: v3 = os.path.join(self.toolchain_roo...
Imports: ```python import datetime import typing ``` Type definitions: Input Types: dict Output Type: Any Dependencies: Function Name: v0 Function: ```python def v0(v1: dict): for v2 in tuple(v1.keys()): if not v1[v2] or (v2 == 'footer' and 'text' not in v1[v2]) or (v2 == 'author' and 'name' not in v1[v2]...