






import torch






def   UpperCamelCase  (       ):




     '''simple docstring'''






     if torch.cuda.is_available():
          __snake_case			:Optional[int]          =						torch.cuda.device_count()
     else:
          __snake_case			:List[str]          =						0
     print(f'''Successfully ran on {num_gpus} GPUs'''  )


if __name__ == "__main__":
     main()










def   UpperCamelCase  (       snake_case__     :   str  ):




     '''simple docstring'''






     __snake_case			:List[Any]          =						hex_num.strip()
     if not hex_num:
          raise ValueError("""No value was passed to the function"""  )

     __snake_case			:str          =						hex_num[0] == """-"""
     if is_negative:
          __snake_case			:List[Any]          =						hex_num[1:]

     try:
          __snake_case			:Tuple          =						int(snake_case__	,16  )
     except ValueError:
          raise ValueError("""Invalid value was passed to the function"""  )

     __snake_case			:int          =						""""""
     while int_num > 0:
          __snake_case			:Optional[int]          =						str(int_num % 2  ) + bin_str
          int_num >>= 1

     return int(("""-""" + bin_str) if is_negative else bin_str  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()


