Coroutine based filters for render pipeline.
173006
def get_filters(self):
        
        return [
            self.compute_style_filter,
            self.render_filter,
            self.calc_widths_filter,
            self.format_row_filter,
            self.align_rows_filter,
        ]
683674
def _reorder_renderers(self, plot, renderer, mapping):
        ""
        renderers = dict({r: self.handles[r+'_glyph_renderer']
                          for r in mapping}, graph=renderer)
        other = [r for r in plot.renderers if r not in renderers.values()]
        graph_renderers = [renderers[k] for k in self._draw_order if k in renderers]
        plot.renderers = other + graph_renderers
1063539
@Api
	@Deprecated
	public void renderAll(boolean force) {
		Scheduler.get().scheduleDeferred(new ScheduledCommand() {

			public void execute() {
				if (graphics.isReady()) {
					render(mapModel, null, RenderStatus.ALL);
				}
			}
		});
	}
283342
def render(self, template, filename, context={}, filters={}):
        
        filename = os.path.normpath(filename)
        path, file = os.path.split(filename)
        try:
            os.makedirs(path)
        except OSError as exception:
            if exception.errno != errno.EEXIST:
                raise

        path, file = os.path.split(template)
        loader = jinja2.FileSystemLoader(path)
        env = jinja2.Environment(loader=loader, trim_blocks=True, lstrip_blocks=True)
        env.filters.update(filters)
        template = env.get_template(file)
        text = template.render(context)
        with open(filename, 'wt') as f:
            f.write(text)
1058569
def _render_pipeline(path)
      filename_parts= path.split('.')
      begin
        ext= filename_parts.pop
        template_class= Renderer.for(ext)
        yield template_class unless template_class.nil?
      end while !template_class.nil? #and filename_parts.size
    end
140127
function LayeredTextureCache(renderer) {
  var self = this;
  var r = self.renderer = renderer;
  var cy = r.cy;
  self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ]

  self.firstGet = true;
  self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold;
  self.skipping = false;
  self.eleTxrDeqs = cy.collection();
  self.scheduleElementRefinement = util(function () {
    self.refineElementTextures(self.eleTxrDeqs);
    self.eleTxrDeqs.unmerge(self.eleTxrDeqs);
  }, refineEleDebounceTime);
  r.beforeRender(function (willDraw, now$$1) {
    if (now$$1 - self.lastInvalidationTime <= invalidThreshold) {
      self.skipping = true;
    } else {
      self.skipping = false;
    }
  }, r.beforeRenderPriorities.lyrTxrSkip);

  var qSort = function qSort(a, b) {
    return b.reqs - a.reqs;
  };

  self.layersQueue = new Heap(qSort);
  self.setupDequeueing();
}
629656
def render(self, obs):
    """"""
    if not self._initialized:
      return
    now = time.time()
    self._game_times.append(
        (now - self._last_time,
         max(1, obs.observation.game_loop - self._obs.observation.game_loop)))
    self._last_time = now
    self._last_game_loop = self._obs.observation.game_loop
    self._obs_queue.put(obs)
    if self._render_sync:
      self._obs_queue.join()
1180540
function Render (gl, animatedModel, dt, state) {
  // TODO: get # joints from model
  var selectedKeyframes = Object.keys(animatedModel.keyframes)
  .sort()
  .slice(state.currentAnimation[0], state.currentAnimation[1] + 1)
  .reduce(function (selectedKeyframes, currentKeyframe) {
    selectedKeyframes[currentKeyframe] = animatedModel.keyframes[currentKeyframe]
    return selectedKeyframes
  }, {})

  var interpolatedJointData = interpolateJoints(selectedKeyframes, dt, animatedModel.numJoints)

  gl.viewport(0, 0, state.viewport.width, state.viewport.height)
  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)

  var pMatrix = makePerspective(Math.PI / 3, state.viewport.width / state.viewport.height, 1, 2000)

  var modelPosition = [0, 0, 0]

  var cameraMatrix = makeCamera(state.orbit, modelPosition)
  var viewMatrix = makeInverse(cameraMatrix)

  animatedModel.draw({
    interpolatedJoints: interpolatedJointData.interpolatedJoints,
    rotationQuats: interpolatedJointData.interpolatedRotQuaternions,
    translationQuats: interpolatedJointData.interpolatedTransQuaternions,
    position: modelPosition,
    perspectiveMatrix: pMatrix,
    viewMatrix: viewMatrix,
    numJoints: animatedModel.numJoints
  })
}
235965
def render(self,
            trajectories: Tuple[NonFluents, Fluents, Fluents, Fluents, np.array],
            batch: Optional[int] = None) -> None:
        '''
        '''

        non_fluents, initial_state, states, actions, interms, rewards = trajectories

        non_fluents = dict(non_fluents)
        states  = dict((name, fluent[0]) for name, fluent in states)
        actions = dict((name, fluent[0]) for name, fluent in actions)
        rewards = rewards[0]

        idx = self._compiler.rddl.domain.state_fluent_ordering.index('location/1')

        start = initial_state[idx][0]
        g = non_fluents['GOAL/1']
        path = states['location/1']
        deltas = actions['move/1']

        centers = non_fluents['DECELERATION_ZONE_CENTER/2']
        decays = non_fluents['DECELERATION_ZONE_DECAY/1']
        zones = [(x, y, d) for (x, y), d in zip(centers, decays)]

        self._ax1 = plt.gca()

        self._render_state_space()
        self._render_start_and_goal_positions(start, g)
        self._render_deceleration_zones(zones)
        self._render_state_action_trajectory(start, path, deltas)

        plt.title('Navigation', fontweight='bold')
        plt.legend(loc='lower right')
        plt.show()
727977
def render_scene(self):
        ""
        self.init_gl() # should be a no-op after the first frame is rendered
        glfw.make_context_current(self.window)
        self.renderer.render_scene()
        # Done rendering
        # glfw.swap_buffers(self.window) # avoid double buffering to avoid stalling
        glFlush() # single buffering
        glfw.poll_events()
134729
function renderTemplate(skipInterpolation) {
	skipInterpolation = typeof skipInterpolation === "string" ? [skipInterpolation] : skipInterpolation;
	const handlebarsMatcher = /{{([^{}]+)}}/;

	return function (files, metalsmith, done) {
		const keys = Object.keys(files);
		const metadata = metalsmith.metadata();

		async.each(keys, (file, next) => {

			// skipping files with skipInterpolation option
			if (skipInterpolation && multimatch([file], skipInterpolation, { dot: true }).length) {
				return next();
			}

			async.series([

				// interpolate the file contents
				function (callback) {
					const str = files[file].contents.toString();
					if (!handlebarsMatcher.test(str)) {
						return callback();
					}

					render(str, metadata, function (err, res) {
						if (err) return callback(err);
						files[file].contents = Buffer.from(res);
						callback();
					});
				},

				// interpolate the file name
				function (callback) {
					if (!handlebarsMatcher.test(file)) {
						return callback();
					}

					render(file, metadata, function (err, res) {
						if (err) return callback(err);
						// safety check to prevent file deletion in case filename doesn't change
						if (file === res) return callback();
						// safety check to prevent overwriting another file
						if (files[res]) return callback(`Cannot rename file ${file} to ${res}. A file with that name already exists.`);

						// add entry for interpolated file name
						files[res] = files[file];
						// delete entry for template file name
						delete files[file];
						callback();
					});
				}

			], function (err) {
				if (err) return done(err);
				next();
			});
		}, done);
	};
}
527451
function render(content) {
  var deferred = q.defer();

  var blockType = "normal";
  var lines = content.split("\n");
  var blocks = {};
  for (var i=0; i<lines.length; i++) {
    var line = lines[i];

    if (line.substr(0,1) == "@") {
      blockType = line.substr(1).trim();
      if (blockType === "end") blockType = "normal";
      continue;
    }
    if (blocks[blockType])
      blocks[blockType] += line + "\n";
    else
      blocks[blockType] = line + "\n";
  }

  for (var key in blocks) {
    if (blocks.hasOwnProperty(key)) {
      try {
        blocks[key] = metaMarked(blocks[key]);
      } catch(err) {
        return deferred.reject(new Error(err));
      }
    }
    deferred.resolve(blocks);
  }

  return deferred.promise;
}
339157
def _render_final(self, render_func, *context, **kwargs):
        
        stack = ContextStack.create(*context, **kwargs)
        self._context = stack

        engine = self._make_render_engine()

        return render_func(engine, stack)
260612
function toNodeStream (renderer) {
  let sourceIsReady = true;

  const read = () => {
    // If source is not ready, defer any reads until the promise resolves.
    if (!sourceIsReady) { return false; }

    sourceIsReady = false;
    const pull = pullBatch(renderer, stream);

    return pull.then(result => {
      sourceIsReady = true;
      if (result === EXHAUSTED) {
        return stream.push(null);
      } else {
        if (result !== INCOMPLETE) {
          stream.push(result);
        }
        return read();
      }
    }).catch(err => {
      return stream.emit("error", err);
    });
  };

  const stream = new Readable({ read });

  return stream;
}
811927
function render(context, xyPoints, map, canvasFeature) {
    ctx = context;
    
    if( canvasFeature.type === 'Point' ) {
        renderPoint(xyPoints, this.size);
    } else if( canvasFeature.type === 'LineString' ) {
        renderLine(xyPoints);
    } else if( canvasFeature.type === 'Polygon' ) {
        renderPolygon(xyPoints);
    } else if( canvasFeature.type === 'MultiPolygon' ) {
        xyPoints.forEach(renderPolygon);
    }
}
1292005
function renderList() {
        var recentProjects = getRecentProjects(),
            currentProject = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            templateVars   = {
                projectList : [],
                Strings     : Strings
            };

        recentProjects.forEach(function (root) {
            if (root !== currentProject) {
                templateVars.projectList.push(parsePath(root));
            }
        });

        return Mustache.render(ProjectsMenuTemplate, templateVars);
    }
822138
async function render(template) {
	const content = {
		badges: await badges(argv.context),
		usage: ''
	}

	if (argv.usage) {
		content.usage = readFileSync(resolve(argv.usage))
	}

	const page = await remark().use(gap).use(squeeze).process(template(content))
	process.stdout.write(page.toString())
}