Return the path to the fortunes data packs.
766110
def get_fortunes_path():
    
    app_config = apps.get_app_config("fortune")
    return Path(os.sep.join([app_config.path, "fortunes"]))
602841
def _get_pltdag_path_hdr(self, hdrgo, usrgos, desc="pruned"):
        """"""
        go_sources = usrgos.union([hdrgo])
        gosubdag = GoSubDag(go_sources,
                            self.gosubdag.get_go2obj(go_sources),
                            relationships=self.gosubdag.relationships,
                            rcntobj=self.gosubdag.rcntobj,
                            go2nt=self.gosubdag.go2nt,
                            dst_srcs_list=[(hdrgo, usrgos), (None, set([hdrgo]))])
        tot_usrgos = len(set(gosubdag.go2obj.keys()).intersection(self.usrgos))
        return self.ntpltgo(
            hdrgo=hdrgo,
            gosubdag=gosubdag,
            tot_usrgos=tot_usrgos,
            parentcnt=True,
            desc=desc)
637929
def get_all(self):
        """"""
        logger.debug('Fetching items. Path: {data_file}'.format(
            data_file=self.data_file
        ))

        return load_file(self.data_file)
1117145
def get(self):
        """"""
        options = {}
        for x in [self.axes, self.graphics, self.layout]:
            for k, v in list(x.get().items()):
                options[k] = v

        return options
641195
def histpath(self):
        """"""
        from os import path
        from fortpy import settings
        return path.join(settings.cache_directory, "history")
432750
def get_pythainlp_data_path() -> str:
    
    path = os.path.join(os.path.expanduser("~"), PYTHAINLP_DATA_DIR)
    if not os.path.exists(path):
        os.makedirs(path)
    return path
1176832
def paths(self):
        
        paths = traversal.closed_paths(self.entities,
                                       self.vertices)
        return paths
1267622
def getSourcePaths(self, makeGlyphs=True, makeKerning=True, makeInfo=True):
        
        paths = []
        for name in self.sources.keys():
            paths.append(self.sources[name][0].path)
        return paths
755330
def get_paths(patterns, start_dirs=None, max_depth=1):
    """"""
    # Shortcut: if there is only one pattern, make sure we process just that.
    if len(patterns) == 1 and not start_dirs:
        pattern = patterns[0]
        directory = os.path.dirname(pattern)
        if directory:
            patterns = [os.path.basename(pattern)]
            start_dirs = directory
            max_depth = 1

    if not start_dirs or start_dirs == '.':
        start_dirs = os.getcwd()
    for start_dir in start_dirs.split(','):
        for root, dirs, files in os.walk(start_dir):  # pylint: disable=W0612
            if max_depth is not None:
                relpath = os.path.relpath(root, start=start_dir)
                depth = len(relpath.split(os.sep))
                if depth > max_depth:
                    continue
            names = []
            for pattern in patterns:
                names += fnmatch.filter(files, pattern)
            for name in names:
                path = os.path.join(root, name)
                yield path
845560
def data_item_path(cls, project, dataset, data_item):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/datasets/{dataset}/dataItems/{data_item}",
            project=project,
            dataset=dataset,
            data_item=data_item,
        )
1009956
def _download_datasets():
    """"""
    def filepath(*args):
        return abspath(join(dirname(__file__), '..', 'vega_datasets', *args))
    dataset_listing = {}
    for name in DATASETS_TO_DOWNLOAD:
        data = Dataset(name)
        url = data.url
        filename = filepath('_data', data.filename)
        print("retrieving data {0} -> {1}".format(url, filename))
        urlretrieve(url, filename)
        dataset_listing[name] = '_data/{0}'.format(data.filename)
    with open(filepath('local_datasets.json'), 'w') as f:
        json.dump(dataset_listing, f, indent=2, sort_keys=True)
1364324
def get_variables_path(export_dir):
  """"""
  return os.path.join(
      tf.compat.as_bytes(export_dir),
      tf.compat.as_bytes(tf_v1.saved_model.constants.VARIABLES_DIRECTORY),
      tf.compat.as_bytes(tf_v1.saved_model.constants.VARIABLES_FILENAME))
502147
def paths(self):
        """"""
        contents = os.listdir(self.path)
        contents = (os.path.join(self.path, path) for path in contents)
        contents = (VenvPath(path) for path in contents)
        return contents
475440
def get_paths(rlz):
    
    dic = {}
    if hasattr(rlz, 'sm_lt_path'):  # composite realization
        dic['source_model_tree_path'] = '_'.join(rlz.sm_lt_path)
        dic['gsim_tree_path'] = '_'.join(rlz.gsim_lt_path)
    else:  # simple GSIM realization
        dic['source_model_tree_path'] = ''
        dic['gsim_tree_path'] = '_'.join(rlz.lt_path)
    return dic
929131
def _items_to_rela_paths(self, items):
        """"""
        paths = []
        for item in items:
            if isinstance(item, (BaseIndexEntry, (Blob, Submodule))):
                paths.append(self._to_relative_path(item.path))
            elif isinstance(item, string_types):
                paths.append(self._to_relative_path(item))
            else:
                raise TypeError("Invalid item type: %r" % item)
        # END for each item
        return paths
857722
def _get_learning_data_path(self):
        
        for res in self.dsDoc['dataResources']:
            resPath = res['resPath']
            resType = res['resType']

            dirname = os.path.basename(os.path.normpath(os.path.dirname(resPath)))

            if resType == 'table' and dirname == 'tables':
                if 'learningData.csv' in res['resPath']:
                    return os.path.join(self.dsHome, resPath)

        # if the for loop is over and learningDoc is not found, then return None
        raise RuntimeError('could not find learningData file the dataset')
303847
def granule_paths(self, band_id):
        """"""
        band_id = str(band_id).zfill(2)
        try:
            assert isinstance(band_id, str)
            assert band_id in BAND_IDS
        except AssertionError:
            raise AttributeError(
                "band ID not valid: %s" % band_id
                )
        return [
            granule.band_path(band_id)
            for granule in self.granules
            ]