





def A_     (		A__		,				A__    )  ->		int:
       return abs(A__    ) if a == 0 else greatest_common_divisor(b % a		,				A__    )



def A_     (		A__		,				A__    )  ->		int:
       while y:  # --> when y=0 then loop will terminate and return x as final GCD.
              a__			,							a__						:     str			=    y, x % y
       return abs(A__    )



def A_     (		)  ->		List[Any]:
       try:
              a__						:     Any			=    input('Enter two integers separated by comma (,): '    ).split(','    )
              a__						:     str			=    int(nums[0]    )
              a__						:     List[Any]			=    int(nums[1]    )
              print(
                  F'greatest_common_divisor({num_a}, {num_a}) = '
                  F'{greatest_common_divisor(A__		,				A__    )}'    )
              print(F'By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(A__		,				A__    )}'    )
       except (IndexError, UnboundLocalError, ValueError):
              print('Wrong input'    )


if __name__ == "__main__":
    main()









import argparse

import torch

from transformers import GPTaConfig, GPTaModel, load_tf_weights_in_gpta
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()



def A_     (		A__		,				A__		,				A__    )  ->		Any:
       # Construct model
       if gpta_config_file == "":
              a__						:     Optional[int]			=    GPTaConfig()
       else:
              a__						:     List[str]			=    GPTaConfig.from_json_file(A__    )
       a__						:     List[str]			=    GPTaModel(A__    )

       # Load weights from numpy
       load_tf_weights_in_gpta(A__		,				A__		,				A__    )

       # Save pytorch-model
       a__						:     Optional[Any]			=    pytorch_dump_folder_path + '/' + WEIGHTS_NAME
       a__						:     Any			=    pytorch_dump_folder_path + '/' + CONFIG_NAME
       print(F'Save PyTorch model to {pytorch_weights_dump_path}'    )
       torch.save(model.state_dict()		,				A__    )
       print(F'Save configuration file to {pytorch_config_dump_path}'    )
       with open(A__		,				'w'		,				encoding='utf-8'    ) as f:
              f.write(config.to_json_string()    )


if __name__ == "__main__":
    lowercase				:	Dict      						=  argparse.ArgumentParser()
    # Required parameters
    parser.add_argument(
        """--gpt2_checkpoint_path""", default=None, type=str, required=True, help="""Path to the TensorFlow checkpoint path."""
    )
    parser.add_argument(
        """--pytorch_dump_folder_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
    )
    parser.add_argument(
        """--gpt2_config_file""",
        default="""""",
        type=str,
        help=(
            """An optional config json file corresponding to the pre-trained OpenAI model. \n"""
            """This specifies the model architecture."""
        ),
    )
    lowercase				:	int      						=  parser.parse_args()
    convert_gpta_checkpoint_to_pytorch(args.gpta_checkpoint_path, args.gpta_config_file, args.pytorch_dump_folder_path)


