Render tree using it's path.
510526
def show_periodical_tree_by_path(path):
    
    path = unquote_plus(path)
    trees = tree_handler().trees_by_path(path)

    if not trees:
        path = path.decode("utf-8")
        abort(404, "Dokument s názvem '%s' není dostupný." % path)

    return render_trees(
        trees,
        partial(web_tools.compose_tree_path, issn=False)
    )
1349449
def render(self, type, rerender=False):
        """"""
        for child in self.children:
            child.render(type, rerender)
1080062
def draw_tree(node,
              child_iter=lambda n: n.children,
              text_str=str):
    """"""
    return LeftAligned(traverse=Traversal(get_text=text_str,
                                          get_children=child_iter),
                       draw=LegacyStyle())(node)
1062454
function( path, callback ) {
		var match = munit.isRegExp( render.options.file_match ) ? render.options.file_match : rtestfile;

		path += '/';
		fs.readdir( path, function( e, files ) {
			if ( e ) {
				return callback( e );
			}

			async.each( files || [],
				function( file, callback ) {
					var fullpath = path + file;

					fs.stat( fullpath, function( e, stat ) {
						if ( e ) {
							callback( e );
						}
						else if ( stat.isDirectory() ) {
							render._renderPath( fullpath, callback );
						}
						else {
							if ( stat.isFile() && match.exec( file ) ) {
								munit.require( fullpath );
							}

							callback();
						}
					});
				},
				callback
			);
		});
	}
704904
def walk_tree(self):
        """"""
        shards = collections.deque([self])
        while shards:
            shard = shards.popleft()
            yield shard
            shards.extend(shard.children)
754767
def tree_path(treemap, tree)
      if (ptree = treemap[tree])
        tree_path(treemap, ptree) + '/' + tree.name
      else
        ''
      end
    end
86257
function childNodesFromPaths (files, parent, renderLabelFn, originalFiles, baseDir) {
  // Group by first path element
  var groups = _.groupBy(files, file => file.match(/^[^/]*\/?/))
  return Object.keys(groups).map(function (groupKey) {
    const group = groups[groupKey]
    // Is this group explicitly part of the result, or
    // just implicit through its children
    const explicit = group.indexOf(groupKey) >= 0
    let index = -1
    if (explicit) {
      index = originalFiles.indexOf(parent.replace(baseDir, '') + groupKey)
    }

    return {
      label: renderLabelFn(parent, groupKey, explicit, explicit ? index : -1),
      nodes: childNodesFromPaths(
        // Remove parent directory from file paths
        group
          .map(node => node.substr(groupKey.length))
          // Skip the empty path
          .filter(node => node),
        // New parent..., normalize to one trailing slash
        parent + groupKey,
        renderLabelFn,
        originalFiles,
        baseDir
      )
    }
  })
}
103995
def render_template(templates_path, template_filename, context):
        """"""
        template_env = Environment(
            autoescape=False, trim_blocks=False,
            loader=FileSystemLoader(str(templates_path)))
        return template_env.get_template(str(template_filename)) \
            .render(context)
905880
def render_children(node: Node, **child_args):
    """"""
    for xml_node in node.xml_node.children:
        child = render(xml_node, **child_args)
        node.add_child(child)
620429
public static Bitmap renderPath(Path path) {
    RectF bounds = new RectF();
    path.computeBounds(bounds, false);
    Bitmap bitmap = Bitmap.createBitmap((int) bounds.right, (int) bounds.bottom, Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    Paint paint = new LPaint();
    paint.setAntiAlias(true);
    paint.setColor(Color.BLUE);
    canvas.drawPath(path, paint);
    return bitmap;
  }
1373671
private void render(SVG.Path obj)
   {
      debug("Path render");

      if (obj.d == null)
         return;

      updateStyleForElement(state, obj);

      if (!display())
         return;
      if (!visible())
         return;
      if (!state.hasStroke && !state.hasFill)
         return;

      if (obj.transform != null)
         canvas.concat(obj.transform);

      Path  path = (new PathConverter(obj.d)).getPath();

      if (obj.boundingBox == null) {
         obj.boundingBox = calculatePathBounds(path);
      }
      updateParentBoundingBox(obj);

      checkForGradientsAndPatterns(obj);
      checkForClipPath(obj);
      
      boolean  compositing = pushLayer();

      if (state.hasFill) {
         path.setFillType(getFillTypeFromState());
         doFilledPath(obj, path);
      }
      if (state.hasStroke)
         doStroke(path);

      renderMarkers(obj);

      if (compositing)
         popLayer(obj);
   }
444949
function renderSlot (
  name,
  fallback,
  props,
  bindObject
) {
  var scopedSlotFn = this.$scopedSlots[name];
  if (scopedSlotFn) { // scoped slot
    props = props || {};
    if (bindObject) {
      props = extend(extend({}, bindObject), props);
    }
    return scopedSlotFn(props) || fallback
  } else {
    var slotNodes = this.$slots[name];
    // warn duplicate slot usage
    if (slotNodes && "development" !== 'production') {
      slotNodes._rendered && warn(
        "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
        "- this will likely cause render errors.",
        this
      );
      slotNodes._rendered = true;
    }
    return slotNodes || fallback
  }
}
158661
def render(self):
        """"""
        context = self.context
        if 'app' not in context:
            context['app'] = self.application.name
        temp_dir = self.temp_dir
        templates_root = self.blueprint.templates_directory
        for root, dirs, files in os.walk(templates_root):
            for directory in dirs:
                directory = os.path.join(root, directory)
                directory = render_from_string(directory, context)
                directory = directory.replace(templates_root, temp_dir, 1)
                os.mkdir(directory)
            for file in files:
                full_file = os.path.join(root, file)
                stat = os.stat(full_file)
                content = render_from_file(full_file, context)
                full_file = strip_extension(
                    render_from_string(full_file, context))
                full_file = full_file.replace(templates_root, temp_dir, 1)
                with open(full_file, 'w') as f:
                    f.write(content)
                os.chmod(full_file, stat.st_mode)
127508
private void renderTextPath(SVG.TextPath obj)
   {
      debug("TextPath render");

      updateStyleForElement(state, obj);

      if (!display())
         return;
      if (!visible())
         return;

      SVG.SvgObject  ref = obj.document.resolveIRI(obj.href);
      if (ref == null)
      {
         error("TextPath reference '%s' not found", obj.href);
         return;
      }

      SVG.Path     pathObj = (SVG.Path) ref;
      Path         path = (new PathConverter(pathObj.d)).getPath();

      if (pathObj.transform != null)
         path.transform(pathObj.transform);

      PathMeasure  measure = new PathMeasure(path, false);

      float  startOffset = (obj.startOffset != null) ? obj.startOffset.floatValue(this, measure.getLength()) : 0f;

      // Handle text alignment
      Style.TextAnchor  anchor = getAnchorPosition();
      if (anchor != Style.TextAnchor.Start) {
         float  textWidth = calculateTextWidth(obj);
         if (anchor == Style.TextAnchor.Middle) {
            startOffset -= (textWidth / 2);
         } else {
            startOffset -= textWidth;  // 'End' (right justify)
         }
      }

      checkForGradientsAndPatterns((SvgElement) obj.getTextRoot());
      
      boolean  compositing = pushLayer();

      enumerateTextSpans(obj, new PathTextDrawer(path, startOffset, 0f));

      if (compositing)
         popLayer(obj);
   }
539141
function renderSlot (
  name,
  fallback,
  props,
  bindObject
) {
  var scopedSlotFn = this.$scopedSlots[name];
  if (scopedSlotFn) { // scoped slot
    props = props || {};
    if (bindObject) {
      extend(props, bindObject);
    }
    return scopedSlotFn(props) || fallback
  } else {
    var slotNodes = this.$slots[name];
    // warn duplicate slot usage
    if (slotNodes && process.env.NODE_ENV !== 'production') {
      slotNodes._rendered && warn(
        "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
        "- this will likely cause render errors.",
        this
      );
      slotNodes._rendered = true;
    }
    return slotNodes || fallback
  }
}
760325
def walk_tree(start, attr):
    
    path = [start]
    for child in path:
        yield child
        idx = path.index(child)
        for grandchild in reversed(getattr(child, attr)):
            path.insert(idx + 1, grandchild)
46647
def tree(path, depth=2, topdown=True, followlinks=False, showhidden=False):
    """"""
    rt = []
    for root, dirs, files in os.walk(path, topdown=topdown, followlinks=followlinks):
        if not showhidden and File.is_hidden(root):
            continue

        current_depth = len(os.path.relpath(root, path).split(os.sep))
        if current_depth > depth:
            continue

        if showhidden:
            _tuple = (
                root,
                [File(os.path.join(root, _dir)) for _dir in dirs],
                [File(os.path.join(root, _file)) for _file in files]
            )
        else:
            _tuple = (
                root,
                [File(os.path.join(root, _dir)) for _dir in dirs if _dir[0] != '.'],
                [File(os.path.join(root, _file)) for _file in files if _file[0] != '.']
            )

        rt.append(_tuple)
    return rt