Pull this room's statistics
558065
def statistics(options = {})

      response = self.class.get(@api.statistics_config[:url],
        :query => {
          :room_id    => room_id,
          :date       => options[:date],
          :timezone   => options[:timezone],
          :format     => options[:format],
          :auth_token => @token,
        }.reject!{|k,v| v.nil?},
        :headers => @api.headers
      )

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      response.body
    end
806211
def make_statistics_information(info):
  """"""
  if not info.splits.total_num_examples:
    # That means that we have yet to calculate the statistics for this.
    return "None computed"

  stats = [(info.splits.total_num_examples, "ALL")]
  for split_name, split_info in info.splits.items():
    stats.append((split_info.num_examples, split_name.upper()))
  # Sort reverse on number of examples.
  stats.sort(reverse=True)
  stats = "\n".join([
      "{0:10} | {1:>10,}".format(name, num_exs) for (num_exs, name) in stats
  ])
  return STATISTICS_TABLE.format(split_statistics=stats)
1036627
def statistics(self):
        
        if self._statistics is None:
            self._statistics = TaskStatisticsList(
                self._version,
                assistant_sid=self._solution['assistant_sid'],
                task_sid=self._solution['sid'],
            )
        return self._statistics
790832
def stats(self, conn, args=None):
        """"""
        # req  - stats [additional args]\r\n
        # resp - STAT <name> <value>\r\n (one per result)
        #        END\r\n
        if args is None:
            args = b''

        conn.writer.write(b''.join((b'stats ', args, b'\r\n')))

        result = {}

        resp = yield from conn.reader.readline()
        while resp != b'END\r\n':
            terms = resp.split()

            if len(terms) == 2 and terms[0] == b'STAT':
                result[terms[1]] = None
            elif len(terms) == 3 and terms[0] == b'STAT':
                result[terms[1]] = terms[2]
            elif len(terms) >= 3 and terms[0] == b'STAT':
                result[terms[1]] = b' '.join(terms[2:])
            else:
                raise ClientException('stats failed', resp)

            resp = yield from conn.reader.readline()

        return result
803478
def stats(self, name, value):
        
        for counter in self._counters:
            counter.stats(name, value)
58706
def stats(self):
        
        def redFunc(left_counter, right_counter):
            return left_counter.mergeStats(right_counter)

        return self.mapPartitions(lambda i: [StatCounter(i)]).reduce(redFunc)
884334
def output_flair_stats(self):
        """"""
        css_counter = Counter()
        text_counter = Counter()
        for flair in self.current_flair():
            if flair['flair_css_class']:
                css_counter[flair['flair_css_class']] += 1
            if flair['flair_text']:
                text_counter[flair['flair_text']] += 1

        print('Flair CSS Statistics')
        for flair, count in sorted(css_counter.items(),
                                   key=lambda x: (x[1], x[0])):
            print('{0:3} {1}'.format(count, flair))

        print('Flair Text Statistics')
        for flair, count in sorted(text_counter.items(),
                                   key=lambda x: (x[1], x[0]), reverse=True):
            print('{0:3} {1}'.format(count, flair))
945316
def participants_in_room(self, message):
        """"""
        room = self.get_room_from_message(message)
        context = {"participants": room.participants, }
        self.say(rendered_template("participants.html", context), message=message, html=True)
68439
def get_stats(self, request, context):
        """"""
        _log_request(request, context)
        m = self.listener.memory
        return clearly_pb2.StatsMessage(
            task_count=m.task_count,
            event_count=m.event_count,
            len_tasks=len(m.tasks),
            len_workers=len(m.workers)
        )
106751
def stats():
    '''
    
    '''
    ret = {}
    cmd = 'locate -S'
    out = __salt__['cmd.run'](cmd).splitlines()
    for line in out:
        comps = line.strip().split()
        if line.startswith('Database'):
            ret['database'] = comps[1].replace(':', '')
            continue
        ret[' '.join(comps[1:])] = comps[0]
    return ret
471394
def summarise(self):
        
        res = ''
        if self.user == 'Developer': 
            if self.host == 'Home PC':
                res += 'At Home'
            else:
                res += 'Away from PC'
        elif self.user == 'User' and self.host == 'Home PC':
            res += 'Remote desktop into home PC'
        res += '\n'
        res += self.transport
        return res
635109
def stats(args):
    
    from jcvi.utils.cbook import percentage

    p = OptionParser(stats.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    blocksfile, = args
    fp = open(blocksfile)
    counts = defaultdict(int)
    total = orthologous = 0
    for row in fp:
        atoms = row.rstrip().split("\t")
        hits = [x for x in atoms[1:] if x != '.']
        counts[len(hits)] += 1
        total += 1
        if atoms[1] != '.':
            orthologous += 1

    print("Total lines: {0}".format(total), file=sys.stderr)
    for i, n in sorted(counts.items()):
        print("Count {0}: {1}".format(i, percentage(n, total)), file=sys.stderr)

    print(file=sys.stderr)

    matches = sum(n for i, n in counts.items() if i != 0)
    print("Total lines with matches: {0}".\
                format(percentage(matches, total)), file=sys.stderr)
    for i, n in sorted(counts.items()):
        if i == 0:
            continue

        print("Count {0}: {1}".format(i, percentage(n, matches)), file=sys.stderr)

    print(file=sys.stderr)
    print("Orthologous matches: {0}".\
                format(percentage(orthologous, matches)), file=sys.stderr)
449969
def statistics(stats)
      traverse do |node, position, stack|
        if position == 0
          if node.is_leaf?
            stats.leaf_nodes += 1
            depth = stack.size + 1
            if stats.min_depth.nil? || stats.min_depth < depth
              stats.min_depth = depth
            end
            if stats.max_depth.nil? || stats.max_depth > depth
              stats.max_depth = depth
            end
          else
            stats.branch_nodes += 1
          end
        end
      end
    end
824649
def printFrequencyStatistics(counts, frequencies, numWords, size):
  
  avgBits = float(counts.sum())/numWords
  print "Retina width=128, height=128"
  print "Total number of words processed=",numWords
  print "Average number of bits per word=",avgBits,
  print "avg sparsity=",avgBits/size
  print "counts matrix sum=",counts.sum(),
  print "max=",counts.max(), "min=",counts.min(),
  print "mean=",counts.sum()/float(size)
  print "frequency matrix sum=",frequencies.sum(),
  print "max=",frequencies.max(), "min=",frequencies.min(),
  print "mean=",frequencies.sum()/float(size)
  print "Number of bits with zero entries",frequencies.nZeroCols()
5653
function descStats(sample) {
    var S = [].concat(sample);
    S.sort(function sortOrder(a, b) {
        return a - b;
    });
    var N = S.length;
    var q1 = S[Math.floor(0.25 * N)];
    var q2 = S[Math.floor(0.50 * N)];
    var q3 = S[Math.floor(0.70 * N)];
    var iqr = q3 - q1;
    var tol = 3 * iqr / 2;
    var hi = q3 + tol;
    var whiIndex = N;
    while (--whiIndex > 0) {
        if (S[whiIndex] <= hi) {
            break;
        }
    }
    var whiPct = (whiIndex + 1) / N;
    var whi = S[whiIndex];
    return {
        min: S[0],
        max: S[N - 1],
        q1: q1,
        q2: q2,
        q3: q3,
        hi: hi,
        whi: whi,
        whiPct: whiPct
    };
}
309957
def read_stats(self):
        

        stats_with_captions = OrderedDict()
        for stat_name in self.stats_captions.keys():
            stats_with_captions[stat_name] = self.read_stat(self.stats_captions[stat_name], stat_name)
        return stats_with_captions
41996
def read_stats(self):
        

        captions, rows = self._get_pages()
        name_caption_index = captions.index(self.name_caption)
        captions.pop(name_caption_index)
        self.captions = captions
        self.statistics = OrderedDict()
        for row in rows:
            name = row.pop(name_caption_index)
            self.statistics[name] = row