Returns a hash of this render configuration from the variable, renderer, and time_index parameters. Used for
        caching the full-extent, native projection render so that subsequent requests can be served by a warp
        operation only.
484984
def hash(self):
        

        renderer_str = "{}|{}|{}|{}".format(
            self.renderer.__class__.__name__, self.renderer.colormap, self.renderer.fill_value,
            self.renderer.background_color
        )
        if isinstance(self.renderer, StretchedRenderer):
            renderer_str = "{}|{}|{}".format(renderer_str, self.renderer.method, self.renderer.colorspace)
        elif isinstance(self.renderer, UniqueValuesRenderer):
            renderer_str = "{}|{}".format(renderer_str, self.renderer.labels)

        return hash("{}/{}/{}".format(self.variable.pk, renderer_str, self.time_index))
964235
def rendered(self):
        """"""
        if not self._rendered:
            template_path = get_template_path(self.raw_template_path)
            if template_path:
                with open(template_path, 'r') as template:
                    if len(os.path.splitext(template_path)) == 2 and (
                            os.path.splitext(template_path)[1] == '.j2'):
                        self._rendered = Template(template.read()).render(
                            context=self.context,
                            mappings=self.mappings,
                            name=self.name,
                            variables=self.resolved_variables
                        )
                    else:
                        self._rendered = template.read()
            else:
                raise InvalidConfig(
                    'Could not find template %s' % self.raw_template_path
                )

        return self._rendered
1327267
def render(self, ctx=None):
        '''
        
        '''
        if ctx is None:
            ctx = RenderContext()
        ctx.push(self)
        self._initialize()
        offset = self.offset if self.offset else 0
        if self._mutating():
            field_idx = self._field_idx
        else:
            key_field = self.resolve_field(self._key_field)
            key_from_key_field = key_field._current_value
            if key_from_key_field in self._keys:
                field_idx = self._keys.index(key_from_key_field)
            else:
                field_idx = 0  # default value
        self._fields[field_idx].set_offset(offset)
        rendered = self._fields[field_idx].render(ctx)
        self.set_current_value(rendered)
        ctx.pop()
        return self._current_rendered
86033
def render(self, renderer=None, **kwargs):
        
        return Markup(get_renderer(current_app, renderer)(**kwargs).visit(
            self))
159201
def get_renderers(self):
        
        renderers = super(WithDynamicViewSetMixin, self).get_renderers()
        if settings.ENABLE_BROWSABLE_API is False:
            return [
                r for r in renderers if not isinstance(r, BrowsableAPIRenderer)
            ]
        else:
            return renderers
1118055
def get_renderers(self):
        
        try:
            source = self.get_object()
        except (ImproperlyConfigured, APIException):
            self.renderer_classes = [RENDERER_MAPPING[i] for i in self.__class__.renderers]
            return [RENDERER_MAPPING[i]() for i in self.__class__.renderers]
        else:
            self.renderer_classes = [RENDERER_MAPPING[i] for i in source.__class__.renderers]
            return [RENDERER_MAPPING[i]() for i in source.__class__.renderers]
530864
def get(self, **kwargs):
        
        old_state = self.state.copy()
        self.merge_dict(kwargs)
        result = rendering.InputRenderer.render_nomenclative(self)
        self.merge_dict(old_state)
        return result
268620
def get_default_renderer(self, view):
        
        renderers = [renderer for renderer in view.renderer_classes
                     if not issubclass(renderer, BrowsableAPIRenderer)]
        non_template_renderers = [renderer for renderer in renderers
                                  if not hasattr(renderer, 'get_template_names')]

        if not renderers:
            return None
        elif non_template_renderers:
            return non_template_renderers[0]()
        return renderers[0]()
537936
def freeRenderModel(self):
        

        fn = self.function_table.freeRenderModel
        pRenderModel = RenderModel_t()
        fn(byref(pRenderModel))
        return pRenderModel
571175
def getCachedDataKey(engineVersionHash, key):
		
		cacheFile = CachedDataManager._cacheFileForHash(engineVersionHash)
		return JsonDataManager(cacheFile).getKey(key)
49188
def render(view_name = nil, context: Attributor::DEFAULT_ROOT_CONTEXT, renderer: Renderer.new, **opts)
      if !view_name.nil?
        warn 'DEPRECATED: please do not pass the view name as the first parameter in Blueprint.render, pass through the view: named param instead.'
      elsif opts.key?(:view)
        view_name = opts[:view]
      end

      fields = opts[:fields]
      view_name = :default if view_name.nil? && fields.nil?

      if view_name
        unless (view = self.class.views[view_name])
          raise "view with name '#{view_name.inspect}' is not defined in #{self.class}"
        end
        return view.render(self, context: context, renderer: renderer)
      end

      # Accept a simple array of fields, and transform it to a 1-level hash with true values
      if fields.is_a? Array
        fields = fields.each_with_object({}) { |field, hash| hash[field] = true }
      end

      # expand fields
      expanded_fields = FieldExpander.expand(self.class, fields)

      renderer.render(self, expanded_fields, context: context)
    end
625824
def get_renderer_context(self):
        
        # Note: Additionally 'response' will also be added to the context,
        #       by the Response object.
        return {
            'view': self,
            'args': getattr(self, 'args', ()),
            'kwargs': getattr(self, 'kwargs', {}),
            'request': getattr(self, 'request', None),
            'extra_context': getattr(self, 'renderer_extra_context', {})
        }
683845
public static synchronized RenderEngine getInstance() {
    //availableEngines = null;
    if (null == availableEngines) {
      availableEngines = new HashMap();
    }

    if (!availableEngines.containsKey(DEFAULT)) {
      RenderEngine engine = new BaseRenderEngine();
      availableEngines.put(engine.getName(), engine);
    }

    return (RenderEngine) availableEngines.get(DEFAULT);
  }
211193
def render_hash(hsh)
      str = ""
      indiff_hsh = hsh.with_indifferent_access
      indiff_hsh.keys.sort.each do |key|
        str << "#{key}: "
        value = indiff_hsh[key]
        PP::pp(value, str)
      end
      str
    end
919061
def render(self, template_name, **kw):
        '''
        
        '''
        logger.debug('Rendering template "%s"', template_name)
        vars = self.globs.copy()
        vars.update(kw)
        resolved_name, engine = self.resolve(template_name)
        return engine.render(resolved_name, **vars)
102950
public static final Renderer<Date> instance() { // NOPMD it's thread save!
    if (DateRenderer.instanceRenderer == null) {
      synchronized (DateRenderer.class) {
        if (DateRenderer.instanceRenderer == null) {
          DateRenderer.instanceRenderer = new DateRenderer("yyyy-MM-dd");
        }
      }
    }
    return DateRenderer.instanceRenderer;
  }
5086
def Render(self):
        
        xs = [self.xs[0]]
        ps = [0.0]
        for i, p in enumerate(self.ps):
            xs.append(self.xs[i])
            ps.append(p)

            try:
                xs.append(self.xs[i + 1])
                ps.append(p)
            except IndexError:
                pass
        return xs, ps