






'''simple docstring'''

def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase					)->				str:
      UpperCamelCase       						=      ''''''
      for i in table:
            res += inp[i - 1]
      return res







def 					lowercase__				(   __UpperCamelCase					)->				int:
      return data[1:] + data[0]







def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase					)->				Optional[int]:
      UpperCamelCase       						=      ''''''
      for i in range(len(lowerCAmelCase_					)					):
            if a[i] == b[i]:
                  res += "0"
            else:
                  res += "1"
      return res







def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase					)->				List[str]:
      UpperCamelCase       						=      int("""0b""" + data[0] + data[-1]	,		2					)
      UpperCamelCase       						=      int("""0b""" + data[1:3]	,		2					)
      return bin(s[row][col]					)[2:]







def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase					)->				Any:
      UpperCamelCase       						=      message[:4]
      UpperCamelCase       						=      message[4:]
      UpperCamelCase       						=      apply_table(lowerCAmelCase_	,		lowerCAmelCase_					)
      UpperCamelCase       						=      xor(lowerCAmelCase_	,		lowerCAmelCase_					)
      UpperCamelCase       						=      apply_sbox(lowerCAmelCase_	,		temp[:4]					)  # noqa: E741
      UpperCamelCase       						=      apply_sbox(lowerCAmelCase_	,		temp[4:]					)
      UpperCamelCase       						=      '''0''' * (2 - len(lowerCAmelCase_					)) + l  # noqa: E741
      UpperCamelCase       						=      '''0''' * (2 - len(lowerCAmelCase_					)) + r
      UpperCamelCase       						=      apply_table(l + r	,		lowerCAmelCase_					)
      UpperCamelCase       						=      xor(lowerCAmelCase_	,		lowerCAmelCase_					)
      return temp + right


if __name__ == "__main__":
     SCREAMING_SNAKE_CASE__											=     input('Enter 10 bit key: ')
     SCREAMING_SNAKE_CASE__											=     input('Enter 8 bit message: ')

     SCREAMING_SNAKE_CASE__											=     [6, 3, 7, 4, 8, 5, 1_0, 9]
     SCREAMING_SNAKE_CASE__											=     [3, 5, 2, 7, 4, 1_0, 1, 9, 8, 6]
     SCREAMING_SNAKE_CASE__											=     [2, 4, 3, 1]
     SCREAMING_SNAKE_CASE__											=     [2, 6, 3, 1, 4, 8, 5, 7]
     SCREAMING_SNAKE_CASE__											=     [4, 1, 3, 5, 7, 2, 8, 6]
     SCREAMING_SNAKE_CASE__											=     [4, 1, 2, 3, 2, 3, 4, 1]
     SCREAMING_SNAKE_CASE__											=     [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
     SCREAMING_SNAKE_CASE__											=     [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

     # key generation
     SCREAMING_SNAKE_CASE__											=     apply_table(key, paa_table)
     SCREAMING_SNAKE_CASE__											=     temp[:5]
     SCREAMING_SNAKE_CASE__											=     temp[5:]
     SCREAMING_SNAKE_CASE__											=     left_shift(left)
     SCREAMING_SNAKE_CASE__											=     left_shift(right)
     SCREAMING_SNAKE_CASE__											=     apply_table(left + right, pa_table)
     SCREAMING_SNAKE_CASE__											=     left_shift(left)
     SCREAMING_SNAKE_CASE__											=     left_shift(right)
     SCREAMING_SNAKE_CASE__											=     left_shift(left)
     SCREAMING_SNAKE_CASE__											=     left_shift(right)
     SCREAMING_SNAKE_CASE__											=     apply_table(left + right, pa_table)

     # encryption
     SCREAMING_SNAKE_CASE__											=     apply_table(message, IP)
     SCREAMING_SNAKE_CASE__											=     function(expansion, sa, sa, keya, temp)
     SCREAMING_SNAKE_CASE__											=     temp[4:] + temp[:4]
     SCREAMING_SNAKE_CASE__											=     function(expansion, sa, sa, keya, temp)
     SCREAMING_SNAKE_CASE__											=     apply_table(temp, IP_inv)
     print('Cipher text is:', CT)

     # decryption
     SCREAMING_SNAKE_CASE__											=     apply_table(CT, IP)
     SCREAMING_SNAKE_CASE__											=     function(expansion, sa, sa, keya, temp)
     SCREAMING_SNAKE_CASE__											=     temp[4:] + temp[:4]
     SCREAMING_SNAKE_CASE__											=     function(expansion, sa, sa, keya, temp)
     SCREAMING_SNAKE_CASE__											=     apply_table(temp, IP_inv)
     print('Plain text after decypting is:', PT)








'''simple docstring'''

import fire

from utils import calculate_rouge, save_json







def 					lowercase__				(   __UpperCamelCase	,		__UpperCamelCase	,		__UpperCamelCase=None	,		**__UpperCamelCase					)->				int:
      UpperCamelCase       						=      [x.strip() for x in open(__UpperCamelCase					).readlines()]
      UpperCamelCase       						=      [x.strip() for x in open(__UpperCamelCase					).readlines()][: len(__UpperCamelCase					)]
      UpperCamelCase       						=      calculate_rouge(__UpperCamelCase	,		__UpperCamelCase	,		**__UpperCamelCase					)
      if save_path is not None:
            save_json(__UpperCamelCase	,		__UpperCamelCase	,		indent=__UpperCamelCase					)
      return metrics  # these print nicely


if __name__ == "__main__":
     fire.Fire(calculate_rouge_path)
