

def       __snake_case						( __UpperCamelCase	: Dict				,__UpperCamelCase	: Dict    ):



      """simple docstring"""

      return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2

def       __snake_case						( __UpperCamelCase	: List[Any]				,__UpperCamelCase	: List[Any]=0    ):



      """simple docstring"""

      return sorted(__UpperCamelCase				,key=lambda __UpperCamelCase    : x[column]    )

def       __snake_case						( __UpperCamelCase	: Optional[int]				,__UpperCamelCase	: str				,__UpperCamelCase	: Optional[int]=float("inf"    )    ):



      """simple docstring"""

      for i in range(points_counts - 1    ):
            for j in range(i + 1				,__UpperCamelCase    ):
                  A_						  =				euclidean_distance_sqr(points[i]				,points[j]    )
                  if current_dis < min_dis:
                        A_						  =				current_dis
      return min_dis

def       __snake_case						( __UpperCamelCase	: Dict				,__UpperCamelCase	: str				,__UpperCamelCase	: Optional[int]=float("inf"    )    ):



      """simple docstring"""

      for i in range(min(6				,points_counts - 1    )				,__UpperCamelCase    ):
            for j in range(max(0				,i - 6    )				,__UpperCamelCase    ):
                  A_						  =				euclidean_distance_sqr(points[i]				,points[j]    )
                  if current_dis < min_dis:
                        A_						  =				current_dis
      return min_dis

def       __snake_case						( __UpperCamelCase	: Union[str, Any]				,__UpperCamelCase	: Optional[int]				,__UpperCamelCase	: List[Any]    ):



      """simple docstring"""

      if points_counts <= 3:
            return dis_between_closest_pair(__UpperCamelCase				,__UpperCamelCase    )

      # recursion
      A_						  =				points_counts // 2
      A_						  =				closest_pair_of_points_sqr(
          __UpperCamelCase				,points_sorted_on_y[:mid]				,__UpperCamelCase    )
      A_						  =				closest_pair_of_points_sqr(
          __UpperCamelCase				,points_sorted_on_y[mid:]				,points_counts - mid    )
      A_						  =				min(__UpperCamelCase				,__UpperCamelCase    )
      A_						  =				[]
      for point in points_sorted_on_x:
            if abs(point[0] - points_sorted_on_x[mid][0]    ) < closest_pair_dis:
                  cross_strip.append(__UpperCamelCase    )

      A_						  =				dis_between_closest_in_strip(
          __UpperCamelCase				,len(__UpperCamelCase    )				,__UpperCamelCase    )
      return min(__UpperCamelCase				,__UpperCamelCase    )

def       __snake_case						( __UpperCamelCase	: Union[str, Any]				,__UpperCamelCase	: int    ):



      """simple docstring"""

      A_						  =				column_based_sort(__UpperCamelCase				,column=0    )
      A_						  =				column_based_sort(__UpperCamelCase				,column=1    )
      return (
          closest_pair_of_points_sqr(
              __UpperCamelCase				,__UpperCamelCase				,__UpperCamelCase    )
      ) ** 0.5


if __name__ == "__main__":
      __a    :List[Any]      =			[(2, 3), (12, 30), (40, 50), (5, 1), (12, 10), (3, 4)]
      print('Distance:', closest_pair_of_points(points, len(points)))


import argparse

import torch

from transformers import BertConfig, BertForPreTraining, load_tf_weights_in_bert
from transformers.utils import logging


logging.set_verbosity_info()





def    __lowerCamelCase      (					UpperCamelCase__  ,				UpperCamelCase__  ,				UpperCamelCase__ ):







							'''simple docstring'''






							snake_case_     							=       BertConfig.from_json_file(UpperCamelCase__ )
							print(F'''Building PyTorch model from configuration: {config}''' )
							snake_case_     							=       BertForPreTraining(UpperCamelCase__ )

							# Load weights from tf checkpoint
							load_tf_weights_in_bert(UpperCamelCase__  ,				UpperCamelCase__  ,				UpperCamelCase__ )

							# Save pytorch-model
							print(F'''Save PyTorch model to {pytorch_dump_path}''' )
							torch.save(model.state_dict()  ,				UpperCamelCase__ )


if __name__ == "__main__":
					_UpperCAmelCase						:  Union[str, Any]									=			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(
					    """--bert_config_file""",
					    default=None,
					    type=str,
					    required=True,
					    help=(
					        """The config json file corresponding to the pre-trained BERT 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						:  Any									=			parser.parse_args()
					convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)




