




def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase      ):
  if number < 0 or shift_amount < 0:
    raise ValueError("both inputs must be positive integers"      )

  lowercase			:Optional[Any]							=  str(bin(lowerCamelCase      )      )
  binary_number += "0" * shift_amount
  return binary_number



def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase      ):
  if number < 0 or shift_amount < 0:
    raise ValueError("both inputs must be positive integers"      )

  lowercase			:Optional[Any]							=  str(bin(lowerCamelCase      )      )[2:]
  if shift_amount >= len(lowerCamelCase      ):
    return "0b0"
  lowercase			:List[Any]							=  binary_number[: len(lowerCamelCase      ) - shift_amount]
  return "0b" + shifted_binary_number



def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase      ):
  if number >= 0:  # Get binary representation of positive number
    lowercase			:List[str]							=  "0" + str(bin(lowerCamelCase      )      ).strip("-"      )[2:]
  else:  # Get binary (2's complement) representation of negative number
    lowercase			:List[str]							=  len(bin(lowerCamelCase      )[3:]      )  # Find 2's complement of number
    lowercase			:Tuple							=  bin(abs(lowerCamelCase      ) - (1 << binary_number_length)      )[3:]
    lowercase			:Union[str, Any]							=  (
        "1" + "0" * (binary_number_length - len(lowerCamelCase      )) + binary_number
    )

  if shift_amount >= len(lowerCamelCase      ):
    return "0b" + binary_number[0] * len(lowerCamelCase      )
  return (
      "0b"
      + binary_number[0] * shift_amount
      + binary_number[: len(lowerCamelCase      ) - shift_amount]
  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()









import torch



def 					UpperCAmelCase__     (   ):
  if torch.cuda.is_available():
    lowercase			:Optional[int]							=  torch.cuda.device_count()
  else:
    lowercase			:Dict							=  0
  print(F"Successfully ran on {num_gpus} GPUs"      )


if __name__ == "__main__":
     main()



