


'''simple docstring'''
from timeit import timeit


def       a				(      __a       )  ->     int:



					'''simple docstring'''






					if number < 0:
										raise ValueError('''the value of input must not be negative'''       )
					UpperCamelCase__       :List[Any]							 =			0
					while number:
										number &= number - 1
										result += 1
					return result


def       a				(      __a       )  ->     int:



					'''simple docstring'''






					if number < 0:
										raise ValueError('''the value of input must not be negative'''       )
					UpperCamelCase__       :Any							 =			0
					while number:
										if number % 2 == 1:
															result += 1
										number >>= 1
					return result


def       a				(      )  ->     None:



					'''simple docstring'''






					def do_benchmark(__a       ) -> None:
										UpperCamelCase__       :Tuple							 =			'''import __main__ as z'''
										print(f'''Benchmark when {number = }:'''       )
										print(f'''{get_set_bits_count_using_modulo_operator(__a       ) = }'''       )
										UpperCamelCase__       :Optional[Any]							 =			timeit('''z.get_set_bits_count_using_modulo_operator(25)'''			, setup=__a       )
										print(f'''timeit() runs in {timing} seconds'''       )
										print(f'''{get_set_bits_count_using_brian_kernighans_algorithm(__a       ) = }'''       )
										UpperCamelCase__       :List[Any]							 =			timeit(
										    '''z.get_set_bits_count_using_brian_kernighans_algorithm(25)'''			, setup=__a			, )
										print(f'''timeit() runs in {timing} seconds'''       )

					for number in (25, 37, 58, 0):
										do_benchmark(__a       )
										print()


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		benchmark()



'''simple docstring'''
import socket


def       a				(      )  ->     Dict:



					'''simple docstring'''






					UpperCamelCase__       :int							 =			socket.socket(socket.AF_INET			, socket.SOCK_STREAM       )
					UpperCamelCase__       :List[Any]							 =			socket.gethostname()
					UpperCamelCase__       :List[str]							 =			12312

					sock.connect((host, port)       )
					sock.send(B'''Hello server!'''       )

					with open('''Received_file'''			, '''wb'''       ) as out_file:
										print('''File opened'''       )
										print('''Receiving data...'''       )
										while True:
															UpperCamelCase__       :str							 =			sock.recv(1024       )
															if not data:
																				break
															out_file.write(__a       )

					print('''Successfully received the file'''       )
					sock.close()
					print('''Connection closed'''       )


if __name__ == "__main__":
		main()