






'''simple docstring'''



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						list[int],       SCREAMING_SNAKE_CASE__:						list[int]     )	->      None:

   """simple docstring"""
   __a					  =     len(SCREAMING_SNAKE_CASE__     )
   print('The following activities are selected:'     )

   # The first activity is always selected
   __a					  =     0
   print(SCREAMING_SNAKE_CASE__,       end=','     )

   # Consider rest of the activities
   for j in range(SCREAMING_SNAKE_CASE__     ):
      # If this activity has start time greater than
      # or equal to the finish time of previously
      # selected activity, then select it
      if start[j] >= finish[i]:
         print(SCREAMING_SNAKE_CASE__,       end=','     )
         __a					  =     j


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 __UpperCamelCase   :							str         =   [1, 3, 0, 5, 8, 5]
 __UpperCamelCase   :							int         =   [2, 4, 6, 7, 9, 9]
 print_max_activities(start, finish)







'''simple docstring'''



import argparse

import torch

from transformers import RemBertConfig, RemBertModel, load_tf_weights_in_rembert
from transformers.utils import logging


logging.set_verbosity_info()



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						Optional[Any],       SCREAMING_SNAKE_CASE__:						Tuple,       SCREAMING_SNAKE_CASE__:						Dict     )	->      List[Any]:

   """simple docstring"""
   # Initialise PyTorch model
   __a					  =     RemBertConfig.from_json_file(SCREAMING_SNAKE_CASE__     )
   print('Building PyTorch model from configuration: {}'.format(str(SCREAMING_SNAKE_CASE__     )     )     )
   __a					  =     RemBertModel(SCREAMING_SNAKE_CASE__     )

   # Load weights from tf checkpoint
   load_tf_weights_in_rembert(SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__     )

   # Save pytorch-model
   print('Save PyTorch model to {}'.format(SCREAMING_SNAKE_CASE__     )     )
   torch.save(model.state_dict(),       SCREAMING_SNAKE_CASE__     )


if __name__ == "__main__":
 __UpperCamelCase   :							List[str]         =   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(
     """--rembert_config_file""",
     default=None,
     type=str,
     required=True,
     help=(
         """The config json file corresponding to the pre-trained RemBERT model. \n"""
         """This specifies the model architecture."""
     ),
 )
 parser.add_argument(
     """--pytorch_dump_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
 )
 __UpperCamelCase   :							List[str]         =   parser.parse_args()
 convert_rembert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.rembert_config_file, args.pytorch_dump_path)