These attributes "partially" instantiate a template for align, with a set of constants
3754
void align_static(Bindings bindings1) {
        bindings1.addAttribute(VAR_CONSUMED_NAME, prim(ROLE_IMG));
        bindings1.addAttribute(VAR_CONSUMED_NAME, prim(ROLE_HDR));
        bindings1.addAttribute(VAR_CONSUMED_NAME, prim(ROLE_IMG_REF));
        bindings1.addAttribute(VAR_CONSUMED_NAME, prim(ROLE_HDR_REF));     
        bindings1.addAttribute(VAR_CONSUMED_TYPE, prim(FILE));
        bindings1.addAttribute(VAR_CONSUMED_TYPE, prim(FILE));
        bindings1.addAttribute(VAR_CONSUMED_TYPE, prim(FILE));
        bindings1.addAttribute(VAR_CONSUMED_TYPE, prim(FILE));
        
        bindings1.addAttribute(VAR_BLOCK_TYPE,    prim(ALIGN_WARP));
        bindings1.addAttribute(VAR_PRODUCED_TYPE, prim(FILE));
        bindings1.addAttribute(VAR_PRODUCED_NAME, prim(ROLE_OUT));


        
    }
422255
function(template, context, partials) {
        if(!this.includes("#", template) && !this.includes("^", template)) {
          return template;
        }

        var that = this;
        // CSW - Added "+?" so it finds the tighest bound, not the widest
        var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag +
                "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
                "\\s*", "mg");

        // for each {{#foo}}{{/foo}} section do...
        return template.replace(regex, function(match, type, name, content) {
          var value = that.find(name, context);
          if(type == "^") { // inverted section
            if(!value || that.is_array(value) && value.length === 0) {
              // false or empty list, render it
              return that.render(content, context, partials, true);
            } else {
              return "";
            }
          } else if(type == "#") { // normal section
            if(that.is_array(value)) { // Enumerable, Let's loop!
              return that.map(value, function(row) {
                return that.render(content, that.create_context(row),
                  partials, true);
              }).join("");
            } else if(that.is_object(value)) { // Object, Use it as subcontext!
              return that.render(content, that.create_context(value),
                partials, true);
            } else if(typeof value === "function") {
              // higher order section
              return value.call(context, content, function(text) {
                return that.render(text, context, partials, true);
              });
            } else if(value) { // boolean section
              return that.render(content, context, partials, true);
            } else {
              return "";
            }
          }
        });
      }
596305
function getTemplate(sName,sPrefix) {
    var tp = typeof sName;
    if (tp != 'string') {
      if (reactIsValid_(sName)) {
        iTagType = 3;
        return sName;   // sName is ReactElement
      }
      else if (tp == 'function') {
        iTagType = 2;
        return sName;
      }
      else return null; // error
    }
    
    var temp, shadowCls = sPrefix? W.$main[sPrefix]: null;
    if (!shadowCls) {   // if has shadowCls, not use cached template
      temp = dTempSet[sName];
      if (temp || temp === null) {
        iTagType = 0;
        return temp;
      }
    }
    
    var ch, b = sName.split('.'), sAttr = b.shift();
    if (b.length == 0 && ((ch=sAttr[0]) < 'A' || ch > 'Z')) {
      iTagType = 1;
      return sAttr;     // createClass_(sAttr); // such as: ['div',{}]
    }
    else iTagType = 0;
    
    temp = T[sAttr];
    while (temp && (sAttr = b.shift())) {
      temp = temp[sAttr];
    }
    if (!temp || !temp._extend)
      dTempSet[sName] = temp = null;  // set null, no try next time
    else {
      if (shadowCls)
        temp = createClass_(temp._extend(shadowCls));
      else dTempSet[sName] = temp = createClass_(temp._extend());
    }
    return temp;
  }
273249
def concatenate_attributes(attributes):
    ''''''
    # We get a template/
    tpl = attributes[0]
    attr = InstanceAttribute(tpl.name, tpl.shape, 
                             tpl.dtype, tpl.dim, alias=None)
    
    # Special case, not a single array has size bigger than 0
    if all(a.size == 0 for a in attributes):
        return attr
    else: 
        attr.value = np.concatenate([a.value for a in attributes if a.size > 0], axis=0)
        return attr
1045572
function builtTemplateFromString(str, filename, options) {

  try {
    var config = {};

    // config at the beginning of the file
    str.replace(settings.config, function(m, conf) {
      config = yaml.safeLoad(conf);
    });

    // strip comments
    if (settings.stripComment) {
      str = str.replace(settings.comment, function(m, code, assign, value) {
        return '';
      });
    }

    // strip whitespace
    if (settings.stripWhitespace) {
      settings.dot.strip = settings.stripWhitespace;
    }

    // layout sections
    var sections = {};

    if (!config.layout) {
      sections.body = str;
    }
    else {
      str.replace(settings.dot.define, function(m, code, assign, value) {
        sections[code] = value;
      });
    }

    var templateSettings = _.pick(options, ['settings']);
    options.getTemplate && (templateSettings.getTemplate = options.getTemplate);
    return new Template({
      express: templateSettings,
      config: config,
      sections: sections,
      dirname: path.dirname(filename),
      filename: filename
    });
  }
  catch (err) {
    throw new Error(
      'Failed to build template' +
      ' (' + filename + ')' +
      ' - ' + err.toString()
    );
  }
}
26503
function loadPartials(template, templatePath) {
    var templateDir = path.dirname(templatePath)

    var partialRegexp = new RegExp(
      escapeRegex(mustache.tags[0]) +
        '>\\s*(\\S+)\\s*' +
        escapeRegex(mustache.tags[1]),
      'g'
    )

    var partialMatch
    while ((partialMatch = partialRegexp.exec(template))) {
      var partialName = partialMatch[1]

      if (!partials[partialName]) {
        try {
          var partialPath = null
          var partial = null

          // ignore `partial` with file extension.
          // e.g.
          //   1, `{{> ./path/to/partial.html }}`
          //   2, `{{> ./path/to/partial. }}`
          if (path.extname(partialName) !== '') {
            partialPath = path.resolve(templateDir, partialName)
            partial = fs.readFileSync(partialPath, 'utf8')
          } else {
            // ignore `partial` file is exists without file extension.
            // e.g.
            //   1, `{{> ./path/to/partial }}` is exists.
            //   2, `{{> ./path/to/.partial }}` is exists.
            partialPath = path.resolve(templateDir, partialName)

            if (fs.existsSync(partialPath)) {
              partial = fs.readFileSync(partialPath, 'utf8')
            } else {
              // or check if `partial + options.extension` is exists.
              // e.g.
              //   if `options.extension` equals ".html":
              //   the `{{> ./path/to/partial }}` will load
              //   `./path/to/partial.html`.
              if (typeof options.extension === 'string') {
                partialPath = path.resolve(
                  templateDir,
                  partialName + options.extension
                )

                if (fs.existsSync(partialPath)) {
                  partial = fs.readFileSync(partialPath, 'utf8')
                }
              }

              // when `options.extension` is not a string or
              // `partialName + options.extension` does not exists.
              // try use `.mustache` extension to load `partial` file.
              if (partial === null) {
                partialPath = path.resolve(
                  templateDir,
                  partialName + '.mustache'
                )

                partial = fs.readFileSync(partialPath, 'utf8')
              }
            }
          }

          partials[partialName] = partial
          loadPartials.call(this, partial, partialPath)
        } catch (ex) {
          this.emit(
            'error',
            new PluginError(
              'gulp-mustache',
              // use `ex.message` property instead of `partialPath`,
              // because `this.emit()` seems not a sync method.
              // also the `ex.message` property provide more details
              // about error information.
              'Unable to load partial file: ' + ex.message
            )
          )
        }
      }
    }
  }
714683
def _align(terms):
    """"""
    try:
        # flatten the parse tree (a nested list, really)
        terms = list(com.flatten(terms))
    except TypeError:
        # can't iterate so it must just be a constant or single variable
        if isinstance(terms.value, pd.core.generic.NDFrame):
            typ = type(terms.value)
            return typ, _zip_axes_from_type(typ, terms.value.axes)
        return np.result_type(terms.type), None

    # if all resolved variables are numeric scalars
    if all(term.is_scalar for term in terms):
        return _result_type_many(*(term.value for term in terms)).type, None

    # perform the main alignment
    typ, axes = _align_core(terms)
    return typ, axes
1095722
function setupViewPartials() {
  
  // Set view path association object
  this.views.pathAsoc = {};

  // Partial & template regexes
  var self = this;
  var exts = this.templateExtensions;
  var partialRegex = new RegExp('\/views\/(.+)\/partials\/[a-zA-Z0-9-_]+\\.(' + exts.join('|') + ')$');
  var templateRegex = new RegExp('\\.(' + exts.join('|') + ')$');
  var layoutPath = this.mvcpath + 'views/' + this.paths.layout;

  var viewsPath = this.mvcpath + 'views';
  
  var partialPaths = [];
  
  if (fs.existsSync(viewsPath)) {
    
    fileModule.walkSync(viewsPath, function(dirPath, dirs, files) {
      
      for (var path,file,i=0; i < files.length; i++) {

        file = files[i];
        path = dirPath + "/" + file;

        if (partialRegex.test(path)) {

          // Only build valid partial views
          partialPaths.push(path);
          buildPartialView.call(self, path);
          watchPartial.call(self, path, buildPartialView);

        } else if (templateRegex.test(file)) {

          // Build partial views for everything inside app.paths.layout

          if (path.indexOf(layoutPath) === 0) {
            partialPaths.push(path);
            buildPartialView.call(self, path);
            watchPartial.call(self, path, buildPartialView);
          }

          // Only add valid templates to view associations
          self.views.pathAsoc[self.relPath(path.replace(self.regex.templateFile, ''))] = path;

        }
      }
    });
    
  }
  
  // Add Builtin Partials
  
  var Helper = protos.lib.helper;
  var builtinHelper = new Helper();
  
  for (var m in builtinHelper) {
    if (builtinHelper[m] instanceof Function) {
      this.registerViewHelper(m, builtinHelper[m], builtinHelper);
    }
  }
  
  // Helper Partials
  
  Object.keys(this.helpers).forEach(function(alias) {
    var m, method, hkey, helper = self.helpers[alias];
    for (m in helper) {
      if (helper[m] instanceof Function) {
        method = helper[m];
        hkey = (alias == 'main')
          ? util.format('%s', m)
          : util.format('%s_%s', alias, m);
        self.registerViewHelper(hkey, method, helper);
      }
    }
  });
  
  // Event when view partials are loaded

  this.emit('view_partials_loaded', this.views.partials);
  
  // Set shortcode context
  // NOTE: Automatically resets on hot code loading, so it's good.
  
  var shortcodeContext = this.__shortcodeContext = {};
  
  // Only add shortcode filter to context if enabled on config
  
  if (this.config.shortcodeFilter) {
    
    // Register shortcodes from partials
  
    var shortcode = self.shortcode;
    var partials = self.views.partials;
  
    Object.keys(this.views.partials).forEach(function(partial) {
      if (partial[0] === '$') {
        shortcodeContext[partial.replace(/^\$/, '#')] = self.views.partials[partial];
      } else {
        shortcodeContext[partial] = function(buf, params, locals) {
          if (buf) params.content = buf; // Provide wrapped content in params.content
          params.__proto__ = locals; // Set locals as prototype of params
          return partials[partial].call(null, params); // Provide params to partial, which is passed as locals
        }
      }
    });

    this.addFilter('context', function(buf, locals) {
      buf = this.shortcode.parse(buf, locals, shortcodeContext);
      return buf;
    });
    
  }
  
  // Event when view shortcodes are loaded

  this.emit('view_shortcodes_loaded', shortcodeContext);

}
1321871
function ontext(template, text, config) {
	var
		blockStubPos = -1,
		cursor = 0,
		children = null,
		nodes = []
	;
	
	config = extend({virtual: template.virtual}, config);

	// Ensures that consecutive textOnly components are merged into a single VText node
	function concatText(text) {
		if ((nodes.length > 0) && nodes[nodes.length - 1].addText) {
			nodes[nodes.length - 1].addText(text);
		} else {
			nodes.push(new VText(text, config));
		}
	}

	// DRY parse
	function concatInterpolatedContent(content) {
		Expression.parseInterpolated(content, {
			ontext: function(text) {
				concatText(text);
			},
			onexpression: function(expr) {
				if (expr.textOnly || (config.virtual === false)) {
					concatText(expr);
				} else {
					nodes.push(expr);
				}
			}
		});
	}

	// While we find more interpolated handlebars blocks
	while ((blockStubPos = text.indexOf(_blockStub, cursor)) > -1) {

		// Get pre-text
		if (blockStubPos > cursor) {
			concatInterpolatedContent(text.substr(cursor, blockStubPos - cursor));
		}

		// Add the block to the list of nodes
		block = template.blocks.shift();
		if (config.virtual === false) {
			block.callback.virtual = false;
			concatText(block);
		} else {
			nodes.push(block);
		}

		// Advance the cursor
		cursor = blockStubPos + _blockStub.length;
	}

	// Get post-text (or the only text)
	if (cursor < text.length) {
		concatInterpolatedContent(text.substr(cursor));
	}

	// textOnly is for things like tagName and attribute values
	return nodes;
}
1228041
function (tmpl) {
        var rexExp =  /\{(.*?)\}/g,
            matches = templatesCache[tmpl],
            len,
            i;
        if (!matches) {
            matches = tmpl.match(rexExp);
            len = matches.length;
            for (i = 0; i < len; i += 1) {
                matches[i] = matches[i].substr(1, matches[i].length - 2);
            }
            templatesCache[tmpl] = matches;
        }
        return matches;
    }
1278121
def apply_template(template, *args, **kw):
    """"""
    if six.callable(template):
        return template(*args, **kw)
    if isinstance(template, six.string_types):
        return template
    if isinstance(template, collections.Mapping):
        return template.__class__((k, apply_template(v, *args, **kw)) for k, v in template.items())
    if isinstance(template, collections.Iterable):
        return template.__class__(apply_template(v, *args, **kw) for v in template)
    return template
259134
def generate_align_subparser(subparsers):
    """"""
    parser = subparsers.add_parser(
        'align', description=constants.ALIGN_DESCRIPTION,
        epilog=constants.ALIGN_EPILOG,
        formatter_class=ParagraphFormatter, help=constants.ALIGN_HELP)
    parser.set_defaults(func=align_results)
    utils.add_common_arguments(parser)
    parser.add_argument('-m', '--minimum', default=20,
                        help=constants.ALIGN_MINIMUM_SIZE_HELP, type=int)
    utils.add_corpus_arguments(parser)
    parser.add_argument('output', help=constants.ALIGN_OUTPUT_HELP,
                        metavar='OUTPUT')
    parser.add_argument('results', help=constants.RESULTS_RESULTS_HELP,
                        metavar='RESULTS')
520991
function createTemplateValue(start, end) {
    var value = "";
    while (start <= end) {
      if (tokens[start].value) {
        value += tokens[start].value;
      } else if (tokens[start].type !== tt.template) {
        value += tokens[start].type.label;
      }
      start++;
    }
    return value;
  }
914654
static function createConstantElement( $constant, $variablePlacement = false )
    {
        if ( is_array( $constant ) )
            return eZTemplateNodeTool::createArrayElement( $constant, $variablePlacement );
        else if ( is_string( $constant ) )
            return eZTemplateNodeTool::createStringElement( $constant, $variablePlacement );
        else if ( is_bool( $constant ) )
            return eZTemplateNodeTool::createBooleanElement( $constant, $variablePlacement );
        else if ( is_numeric( $constant ) )
            return eZTemplateNodeTool::createNumericElement( $constant, $variablePlacement );
        else
            return eZTemplateNodeTool::createVoidElement();
    }
811816
def align_cell(fmt, elem, width):
    """"""
    if fmt == "<":
        return elem + ' ' * (width - len(elem))
    if fmt == ">":
        return ' ' * (width - len(elem)) + elem
    return elem
218125
def from_template(cls, template):
        
        regex = r'#{\s*%s\s*}' % cls.ALLOWED_KEY
        keys = re.findall(regex, template)
        if len(keys) == 0:
            raise cls.Bad("Bad keys template: %s. Should be: \"%s\"" % (
                template, "a = #{key1}, b = #{key2.key3} ..."))
        return keys
551452
function injectMissingPrefix() {
        const injector = p => {
            const { property } = p.parentPath.value;
            if (property && property.type === j.Identifier.name) {
                if (property.name !== 'to') {
                    const newPath = j.memberExpression(p.value, j.identifier('to'));
                    p.replace(newPath);
                }
            }
        };

        root
            .find(j.CallExpression, {
                callee: {
                    name: name => ['expect', 'should'].indexOf(name) >= 0,
                },
            })
            .forEach(injector);

        root
            .find(j.MemberExpression, {
                property: {
                    type: j.Identifier.name,
                    name: 'should',
                },
            })
            .forEach(injector);
    }