top of page
!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.
bottom of page
  import subprocess
  import pathlib
  import requests
  from tqdm import tqdm
  import pandas as pd
  
  # Destination folder for the downloaded files
  dir_dest = pathlib.Path(__file__).absolute().parent.parent / "dataset"
  try:
      # Send GET request to Github API
      r = requests.get(
          (
              "https://api.github.com/repos/shandou/"
              "data-sets/contents"
          )
      )
      r.raise_for_status()
  except requests.exceptions.HTTPError as e:
      print(f"requests failed with error {e}")
  else:
      # When requests succeed, pack returned JSON into pandas dataframe
      df = pd.read_json(r.content)