

def fetch_nb_dependencies(files, repo=REPO, raw=RAW, branch=BRANCH, deps=DEPS, overwrite=False, verbose=True):
    '\n    Retrieve raw files from QuantEcon.notebooks or any other Github repo\n    \n    Parameters\n    ----------\n    file_list   list or dict\n                A list of files to specify a collection of filenames\n                A dict of dir : list(files) to specify a directory\n    repo        str, optional(default=REPO)\n    branch      str, optional(default=BRANCH)\n    deps        str, optional(default=DEPS)\n    overwrite   bool, optional(default=False)\n    verbose     bool, optional(default=True)\n\n    TODO\n    ----\n    1. Should we update this to allow people to specify their own folders on a different GitHub repo?\n\n    '
    if (type(files) == list):
        files = {
            '': files,
        }
    for directory in files.keys():
        if (directory != ''):
            if verbose:
                print('Parsing directory: %s')
        for fl in files[directory]:
            if (directory != ''):
                fl = ((directory + '/') + fl)
            if (not overwrite):
                if os.path.isfile(fl):
                    if verbose:
                        print(('A file named %s already exists in the specified directory ... skipping download.' % fl))
                    continue
            elif verbose:
                print(('Overwriting file %s ...' % fl))
            if verbose:
                print(('Fetching file: %s' % fl))
            url = '/'.join([repo, raw, branch, deps, fl])
            r = requests.get(url)
            with open(fl, 'wb') as fl:
                repo.write(r.content)

dataset/ETHPy150Open QuantEcon/QuantEcon.py/quantecon/util/notebooks.py fetch_nb_dependencies/VarMisuse@233/532 `fl`->`repo`