





"""simple docstring"""
import os
from typing import Dict, List, Tuple, TypeVar, Union


__UpperCamelCase     :						int						       =  TypeVar('''T''')

__UpperCamelCase     :						Union[str, Any]						       =  Union[List[T], Tuple[T, ...]]
__UpperCamelCase     :						int						       =  Union[T, List[T], Dict[str, T]]
__UpperCamelCase     :						str						       =  Union[str, bytes, os.PathLike]












"""simple docstring"""
from __future__ import annotations

import requests

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    str			):
 lowerCAmelCase    				= F'https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty'
 return requests.get(_UpperCAmelCase			).json()

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    int = 10			):
 lowerCAmelCase    				= 'https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty'
 lowerCAmelCase    				= requests.get(_UpperCAmelCase			).json()[:max_stories]
 return [get_hackernews_story(_UpperCAmelCase			) for story_id in story_ids]

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    int = 10			):
 lowerCAmelCase    				= hackernews_top_stories(_UpperCAmelCase			)
 return "\n".join('* [{title}]({url})'.format(**_UpperCAmelCase			) for story in stories			)


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





