This function collects the values from one run.
        Only columns that should be part of the table are collected.
559149
def create_from_xml(sourcefileTag, get_value_from_logfile, listOfColumns,
                        correct_only, log_zip_cache, columns_relevant_for_diff,
                        result_file_or_url):
        '''
        
        '''

        def read_logfile_lines(log_file):
            if not log_file:
                return []
            log_file_url = Util.make_url(log_file)
            url_parts = urllib.parse.urlparse(log_file_url, allow_fragments=False)
            log_zip_path = os.path.dirname(url_parts.path) + ".zip"
            log_zip_url = urllib.parse.urlunparse((url_parts.scheme, url_parts.netloc,
                log_zip_path, url_parts.params, url_parts.query, url_parts.fragment))
            path_in_zip = urllib.parse.unquote(
                os.path.relpath(url_parts.path, os.path.dirname(log_zip_path)))
            if log_zip_url.startswith("file:///") and not log_zip_path.startswith("/"):
                # Replace file:/// with file: for relative paths,
                # otherwise opening fails.
                log_zip_url = "file:" + log_zip_url[8:]

            try:
                with Util.open_url_seekable(log_file_url, 'rt') as logfile:
                    return logfile.readlines()
            except IOError as unused_e1:
                try:
                    if log_zip_url not in log_zip_cache:
                        log_zip_cache[log_zip_url] = zipfile.ZipFile(
                            Util.open_url_seekable(log_zip_url, 'rb'))
                    log_zip = log_zip_cache[log_zip_url]

                    try:
                        with io.TextIOWrapper(log_zip.open(path_in_zip)) as logfile:
                            return logfile.readlines()
                    except KeyError:
                        logging.warning("Could not find logfile '%s' in archive '%s'.",
                                        log_file, log_zip_url)
                        return []

                except IOError as unused_e2:
                    logging.warning("Could not find logfile '%s' nor log archive '%s'.",
                                    log_file, log_zip_url)
                    return []

        status = Util.get_column_value(sourcefileTag, 'status', '')
        category = Util.get_column_value(sourcefileTag, 'category', result.CATEGORY_MISSING)
        score = result.score_for_task(
            sourcefileTag.get('properties', '').split(), category, status)
        logfileLines = None

        values = []

        for column in listOfColumns: # for all columns that should be shown
            value = None # default value
            if column.title.lower() == 'status':
                value = status

            elif not correct_only or category == result.CATEGORY_CORRECT:
                if not column.pattern or column.href:
                    # collect values from XML
                    value = Util.get_column_value(sourcefileTag, column.title)

                else: # collect values from logfile
                    if logfileLines is None: # cache content
                        logfileLines = read_logfile_lines(sourcefileTag.get('logfile'))

                    value = get_value_from_logfile(logfileLines, column.pattern)

            if column.title.lower() == 'score' and value is None and score is not None:
                # If no score column exists in the xml, take the internally computed score,
                # if available
                value = str(score)
            values.append(value)

        sourcefiles = sourcefileTag.get('files')
        if sourcefiles:
            if sourcefiles.startswith('['):
                sourcefileList = [s.strip() for s in sourcefiles[1:-1].split(',') if s.strip()]
                sourcefiles_exist = True if sourcefileList else False
            else:
                raise AssertionError('Unknown format for files tag:')
        else:
            sourcefiles_exist = False

        return RunResult(get_task_id(sourcefileTag, result_file_or_url if sourcefiles_exist else None),
                         status, category, score,
                         sourcefileTag.get('logfile'), listOfColumns, values,
                         columns_relevant_for_diff, sourcefiles_exist=sourcefiles_exist)
973636
def _loadColumns(self, record, columnName, value):
        
        value = unwrapNone(value)
        item = self.findRecordItem(record)
        if item:
            item.updateColumnValue(record.schema().column(columnName),
                                   value,
                                   self.column(columnName))
338293
def table(self, oid, columns=None, column_value_mapping=None, non_repeaters=0,
              max_repetitions=20, fetch_all_columns=True):
        
        snmpsecurity = self._get_snmp_security()
        base_oid = oid.strip(".")

        if not fetch_all_columns and not columns:
            raise ValueError("please use the columns argument to "
                             "indicate which columns to fetch")

        if fetch_all_columns:
            columns_to_fetch = [""]
        else:
            columns_to_fetch = ["." + str(col_id) for col_id in columns.keys()]

        full_obj_table = []

        for col in columns_to_fetch:
            try:
                engine_error, pdu_error, pdu_error_index, obj_table = self._cmdgen.bulkCmd(
                    snmpsecurity,
                    cmdgen.UdpTransportTarget((self.host, self.port), timeout=self.timeout,
                                              retries=self.retries),
                    non_repeaters,
                    max_repetitions,
                    oid + col,
                )

            except Exception as e:
                raise SNMPError(e)
            if engine_error:
                raise SNMPError(engine_error)
            if pdu_error:
                raise SNMPError(pdu_error.prettyPrint())

            # remove any trailing rows from the next subtree
            try:
                while not str(obj_table[-1][0][0].getOid()).lstrip(".").startswith(
                    base_oid + col + "."
                ):
                    obj_table.pop()
            except IndexError:
                pass

            # append this column to full result
            full_obj_table += obj_table

        t = Table(columns=columns, column_value_mapping=column_value_mapping)

        for row in full_obj_table:
            for name, value in row:
                oid = str(name.getOid()).strip(".")
                value = _convert_value_to_native(value)
                column, row_id = oid[len(base_oid) + 1:].split(".", 1)
                t._add_value(int(column), row_id, value)

        return t
688119
def values_for_column(self, column_name, limit=10000):
        
        cols = {col.column_name: col for col in self.columns}
        target_col = cols[column_name]
        tp = self.get_template_processor()

        qry = (
            select([target_col.get_sqla_col()])
            .select_from(self.get_from_clause(tp))
            .distinct()
        )
        if limit:
            qry = qry.limit(limit)

        if self.fetch_values_predicate:
            tp = self.get_template_processor()
            qry = qry.where(tp.process_template(self.fetch_values_predicate))

        engine = self.database.get_sqla_engine()
        sql = '{}'.format(
            qry.compile(engine, compile_kwargs={'literal_binds': True}),
        )
        sql = self.mutate_query_from_config(sql)

        df = pd.read_sql_query(sql=sql, con=engine)
        return [row[0] for row in df.to_records(index=False)]
328411
def _from_list_record(data):
    
    return [Schema._get_field_entry('Column%d' % (i + 1), value) for i, value in enumerate(data)]
1126416
def columns(self):
        """"""
        res = [col['name'] for col in self.column_definitions]
        res.extend([col['name'] for col in self.foreign_key_definitions])
        return res
99647
def alts_columns_used(self):
        
        return list(tz.unique(tz.concat(
            m.alts_columns_used() for m in self.models.values())))
374638
def _collect(self, section=None):
        
        if self.config['method'] == 'http':
            csv_data = self.http_get_csv_data(section)
        elif self.config['method'] == 'unix':
            csv_data = self.unix_get_csv_data()
        else:
            self.log.error("Unknown collection method: %s",
                           self.config['method'])
            csv_data = []

        data = list(csv.reader(csv_data))
        headings = self._generate_headings(data[0])
        section_name = section and self._sanitize(section.lower()) + '.' or ''

        for row in data:
            if ((self._get_config_value(section, 'ignore_servers') and
                 row[1].lower() not in ['frontend', 'backend'])):
                continue

            part_one = self._sanitize(row[0].lower())
            part_two = self._sanitize(row[1].lower())
            metric_name = '%s%s.%s' % (section_name, part_one, part_two)

            for index, metric_string in enumerate(row):
                try:
                    metric_value = float(metric_string)
                except ValueError:
                    continue

                stat_name = '%s.%s' % (metric_name, headings[index])
                self.publish(stat_name, metric_value, metric_type='GAUGE')
873956
def clear_cached(self):
        
        _TABLE_CACHE.pop(self.name, None)
        for col in _columns_for_table(self.name).values():
            col.clear_cached()
        logger.debug('cleared cached columns for table {!r}'.format(self.name))
659816
private List<String> getColumnResults(int columnIndex,
			UserCoreResult<?, ?, ?> results) {

		List<String> values = new ArrayList<>();
		while (results.moveToNext()) {
			values.add(results.getString(columnIndex));
		}

		return values;
	}
698505
def values(self):
        
        table_id = 0
        get = self.get___method
        for cell_id in range(self.width):
            val = get(self, table_id, cell_id)
            if val:
                yield val
766993
boolean incrNumberRuns(List<Cell> column, Table aggTable,
      AppAggregationKey appAggKey) throws IOException {

    /*
     * check if this is the very first insert for numbers for this app in that
     * case, there will no existing column/value for number of run in info col
     * family null signifies non existence of the column for {@link
     * Table.checkAndPut}
     */
    long expectedValueBeforePut = 0L;
    if (column.size() > 0) {
      try {
        expectedValueBeforePut = Bytes.toLong(column.get(0).getValue());
      } catch (NumberFormatException e) {
        LOG.error(
            "Could not read existing value for number of runs during aggregation"
                + appAggKey.toString());
        return false;
      }
    }

    byte[] rowKey = aggConv.toBytes(appAggKey);

    long insertValue = 1L;
    byte[] expectedValueBeforePutBytes = null;
    if (expectedValueBeforePut != 0L) {
      insertValue = 1 + expectedValueBeforePut;
      expectedValueBeforePutBytes = Bytes.toBytes(expectedValueBeforePut);
    }
    byte[] insertValueBytes = Bytes.toBytes(insertValue);

    if (LOG.isTraceEnabled()) {
      LOG.trace(" before statusCheckAndPut " + insertValue + " "
          + expectedValueBeforePut);
    }
    return executeCheckAndPut(aggTable, rowKey, expectedValueBeforePutBytes,
        insertValueBytes, AggregationConstants.INFO_FAM_BYTES,
        AggregationConstants.NUMBER_RUNS_BYTES);
  }
1105776
def distinct_values_for_column(column)  #:nodoc:
      column.model.select("distinct #{column.name}").order("#{column.name} asc").collect do|ar|
        ar[column.name]
      end.reject(&:blank?).map { |i| [i, i] }
    end
55078
private List<HBaseData> scanResults(final String columnFamily, List<HBaseData> results) throws IOException
    {
        HBaseData data = null;

        if (fetchSize == null)
        {
            for (Result result : scanner)
            {
                List<KeyValue> values = result.list();
                for (KeyValue value : values)
                {
                    data = new HBaseData(columnFamily != null ? columnFamily : new String(value.getFamily()),
                            value.getRow());
                    break;
                }
                data.setColumns(values);
                if (results == null)
                {
                    results = new ArrayList<HBaseData>();
                }
                results.add(data);
            }

            scanner = null;
            resultsIter = null;
        }
        return results;
    }
409434
def collect_values_with_count_subtree(flag=nil)
		values = collect_values_with_count
		all_children_deep(flag).each do |c|
			c.collect_values_with_count.each do |k,v|
				values[k]+=v
			end
		end
		values
	end
1282511
def _run_collect_allelic_counts(pos_file, pos_name, work_dir, data):
    
    out_dir = utils.safe_makedir(os.path.join(dd.get_work_dir(data), "structural", "counts"))
    out_file = os.path.join(out_dir, "%s-%s-counts.tsv" % (dd.get_sample_name(data), pos_name))
    if not utils.file_exists(out_file):
        with file_transaction(data, out_file) as tx_out_file:
            params = ["-T", "CollectAllelicCounts", "-L", pos_file, "-I", dd.get_align_bam(data),
                      "-R", dd.get_ref_file(data), "-O", tx_out_file]
            _run_with_memory_scaling(params, tx_out_file, data)
    return out_file
157645
def select_values(statement, build_arg = nil)
    select(statement, build_arg).collect { |row| row.values }
  end