


"""simple docstring"""






import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


__snake_case		=       HUGGINGFACE_HUB_CACHE


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



"""simple docstring"""






from pathlib import Path

import fire
def       A_   (   _lowerCAmelCase     :					str,     _lowerCAmelCase     :					str,     _lowerCAmelCase     :					int       ):






     """simple docstring"""

     _a    	=				Path(_lowerCAmelCase       )
     _a    	=				Path(_lowerCAmelCase       )
     dest_dir.mkdir(exist_ok=_lowerCAmelCase       )
     for path in src_dir.iterdir():
          _a    	=				[x.rstrip() for x in list(path.open().readlines()       )][:n]
          _a    	=				dest_dir.joinpath(path.name       )
          print(_lowerCAmelCase       )
          dest_path.open('''w'''       ).write('''\n'''.join(_lowerCAmelCase       )       )


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