
'''simple docstring'''







def 					UpperCAmelCase_		(__a      :    str ):






   """simple docstring"""

   _a				:	Optional[int]			=   ''
   for ch in key:
      if ch == " " or ch not in key_no_dups and ch.isalpha():
         key_no_dups += ch
   return key_no_dups





def 					UpperCAmelCase_		(__a      :    str ):






   """simple docstring"""

   _a				:	Any			=   [chr(i + 6_5 ) for i in range(2_6 )]
   # Remove duplicate characters from key
   _a				:	List[str]			=   remove_duplicates(key.upper() )
   _a				:	int			=   len(__a )
   # First fill cipher with key characters
   _a				:	Tuple			=   {alphabet[i]: char for i, char in enumerate(__a )}
   # Then map remaining characters in alphabet to
   # the alphabet from the beginning
   for i in range(len(__a ) ,	2_6 ):
      _a				:	List[str]			=   alphabet[i - offset]
      # Ensure we are not mapping letters to letters previously mapped
      while char in key:
         offset -= 1
         _a				:	Dict			=   alphabet[i - offset]
      _a				:	Optional[int]			=   char
   return cipher_alphabet





def 					UpperCAmelCase_		(__a      :    str ,	__a      :    dict[str, str] ):






   """simple docstring"""

   return "".join(cipher_map.get(__a ,	__a ) for ch in message.upper() )





def 					UpperCAmelCase_		(__a      :    str ,	__a      :    dict[str, str] ):






   """simple docstring"""

   _a				:	List[Any]			=   {v: k for k, v in cipher_map.items()}
   return "".join(rev_cipher_map.get(__a ,	__a ) for ch in message.upper() )





def 					UpperCAmelCase_		():






   """simple docstring"""

   _a				:	Any			=   input('Enter message to encode or decode: ' ).strip()
   _a				:	Tuple			=   input('Enter keyword: ' ).strip()
   _a				:	str			=   input('Encipher or decipher? E/D:' ).strip()[0].lower()
   try:
      _a				:	str			=   {'e': encipher, 'd': decipher}[option]
   except KeyError:
      raise KeyError('invalid input option' )
   _a				:	Dict			=   create_cipher_map(__a )
   print(func(__a ,	__a ) )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()





'''simple docstring'''







import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


__lowerCAmelCase         =    HUGGINGFACE_HUB_CACHE


__lowerCAmelCase         =    """config.json"""
__lowerCAmelCase         =    """diffusion_pytorch_model.bin"""
__lowerCAmelCase         =    """diffusion_flax_model.msgpack"""
__lowerCAmelCase         =    """model.onnx"""
__lowerCAmelCase         =    """diffusion_pytorch_model.safetensors"""
__lowerCAmelCase         =    """weights.pb"""
__lowerCAmelCase         =    """https://huggingface.co"""
__lowerCAmelCase         =    default_cache_path
__lowerCAmelCase         =    """diffusers_modules"""
__lowerCAmelCase         =    os.getenv("""HF_MODULES_CACHE""", os.path.join(hf_cache_home, """modules"""))
__lowerCAmelCase         =    ["""fp16""", """non-ema"""]
__lowerCAmelCase         =    """.self_attn"""



