

'''simple docstring'''



SCREAMING_SNAKE_CASE_     = {
    """meter""": """m""",
    """kilometer""": """km""",
    """megametre""": """Mm""",
    """gigametre""": """Gm""",
    """terametre""": """Tm""",
    """petametre""": """Pm""",
    """exametre""": """Em""",
    """zettametre""": """Zm""",
    """yottametre""": """Ym""",
}
# Exponent of the factor(meter)
SCREAMING_SNAKE_CASE_     = {
    """m""": 0,
    """km""": 3,
    """Mm""": 6,
    """Gm""": 9,
    """Tm""": 12,
    """Pm""": 15,
    """Em""": 18,
    """Zm""": 21,
    """Ym""": 24,
}

def 	lowerCamelCase__							(   a__      ,   a__      ,   a__)		->     float:



    """simple docstring"""







    _snake_case			:			Optional[Any]				       =		from_type.lower().strip('s')
    _snake_case			:			List[str]				       =		to_type.lower().strip('s')

    _snake_case			:			Dict				       =		UNIT_SYMBOL.get(lowercase_      ,   lowercase_)
    _snake_case			:			Optional[int]				       =		UNIT_SYMBOL.get(lowercase_      ,   lowercase_)

    if from_sanitized not in METRIC_CONVERSION:
        _snake_case			:			str				       =		(
            F"""Invalid 'from_type' value: {from_type!r}.\n"""
            F"""Conversion abbreviations are: {', '.join(lowercase_)}"""
        )
        raise ValueError(lowercase_)
    if to_sanitized not in METRIC_CONVERSION:
        _snake_case			:			Optional[Any]				       =		(
            F"""Invalid 'to_type' value: {to_type!r}.\n"""
            F"""Conversion abbreviations are: {', '.join(lowercase_)}"""
        )
        raise ValueError(lowercase_)
    _snake_case			:			Tuple				       =		METRIC_CONVERSION[from_sanitized]
    _snake_case			:			List[Any]				       =		METRIC_CONVERSION[to_sanitized]
    _snake_case			:			Any				       =		1

    if from_exponent > to_exponent:
        _snake_case			:			Optional[Any]				       =		from_exponent - to_exponent
    else:
        _snake_case			:			List[str]				       =		-(to_exponent - from_exponent)

    return value * pow(1_0      ,   lowercase_)


if __name__ == "__main__":
   from doctest import testmod

   testmod()









from __future__ import annotations

import requests







def SCREAMING_SNAKE_CASE							(			lowercase_		)  ->			dict:



       """simple docstring"""

       A__ 					=       f"""https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty"""
       return requests.get(lowercase_		).json()







def SCREAMING_SNAKE_CASE							(			lowercase_ = 10		)  ->			list[dict]:



       """simple docstring"""

       A__ 					=       '''https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty'''
       A__ 					=       requests.get(lowercase_		).json()[:max_stories]
       return [get_hackernews_story(lowercase_		) for story_id in story_ids]







def SCREAMING_SNAKE_CASE							(			lowercase_ = 10		)  ->			str:



       """simple docstring"""

       A__ 					=       hackernews_top_stories(lowercase_		)
       return "\n".join('''* [{title}]({url})'''.format(**lowercase_		) for story in stories		)


if __name__ == "__main__":
  print(hackernews_top_stories_as_markdown())


