Beispiel #1
0
def unzip_file(file_name, dest):
    """
    解压缩 zip 文件
    :param file_name: 压缩包名称
    :param dest: 基础路径
    :return:
    """

    # 在处理中文名时,会产生空文件夹,存储它们的路径,在解压完成后删除
    KaggleDatasetBusiness.unzip_file(file_name=file_name, dest=dest)
Beispiel #2
0
 def kaggle_download_size_update(cls,
                                 dataset_id=None,
                                 kaggle_downloading_size=None):
     result = KaggleDatasetBusiness.kaggle_dataset_update_download_size(
         dataset_id=dataset_id,
         kaggle_downloading_size=kaggle_downloading_size)
     return result
Beispiel #3
0
 def search_kaggle_list(cls, page, search, size, file_type, sort_by, tags):
     search_list = KaggleDatasetBusiness.search_list_from_kaggle(
         page=page,
         search=search,
         size=size,
         file_type=file_type,
         sort_by=sort_by,
         tags=tags)
     return list(search_list)
Beispiel #4
0
 def kaggle_dataset_update_status_and_mount(cls, dataset_id=None):
     result = KaggleDatasetBusiness.kaggle_dataset_update_status_and_mount(
         dataset_id)
     return result
Beispiel #5
0
 def kaggle_dataset_favor_action(cls, user_ID, ref, title, size):
     dataset, overview = KaggleDatasetBusiness.kaggle_dataset_favor_action(
         user_ID=user_ID, ref=ref, title=title, size=size)
     return dataset, overview
Beispiel #6
0
 def cancel_download(cls, project_id, mounted_dataset_id):
     task_cancel = KaggleDatasetBusiness.cancel_download(
         project_id, mounted_dataset_id)
     return task_cancel
Beispiel #7
0
 def add_kaggle_download_list(cls, kaggle_obj):
     add_result, overview = KaggleDatasetBusiness.add_kaggle_download_task(
         kaggle_obj)
     print('添加结果', add_result)
     return add_result, overview
Beispiel #8
0
 def download_list(cls, project_id, page=1, page_size=10):
     downloadList, total_count = KaggleDatasetBusiness.download_list(
         page=page, page_size=page_size, project_id=project_id)
     return downloadList, total_count