make interactive tree will return complete html for an interactive tree
    :param title: a title for the plot, if not defined, will be left out.
344976
def make_interactive_tree(matrix=None,labels=None):
    '''
    '''
    from scipy.cluster.hierarchy import (
        dendrogram, 
        linkage,
        to_tree
    )

    d3 = None
    from scipy.cluster.hierarchy import cophenet
    from scipy.spatial.distance import pdist

    if isinstance(matrix,pandas.DataFrame):
        Z = linkage(matrix, 'ward') # clusters
        T = to_tree(Z, rd=False)

        if labels == None:
            labels = matrix.index.tolist()
        lookup = dict(zip(range(len(labels)), labels))

        # Create a dendrogram object without plotting
        dend = dendrogram(Z,no_plot=True,
                      orientation="right",
                      leaf_rotation=90.,  # rotates the x axis labels
                      leaf_font_size=8.,  # font size for the x axis labels
                      labels=labels)

        d3 = dict(children=[], name="root")
        add_node(T, d3)
        label_tree(d3["children"][0],lookup)
    else:
        bot.warning('Please provide data as pandas Data Frame.')
    return d3
72378
def tree_to_html(tree):
    """"""
    ul = etree.Element('ul')
    html_listify([tree], ul)
    return HTML_WRAPPER.format(etree.tostring(ul))
215886
def render_title(text, markup=True, no_smartquotes=False):
    

    # HACK: If the title starts with something that looks like a list, save it
    # for later
    pfx, text = re.match(r'([0-9. ]*)(.*)', text).group(1, 2)
    text = pfx + misaka.Markdown(TitleRenderer(),
                                 extensions=TITLE_EXTENSIONS)(text)

    if not markup:
        strip = HTMLStripper()
        strip.feed(text)
        text = strip.get_data()

    if not no_smartquotes:
        text = misaka.smartypants(text)

    return flask.Markup(text)
314576
def title(self):
        
        for elm in self._spTree.iter_ph_elms():
            if elm.ph_idx == 0:
                return self._shape_factory(elm)
        return None
193548
protected HtmlTree getWinTitleScript(){
        HtmlTree script = HtmlTree.SCRIPT();
        if(winTitle != null && winTitle.length() > 0) {
            String scriptCode = "<!--" + DocletConstants.NL +
                    "    try {" + DocletConstants.NL +
                    "        if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
                    "            parent.document.title=\"" + escapeJavaScriptChars(winTitle) + "\";" + DocletConstants.NL +
                    "        }" + DocletConstants.NL +
                    "    }" + DocletConstants.NL +
                    "    catch(err) {" + DocletConstants.NL +
                    "    }" + DocletConstants.NL +
                    "//-->" + DocletConstants.NL;
            RawHtml scriptContent = new RawHtml(scriptCode);
            script.addContent(scriptContent);
        }
        return script;
    }
593802
def title(*args)
      content_for :title do
        if args.first.is_a?(Symbol) && (args[1].respond_to?(:model_name) || args[1].class.respond_to?(:model_name))
          model = args[1].respond_to?(:model_name) ? args[1] : args[1].class
          if args.first == :index
            t('cmtool.action.index.title', models: model.model_name.human_plural)
          else
            t("cmtool.action.#{args.first}.title", model: model.model_name.human)
          end
        else
          raise 'Imporoper title declaration'
          args.first
        end
      end
    end
700765
def title(self):
        
        value = self._schema.get("title", None)
        if value is None:
            return
        if not isinstance(value, basestring):
            raise SchemaError(
                "title value {0!r} is not a string".format(value))
        return value
463132
function tree (toc, tpl) {
  if ( tpl === void 0 ) tpl = '';

  if (!toc || !toc.length) { return '' }

  toc.forEach(function (node) {
    tpl += "<li><a class=\"section-link\" href=\"" + (node.slug) + "\">" + (node.title) + "</a></li>";
    if (node.children) {
      tpl += "<li><ul class=\"children\">" + (tree(node.children)) + "</li></ul>";
    }
  });

  return tpl
}
348314
def title(self) -> str:
        """"""
        title_element = _find_tag(self.head, 'title')
        if title_element:
            return title_element.textContent
        return ''
204451
def get_content_title(self, obj):
        """"""
        return Content.objects.get(id=obj.content.id).title
180849
def get_text_for_html(html_content):
    '''
    
    '''

    soup = BeautifulSoup(html_content)

    # kill all script and style elements
    for script in soup(["script", "style"]):
        script.extract()    # rip it out

    # Replace all links with HREF with the link text and the href in brackets
    for a in soup.findAll('a', href=True):
        a.replaceWith('%s <%s>' % (a.string, a.get('href')))

    # get text
    text = soup.get_text()

    # break into lines and remove leading and trailing space on each
    lines = (line.strip() for line in text.splitlines())
    # break multi-headlines into a line each
    chunks = (phrase.strip() for line in lines for phrase in line.split("  "))
    # drop blank lines
    text = '\n'.join(chunk for chunk in chunks if chunk)

    return text
498828
def create(self, title):
    
    return self.send_request(C.POST, self.end, data={'title':title})
491315
function(ctx, flag, opts) {
		var tree = ctx.tree,
			node = ctx.node;
// Let the base implementation expand/collapse the node, then redraw the title
// after the animation has finished
		return this._super(ctx, flag, opts).always(function(){
			tree.nodeRenderTitle(ctx);
		});
	}
171739
def html_page(title="Page Title", body=""):
    """"""
    html = "<html>\n<head><title>%s</title></head>\n<body>\n" % (title)
    html += "<h1>%s</h1>\n" % (title)
    html += body
    html += "</body>\n</html>\n"
    return html
226686
def section(node):
    
    title = ''  # All sections need an id
    if node.first_child is not None:
        if node.first_child.t == u'heading':
            title = node.first_child.first_child.literal
    o = nodes.section(ids=[title], names=[title])
    for n in MarkDown(node):
        o += n
    return o
1173596
def get_html(self):
        """"""
        if self.__htmltree is not None:
            return self.__htmltree
        else:
            self.__make_tree()
            return self.__htmltree
44725
function(value, absolute) {
            var mt =  this.$('title');
            if (mt.length === 0) {
                mt =  $("<title>", {}).appendTo(this.$el);
            }
            if (value != null) {
                this._title = value;
                if (absolute !== false) value = this.completeTitle(value);
                mt.text(value);
            } else {
                return mt.attr('content');
            }
        }