Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chiehpower/ce62a94752e3903ba9f8c694c4122d13 to your computer and use it in GitHub Desktop.
Save chiehpower/ce62a94752e3903ba9f8c694c4122d13 to your computer and use it in GitHub Desktop.
Give the file name and location and return the whole path
File = 'file_name.txt'
Location = '/home/chieh/(Path)'
File_path = os.path.join(os.path.abspath(Location), File)
assert os.path.isfile(File_path), "Cannot find the file_name.txt file."
with open(File_path, 'r') as f:
data = f.read().splitlines()
@chiehpower
Copy link
Author

git submodule

For example

git clone --recurse-submodules https://github.com/chiehpower/Anomaly_detection.git

or

git clone -b master https://github.com/chiehpower/Anomaly_detection.git
cd Anomaly_detection
git submodule update --init --recursive

@chiehpower
Copy link
Author

加密壓縮

zip -rP [密碼放於此] test.zip 1.txt

說明:將目錄下1.txt加密壓縮成test.zip

解密+解壓縮

unzip -P [密碼放於此] test.zip
說明:將目錄下test.zip解壓縮

Source from : https://kinomelma.pixnet.net/blog/post/30626794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment