top of page
If you liked what you read or would want me to write on a specific topic, please leave your feedback in the form below. 
Feedback is a Gift
RatingPoorFairGoodVery goodExcellentRating

Thank you for your message!

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)