

'''simple docstring'''






from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import torch

from ...utils import BaseOutput, OptionalDependencyNotAvailable, is_torch_available, is_transformers_available






@dataclass
class      lowercase_      (lowerCamelCase__ ):




  """simple docstring"""




  SCREAMING_SNAKE_CASE       :    Union[List[np.ndarray], torch.FloatTensor]


try:
 if not (is_transformers_available() and is_torch_available()):
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
 from .pipeline_text_to_video_synth import TextToVideoSDPipeline
 from .pipeline_text_to_video_synth_imgaimg import VideoToVideoSDPipeline  # noqa: F401
 from .pipeline_text_to_video_zero import TextToVideoZeroPipeline








"""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())





