Get a list of comments at specified indexes
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
904784
def fetch_comments_async(prs)
      threads = []

      prs.each_slice(MAX_THREAD_NUMBER) do |prs_slice|
        prs_slice.each do |pr|
          threads << Thread.new do
            pr["comments"] = []
            iterate_pages(@client, "issue_comments", pr["number"]) do |new_comment|
              pr["comments"].concat(new_comment)
            end
            pr["comments"] = pr["comments"].map { |comment| stringify_keys_deep(comment.to_hash) }
          end
        end
        threads.each(&:join)
        threads = []
      end
      nil
    end
338266
def get_all_comments(self):
        
        return bind_api(
            api=self,
            path='/comments',
            payload_type='comment',
            payload_list=True,
            pagination_param=['page_number', 'page_size']
        )
1336061
def reply_count(self, url, mode=5, after=0):
        

        sql = ['SELECT comments.parent,count(*)',
               'FROM comments INNER JOIN threads ON',
               '   threads.uri=? AND comments.tid=threads.id AND',
               '   (? | comments.mode = ?) AND',
               '   comments.created > ?',
               'GROUP BY comments.parent']

        return dict(self.db.execute(sql, [url, mode, mode, after]).fetchall())
1163491
def comments(self, issue):
        
        commit = self.as_id(issue)
        return self.get_list(url='%s/%s/comments' % (self, commit))
433030
def get_issue_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.IssueComment.IssueComment,
            self._requester,
            self.issue_url + "/comments",
            None
        )
827294
function getComments(comments) {
  if (!comments || !comments.body) return {};

  Object.assign(comments, {
    create_time: formatTime(comments.created_at),
    update_time: formatTime(comments.updated_at)
  })

  return comments;
}
284983
def get_comments(self):
        """"""
        url = self._imgur._base_url + "/3/gallery/{0}/comments".format(self.id)
        resp = self._imgur._send_request(url)
        return [Comment(com, self._imgur) for com in resp]
763051
def __parse_comments():
    ''''''
    filename = get_file('comments.tsv')

    with io.open(filename, 'r', encoding='cp1252') as textfile:
        next(textfile)

        for line in textfile:
            tokens = line.strip().split('\t')
            chebi_id = int(tokens[1])

            if chebi_id not in __COMMENTS:
                __COMMENTS[chebi_id] = []

            # Append Comment:
            com = Comment(tokens[3],
                          tokens[4],
                          tokens[5],
                          datetime.datetime.strptime(tokens[2], '%Y-%M-%d'))

            __COMMENTS[chebi_id].append(com)
106799
def getcomments(object):
    """"""
    try: lines, lnum = findsource(object)
    except IOError: return None

    if ismodule(object):
        # Look for a comment block at the top of the file.
        start = 0
        if lines and lines[0][:2] == '#!': start = 1
        while start < len(lines) and string.strip(lines[start]) in ['', '#']:
            start = start + 1
        if start < len(lines) and lines[start][:1] == '#':
            comments = []
            end = start
            while end < len(lines) and lines[end][:1] == '#':
                comments.append(string.expandtabs(lines[end]))
                end = end + 1
            return string.join(comments, '')

    # Look for a preceding block of comments at the same indentation.
    elif lnum > 0:
        indent = indentsize(lines[lnum])
        end = lnum - 1
        if end >= 0 and string.lstrip(lines[end])[:1] == '#' and \
            indentsize(lines[end]) == indent:
            comments = [string.lstrip(string.expandtabs(lines[end]))]
            if end > 0:
                end = end - 1
                comment = string.lstrip(string.expandtabs(lines[end]))
                while comment[:1] == '#' and indentsize(lines[end]) == indent:
                    comments[:0] = [comment]
                    end = end - 1
                    if end < 0: break
                    comment = string.lstrip(string.expandtabs(lines[end]))
            while comments and string.strip(comments[0]) == '#':
                comments[:1] = []
            while comments and string.strip(comments[-1]) == '#':
                comments[-1:] = []
            return string.join(comments, '')
601026
public String getComment(int index) {
		if (comments == null || index < 0 || index >= comments.size()) {
			throw new IllegalArgumentException("Not a valid comment index: " + index);
		}
		return (String)comments.get(index);
	}
993255
def get_box_comments(self, box_key):
		'''
		'''
		uri = '/'.join([
						self.api_uri,
						self.boxes_suffix,
						box_key,
						self.comments_suffix
						])
		return self._req('get', uri)
1091110
def comments(self, case_id=None, variant_id=None, username=None):
        
        logger.debug("Looking for comments")
        comment_objs = self.query(Comment)

        if case_id:
            comment_objs = comment_objs.filter_by(case_id=case_id)

        if variant_id:
            comment_objs = comment_objs.filter_by(variant_id=variant_id)
        elif case_id:
            comment_objs = comment_objs.filter_by(variant_id=None)

        return comment_objs
671312
def comments(self, text, start=0):
        

        out = [self.extractChunkContent(s)
               for s in self.chunkComment(text, start)]
        return out
408331
def associated_comments
      @associated_comments ||= begin
        result = {}
        Parser::Source::Comment.associate_locations(node, comments).each_pair do |loc, all|
          block = all #.select{ |l| l.document? || code.lines[l.loc.line].strip.start_with?('#')}
          next if block.empty?
          result[loc.line] ||= []
          result[loc.line].concat block
        end
        result
      end
    end
767554
def get_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.CommitComment.CommitComment,
            self._requester,
            self.url + "/comments",
            None
        )
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