GithubHelp home page GithubHelp logo

chengchingwen / fetch.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from foldfelis/fetch.jl

0.0 2.0 0.0 141 KB

Fetch datasets from GoogleDrive and Kaggle

Home Page: https://foldfelis.github.io/Fetch.jl/dev/

License: MIT License

Julia 100.00%

fetch.jl's Introduction

Fetch

Stable Dev Build Status Coverage

Quick start

The package can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add Fetch

Download file from Google drive

Download file or Google Sheet from Google drive via the share link:

using Fetch
link = "https://drive.google.com/file/d/1OiX6gEWRm57kb1H8L0K_HWN_pzc-sk8y/view?usp=sharing"
gdownload(link, pwd())

Download dataset from Kaggle

Download dataset from Kaggle via the name of dataset:

using Fetch
dataset = "ningjingyu/fetchtest"
kdownload(dataset, pwd())

Or via the url of the home page of the dataset:

using Fetch
url = "https://www.kaggle.com/ningjingyu/fetchtest"
kdownload(url, pwd())

Intergrate with DataDeps.jl

According to DataDeps.jl, DataDep can be construct as following:

DataDep(
    name::String,
    message::String,
    remote_path::Union{String,Vector{String}...},
    [checksum::Union{String,Vector{String}...},];
    fetch_method=fetch_default
    post_fetch_method=identity
)

By using Fetch.jl, one can upload their dataset to Google drive, and construct DataDep by setting fetch_method=gdownload.

using DataDeps
using Fetch

register(DataDep(
    "FetchTest",
    """Test dataset""",
    "https://drive.google.com/file/d/1OiX6gEWRm57kb1H8L0K_HWN_pzc-sk8y/view?usp=sharing",
    "b083597a25bec4c82c2060651be40c0bb71075b472d3b0fabd85af92cc4a7076",
    fetch_method=gdownload,
    post_fetch_method=unpack
))

datadep"FetchTest"

Or to Kaggle

using DataDeps
using Fetch

register(DataDep(
    "FetchTest",
    """Test dataset""",
    "ningjingyu/fetchtest",
    "65492e1f4c6affb7955125e5e4cece2bb547e482627f3af9812c06448dae40a9",
    fetch_method=kdownload,
    post_fetch_method=unpack
))

datadep"FetchTest"

According to the document of Kaggle-api one needs to set their environment variables KAGGLE_USERNAME and KAGGLE_KEY, or simply download the api token from Kaggle, and place this file in the location ~/.kaggle/kaggle.json (on Windows in the location C:\Users\<Windows-username>\.kaggle\kaggle.json).

fetch.jl's People

Contributors

chengchingwen avatar foldfelis avatar github-actions[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.