분명히 새벽 2시 30분에 잠자리에 들기전에 마지막으로 확인했을 때 9만개의 파일 중에 4만개가 업로드 되고 있었는데... 아침에 일어나니까 솜씻는 너구리가 됨... 갑자기 사라짐...
열 받아서 생각해보니까 구글 드라이브에서 바로 받을 수 있지 않나? 싶어서 갑자기 진행했는데
됨.... 세상에 ㅇ0ㅇ... 불편한 점이 있다면 다운로드와 압축해제를 하는데 3시간 걸림.
from zipfile import ZipFile
import gdown
import argparse
file_destinations = {
'FaceMaskDetection': '압축파일이름.zip을 넣어주세요', }
file_id_dic = {
'FaceMaskDetection': '구글 드라이브 키를 넣어주세요'
}
def download_file_from_google_drive(id_, destination):
url = f"https://drive.google.com/uc?id={id_}"
output = destination
gdown.download(url, output, quiet=True)
print(f"{output} download complete")
parser = argparse.ArgumentParser(description='data loader ... ')
parser.add_argument('--data', type=str, help='key for selecting data..!!')
args = parser.parse_args()
download_file_from_google_drive(
id_=file_id_dic[args.data], destination=file_destinations[args.data]
)
test_file_name = "./QC_raw.zip"
with ZipFile(test_file_name, 'r') as zip:
zip.printdir()
zip.extractall()
세상... 첨부터 이걸 썼으면... 쓸데없이 밤새도록 컴퓨터 켜놓지도 않았을거고...
파일 올라가다가 터질까봐 조마조마 하지 않았어도 되는데...
어제 저녁의 전기세는... 멍충비용...