An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0'?> | |
<sdf version="1.7"> | |
<model name="my_model"> | |
<pose>0 0 0.5 0 0 0</pose> | |
<static>true</static> | |
<link name="box_link"> | |
<inertial> | |
<mass>1.0</mass> | |
<inertia> <!-- inertias are tricky to compute --> | |
<!-- http://gazebosim.org/tutorials?tut=inertia&cat=build_robot --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Looking for .py file in $1" | |
echo "Saving pdfs to $2" | |
echo | |
REPOSITORY=$1 | |
while read source_file | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
from torch.autograd import Variable | |
# Do this to display pytorch version. | |
# The version used in this gist is 0.3.0.post4. | |
print(torch.__version__) | |
# There are three steps to demonstrate multi head network | |
# 1. build the network |
This example pulls together various examples of work with trees in D3.js.
The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.
One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.
Dragging can be performed on any node other than root (flare). Dropping can be done on any node.
Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.