text stringlengths 190 325k |
|---|
Imports:
```python
import typing
```
Type definitions:
Input Types: List[List[int]], int
Output Type: List[List[int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[List[int]], v2: int) -> List[List[int]]:
v3 = [x for v4 in v1 for v5 in v4 if v5 < v2]
v6 = [v5 for v4 in v1 for v5 in v4 if... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.Tuple[str, ...]
Output Type: typing.Tuple[typing.Any, typing.Tuple[str, ...]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.Tuple[str, ...]) -> typing.Tuple[typing.Any, typing.Tuple[str, ...]]:
if len(v1) < 2:... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
async def v0(self) -> None:
logging.info('Closing auth client')
return await self.sess.close()
``` |
Imports:
```python
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, REMAINDER
import typing
```
Type definitions:
```python
v0 = ArgumentParser
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1() -> v0:
v2 = ArgumentParser(description='\n Manage ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Literal['users', 'guilds']
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, v1, v2: Literal['users', 'guilds']):
v3 = self._database[v2]
await v3.insert_one(v1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any
Output Type: np.ndarray
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> np.ndarray:
(v2, *v3) = self._domain_boundary_sides(v1)
v4 = np.zeros(v1.num_faces)
v4[v2] = self.T_0_Kelvin
return... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
logging.info('Resetting the webdriver instance')
logging.debug('Headless? {} Config: {}'.format(self.headless, self.config))
if se... |
Imports:
```python
import random
import typing
```
Type definitions:
Input Types: str, List[int]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: List[int]):
if v1 == 'discrete':
return random.randint(v2[0], v2[1])
elif v1 == 'continuous':
return random.... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = f'\n from __static__ import dataclass\n\n @dataclass\n class C:\n x: int\n\n @dataclass\n class D:\n ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: '[StateSA, ...]'
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> '[StateSA, ...]':
v1 = []
v2 = self
while not v2.is_initial_state():
v1.append(v2)
v2 = v2.parent
v1.reverse()
retu... |
Imports:
```python
import argparse
import typing
```
Type definitions:
Input Types: list
Output Type: argparse.Namespace
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: list) -> argparse.Namespace:
v2 = argparse.ArgumentParser(description='Validate a rule configuration')
v2.add_argument('... |
Imports:
```python
import sys
from inspect import getmembers, isfunction, getmodule
import typing
```
Type definitions:
Input Types:
Output Type: List[str]
Dependencies:
```python
def v0(v1: str) -> str:
return v1.replace('_', '-')
```
```python
def v2():
v3 = globals()['__name__']
return sys.modules[v3]
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.Dataframe, pd.Series, pd.Series
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.Dataframe, v2: pd.Series, v3: pd.Series) -> None:
v1.loc[v2, 'CURRENCY'] = v1[v2]['NOTIONAL_CURRENCY_2']
v1.loc[v3, 'CURREN... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, int, int
Output Type: Optional[int]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: int, v3: int) -> Optional[int]:
v4 = 0
v5 = 0
while v4 < len(v1) and v5 != v2:
v4 = v1.index('\n', v4) + 1
v5... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> bool:
v2 = iter(v1)
return any(v2) and (not any(v2))
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> None:
if not self.stack:
self.mins = v1
self.stack.append(0)
else:
v2 = v1 - self.mins
self.stack.append(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 = 2
for v4 in v1.split('/'):
if v4:
v5 = '/'.join(v1.split('/')[:v3])
v2.append((v5, v4, v5 != v1))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.model.recommend(1, set([2]), 1)
assert v1 is not None
self.assertCountEqual(v1, [3], 'Recommend 3 because 2 has already been solved.')
... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: List[str]
Output Type: List[Tuple[str, str]]
Dependencies:
```python
def v0(v1: str) -> Dict[str, str]:
v2 = pd.read_csv(v1, delimiter='\t')
return {row['uid']: row['word-embedding'] for (v3, v4) in v2.iterrows()}
```
Funct... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str):
v2 = [s for v3 in v1.split(',') if v3]
if 'w' in v2:
v2.remove('w')
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict) -> None:
for v2 in self.parameters:
if v2 in v1:
setattr(self, v2, v1[v2])
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> List[str]:
v2 = [v1]
v2 += self.cell_types.get_all_parents(v1)
v2 += self.cell_types.get_all_subtypes(v1)
v3 = []
for v4 in v2... |
Imports:
```python
from urllib.parse import quote
from pandas import read_html
from requests import get
import typing
```
Type definitions:
Input Types: str, int, int
Output Type: str
Dependencies:
```python
def v0(v1: str) -> str:
v2 = 'https://hackersthegame.fandom.com/wiki/{}{}'.format(quote(v1, safe=''), '%28T... |
Imports:
```python
import tensorflow as tf
import numpy as np
from tensorflow.python.eager.backprop import GradientTape
import typing
```
Type definitions:
Input Types: np.ndarray, np.ndarray, Any, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: np.ndarray, v2: np.ndarray, v3=v3, v... |
Imports:
```python
import tokenize
import typing
```
Type definitions:
Input Types: int
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> Optional[str]:
if self._noqa_line_mapping is None:
try:
v2 = self.file_tokens
except (tokenize... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: List[int]
Dependencies:
```python
def v0(v1: int) -> bool:
v2 = 0
for v3 in range(1, v1):
if v1 % v3 == 0:
v2 += v3
return v2 == v1
```
```python
def v4():
v5 = 1
while True:
if v0(v5):
... |
Imports:
```python
from math import ceil
from scipy.stats import t as t_dist
import numpy as np
import typing
```
Type definitions:
Input Types: float, float, float, float, float, float, float, float, bool, int, float, float, int, float, float, float, bool
Output Type: Optional[int]
Dependencies:
Function Name: v0
Fu... |
Imports:
```python
import argparse
import typing
```
Type definitions:
Input Types: List[str]
Output Type: argparse.Namespace
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: List[str]=None) -> argparse.Namespace:
v2 = argparse.ArgumentParser(description='optimize and deploy transformers', formatter... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> None:
v2 = 'cache/' + os.listdir(v1)[0]
for v3 in os.listdir(v1):
if os.path.getctime('cache/' + v3) > os.path.getctime(v2):
... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: Union[pd.DataFrame, dict, list], np.ndarray
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[pd.DataFrame, dict, list], v2: np.ndarray):
if isinstance(v1, pd.DataFrame):
v3 = ... |
Imports:
```python
import subprocess
import sys
import typing
```
Type definitions:
Input Types: str
Output Type: int
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> int:
v2 = subprocess.Popen(v1, shell=True, executable='/bin/bash', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
(v3,... |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: float
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: float) -> float:
v2 = 280.46646 + v1 * (36000.76983 + 0.0003032 * v1)
return v2 % 360.0
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: float
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: float) -> str:
v1 = max(0, v1)
v1 = min(1, v1)
v2 = int(v1 * self.width)
return f'{self.prefix}{self.fill * v2}{self.empty * (self.width - v2)... |
Imports:
```python
import sqlite3
from sqlite3.dbapi2 import Connection
import typing
```
Type definitions:
Input Types: Any, Any, str, str, str, str, str, str
Output Type: Any
Dependencies:
```python
def v0() -> Connection:
v1 = sqlite3.connect(DATABASE_NAME, detect_types=sqlite3.PARSE_DECLTYPES)
v1.row_facto... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1) -> None:
v2 = {'operator-user': self._operator_user, 'operator-password': self._operator_password}
v1.set_results(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> dict:
assert '.' in v1, f'file ({v1}) has not extention.'
v2 = v1.split('.')[-1]
if v2 in ('yml', 'yaml'):
return self.load_yml(v1)... |
Imports:
```python
from email.utils import parsedate
from email.utils import formatdate
import typing
```
Type definitions:
```python
class v0(typing.Mapping[str, str]):
def __init__(self, v1: typing.Mapping[str, str]=None, v2: typing.List[typing.Tuple[bytes, bytes]]=None, v3: Scope=None) -> None:
self._li... |
Imports:
```python
import matplotlib.pyplot as plt
import pandas as pd
import tensorflow as tf
import typing
```
Type definitions:
Input Types: bool, bool, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: bool=False, v2: bool=False, v3: str='model'):
v4 = tf.keras.callback... |
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:
v1 = np.transpose(v1, axes=[2, 0, 1])
v1 = np.rot90(v1, k=1, axes=(2, 1))
v1 = v1[:, 27:227, 2... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, T.Any, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: dict, v2: T.Any, *v4: T.Any, v3: bool=False) -> None:
for v5 in v4:
if v5 in v1:
if v2 not in v1:
v1[v2] = v1[v... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, object
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: object):
self.define(v1)
self.values[v1] = v2
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict[str, Any]
Output Type: List[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: Dict[str, Any]) -> List[str]:
v2 = v1.get('script_args')
if v2 is None or v2 == []:
return v2
(v3, *v4) = v2
return v4 if v3 ... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: dict[str, Any]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> dict[str, Any]:
v1 = list(self.model.named_parameters())
v2 = ['bias', 'gamma', 'beta']
v3 = [{'params': [p for (v4, v5) in v1 if all((nd not... |
Imports:
```python
from urllib.parse import urljoin
import typing
```
Type definitions:
Input Types: int, int, str, List[str]
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: str, v4: List[str]):
v5 = urljoin(self.api_url, self.URL_ASSIGN_IMAGES)
v6 = sel... |
Imports:
```python
import typing
```
Type definitions:
```python
@public
@_not_constructible
class v0(util.CachedEqMixin):
v1 = ()
def __init__(self, v2: bool=True, **v3: typing.Any) -> None:
object.__setattr__(self, 'nullable', v2)
for (v4, v5) in v3.items():
if v4 not in self._fie... |
Imports:
```python
from pathlib import Path
import typing
```
Type definitions:
Input Types: Path, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Path, v2: str):
v3 = Path(v1) / 'wscript'
with open(v3, 'w+') as v4:
v4.write(v2)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, str
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Any, v2: str) -> None:
v3 = 1
v4 = v1.find_all('blockquote')
self.bq_len = len(v4)
for v5 in v4:
v6 = v5.findChildren(recursive=Fa... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
while not self.iteration_is_complete():
self.process_next_page_of_results()
``` |
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.cnxn.cursor()
v3 = f"EXEC dbo._Insert_MigrationsRun('{v1}')"
v2.execute(v3)
self.cnxn.commit()
v2.close()
``` |
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: bool
Dependencies:
```python
def v2(v3, v4, v5):
if not v3:
return True
if not v4 < v3.val < v... |
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(self, v1: tf.Tensor, v2: tf.Tensor) -> tf.Tensor:
v3 = tf.transpose(v1)
v4 = tf.ones((v1.shape[1], v1.shape[1]))
... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
self.set_models({'user/111': {'username': 'user111'}, 'meeting/110': {'is_active_in_organization_id': 1}})
v1 = self.request('user.update', {'id': 11... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> bool:
if v1.accepted_renderer.format == 'api':
return True
if v1.query_params.get('page', False):
return True
return False
``` |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str):
v2 = self.setting.tags
v3 = self.setting.save_result_path + v2['tbl']['dir'] + v2[v1]['dir'] + self._scenario + v2['tbl']['ext... |
Imports:
```python
from datetime import datetime
import typing
```
Type definitions:
Input Types: str, datetime, str, Dict, Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: datetime, v3: str, v4: Dict, v5=False):
v6 = {'name': v1, 'timestamp': str(int(datetime.tim... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Dict
Output Type: Union[Dict, List]
Dependencies:
Function Name: v0
Function:
```python
async def v0(self, *, v1: Dict) -> Union[Dict, List]:
v2 = await self.aio_requests.async_post(self.jrpc_server_maps[self.jrpc_server], json=v1)
return v2.... |
Imports:
```python
import os
import json
import typing
```
Type definitions:
Input Types: str, str
Output Type: [json]
Dependencies:
```python
def v0(v1: str, v2: str) -> str:
return f'{v1}_{v2}.json'
```
Function Name: v3
Function:
```python
def v3(v4: str, v5: str) -> [json]:
v6 = []
v7 = [str(month) for... |
Imports:
```python
import tensorflow as tf
import typing
```
Type definitions:
Input Types: tf.Tensor, tf.Tensor, int, bool, bool
Output Type: tf.Tensor
Dependencies:
```python
def v0(v1: tf.Tensor, v2: int, v3: bool) -> tf.Tensor:
return v1 / 2 ** (v2 - int(v3))
```
```python
def v4(v5: tf.Tensor) -> tf.Tensor:
... |
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.do_stem(v1)
v3 = self.get_freq(v2)
return {'tokens': v2, 'top_words': v3}
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, Any, dict
Output Type: Any
Dependencies:
```python
def v0(v1, v2: dict={}):
if v2.get('_expr_mode'):
if isinstance(v1, dict) and 'value' in v1:
v1 = v1['value']
v1 = v1.format(**v2) if isinstance(v1, str) else ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: Dict[int, str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int) -> Dict[int, str]:
v2 = {}
for v3 in range(0, v1):
v2[v3] = f'test{v3}'
return v2
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(BlockManager, SingleDataManager):
v1 = 1
v2 = True
v3 = True
v4 = ()
v5 = True
def __init__(self, v6: Block, v7: Index, v8: bool=False, v9=lib.no_default):
assert isinstance(v6, Block), type(v6)
assert isi... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, bool
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: bool):
self.cells[v1, v2] = int(v3)
self.updated.append((v1, v2))
``` |
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._pages[v1]
self.embed.clear_fields()
for v3 in v2:
self.embed.add_field(name=v3.name, value=v3.value, inline=v3.inline)
... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any, FileIO
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1='', v2: FileIO=None):
if v2 is not None:
v2.write(',%8.5f' % self.fitness)
v0(f'{v1}[%i %8.5f]' % (self.ID, self.fitness), end=' ')
``` |
Imports:
```python
from base64 import b64encode
import typing
```
Type definitions:
Input Types:
Output Type: Tuple[bytes, bytes]
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> Tuple[bytes, bytes]:
v1 = self.kms.generate_data_key(KeyId=self.crypto_key_alias, KeySpec='AES_256')
return (v1... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = ''
if self.sign < 0:
v1 = '-'
return u'{}{}:{}'.format(v1, self.sec, self.ns)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: str
Output Type: Generator[str, None, None]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str) -> Generator[str, None, None]:
with open(v1) as v2:
for v3 in v2:
v3 = v3.strip()
if not v3:
... |
Imports:
```python
import logging
import typing
```
Type definitions:
Input Types: str, dict
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: dict) -> bool:
v3 = self._base + 'user/update'
v4 = {'access_token': self.getToken()}
v5 = {'userid': v1}
v5.upda... |
Imports:
```python
import typing
```
Type definitions:
Input Types: construct.GreedyRange
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: construct.GreedyRange):
self.append()
self.append(f'.. py:attribute:: {self.name}.GreedyRange')
self.append(f' :type: {self._typ... |
Imports:
```python
import typing
```
Type definitions:
Input Types: int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int) -> None:
for v2 in self:
v2.check_value_rank(v1)
``` |
Imports:
```python
import numpy as np
import typing
```
Type definitions:
Input Types: Any, int
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1, v2: int):
v3 = self.subbeams[v2]
v4 = v1.control_point.actual
v5 = v3.control_point
try:
v6 = self.subbeams[v2 +... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Union[list, tuple, int], Any
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: Union[list, tuple, int], v2: Any):
if isinstance(v1, int):
v1 = (v1,)
for v3 in v1:
self.debug(f'self.app.regis... |
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):
if v1 in self.experiment_stash.get(v2, {}):
del self.experiment_stash[v2][v1]
``` |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(BaseClient):
def __init__(self, v1: str, v2: str, v3: str, v4: str, v5: bool, v6: str, v7: str, v8: int, v9: str, v10: str, v11: bool, v12: str, v13: dict=None, v14: str=None):
"""
Args:
server_url: SNOW server u... |
Imports:
```python
import json
import typing
```
Type definitions:
Input Types: socket.socket
Output Type: Any
Dependencies:
```python
def v0(v1):
v2 = v1.decode()
v3 = v2.split('\r\n')
v4 = v3[0][10:]
v5 = v3[1][3:]
v5 = json.loads(v5)
v6 = int(v3[2][5:])
return (v4, v5, v6)
```
Function N... |
Imports:
```python
import pandas as pd
import typing
```
Type definitions:
Input Types: pd.Series
Output Type: Tuple[float, float]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: pd.Series) -> Tuple[float, float]:
if pd.isnull(v1[self.c.COLS.REGRESSION_PARAM]) or pd.isnull(v1[self.c.COLS.REGR... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0() -> None:
global data_element_callback
global data_element_callback_kwargs
v1 = None
v2 = {}
``` |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = os.path.join(self.unit_test_dir, '93 new subproject in configured project')
self.init(v1)
self.build()
self.setconf('-Duse-sub... |
Imports:
```python
import typing
```
Type definitions:
```python
v0 = TypeVar('T')
```
Input Types:
Output Type: v0
Dependencies:
Function Name: v1
Function:
```python
def v1(self) -> v0:
if not self.empty:
return self._last
raise StopIteration("Can't peek empty iterable")
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: pd.DataFrame
Output Type: pd.DataFrame
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: pd.DataFrame) -> pd.DataFrame:
v2 = v1.copy()
v3 = [1, 11, 21]
v2['group'] = v2['time'].dt.day.isin(v3).cumsum()
v4 = {colname: 'mea... |
Imports:
```python
import typing
```
Type definitions:
Input Types: Any
Output Type: Optional[str]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1) -> Optional[str]:
if 'DTSGInitData' in v1:
return v1['DTSGInitData']['token']
elif 'DTSGInitialData' in v1:
return v1['DTSGInitialDa... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, int, bool
Output Type: dict
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: dict, v2: int=None, v3: bool=True) -> dict:
v4 = {}
v2 = v2 if v2 is not None else self.current_player
for v5 in v1:
v4[v5] = [... |
Imports:
```python
import typing
```
Type definitions:
Input Types: dict, dict, list, int
Output Type: Any
Dependencies:
```python
def v0(v1: dict, v2: str, v3: dict, v4: dict, v5: set):
v3[v2] = True
if v2 in v5:
v4[v2] = -1
else:
v4[v2] = 1
for v6 in range(4):
if v1[v2][v6] is... |
Imports:
```python
import os
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str):
v3 = os.path.normpath('%s/downloaded.txt' % v1)
with open(v3, 'at') as v4:
v4.write('%s\n' % v2)
``` |
Imports:
```python
import json
from pathlib import Path
import typing
```
Type definitions:
Input Types:
Output Type: str
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> str:
v1 = Path(f'{self.root}/{self.name}/checkpoints/epoch_{self.epoch}')
v1.mkdir(parents=True, exist_ok=True)
v2 ... |
Imports:
```python
import typing
```
Type definitions:
```python
class v0(Enum):
v1 = 1
v2 = 2
v3 = 3
```
Input Types: v0
Output Type: None
Dependencies:
Function Name: v4
Function:
```python
def v4(self, v5: v0) -> None:
print(f'Текущее настроение шефа: {v5.name}')
self._chief_mood = v5
``` |
Imports:
```python
from collections import defaultdict, Counter
import itertools, copy, time, sys, re, random
import typing
```
Type definitions:
Input Types: Iterable[int]
Output Type: List[int]
Dependencies:
```python
def v0(v1: Signature, v2: Sequence[Tuple[str, str]]) -> Iterable[Formula]:
v3: Dict[str, List[T... |
Imports:
```python
from datetime import timedelta
import numpy as np
import typing
```
Type definitions:
Input Types: pd.Series, pd.Series, int
Output Type: pd.Series
Dependencies:
```python
def v0(v1: pd.Series, v2: int=7):
if v1.first_valid_index() is None:
return v1
v1 = v1.copy()
v1[:v1.first_v... |
Imports:
```python
from random import choice as random_choice
import typing
```
Type definitions:
Input Types:
Output Type: bytes
Dependencies:
Function Name: v0
Function:
```python
def v0() -> bytes:
v1 = [b'\n\n', b'\x1a\x1a', b'**', b'::', b'JJ', b'ZZ', b'jj', b'zz', b'\x8a\x8a', b'\x9a\x9a', b'\xaa\xaa', b'\... |
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] * (v1 + 1) for v3 in range(v1 + 1)]
for v4 in range(v1 + 1):
v2[v4][0] = 1
v2[v4][1] = 1
for v5 in ra... |
Imports:
```python
import typing
```
Type definitions:
Input Types: typing.List[int], typing.List[int]
Output Type: typing.Optional[typing.Set[str]]
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: typing.List[int], v2: typing.List[int]) -> typing.Optional[typing.Set[str]]:
v3: typing.Set[str]... |
Imports:
```python
import typing
```
Type definitions:
Input Types: str, bool
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str, v2: bool) -> None:
v3 = getattr(self, v1)
if v2:
self.unequip_message(v3.name)
setattr(self, v1, None)
``` |
Imports:
```python
import typing
```
Type definitions:
Input Types: int, int, int, int
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: int, v2: int, v3: int, v4: int) -> None:
(self.rows[v2][v1], self.rows[v4][v3]) = (self.rows[v4][v3], self.rows[v2][v1])
self.moves_done... |
Imports:
```python
import typing
```
Type definitions:
Input Types:
Output Type: None
Dependencies:
Function Name: v0
Function:
```python
def v0(self) -> None:
v1 = self.get_current_stats()
for (v2, v3) in v1.items():
if isinstance(v3, (float, int)):
v4 = list(self._buffer.get(v2, [v3]))
... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: str
Output Type: bool
Dependencies:
Function Name: v0
Function:
```python
def v0(self, v1: str) -> bool:
self.cursor.execute(f'SELECT `password` FROM Users WHERE `email` = ?', (self.email,))
v2 = self.cursor.fetchone()
retu... |
Imports:
```python
import hashlib
import typing
```
Type definitions:
Input Types: str, str
Output Type: Any
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: str, v2: str=''):
v3 = v2.encode('utf-8')
v1 = v1.encode('utf-8')
v4 = hashlib.sha512(v3).hexdigest()
v5 = hashlib.md5(v3).hexdige... |
Imports:
```python
import typing
```
Type definitions:
```python
@dataclass(unsafe_hash=True, frozen=True)
class v0:
pass
```
Input Types: v0
Output Type: Any
Dependencies:
Function Name: v1
Function:
```python
def v1(self, v2: v0):
self._state[type(v2)] = v2
if self._data_pipeline_state is not None:
... |
Imports:
```python
import math
import typing
```
Type definitions:
Input Types: int, int
Output Type: List[Tuple[int, int]]
Dependencies:
Function Name: v0
Function:
```python
def v0(v1: int, v2: int) -> List[Tuple[int, int]]:
if v1 < v2:
v2 = v1
v3 = []
v4 = 0
v5 = int(math.ceil(v1 / v2))
... |
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.subsets:
if not self._check_subset_integrity(v1):
raise ValueError(f'subset {v1} not found or corrupt')
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.