






'''simple docstring'''

from __future__ import annotations



def 							snake_case					(     a_							: list[float]    ,   a_							: str	)       ->				Union[str, Any]:





      """simple docstring"""

      print(f"Vertex\tShortest Distance from vertex {src}"	)
      for i, d in enumerate(a_	):
            print(f"{i}\t\t{d}"	)



def 							snake_case					(     a_							: list[dict[str, int]]    ,   a_							: list[float]    ,   a_							: int	)       ->				Optional[Any]:





      """simple docstring"""

      for j in range(a_	):
            UpperCamelCase_				:   List[str]					    =							(graph[j][k] for k in ["""src""", """dst""", """weight"""])
            if distance[u] != float("""inf"""	) and distance[u] + w < distance[v]:
                  return True
      return False



def 							snake_case					(     a_							: list[dict[str, int]]    ,   a_							: int    ,   a_							: int    ,   a_							: int	)       ->				list[float]:





      """simple docstring"""

      UpperCamelCase_				:   Optional[Any]					    =							[float("""inf"""	)] * vertex_count
      UpperCamelCase_				:   str					    =							0.0

      for _ in range(vertex_count - 1	):
            for j in range(a_	):
                  UpperCamelCase_				:   Optional[Any]					    =							(graph[j][k] for k in ["""src""", """dst""", """weight"""])

                  if distance[u] != float("""inf"""	) and distance[u] + w < distance[v]:
                        UpperCamelCase_				:   Tuple					    =							distance[u] + w

      UpperCamelCase_				:   Union[str, Any]					    =							check_negative_cycle(a_    ,   a_    ,   a_	)
      if negative_cycle_exists:
            raise Exception("""Negative cycle found"""	)

      return distance


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    UpperCamelCase							=int(input("Enter number of vertices: ").strip())
    UpperCamelCase							=int(input("Enter number of edges: ").strip())

    UpperCamelCase							=[{} for _ in range(E)]

    for i in range(E):
        print("Edge ", i + 1)
        UpperCamelCase				,		UpperCamelCase				,		UpperCamelCase							=(
            int(x)
            for x in input("Enter source, destination, weight: ").strip().split(" ")
        )
        UpperCamelCase							={"src": src, "dst": dest, "weight": weight}

    UpperCamelCase							=int(input("\nEnter shortest path source:").strip())
    UpperCamelCase							=bellman_ford(graph, V, E, source)
    print_distance(shortest_distance, 0)














'''simple docstring'''

from __future__ import annotations

import os
from typing import Any

import requests

UpperCamelCase							="https://api.github.com"

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
UpperCamelCase							=BASE_URL + "/user"

# https://github.com/settings/tokens
UpperCamelCase							=os.environ.get("USER_TOKEN", "")



def 							snake_case					(     a_							: str	)       ->				dict[Any, Any]:





      """simple docstring"""

      UpperCamelCase_				:   Tuple					    =							{
          """Authorization""": f"token {auth_token}",
          """Accept""": """application/vnd.github.v3+json""",
      }
      return requests.get(a_    ,   headers=a_	).json()


if __name__ == "__main__":  # pragma: no cover
      if USER_TOKEN:
            for key, value in fetch_github_info(USER_TOKEN).items():
                  print(f"{key}: {value}")
      else:
            raise ValueError("'USER_TOKEN' field cannot be empty.")






