return the file name for other diffuse map templates
179156
def diffuse_template(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)        
        localpath = NameFactory.diffuse_template_format.format(**kwargs_copy)
        if kwargs.get('fullpath', False):
            return self.fullpath(localpath=localpath)
        return localpath
68658
def _get_canonical_map(self):
        
        cacheattr = "_token2canonical"
        if not hasattr(self, cacheattr):
            # Get the list of commands and their aliases, if any.
            token2canonical = {}
            cmd2funcname = {}  # use a dict to strip duplicates
            for attr in self.get_names():
                if attr.startswith("do_"): cmdname = attr[3:]
                elif attr.startswith("_do_"): cmdname = attr[4:]
                else:
                    continue
                cmd2funcname[cmdname] = attr
                token2canonical[cmdname] = cmdname
            for cmdname, funcname in cmd2funcname.items():  # add aliases
                func = getattr(self, funcname)
                aliases = getattr(func, "aliases", [])
                for alias in aliases:
                    if alias in cmd2funcname:
                        import warnings
                        warnings.warn("'%s' alias for '%s' command conflicts "
                                      "with '%s' handler" %
                                      (alias, cmdname, cmd2funcname[alias]))
                        continue
                    token2canonical[alias] = cmdname
            setattr(self, cacheattr, token2canonical)
        return getattr(self, cacheattr)
359856
function mapImages(imageMap, srcFolder, destFolder) {
  return through.obj(function(file, enc, cb) {
    // find the relative path to image. If any pipe has changed the filename,
    // it's the original is set in orgRelative, so we look at that first.
    var relativeFrom = file.orgRelative || file.relative;
    var relativeTo = path.join(destFolder, file.relative);
    imageMap[relativeFrom] = relativeTo;
    cb(null, file);
  });
}
1251179
function getThemeByFile(file) {
        var path = file._path;
        return _.find(loadedThemes, function (item) {
            return item.file._path === path;
        });
    }
312971
function getHtmlTemplates(dirName) {
  const html_conf = [];
  // create the array of HTML plugins.
  const template = path.join(dirName, '_template.html');
  getExamples(dirName, (entryName, filename) => {
    html_conf.push(
      new HtmlWebpackPlugin({
        title: entryName,
        // ensure each output has a unique filename
        filename: entryName + '.html',
        template,
        // without specifying chunks, all chunks are
        //  included with the file.
        chunks: ['common', entryName]
      })
    );
  });
  return html_conf;
}
1130871
function(task,path,filesMap){
        var _t = [];
        for(var i in filesMap){
            filesMap[i][task] && _t.push(path + '/' + filesMap[i]['name'] + jsSuffix);
        }
        return _t;
    }
956942
def parse_map_Ks(self):
        """"""
        Kd = os.path.join(self.dir, " ".join(self.values[1:]))
        self.this_material.set_texture_specular_color(Kd)
191936
def scan_dir_for_template_files(search_dir):
    
    template_files = {}
    cf_dir = os.path.join(search_dir, 'cloudformation')
    for type in os.listdir(cf_dir):
        template_dir = os.path.join(cf_dir, type, 'templates')
        for x in os.listdir(template_dir):
            name = os.path.splitext(x)[0]
            template_files[name] = os.path.join(template_dir, x)
    return template_files
916170
function getFileNames(fileNames = [], componentName) {
  const defaultFileNames = {
    testFileName: `${defaultOptions.testFileName}.${componentName}`,
    componentFileName: componentName,
    styleFileName: componentName,
  }

  const formattedFileNames = Object.keys(fileNames).reduce(
    (acc, curr) => {
      acc[curr] = replaceKeys(fileNames[curr], componentName)
      return acc
    },
    { ...defaultFileNames }
  )

  return formattedFileNames
}
211572
def _fetch_templates(src):
    '''
    
    '''
    templates = []
    log.debug('Listing contents of %s', src)
    for item in os.listdir(src):
        s = os.path.join(src, item)
        if os.path.isdir(s):
            template_path = os.path.join(s, TEMPLATE_FILE_NAME)
            if os.path.isfile(template_path):
                templates.append(_get_template(template_path, item))
            else:
                log.debug("Directory does not contain %s %s", template_path,
                          TEMPLATE_FILE_NAME)
    return templates
941353
function filterFile(template) {
  // Find matches for parans
  var filterMatches = template.match(/\(([^)]+)\)/g);
  var filters = [];
  if (filterMatches) {
    filterMatches.forEach(function(filter) {
      filters.push(filter.replace('(', '').replace(')', ''));
      template = template.replace(filter, '');
    });
  }

  return { name: template, filters: filters };
}
708305
def getCMakeFlags(self, engineRoot, fmt):
		
		return Utility.join(
			fmt.delim,
			[
				'-DCMAKE_PREFIX_PATH=' + self.getPrefixDirectories(engineRoot, ';'),
				'-DCMAKE_INCLUDE_PATH=' + self.getIncludeDirectories(engineRoot, ';'),
				'-DCMAKE_LIBRARY_PATH=' + self.getLinkerDirectories(engineRoot, ';'),
			] + self.resolveRoot(self.cmakeFlags, engineRoot),
			fmt.quotes
		)
228364
def _map_in_out(self, inside_var_name):
        """"""
        for out_name, in_name in self.outside_name_map.items():
            if inside_var_name == in_name:
                return out_name
        return None
927601
def image_mapped(name):
    """"""
    try:
        out = check_output(['rbd', 'showmapped'])
        if six.PY3:
            out = out.decode('UTF-8')
    except CalledProcessError:
        return False

    return name in out
607984
def _compose_cheetah_template_map(cache):
    

    from .cheetah import get_templates

    # pylint: disable=W0406
    # needed for introspection
    import javatools

    for template_type in get_templates():
        if "_" not in template_type.__name__:
            # we use the _ to denote package and class names. So any
            # template without a _ in the name isn't meant to be
            # matched to a change type.
            continue

        # get the package and change class names based off of the
        # template class name
        tn = template_type.__name__
        pn, cn = tn.split("_", 1)

        # get the package from javatools
        pk = getattr(javatools, pn, None)
        if pk is None:
            __import__("javatools." + pn)
            pk = getattr(javatools, pn, None)

        # get the class from the package
        cc = getattr(pk, cn, None)
        if cc is None:
            raise Exception("no change class for template %s" % tn)

        # associate a Change class with a Template class
        cache[cc] = template_type

    return cache
1101912
function getTplPath(tpl) {
  const tplFile = path.join(__dirname, './templates', tpl);
  const customTplDir =
    _.get(config.getRekitConfig(), 'rekitReact.templateDir') ||
    path.join(paths.map('.rekit-react/templates'));
  const customTplFile = path.join(customTplDir, tpl);
  return fs.existsSync(customTplFile) ? customTplFile : tplFile;
}
1026923
def _get_template_dirs():
    """"""
    return filter(lambda x: os.path.exists(x), [
        # user dir
        os.path.join(os.path.expanduser('~'), '.py2pack', 'templates'),
        # system wide dir
        os.path.join('/', 'usr', 'share', 'py2pack', 'templates'),
        # usually inside the site-packages dir
        os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates'),
    ])