<jupyter_start><jupyter_text>Helpers about filesHow to compress, encrypt, decrypt files with pyquickhelper.  compress<jupyter_code>from pyquickhelper.filehelper import download, gzip_files, zip7_files, zip_files
download("https://docs.python.org/3.4/library/urllib.request.html")
gzip_files("request.html.gz", ["urllib.request.html"])
import os
os.listdir(".")
ipy = [ _ for _ in os.listdir(".") if ".ipynb" in _ ]
if os.path.exists("request.html.zip"):
    os.remove("notebooks.zip")
zip_files("notebooks.zip", ipy)<jupyter_output><empty_output><jupyter_text>The following example get all files registered in a repository GIT or SVN.<jupyter_code>from pyquickhelper.filehelper import explore_folder_iterfile_repo
files = list ( explore_folder_iterfile_repo(".") )
files<jupyter_output><empty_output><jupyter_text>encrypt, decrypt<jupyter_code>%load_ext pyquickhelper
%encrypt_file notebooks.zip notebooks.enc passwordpassword
%decrypt_file notebooks.enc notebooks2.zip passwordpassword<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11614173228346457, 'fraction_numerical': 0.003937007874015748, 'mean_word_length': 8.0, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '27007', 'license': 'MIT', 'n_tokens_mistral': 346, 'n_tokens_neox': 346, 'n_words': 64, 'path': '_unittests/ut_helpgen/notebooks_rst_end/example_about_files.ipynb', 'repo_name': 'janjagusch/pyquickhelper', 'size': '1016'}