def fetch_nb_dependencies(files, repo=REPO, raw=RAW, branch=BRANCH, deps=DEPS, overwrite=False, verbose=True):
 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:
    fl.write(r.content)

def fetch_nb_dependencies ( files , repo = REPO , raw = RAW , branch = BRANCH , deps = DEPS , overwrite = False , verbose = True ) : 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 : fl . write ( r . content )
retrieve raw files from quantecon .