How to use the kaggle.api.dataset_download_files function in kaggle

To help you get started, we’ve selected a few kaggle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github intel / workload-collocation-agent / workloads / tensorflow_inference / prep_dataset_fruits.py View on Github external
import os.path
import kaggle

'''
Downloads Moltean's fruits dataset using kaggle module
(install with 'pip install -r requirements.txt')
if dataset zip file is not found.
'''

dataset = 'moltean/fruits'
dataset_dir = 'tensorflow-inference/fruits-360'
if os.path.isdir(dataset_dir):
    print("Found dataset directory, exiting")
    exit(0)
print("Dataset not found, using kaggle-api tool for download")
kaggle.api.dataset_download_files(dataset, path="./tensorflow-inference/", unzip=True)
github intel / workload-collocation-agent / workloads / tensorflow_train / prep_dataset.py View on Github external
import os.path
import kaggle

'''
Downloads blood-cells dataset using kaggle module (install with 'pip install -r requirements.txt')
if dataset zip file is not found.
'''

dataset = 'paultimothymooney/blood-cells'
dataset_file = 'tensorflow-train/dataset2-master.zip'
if os.path.isfile(dataset_file):
    print("Found dataset archive, exiting")
    exit(0)
print("Dataset not found, using kaggle-api tool for download")
kaggle.api.dataset_download_files(dataset, path="./tensorflow-train/", unzip=True)
github Kashu7100 / Qualia2.0 / qualia2 / data / fimlp.py View on Github external
def _download(self): 
        if not os.path.exists(self.root+'/'):  
            os.makedirs(self.root+'/') 
        else:
            return
        import kaggle
        kaggle.api.authenticate()
        kaggle.api.dataset_download_files('drgilermo/face-images-with-marked-landmark-points', path=self.root, unzip=True)