learning/Python9 [Python] 파일압축 및 압축풀기 [압축] import shutil shutil.make_archive(저장 경로 및 파일명, 'zip', 압축할 파일경로) ex) shutil.make_archive('./zip_results', 'zip', './results/') [압축해제] dir_zip = '/home/datasets/test.zip' dir_extract = '/home/datasets/test' import zipfile with zipfile.ZipFile(dir_zip, 'r') as zip_ref: zip_ref.extractall(dir_extract) 2022. 6. 2. [Python] GPU 제한 [ TF ] gpu 제한 명령어 gpu = tf.config.experimental.list_physical_devices('GPU') if gpu: tf.config.experimental.set_virtual_device_configuration(gpu[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit = 7 * 1024)]) 2022. 4. 15. [Linux] 파일 돌리기 보호되어 있는 글 입니다. 2022. 2. 14. 이전 1 2 다음