Return the title with word count and number of comments.
779526
def get_title(self, entry):
        
        title = _('%(title)s (%(word_count)i words)') % \
            {'title': entry.title, 'word_count': entry.word_count}
        reaction_count = int(entry.comment_count +
                             entry.pingback_count +
                             entry.trackback_count)
        if reaction_count:
            return ungettext_lazy(
                '%(title)s (%(reactions)i reaction)',
                '%(title)s (%(reactions)i reactions)', reaction_count) % \
                {'title': title,
                 'reactions': reaction_count}
        return title
586058
def title(self, txt):
        
        num = len(txt)
        ticks = "=" * num
        print(ticks)
        print(txt)
        print(ticks)
807332
def title(self):
        """"""
        return (u'[{}] {}>>'.format(
            os.path.split(os.path.abspath('.'))[-1],
            u' '.join(self.command))).encode('utf8')
422922
def title(self, txt=None):
        '''
        if txt:
            self.SetConsoleTitleW(txt)
        else:
            buffer = create_unicode_buffer(200)
            n = self.GetConsoleTitleW(buffer, 200)
            if n > 0:
                return buffer.value[:n]
533689
def _filter(self, text, context, encoding):
        """"""

        docstrings = []
        strings = []
        comments = []
        prev_token_type = tokenize.NEWLINE
        indent = ''
        name = None
        stack = [(context, 0, self.MODULE)]
        last_comment = False
        possible_fmt_str = None

        src = io.StringIO(text)

        for token in tokenizer(src.readline):
            token_type = token[0]
            value = token[1]
            line = str(token[2][0])
            line_num = token[2][0]

            value = token[1]
            line = str(token[2][0])

            # Track function and class ancestry
            if token_type == tokenize.NAME:
                possible_fmt_str = None
                if value in ('def', 'class'):
                    name = value
                elif name:
                    parent = stack[-1][2]
                    prefix = ''
                    if parent != self.MODULE:
                        prefix = '.' if parent == self.CLASS else ', '
                    if name == 'class':
                        stack.append(('%s%s' % (prefix, value), len(indent), self.CLASS))
                    elif name == 'def':
                        stack.append(('%s%s()' % (prefix, value), len(indent), self.FUNCTION))
                    name = None
                elif not F_SUPPORT and value in FMT_STR:
                    possible_fmt_str = (prev_token_type, value)
            elif token_type != tokenize.STRING:
                possible_fmt_str = None

            if token_type == tokenize.COMMENT and self.comments:
                # Capture comments
                if (
                    self.group_comments and
                    last_comment and
                    comments and (comments[-1][2] + 1) == line_num
                ):
                    # Group multiple consecutive comments
                    comments[-1][0] += '\n' + value[1:]
                    comments[-1][2] = line_num
                else:
                    if len(stack) > 1:
                        loc = "%s(%s): %s" % (stack[0][0], line, ''.join([crumb[0] for crumb in stack[1:]]))
                    else:
                        loc = "%s(%s)" % (stack[0][0], line)
                    comments.append([value[1:], loc, line_num])
            if token_type == tokenize.STRING:
                # Capture docstrings.
                # If we captured an `INDENT` or `NEWLINE` previously we probably have a docstring.
                # `NL` means end of line, but not the end of the Python code line (line continuation).
                if (
                    (prev_token_type in PREV_DOC_TOKENS) or
                    (possible_fmt_str and possible_fmt_str[0] in PREV_DOC_TOKENS)
                ):
                    if self.docstrings:
                        value = value.strip()
                        if possible_fmt_str and value.startswith(("'", "\"")):
                            value = possible_fmt_str[1] + value
                        string, is_bytes = self.process_strings(value, docstrings=True)
                        if string:
                            loc = "%s(%s): %s" % (stack[0][0], line, ''.join([crumb[0] for crumb in stack[1:]]))
                            docstrings.append(
                                filters.SourceText(string, loc, 'utf-8', 'py-docstring')
                            )
                elif self.strings:
                    value = value.strip()
                    if possible_fmt_str and value.startswith(("'", "\"")):
                        value = possible_fmt_str[1] + value
                    string, is_bytes = self.process_strings(value)
                    if string:
                        loc = "%s(%s): %s" % (stack[0][0], line, ''.join([crumb[0] for crumb in stack[1:]]))
                        strings.append(filters.SourceText(string, loc, 'utf-8', 'py-string'))

            if token_type == tokenize.INDENT:
                indent = value
            elif token_type == tokenize.DEDENT:
                indent = indent[:-4]
                if len(stack) > 1 and len(indent) <= stack[-1][1]:
                    stack.pop()

            # We purposefully avoid storing comments as comments can come before docstrings,
            # and that can mess up our logic. So if the token is a comment we won't track it,
            # and comments are always followed with `NL` so we ignore that as well.
            # We only care that docstrings are preceded by `NEWLINE`.
            if token_type != tokenize.COMMENT and not (last_comment and token_type == tokenize.NL):
                prev_token_type = token_type
                last_comment = False
            else:
                last_comment = True

        final_comments = []
        for comment in comments:
            final_comments.append(filters.SourceText(textwrap.dedent(comment[0]), comment[1], encoding, 'py-comment'))

        return docstrings + final_comments + strings
678073
private function title(Post $post, int $count): string
    {
        $out = '';

        if (0 === ($title_words = $this->posts->args['title']['length'])) {
            return $out;
        }

        if (!($title = \get_the_title($post->get()))) {
            return $out;
        }

        $out .= '<'.($title_tag = \sanitize_key(
            $this->posts->args['title']['tag']
        )).' class="entry-title" itemprop="name headline">';

        $anchor_title = ($title_words > 0)
            ? ' title="'.\esc_attr(\wp_strip_all_tags($title, true)).'" ' : '';

        if ($title_link = $this->posts->args['title']['link']) {
            $out .= '<a itemprop="url" href="'.\get_permalink($post->get()).
                '" '. $anchor_title.' rel="bookmark">';
        }

        if ($title_words < 0) {
            $out .= \sanitize_text_field($title);
        } else {
            $out .= \wp_trim_words(
                $title,
                $title_words,
                '<span class="ellipsis">...</span>'
            );
        }

        if ($title_link) {
            $out .= '</a>';
        }

        $out .= '</'.$title_tag.'>';

        return $out;
    }
697237
def title(self, title=None):
        """"""

        if title is None:
            return self._title
        else:
            if not isinstance(title, str):
                raise TypeError("title must be str, not '%s'" % str(title))
            self._title = title
1112487
def _get_comments_count(session, group_or_user_id, wall_id):
        
        response = session.fetch("wall.getComments", count=100, owner_id=group_or_user_id, post_id=wall_id)
        return response.get('count')
924660
public function wordCount()
    {
        $count = 0;

        foreach ($this->getParameters() as $value)
            $count += str_word_count(strip_tags($value));

        return $count;
    }
752568
def word_texts(self):
        """"""
        if not self.is_tagged(WORDS):
            self.tokenize_words()
        return [word[TEXT] for word in self[WORDS]]
57576
def title(self):
        """"""
        try:
            return self._properties['title']
        except KeyError:
            metadata = self.fetch_sheet_metadata()
            self._properties.update(metadata['properties'])
            return self._properties['title']
731436
def get_comment(self, table: str, column: str) -> str:
        """"""
        return self.flavour.get_comment(self, table, column)
70655
def commentmap(self, cache=True):
        """"""
        if self.__commentmap is not None and cache==True:
            return self.__commentmap
        else:
            x = self.xml(src='word/comments.xml')
            d = Dict()
            if x is None: return d
            for comment in x.root.xpath("w:comment", namespaces=self.NS):
                id = comment.get("{%(w)s}id" % self.NS)
                typ = comment.get("{%(w)s}type" % self.NS)
                d[id] = Dict(id=id, type=typ, elem=comment)
            if cache==True: self.__commentmap = d
            return d
860195
private function getCommentsCountQuery($postTableName, $commentTableName)
    {
        switch ($this->getConnection()->getDriver()->getDatabasePlatform()->getName()) {
            case 'postgresql':
                return sprintf(
            'UPDATE %s SET comments_count = count_comment.total
            FROM (SELECT c.post_id, count(*) AS total FROM %s AS c WHERE c.status = 1 GROUP BY c.post_id) count_comment
            WHERE %s.id = count_comment.post_id', $postTableName, $commentTableName, $postTableName);

            default:
                return sprintf(
            'UPDATE %s p, (SELECT c.post_id, count(*) as total FROM %s as c WHERE c.status = 1 GROUP BY c.post_id) as count_comment
            SET p.comments_count = count_comment.total
            WHERE p.id = count_comment.post_id', $postTableName, $commentTableName);
        }
    }
360747
def comments(self, limit=None):
        
        return self._reddit._limit_get(self.permalink, limit=limit)[1]
1083024
def comment_count(self):
        
        # Get the comment model.
        comment_model = comments.get_model()

        modelbase_content_type = ContentType.objects.get(app_label="panya", model="modelbase")

        # Create a qs filtered for the ModelBase or content_type objects.
        qs = comment_model.objects.filter(
            content_type__in = [self.content_type, modelbase_content_type],
            object_pk    = smart_unicode(self.pk),
            site__pk     = settings.SITE_ID,
        )

        # The is_public and is_removed fields are implementation details of the
        # built-in comment model's spam filtering system, so they might not
        # be present on a custom comment model subclass. If they exist, we
        # should filter on them.
        field_names = [f.name for f in comment_model._meta.fields]
        if 'is_public' in field_names:
            qs = qs.filter(is_public=True)
        if getattr(settings, 'COMMENTS_HIDE_REMOVED', True) and 'is_removed' in field_names:
            qs = qs.filter(is_removed=False)

        # Return ammount of items in qs.
        return qs.count()
769661
def _get_title(self):
        """"""
        #TODO: unicode support
        strbuffer = self.ctypes.create_string_buffer(1024)
        size = self.ctypes.c_short(1024)
        #unicode versions are (Get|Set)ConsolTitleW
        self.ctypes.windll.kernel32.GetConsoleTitleA(strbuffer, size)
        return strbuffer.value