Render a source with the passed variables.
505350
def render_source(self, source, variables=None):
        
        if variables is None:
            variables = {}
        template = self._engine.from_string(source)
        return template.render(**variables)
144202
function renderAttrs (attrs = {}) {
  const keys = Object.keys(attrs)
  if (keys.length) {
    return ' ' + keys.map(name => `${name}="${escape(attrs[name])}"`).join(' ')
  } else {
    return ''
  }
}
81637
def render_template(self, source, **kwargs_context):
        
        """
        return self.jinja_env.from_string(source).render(kwargs_context)
1349819
def _render_template(param, username):
    '''
    
    '''
    env = Environment()
    template = env.from_string(param)
    variables = {'username': username}
    return template.render(variables)
1220787
def render(self, name, value, attrs=None, renderer=None):
        """"""
        location = getattr(value, '_seralized_location', '')
        if location and not hasattr(value, 'url'):
            value.url = '#'
            if hasattr(self, 'get_template_substitution_values'):
                # Django 1.8-1.10
                self.template_with_initial = (
                    '%(initial_text)s: %(initial)s %(clear_template)s'
                    '<br />%(input_text)s: %(input)s')
        attrs = attrs or {}
        attrs.update({'data-upload-url': self.url})
        hidden_name = self.get_hidden_name(name)
        kwargs = {}
        if django_version >= (1, 11):
            kwargs['renderer'] = renderer

        parent = super(StickyUploadWidget, self).render(name, value, attrs=attrs, **kwargs)
        hidden = forms.HiddenInput().render(hidden_name, location, **kwargs)

        return mark_safe(parent + '\n' + hidden)
1027372
function render() {
        //\Debug::info(TplVar::instance()->vars());
        //\Debug::info($this->layout);
        return Twig::from_template($this->layout)
                        ->set(Page_TplVar::instance()->vars())
                        ->render();
    }
1289052
function renderTemplateLoader(source) {
  // Get the loader options object.
  var options = getOptions(this)
  // Get the template locals.
  var locals = getLocals.call(this, options)
  // Create info object of the filename of the resource being loaded.
  var info = { filename: this.resourcePath }
  // Get the engine options to be passed to the engine.
  var engineOptions = getEngineOptions.call(this, options.engineOptions, info)
  // Get the template renderer
  var renderer = getRenderer.call(this, options.engine)
  // Call options.init.
  init.call(this, renderer.engine, info, options)
  // Render the template
  var result = render(renderer, source, locals, engineOptions)
  // Assign the tempate to module.exports.
  return 'module.exports = ' + JSON.stringify(result)
}
59946
def render(self, context, request=None):
        """"""
        context['component'] = self
        return render_to_string(self.template_name, context, request)
52699
def render_string(self, path: str, **kwargs: Any) -> bytes:
        """"""
        return self.handler.render_string(path, **kwargs)
1185750
function render($context = null, $vars = array())
    {
        $directives = $this->getDirectives();

        foreach ($directives as $directive) {
            list($i, $name, $argv) = $directive;
            $this->executeDirective($name, $context, $argv);
        }

        return $this->getProcessedSource();
    }
108255
public function render() {
        if (!$this->_enableXDebugOverlay) {
            ini_set('xdebug.overload_var_dump', 'off');
        }
        $debuggerCount = count($this->_debuggers);
        $this->setName(str_replace('{count}', '{' . $debuggerCount . '}', self::NAME));
        parent::render();
    }
532448
def replace_variables(self, source: str, variables: dict) -> str:
        """"""
        try:
            replaced = re.sub(
                "{{(.*?)}}", lambda m: variables.get(m.group(1), ""), source
            )
        except TypeError:
            replaced = source
        return replaced
1327110
protected function render($name, $variables = []) {
		$twig = $this->getServiceContainer()->getTwig();
		return $twig->render($name, array_merge($this->getGlobalTwigVariables(), $variables));
	}
1002815
protected function RenderImpl()
    {
        $i = 0;
        $children = pq('[zippy=' . $this->id . ']  source');
        foreach ($children as $child) {
            if (strlen($this->sources[$i]) > 0) {
                pq($child)->attr("src", $this->sources[$i]);
                $i++;
            }
        }

        if (strlen($this->src) > 0)
            $this->setAttribute("src", $this->src);
    }
923840
def render(self, context, db=None, safe_mode=False, extra_context=None):
        """"""
        if not db:
            raise MissingParameterError(
                "db",
                context=self.error_context
            )
        rendered_views = dict()
        path_instances = db.query(self.path.query, safe_mode=safe_mode)
        extra_ctx = copy(extra_context) if extra_context else dict()

        for inst in path_instances:
            extra_ctx.update({
                self.path.variable: inst
            })
            ctx = context.build(
                db=db,
                safe_mode=safe_mode,
                for_each_inst=inst,
                extra=extra_ctx
            )
            inst_path = self.path.render(inst=inst, context=ctx)
            rendered_view = self.template.render(ctx)
            rendered_views = deep_merge_dict(
                rendered_views,
                dict_from_path(inst_path, final_value=rendered_view)
            )
        return rendered_views
622177
def _render(template, callable_, args, data, as_unicode=False):
    """"""

    if as_unicode:
        buf = util.FastEncodingBuffer(as_unicode=True)
    elif template.bytestring_passthrough:
        buf = compat.StringIO()
    else:
        buf = util.FastEncodingBuffer(
                        as_unicode=as_unicode,
                        encoding=template.output_encoding,
                        errors=template.encoding_errors)
    context = Context(buf, **data)
    context._outputting_as_unicode = as_unicode
    context._set_with_template(template)

    _render_context(template, callable_, context, *args,
                            **_kwargs_for_callable(callable_, data))
    return context._pop_buffer().getvalue()
737942
def render(self, *args, **kwargs):
        
        env = {}; stdout = []
        for dictarg in args: env.update(dictarg)
        env.update(kwargs)
        self.execute(stdout, env)
        return ''.join(stdout)