




'''simple docstring'''





from __future__ import annotations




class 				_snake_case	:




   def __init__(      self       ,							a__							)       ->       int:

          '''simple docstring'''




          snake_case_			      =   vertices
          snake_case_			      =   [[0] * vertices for _ in range(a__							)]




   def      lowerCAmelCase__       (      self       ,							a__							)       ->       List[Any]:

          '''simple docstring'''




          print("Vertex \t Distance from Source"							)
          for vertex in range(self.vertices							):
                 print(a__       ,							"\t\t"       ,							distances_from_source[vertex]							)




   def      lowerCAmelCase__       (      self       ,							a__       ,							a__							)       ->       Tuple:

          '''simple docstring'''




          snake_case_			      =   1e7
          snake_case_			      =   0

          # Search not nearest vertex not in the shortest path tree
          for vertex in range(self.vertices							):
                 if distances_from_source[vertex] < minimum and visited[vertex] is False:
                        snake_case_			      =   distances_from_source[vertex]
                        snake_case_			      =   vertex
          return min_index




   def      lowerCAmelCase__       (      self       ,							a__							)       ->       Optional[Any]:

          '''simple docstring'''




          snake_case_			      =   [int(1e7							)] * self.vertices  # distances from the source
          snake_case_			      =   0
          snake_case_			      =   [False] * self.vertices

          for _ in range(self.vertices							):
                 snake_case_			      =   self.minimum_distance(a__       ,							a__							)
                 snake_case_			      =   True

                 # Update dist value of the adjacent vertices
                 # of the picked vertex only if the current
                 # distance is greater than new distance and
                 # the vertex in not in the shortest path tree
                 for v in range(self.vertices							):
                        if (
                            self.graph[u][v] > 0
                            and visited[v] is False
                            and distances[v] > distances[u] + self.graph[u][v]
                        ):
                               snake_case_			      =   distances[u] + self.graph[u][v]

          self.print_solution(a__							)


if __name__ == "__main__":
  _SCREAMING_SNAKE_CASE							:     List[Any]   	=				Graph(9)
  _SCREAMING_SNAKE_CASE							:     Any   	=				[
      [0, 4, 0, 0, 0, 0, 0, 8, 0],
      [4, 0, 8, 0, 0, 0, 0, 11, 0],
      [0, 8, 0, 7, 0, 4, 0, 0, 2],
      [0, 0, 7, 0, 9, 14, 0, 0, 0],
      [0, 0, 0, 9, 0, 10, 0, 0, 0],
      [0, 0, 4, 14, 10, 0, 2, 0, 0],
      [0, 0, 0, 0, 0, 2, 0, 1, 6],
      [8, 11, 0, 0, 0, 0, 1, 0, 7],
      [0, 0, 2, 0, 0, 0, 6, 7, 0],
  ]
  graph.dijkstra(0)










'''simple docstring'''





import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils




class 				_snake_case	(			unittest.TestCase							):




			@patch("diffusers.utils.hub_utils.get_full_repo_name"							)
			def      lowerCAmelCase__       (      self       ,							a__							)       ->       None:

										'''simple docstring'''




										snake_case_			      =   "full_repo_name"
										with TemporaryDirectory() as tmpdir:
																	# Dummy args values
																	snake_case_			      =   Mock()
																	snake_case_			      =   tmpdir
																	snake_case_			      =   0
																	snake_case_			      =   "hub_token"
																	snake_case_			      =   "dataset_name"
																	snake_case_			      =   0.0_1
																	snake_case_			      =   100_000
																	snake_case_			      =   10_000
																	snake_case_			      =   0.0_1
																	snake_case_			      =   0.0_2
																	snake_case_			      =   0.0_3
																	snake_case_			      =   0.0_0_0_5
																	snake_case_			      =   0.0_0_0_0_0_1
																	snake_case_			      =   1
																	snake_case_			      =   10
																	snake_case_			      =   0.0_0_1
																	snake_case_			      =   0.1
																	snake_case_			      =   0.2
																	snake_case_			      =   True

																	# Model card mush be rendered and saved
																	diffusers.utils.hub_utils.create_model_card(a__       ,							model_name="model_name"							)
																	self.assertTrue((Path(a__							) / "README.md").is_file()							)




