



import math






def      _A				(UpperCamelCase		:      int )  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      Tuple								=		0
			lowerCamelCase__ :      List[Any]								=		0
			while num > 0:
						lowerCamelCase__ :      Tuple								=		num % 8
						lowerCamelCase__ :      int								=		octal + (remainder * math.floor(math.pow(10      ,			UpperCamelCase ) ))
						counter += 1
						lowerCamelCase__ :      Dict								=		math.floor(num / 8 )  # basically /= 8 without remainder if any
						# This formatting removes trailing '.0' from `octal`.
			return f"0o{int(UpperCamelCase )}"






def      _A				()  ->None:



			'''simple docstring'''







			print("""\n2 in octal is:""" )
			print(decimal_to_octal(2 ) )  # = 2
			print("""\n8 in octal is:""" )
			print(decimal_to_octal(8 ) )  # = 10
			print("""\n65 in octal is:""" )
			print(decimal_to_octal(65 ) )  # = 101
			print("""\n216 in octal is:""" )
			print(decimal_to_octal(216 ) )  # = 330
			print("""\n512 in octal is:""" )
			print(decimal_to_octal(512 ) )  # = 1000
			print("""\n""" )


if __name__ == "__main__":
				main()






import argparse

from transformers import TaConfig, TaForConditionalGeneration, load_tf_weights_in_ta
from transformers.utils import logging


logging.set_verbosity_info()






def      _A				(UpperCamelCase		:      Any      ,			UpperCamelCase		:      Union[str, Any]      ,			UpperCamelCase		:      Optional[Any] )  ->Any:



			'''simple docstring'''







			lowerCamelCase__ :      Optional[Any]								=		TaConfig.from_json_file(UpperCamelCase )
			print(f"Building PyTorch model from configuration: {config}" )
			lowerCamelCase__ :      Optional[int]								=		TaForConditionalGeneration(UpperCamelCase )

			# Load weights from tf checkpoint
			load_tf_weights_in_ta(UpperCamelCase      ,			UpperCamelCase      ,			UpperCamelCase )

			# Save pytorch-model
			print(f"Save PyTorch model to {pytorch_dump_path}" )
			model.save_pretrained(UpperCamelCase )


if __name__ == "__main__":
				_lowercase     							=						argparse.ArgumentParser()
				# Required parameters
				parser.add_argument(
				    '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
				)
				parser.add_argument(
				    '''--config_file''',
				    default=None,
				    type=str,
				    required=True,
				    help=(
				        '''The config json file corresponding to the pre-trained T5 model. \nThis specifies the model architecture.'''
				    ),
				)
				parser.add_argument(
				    '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
				)
				_lowercase     							=						parser.parse_args()
				convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)



