Change the summary for the current array in the current DAF.

    http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrs_c.html

    :param insum: New summary for current array.
    :type insum: Array of floats
327596
def dafrs(insum):
    
    insum = stypes.toDoubleVector(insum)
    libspice.dafrs_c(ctypes.byref(insum))
1235995
public void setSummary(java.lang.String summary) {
        getStateHelper().put(PropertyKeys.summary, summary);
        handleAttribute("summary", summary);
    }
865565
def _summary(in_file):
    
    data = Counter()
    out_file = in_file + "_size_stats"
    if file_exists(out_file):
        return out_file
    with open(in_file) as in_handle:
        for line in in_handle:
            counts = int(line.strip().split("_x")[1])
            line = next(in_handle)
            l = len(line.strip())
            next(in_handle)
            next(in_handle)
            data[l] += counts
    with file_transaction(out_file) as tx_out_file:
        with open(tx_out_file, 'w') as out_handle:
            for l, c in data.items():
                out_handle.write("%s %s\n" % (l, c))
    return out_file
881444
def _update_summary(self, system):
        
        self.basic.update({
            'nbus': system.Bus.n,
            'ngen': system.PV.n + system.SW.n,
            'ngen_on': sum(system.PV.u) + sum(system.SW.u),
            'nload': system.PQ.n,
            'nshunt': system.Shunt.n,
            'nline': system.Line.n,
            'ntransf': system.Line.trasf.count(True),
            'narea': system.Area.n,
        })
1078246
public void setSummaryItems(java.util.Collection<InventoryDeletionSummaryItem> summaryItems) {
        if (summaryItems == null) {
            this.summaryItems = null;
            return;
        }

        this.summaryItems = new com.amazonaws.internal.SdkInternalList<InventoryDeletionSummaryItem>(summaryItems);
    }
415900
void adjustLeft(float newValue) {
    	Object[] o = (Object[])attributes.get(Chunk.TAB);
    	if (o != null) {
    		attributes.put(Chunk.TAB, new Object[]{o[0], o[1], o[2], new Float(newValue)});
    	}
    }
83082
def taf(trans: TafLineTrans) -> str:
    
    summary = []
    if trans.wind:
        summary.append('Winds ' + trans.wind)
    if trans.visibility:
        summary.append('Vis ' + trans.visibility[:trans.visibility.find(' (')].lower())
    if trans.altimeter:
        summary.append('Alt ' + trans.altimeter[:trans.altimeter.find(' (')])
    if trans.other:
        summary.append(trans.other)
    if trans.clouds:
        summary.append(trans.clouds.replace(' - Reported AGL', ''))
    if trans.wind_shear:
        summary.append(trans.wind_shear)
    if trans.turbulance:
        summary.append(trans.turbulance)
    if trans.icing:
        summary.append(trans.icing)
    return ', '.join(summary)
419711
private void addPreviewMeasurementSquaredDiffsToSum(
            List<double[]> meanMeasurements, 
            List<double[]> measurementsSquaredDiffSum, 
            Preview        preview, 
            int            numEntriesPerPreview)
    {
        List<double[]> previewMeasurements = preview.getData();
        
        // add standard deviation for each measurement in each entry
        for (int entryIdx = 0; entryIdx < numEntriesPerPreview; entryIdx++) {
            double[] meanEntry    = meanMeasurements.get(entryIdx);
            double[] previewEntry = previewMeasurements.get(entryIdx);
            double[] squaredDiffSumEntry;
            
            if (measurementsSquaredDiffSum.size() > entryIdx) {
                squaredDiffSumEntry = measurementsSquaredDiffSum.get(entryIdx);
            }
            else {
                // initialize sum entry
                squaredDiffSumEntry = new double[previewEntry.length];
                measurementsSquaredDiffSum.add(squaredDiffSumEntry);
            }
            
            // first measurement is used for indexing
            // -> simply copy from first preview
            if (squaredDiffSumEntry[0] == 0.0) {
                squaredDiffSumEntry[0] = previewEntry[0];
            }
            
            // add squared differences for current entry
            for (int m = 1; m < previewEntry.length; m++) {
                double diff        = (meanEntry[m] - previewEntry[m]);
                double squaredDiff = diff * diff;
                squaredDiffSumEntry[m] += squaredDiff;
            }
        }
    }
709814
def summary(self, indicator_data):
        """"""
        summary = []
        for v in self._value_fields:
            summary.append(indicator_data.get(v, ''))
        return indicator_data.get('summary', ' : '.join(summary))
154712
def update_from_stats(self, stats):
        """"""

        sd = dict(stats)

        for c in self.columns:

            if c not in sd:
                continue

            stat = sd[c]

            if stat.size and stat.size > c.size:
                c.size = stat.size

            c.lom = stat.lom
1301235
def set_float_info(self, field, data):
        
        _check_call(_LIB.XGDMatrixSetFloatInfo(self.handle,
                                               c_str(field),
                                               c_array(ctypes.c_float, data),
                                               len(data)))
1225049
def da2cf(dataarray, epoch=EPOCH):
        """"""
        new_data = dataarray.copy()

        # Remove the area
        new_data.attrs.pop('area', None)

        anc = [ds.attrs['name']
               for ds in new_data.attrs.get('ancillary_variables', [])]
        if anc:
            new_data.attrs['ancillary_variables'] = ' '.join(anc)
        # TODO: make this a grid mapping or lon/lats
        # new_data.attrs['area'] = str(new_data.attrs.get('area'))
        for key, val in new_data.attrs.copy().items():
            if val is None:
                new_data.attrs.pop(key)
        new_data.attrs.pop('_last_resampler', None)

        if 'time' in new_data.coords:
            new_data['time'].encoding['units'] = epoch
            new_data['time'].attrs['standard_name'] = 'time'
            new_data['time'].attrs.pop('bounds', None)
            if 'time' not in new_data.dims:
                new_data = new_data.expand_dims('time')

        if 'x' in new_data.coords:
            new_data['x'].attrs['standard_name'] = 'projection_x_coordinate'
            new_data['x'].attrs['units'] = 'm'

        if 'y' in new_data.coords:
            new_data['y'].attrs['standard_name'] = 'projection_y_coordinate'
            new_data['y'].attrs['units'] = 'm'

        new_data.attrs.setdefault('long_name', new_data.attrs.pop('name'))
        if 'prerequisites' in new_data.attrs:
            new_data.attrs['prerequisites'] = [np.string_(str(prereq)) for prereq in new_data.attrs['prerequisites']]
        return new_data
589097
def add_summary_page(self):
        """"""
        s = PortfolioSummary()
        s.include_long_short()
        pieces = []
        for r in self.results:
            tmp = s(r.port, PortfolioSummary.analyze_returns)
            tmp['desc'] = r.desc
            tmp['sid'] = r.sid
            tmp = tmp.set_index(['sid', 'desc'], append=1).reorder_levels([2, 1, 0])
            pieces.append(tmp)
        frame = pd.concat(pieces)

        tf = self.pdf.table_formatter(frame)
        tf.apply_basic_style(cmap=self.table_style)
        # [col.guess_format(pcts=1, trunc_dot_zeros=1) for col in tf.cells.iter_cols()]
        tf.cells.match_column_labels(['nmonths', 'cnt', 'win cnt', 'lose cnt', 'dur max']).int_format()
        tf.cells.match_column_labels(['sharpe ann', 'sortino', 'dur avg']).float_format(precision=1)
        tf.cells.match_column_labels(['maxdd dt']).apply_format(new_datetime_formatter('%d-%b-%y'))
        tf.cells.match_column_labels(['cagr', 'mret avg', 'mret std ann', 'ret std', 'mret avg ann', 'maxdd', 'avg dd',
                                      'winpct', 'ret avg', 'ret min', 'ret max']).percent_format()

        self.pdf.build_page('summary', {'F1': tf.build()})
273661
def _modify_report(summary_path, out_dir):
    """"""
    summary_path = op.abspath(summary_path)
    template = op.normpath(op.join(op.dirname(op.realpath(template_seqcluster.__file__)), "report.rmd"))
    content = open(template).read()
    out_content = string.Template(content).safe_substitute({'path_abs': summary_path})
    out_file = op.join(out_dir, "srna_report.rmd")
    with open(out_file, 'w') as out_handle:
        out_handle.write(out_content)
    return out_file
171106
def pick_summary_data(key, summary_df, selected_summaries):
    """"""

    selected_summaries_dict = create_selected_summaries_dict(selected_summaries)
    value = selected_summaries_dict[key]
    return summary_df.iloc[:, summary_df.columns.get_level_values(1) == value]
671753
private static void summarizeGLMModel(ModelSummary summary, hex.glm.GLMModel model) {
    // add generic fields such as column names
    summarizeModelCommonFields(summary, model);

    summary.model_algorithm = "GLM";

    JsonObject all_params = (model.get_params()).toJSON();
    summary.critical_parameters = whitelistJsonObject(all_params, GLM_critical_params);
    summary.secondary_parameters = whitelistJsonObject(all_params, GLM_secondary_params);
    summary.expert_parameters = whitelistJsonObject(all_params, GLM_expert_params);
  }
945581
def updateAltHistory(self):
        ''''''
        self.altHist.append(self.relAlt)
        self.timeHist.append(self.relAltTime)
        
        # Delete entries older than x seconds
        histLim = 10
        currentTime = time.time()
        point = 0
        for i in range(0,len(self.timeHist)):
            if (self.timeHist[i] > (currentTime - 10.0)):
                break
        # Remove old entries
        self.altHist = self.altHist[i:]
        self.timeHist = self.timeHist[i:]
        
        # Transform Data
        x = []
        y = []
        tmin = min(self.timeHist)
        tmax = max(self.timeHist)
        x1 = self.leftPos+(self.vertSize/10.0)
        y1 = -0.25
        altMin = 0
        altMax = max(self.altHist)
        # Keep alt max for whole mission
        if altMax > self.altMax:
            self.altMax = altMax
        else:
            altMax = self.altMax
        if tmax != tmin:
            mx = 0.5/(tmax-tmin)
        else:
            mx = 0.0
        if altMax != altMin:
            my = 0.5/(altMax-altMin)
        else:
            my = 0.0
        for t in self.timeHist:
            x.append(mx*(t-tmin)+x1)
        for alt in self.altHist:
            val = my*(alt-altMin)+y1
            # Crop extreme noise
            if val < -0.25:
                val = -0.25
            elif val > 0.25:
                val = 0.25
            y.append(val)
        # Display Plot
        self.altHistRect.set_x(self.leftPos+(self.vertSize/10.0))
        self.altPlot.set_data(x,y)
        self.altMarker.set_data(self.leftPos+(self.vertSize/10.0)+0.5,val)
        self.altText2.set_position((self.leftPos+(4*self.vertSize/10.0)+0.5,val))
        self.altText2.set_size(self.fontSize)
        self.altText2.set_text('%.f m' % self.relAlt)