Get comments record.
        output should be like: {'k1': 'v1', 'k2': 'v2'}'
498486
def get_comments_by_userid(self, userid):
        
        userid = userid
        with get_guest_conn() as conn:
            res = conn.execute("SELECT comments FROM guests "
                               "WHERE userid=?", (userid,))

        result = res.fetchall()
        comments = {}
        if result[0][0]:
            comments = json.loads(result[0][0])
        return comments
1157248
def _extract_more_comments(tree):
        """"""
        more_comments = []
        queue = [(None, x) for x in tree]
        while len(queue) > 0:
            parent, comm = queue.pop(0)
            if isinstance(comm, MoreComments):
                heappush(more_comments, comm)
                if parent:
                    parent.replies.remove(comm)
                else:
                    tree.remove(comm)
            else:
                for item in comm.replies:
                    queue.append((comm, item))
        return more_comments
767554
def get_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.CommitComment.CommitComment,
            self._requester,
            self.url + "/comments",
            None
        )
50558
def get_comment_init(request, obj):
    
    if request.user.is_authenticated():
        init = {'obj': obj, 'username': request.user.username, 'email': request.user.email}
    else:
        init = {'obj': obj}
    return init
606274
def comment_set(self):
        
        ct = ContentType.objects.get_for_model(self.__class__)
        qs = Comment.objects.filter(
            content_type=ct,
            object_pk=self.pk)
        qs = qs.exclude(is_removed=True)
        qs = qs.order_by('-submit_date')
        return qs
1201555
def get_comments(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.CommentList(self._results, runtime=self._runtime)
1260413
def comments(tag, limit=0, flags=0, **kwargs):
    """"""

    return [comment for comment in cm.CommentsMatch(tag).get_comments(limit)]
964998
def comment_lines(lines):
    """"""
    ret = []
    for line in lines:
        ws_prefix, rest, ignore = RE_LINE_SPLITTER_COMMENT.match(line).groups()
        ret.append(ws_prefix + '#' + rest)
    return ''.join(ret)
831178
function getCommentLineNums(comments) {
    const lines = [];

    comments.forEach(token => {
        const start = token.loc.start.line;
        const end = token.loc.end.line;

        lines.push(start, end);
    });
    return lines;
}
1175353
def obtain_comments(check = nil)

      if check.blank? && !@content.blank? && @content[0].blank?
        Comment.where(:post_id => @content.id, :comment_approved => 'Y')
      else
        Comment.where(:post_id => check, :comment_approved => 'Y')
      end

    end
588462
def comments(self):
        

        endpoint = self.links["replies"]
        if self._comments is None:
            self._comments = Feed(endpoint, pypump=self._pump)
        return self._comments
1077792
def _extract_comments(self):
        """"""
        self._det_file.seek(0, 0)
        for line in self._det_file.readlines():
            line = line.strip()
            if line.startswith('#'):
                self.add_comment(line[1:])
838490
def comments_for(context, obj):
    
    form_class = import_dotted_path(settings.COMMENT_FORM_CLASS)
    form = form_class(context["request"], obj)
    context_form = context.get("posted_comment_form", form)
    context.update({
        'posted_comment_form':
            context_form if context_form.target_object == obj else form,
        'unposted_comment_form': form,
        'comment_url': reverse("comment"),
        'object_for_comments': obj,
    })
    return context
590455
def get_num_commenters(self, item):
        """"""

        commenters = [comment['user']['login'] for comment in item['comments_data']]
        return len(set(commenters))
168451
def restore_yaml_comments(data, default_data):
    
    comment_map = dict()
    default_lines = iter(default_data.splitlines())
    for line in default_lines:
        if not line:
            comment = "\n"
        elif line.startswith("#"):
            comment = "{0}\n".format(line)
        else:
            continue
        while True:
            line = next(default_lines)
            if line and not line.startswith("#"):
                break
            comment += "{0}\n".format(line)
        key = line.split(':')[0].strip()
        comment_map[key] = comment
    out_lines = iter(data.splitlines())
    out_data = ""
    for line in out_lines:
        key = line.split(':')[0].strip()
        if key in comment_map:
            out_data += comment_map[key]
        out_data += "{0}\n".format(line)
    return out_data
384804
def get_comments(self, commentable_type, id_):
    
    return _get_request(_COM.format(c_api=_C_API_BEGINNING,
                                            ct=commentable_type,
                                            id_=id_,
                                            api=_API_VERSION,
                                            at=self.access_token))
1089062
def case_comments(self):
        """"""
        comments = (comment for comment in self.comments if
                    comment.variant_id is None)
        return comments