Example #1
0
def get(ctx, dataset, rm, keep_compressed, dont_process, keep_raw, kwargs):
    "performs the operations download, extract, rm_compressed, processes and rm_raw, in sequence. KWARGS must be in the form: key=value, and are fowarded to all opeartions."

    kwargs = parse_kwargs(kwargs)

    process = not dont_process
    rm_raw = not keep_raw
    rm_compressed = not keep_compressed

    data(dataset, ctx.obj["path"]).get(rm=rm,
                                       rm_compressed=rm_compressed,
                                       process=process,
                                       rm_raw=rm_raw,
                                       **kwargs)
Example #2
0
def reqs(ctx, dataset, kwargs):
    "Get the dataset's pip requirements"

    kwargs = parse_kwargs(kwargs)
    (print)(data(dataset, ctx.obj["path"]).reqs(**kwargs))
Example #3
0
def process(ctx, dataset, kwargs):
    "processes the data to a friendly format"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).process(**kwargs)
Example #4
0
def rm_raw(ctx, dataset, kwargs):
    "removes the raw unprocessed data"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).rm_raw(**kwargs)
Example #5
0
def rm_compressed(ctx, dataset, kwargs):
    "removes the compressed files"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).rm_compressed(**kwargs)
Example #6
0
def extract(ctx, dataset, kwargs):
    "extracts the files from the compressed archives"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).extract(**kwargs)
Example #7
0
def download(ctx, dataset, rm, kwargs):
    "downloads the dataset's compressed files"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).download(rm=rm, **kwargs)
Example #8
0
def rm_subsets(ctx, dataset, kwargs):
    "removes the dataset's training-set and test-set folders if they exists"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).rm_subsets(**kwargs)
Example #9
0
def rm(ctx, dataset, kwargs):
    "removes the dataset's folder if it exists"

    kwargs = parse_kwargs(kwargs)
    data(dataset, ctx.obj["path"]).rm(**kwargs)