Return the list of comment moderators for the given collection.
9429
def get_collection_moderators(collection):
    
    from invenio_access.engine import acc_get_authorized_emails

    res = list(
        acc_get_authorized_emails(
            'moderatecomments',
            collection=collection))
    if not res:
        return [CFG_WEBCOMMENT_DEFAULT_MODERATOR, ]
    return res
487038
def get_queryset(self):
        
        forums = self.request.forum_permission_handler.get_readable_forums(
            Forum.objects.all(), self.request.user,
        )
        topics = Topic.objects.filter(forum__in=forums)
        topics_pk = map(lambda t: t.pk, track_handler.get_unread_topics(topics, self.request.user))
        return Topic.approved_objects.filter(pk__in=topics_pk).order_by('-last_post_on')
648487
def get_moderators(self, subreddit, **kwargs):
        """"""
        url = self.config['moderators'].format(
            subreddit=six.text_type(subreddit))
        return self.request_json(url, **kwargs)
767554
def get_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.CommitComment.CommitComment,
            self._requester,
            self.url + "/comments",
            None
        )
220615
def get_recent_comments(number=5, template='zinnia/tags/comments_recent.html'):
    
    # Using map(smart_text... fix bug related to issue #8554
    entry_published_pks = map(smart_text,
                              Entry.published.values_list('id', flat=True))
    content_type = ContentType.objects.get_for_model(Entry)

    comments = get_comment_model().objects.filter(
        Q(flags=None) | Q(flags__flag=CommentFlag.MODERATOR_APPROVAL),
        content_type=content_type, object_pk__in=entry_published_pks,
        is_public=True).order_by('-pk')[:number]

    comments = comments.prefetch_related('content_object')

    return {'template': template,
            'comments': comments}
896294
def commentList(request):
    
    if request.method == 'POST':
        return post(request)

    comments = []
    guid = request.GET.get('guid', None)

    if guid:
        obj = getObjectsFromGuids([guid])[0]
        if obj.AssetType == 1:
            model = 'image'
        else:
            model = 'video'
        contenttype = ContentType.objects.get(app_label="frog", model=model)
        comments = Comment.objects.filter(object_pk=obj.id, content_type=contenttype)

    res = Result()
    for comment in comments:
        res.append(commentToJson(comment))
    return JsonResponse(res.asDict())
578686
def _get_comments(group_tasks):
    
    comments = {}
    for status, human in _COMMENTS:
        num_tasks = _get_number_of_tasks_for(status, group_tasks)
        if num_tasks:
            space = "    " if status in _PENDING_SUB_STATUSES else ""
            comments[status] = '{space}* {num_tasks} {human}:\n'.format(
                space=space,
                num_tasks=num_tasks,
                human=human)
    return comments
357011
def get_comments_at_indexes(self, indexes):
        """"""
        s = self.style[indexes]
        has_comments = np.where(s & comment_bit_mask > 0)[0]
        comments = []
        for where_index in has_comments:
            raw = self.get_raw_index(indexes[where_index])
            try:
                comment = self.rawdata.extra.comments[raw]
            except KeyError:
                comment = None
            comments.append(comment)
        return has_comments, comments
590455
def get_num_commenters(self, item):
        """"""

        commenters = [comment['user']['login'] for comment in item['comments_data']]
        return len(set(commenters))
620212
def get_comment_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'comment_record_types' in kwargs:
            return self.get_comment_form_for_create(*args, **kwargs)
        else:
            return self.get_comment_form_for_update(*args, **kwargs)
721216
def getcomments(self):
        
        comment_list = self.bugzilla.get_comments([self.bug_id])
        return comment_list['bugs'][str(self.bug_id)]['comments']
205485
def get_cached_moderated_reddits(self):
        
        if self._mod_subs is None:
            self._mod_subs = {'mod': self.reddit_session.get_subreddit('mod')}
            for sub in self.reddit_session.get_my_moderation(limit=None):
                self._mod_subs[six.text_type(sub).lower()] = sub
        return self._mod_subs
675785
def p_CommentOrEmptyLineList(p):
    '''
     
    '''
    if len(p) <= 1:
        p[0] = CommentOrEmptyLineList(None, None)
    elif len(p) <= 2:
        p[0] = CommentOrEmptyLineList(None, p[1])
    else:
        p[0] = CommentOrEmptyLineList(p[1], p[2])
416365
public function Comments()
    {
        $list = $this->AllVisibleComments();

        // If nesting comments, only show root level
        if ($this->owner->getCommentsOption('nested_comments')) {
            $list = $list->filter('ParentCommentID', 0);
        }

        $this->owner->extend('updateComments', $list);
        return $list;
    }
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;
}
1163585
def for_entity(obj, check_commentable=False):
    """"""
    if check_commentable and not is_commentable(obj):
        return []

    return getattr(obj, ATTRIBUTE)
245103
def get_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.GistComment.GistComment,
            self._requester,
            self.url + "/comments",
            None
        )