
# Function to print upper half of diamond (pyramid)


def      __lowercase					( snake_case ):







				"""simple docstring"""






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

def      __lowercase					( snake_case ):







				"""simple docstring"""






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

def      __lowercase					( snake_case ):







				"""simple docstring"""






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


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

					print("""Good Bye...""")














import unittest

import numpy as np
import torch

from .utils_summarization import build_mask, compute_token_type_ids, process_story, truncate_or_pad
class 						lowerCamelCase_				(      unittest.TestCase ):







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      1_0







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      [1, 2, 3, 4]
								__magic_name__		:Union[str, Any]        =      [1, 2, 3, 4, 0, 0, 0, 0, 0, 0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								__magic_name__		:Optional[Any]        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0, 1_1, 1_2, 1_3]
								__magic_name__		:str        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Tuple        =      '''It was the year of Our Lord one thousand seven hundred and
        seventy-five.\n\nSpiritual revelations were conceded to England at that
        favoured period, as at this.'''
								__magic_name__     ,				__magic_name__		:Optional[int]        =      process_story(__lowerCAmelCase     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Union[str, Any]        =      ''''''
								__magic_name__     ,				__magic_name__		:Optional[int]        =      process_story(__lowerCAmelCase     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      (
								    '''It was the year of Our Lord one thousand seven hundred and '''
								    '''seventy-five\n\nSpiritual revelations were conceded to England '''
								    '''at that favoured period, as at this.\n@highlight\n\nIt was the best of times'''
								)
								__magic_name__     ,				__magic_name__		:str        =      process_story(__lowerCAmelCase     )

								__magic_name__		:Optional[int]        =      [
								    '''It was the year of Our Lord one thousand seven hundred and seventy-five.''',
								    '''Spiritual revelations were conceded to England at that favoured period, as at this.''',
								]
								self.assertEqual(__lowerCAmelCase       ,					__lowerCAmelCase     )

								__magic_name__		:Union[str, Any]        =      ['''It was the best of times.''']
								self.assertEqual(__lowerCAmelCase       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      torch.tensor([1, 2, 3, 4]     )
								__magic_name__		:List[str]        =      torch.tensor([1, 1, 1, 1]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					0     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[str]        =      torch.tensor([1, 2, 3, 4, 2_3, 2_3, 2_3]     )
								__magic_name__		:Union[str, Any]        =      torch.tensor([1, 1, 1, 1, 0, 0, 0]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					2_3     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      torch.tensor([8, 2, 3, 4, 1, 1, 1]     )
								__magic_name__		:Dict        =      torch.tensor([1, 1, 1, 1, 0, 0, 0]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					1     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      1_0_1
								__magic_name__		:List[Any]        =      torch.tensor([[1, 2, 3, 4, 5, 6], [1, 2, 3, 1_0_1, 5, 6], [1, 1_0_1, 3, 4, 1_0_1, 6]]     )
								__magic_name__		:str        =      torch.tensor([[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1]]     )

								__magic_name__		:Tuple        =      compute_token_type_ids(__lowerCAmelCase       ,					__lowerCAmelCase     )
								np.testing.assert_array_equal(__lowerCAmelCase       ,					__lowerCAmelCase     )






