def get_file_name(filepath, extension=True):
  name = filepath.split("/")[-1]
  if extension:
    return name
  else:
    return name.split(".")[0]
Returns the name of the file of a given filepath or url.
dataset/ETHPy150Open google/fplutil/setuputil/util.py/get_file_name