



"""simple docstring"""

from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version




def __lowercase    (							_a	,    _a	,    _a = None					):
    if version.parse(hfh.__version__					).release < version.parse('''0.11.0'''					).release:
        # old versions of hfh don't url-encode the file path
        snake_case_				:  Any       =			quote(_a					)
    return hfh.hf_hub_url(_a	,    _a	,    repo_type='''dataset'''	,    revision=_a					)










"""simple docstring"""

from statistics import mean, stdev




def __lowercase    (							_a	,    _a = 3					):
    snake_case_				:  Optional[int]       =			min(_a					)
    snake_case_				:  str       =			max(_a					)
    # normalize data
    return [round((x - x_min) / (x_max - x_min)	,    _a					) for x in data]






def __lowercase    (							_a	,    _a = 3					):
    snake_case_				:  Any       =			mean(_a					)
    snake_case_				:  str       =			stdev(_a					)
    # standardize data
    return [round((x - mu) / (sigma)	,    _a					) for x in data]





