Lists builtin and installed templates.
774252
def list
      print_template = lambda { |path|
        puts "  #{File.basename(path)}"
      }

      say "Builtin templates:", :green
      Config.builtin_templates(&print_template)

      say "Installed templates:", :green
      Config.installed_templates(&print_template)
    end
710363
def get_page_templates():
    """"""
    PAGE_TEMPLATES = get_setting('PAGE_TEMPLATES',
        default_value=())
    if isinstance(PAGE_TEMPLATES, collections.Callable):
        return PAGE_TEMPLATES()
    else:
        return PAGE_TEMPLATES
669121
def iterate_templates(self):
        
        return [t for dd in self.dirs for t in Template.scan(dd)]
611565
function getEnvsListForTemplate(){
		var envsList = [];
		var keys = Object.keys(allEnvs).sort();
		for(var j = 0; j < keys.length; j++) {
			var key = keys[j];
			if(key !== 'builtin'){
				envsList.push(key);
			}
		}
		var templateList = {
			type: "link", //$NON-NLS-0$
			values: envsList,
			title: 'ESLint Environments',
			style: 'no_emphasis' //$NON-NLS-1$
		};
		return JSON.stringify(templateList).replace("}", "\\}");
	}
609256
def get_template_names(self):
        
        #noinspection PyUnresolvedReferences
        if self.request.is_ajax():
            template_name = '/results.html'
        else:
            template_name = '/index.html'

        return ['{0}{1}'.format(self.template_dir, template_name)]
1039407
private function _getTemplateList()
    {
        $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
        sort($dirlist);
        foreach ($dirlist as $file) {
            $tpl_ext = substr($file, strlen($file) - 4);
            $tpl_name = substr($file, 0, strlen($file) - 4);
            if ($tpl_ext === ".css") {
                if (preg_match("/(\S+)_bootstrap$/", $tpl_name, $ar_buf)) {
                    array_push($this->_bootstrap_templates, $ar_buf[1]);
                } else {
                    array_push($this->_templates, $tpl_name);
                }
            }
        }
    }
809337
def clear_installed_templates
      install_path = Pathname.new(TEMPLATES_FOLDER)
      FileUtils.rm_rf(Dir.glob(install_path))
    end
1373859
def list_installed_files(self):
        

        def _md5(path):
            f = open(path, 'rb')
            try:
                content = f.read()
            finally:
                f.close()
            return hashlib.md5(content).hexdigest()

        def _size(path):
            return os.stat(path).st_size

        record_path = os.path.join(self.path, 'installed-files.txt')
        result = []
        if os.path.exists(record_path):
            with codecs.open(record_path, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.strip()
                    p = os.path.normpath(os.path.join(self.path, line))
                    # "./" is present as a marker between installed files
                    # and installation metadata files
                    if not os.path.exists(p):
                        logger.warning('Non-existent file: %s', p)
                        if p.endswith(('.pyc', '.pyo')):
                            continue
                        #otherwise fall through and fail
                    if not os.path.isdir(p):
                        result.append((p, _md5(p), _size(p)))
            result.append((record_path, None, None))
        return result
239774
def listCLIExecutables(baseDir):
    """"""
    return [path for path in glob.glob(os.path.join(os.path.normpath(baseDir), '*'))
            if isCLIExecutable(path)]
662254
def template_list(call=None):
    '''
    

    '''
    templates = {}
    session = _get_session()
    vms = session.xenapi.VM.get_all()
    for vm in vms:
        record = session.xenapi.VM.get_record(vm)
        if record['is_a_template']:
            templates[record['name_label']] = record
    return templates
107190
protected function installTemplates()
    {
        $path = $this->getCodeDir() . '/client/templates';
        if (file_exists($path))
        {
            $ts = Eresus_Template_Service::getInstance();
            $it = new DirectoryIterator($path);
            foreach ($it as $fileInfo)
            {
                /** @var DirectoryIterator $fileInfo */
                if (!$fileInfo->isDot())
                {
                    $ts->install($fileInfo->getPathname(), $this->getName());
                }
            }
        }
    }
218445
def filter_installed_packages(packages):
    """"""
    cache = apt_cache()
    _pkgs = []
    for package in packages:
        try:
            p = cache[package]
            p.current_ver or _pkgs.append(package)
        except KeyError:
            log('Package {} has no installation candidate.'.format(package),
                level='WARNING')
            _pkgs.append(package)
    return _pkgs
368721
function list() {
  return installer.listPlugins(function(listErr, plugins) {
    if (listErr) {
      return out.error("error : %s", listErr);
    }
    if (plugins.length === 0) {
      return out.success("no plugins found");
    }
    var string = "";
    for (var idx = 0; idx < plugins.length; idx++) {
      string += "  " + (idx + 1) + ".  " + plugins[idx].name +
        " - " + plugins[idx].description + "\n";
    }
    return out.success("installed plugins:\n%s", string);
  });
}
247448
def list_plugins(directory=None):
    """"""
    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    if not plugins or not isinstance(plugins, dict):
        return None
    return plugins.keys()
669374
def display_modules_list(self):
        """"""
        print("Plugins list: {}".format(
            ', '.join(sorted(self.stats.getPluginsList(enable=False)))))
        print("Exporters list: {}".format(
            ', '.join(sorted(self.stats.getExportsList(enable=False)))))
220255
def get_base_templates():
    "  "

    return sorted(filter(
                  lambda x: op.isdir(op.join(TPL_DIR, x)),
                  listdir(TPL_DIR)))
2427
def list():
    ''''''
    for cls, metrics in metric_catalog.items():
        echo(white(cls.__name__))

        for metric in metrics.keys():
            echo('> {0}'.format(metric))