




def 		_A(       UpperCamelCase__							:			Any				,       UpperCamelCase__							:			List[str]				)    -> str:
       '''simple docstring'''


       if number < 0 or shift_amount < 0:
              raise ValueError('''both inputs must be positive integers'''				)

       __lowercase      =    str(bin(__snake_case				)				)
       binary_number += "0" * shift_amount
       return binary_number







def 		_A(       UpperCamelCase__							:			Optional[Any]				,       UpperCamelCase__							:			int				)    -> str:
       '''simple docstring'''


       if number < 0 or shift_amount < 0:
              raise ValueError('''both inputs must be positive integers'''				)

       __lowercase      =    str(bin(__snake_case				)				)[2:]
       if shift_amount >= len(__snake_case				):
              return "0b0"
       __lowercase      =    binary_number[: len(__snake_case				) - shift_amount]
       return "0b" + shifted_binary_number







def 		_A(       UpperCamelCase__							:			List[Any]				,       UpperCamelCase__							:			Optional[Any]				)    -> str:
       '''simple docstring'''


       if number >= 0:  # Get binary representation of positive number
              __lowercase      =    '''0''' + str(bin(__snake_case				)				).strip('''-'''				)[2:]
       else:  # Get binary (2's complement) representation of negative number
              __lowercase      =    len(bin(__snake_case				)[3:]				)  # Find 2's complement of number
              __lowercase      =    bin(abs(__snake_case				) - (1 << binary_number_length)				)[3:]
              __lowercase      =    (
                  '''1''' + '''0''' * (binary_number_length - len(__snake_case				)) + binary_number
              )

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


if __name__ == "__main__":
   import doctest

   doctest.testmod()












import argparse


UpperCAmelCase__				     = "docs/source/_static/js/custom.js"







def 		_A(       UpperCamelCase__							:			Optional[int]				)    -> Optional[int]:
							'''simple docstring'''


							with open(UpperCamelCase__				,       encoding='''utf-8'''				,       newline='''\n'''				) as f:
														__lowercase      =    f.readlines()
							__lowercase      =    0

							# First let's put the right version
							while not lines[index].startswith('''const stableVersion ='''				):
														index += 1
							__lowercase      =    F'const stableVersion = "v{version}"\n'

							# Then update the dictionary
							while not lines[index].startswith('''const versionMapping = {'''				):
														index += 1

							# We go until the end
							while not lines[index].startswith('''}'''				):
														index += 1
							# We add the new version at the end
							lines[index - 1] += F'    "v{version}": "v{version}",\n'

							with open(UpperCamelCase__				,       '''w'''				,       encoding='''utf-8'''				,       newline='''\n'''				) as f:
														f.writelines(UpperCamelCase__				)


if __name__ == "__main__":
			UpperCAmelCase__				     = argparse.ArgumentParser()
			parser.add_argument("--version", help="Release version.")
			UpperCAmelCase__				     = parser.parse_args()
			update_custom_js(args.version)






