


# Function to print upper half of diamond (pyramid)




def     UpperCamelCase    (      _a		)					->							Union[str, Any]:
     '''simple docstring'''





     for i in range(0       ,		_a		):
          for _ in range(0       ,		n - i - 1		):  # printing spaces
               print(''' '''       ,		end=''''''		)
          for _ in range(0       ,		i + 1		):  # printing stars
               print('''* '''       ,		end=''''''		)
          print()




def     UpperCamelCase    (      _a		)					->							int:
     '''simple docstring'''





     for i in range(_a       ,		0       ,		-1		):
          for _ in range(_a       ,		0       ,		-1		):  # printing stars
               print('''* '''       ,		end=''''''		)
          print()
          for _ in range(n - i + 1       ,		0       ,		-1		):  # printing spaces
               print(''' '''       ,		end=''''''		)




def     UpperCamelCase    (      _a		)					->							Dict:
     '''simple docstring'''





     if n <= 0:
          print('''       ...       ....        nothing printing :('''		)
          return
     floyd(_a		)  # upper half
     reverse_floyd(_a		)  # lower half


if __name__ == "__main__":
   print(r"| /\ | |- |  |-  |--| |\  /| |-")
   print(r"|/  \| |- |_ |_  |__| | \/ | |_")
   SCREAMING_SNAKE_CASE       :		Tuple         =				1
   while K:
      SCREAMING_SNAKE_CASE       :		List[str]         =				int(input("enter the number and , and see the magic : "))
      print()
      pretty_print(user_number)
      SCREAMING_SNAKE_CASE       :		Any         =				int(input("press 0 to exit... and 1 to continue..."))

   print("Good Bye...")





import argparse

import torch

from transformers import OpenAIGPTConfig, OpenAIGPTModel, load_tf_weights_in_openai_gpt
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()




def     UpperCamelCase    (      _a       ,		_a       ,		_a		)					->							List[str]:
     '''simple docstring'''





     if openai_config_file == "":
          lowercase_       :str     =       OpenAIGPTConfig()
     else:
          lowercase_       :int     =       OpenAIGPTConfig.from_json_file(_a		)
     lowercase_       :int     =       OpenAIGPTModel(_a		)

     # Load weights from numpy
     load_tf_weights_in_openai_gpt(_a       ,		_a       ,		_a		)

     # Save pytorch-model
     lowercase_       :Optional[int]     =       pytorch_dump_folder_path + '''/''' + WEIGHTS_NAME
     lowercase_       :List[str]     =       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__":
   SCREAMING_SNAKE_CASE       :		List[str]         =				argparse.ArgumentParser()
   # Required parameters
   parser.add_argument(
       "--openai_checkpoint_folder_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(
       "--openai_config_file",
       default="",
       type=str,
       help=(
           "An optional config json file corresponding to the pre-trained OpenAI model. \n"
           "This specifies the model architecture."
       ),
   )
   SCREAMING_SNAKE_CASE       :		Optional[Any]         =				parser.parse_args()
   convert_openai_checkpoint_to_pytorch(
       args.openai_checkpoint_folder_path, args.openai_config_file, args.pytorch_dump_folder_path
   )

