Print a summary of the form.

        May help finding which fields need to be filled-in.
541637
def print_summary(self):
        
        for input in self.form.find_all(
                ("input", "textarea", "select", "button")):
            input_copy = copy.copy(input)
            # Text between the opening tag and the closing tag often
            # contains a lot of spaces that we don't want here.
            for subtag in input_copy.find_all() + [input_copy]:
                if subtag.string:
                    subtag.string = subtag.string.strip()
            print(input_copy)
816467
function() {

            var self = this;
            var summary = 
                self.tableSummaryBuilder(self.groupsSummary,
                                         self.pagesSummary, 
                                         self.total);
            $('#' + self.getId('summary')).html(summary);

        }
192939
function finishForm(&$form)
    {
        // add a required note, if one is needed
        if (!empty($form->_required) && !$form->_freezeAll) {
            $this->_html .= str_replace('{requiredNote}', $form->getRequiredNote(), $this->_requiredNoteTemplate);
        }
        // add form attributes and content
        $html = str_replace('{attributes}', $form->getAttributes(true), $this->_formTemplate);
        if (strpos($this->_formTemplate, '{hidden}')) {
            $html = str_replace('{hidden}', $this->_hiddenHtml, $html);
        } else {
            $this->_html .= $this->_hiddenHtml;
        }
        $this->_hiddenHtml = '';
        $this->_html = str_replace('{content}', $this->_html, $html);
        // add a validation script
        if ('' != ($script = $form->getValidationScript())) {
            $this->_html = $script . "\n" . $this->_html;
        }
    }
824653
def describe_form(label, fields):
    
    try:
        app_name, model_name = label.split('.')[-2:]
    except (IndexError, ValueError):
        raise CommandError("Need application and model name in the form: appname.model")
    model = apps.get_model(app_name, model_name)

    opts = model._meta
    field_list = []
    for f in opts.fields + opts.many_to_many:
        if not f.editable:
            continue
        if fields and f.name not in fields:
            continue
        formfield = f.formfield()
        if '__dict__' not in dir(formfield):
            continue
        attrs = {}
        valid_fields = ['required', 'initial', 'max_length', 'min_length', 'max_value', 'min_value', 'max_digits', 'decimal_places', 'choices', 'help_text', 'label']
        for k, v in formfield.__dict__.items():
            if k in valid_fields and v is not None:
                # ignore defaults, to minimize verbosity
                if k == 'required' and v:
                    continue
                if k == 'help_text' and not v:
                    continue
                if k == 'widget':
                    attrs[k] = v.__class__
                elif k in ['help_text', 'label']:
                    attrs[k] = str(force_text(v).strip())
                else:
                    attrs[k] = v

        params = ', '.join(['%s=%r' % (k, v) for k, v in sorted(attrs.items())])
        field_list.append('    %(field_name)s = forms.%(field_type)s(%(params)s)' % {
            'field_name': f.name,
            'field_type': formfield.__class__.__name__,
            'params': params
        })
    return '''
from django import forms
from %(app_name)s.models import %(object_name)s

class %(object_name)sForm(forms.Form):
%(field_list)s
''' % {'app_name': app_name, 'object_name': opts.object_name, 'field_list': '\n'.join(field_list)}
745552
def print_summary(self, stream=sys.stdout, indent=""):
        
        stream.write("%sTotal files      : %i\n" %
                     (indent, len(self.file_dict)))
        stream.write("%s  Input files    : %i\n" %
                     (indent, len(self.input_files)))
        stream.write("%s  Output files   : %i\n" %
                     (indent, len(self.output_files)))
        stream.write("%s  Internal files : %i\n" %
                     (indent, len(self.internal_files)))
        stream.write("%s  Temp files     : %i\n" %
                     (indent, len(self.temp_files)))
1097825
def get_summary_string(self):
        
        from rez.plugin_managers import plugin_manager

        txt = "Rez %s" % __version__
        txt += "\n\n%s" % plugin_manager.get_summary_string()
        return txt
786871
public void printDetails(final PrintWriter out) {
    out.print(this + ", entries = [");
    for (int i = 0; i < entries.length; i++) {
      if (entries[i] != null) {
        LinkedElement<T> e = entries[i];
        out.print("\n  " + i + ": " + e);
        for (e = e.next; e != null; e = e.next) {
          out.print(" -> " + e);
        }
      }
    }
    out.println("\n]");
  }
966781
def print_summary(num_actions, failed, duration):
    
    num_failed = len(failed)
    print("""
Summary:
{num_total} actions were in the queue.
{num_failed} actions failed to execute.

This run took: {elapsed_time:8.3f} seconds.
    """.format(
        num_total=num_actions, num_failed=num_failed, elapsed_time=duration))
787281
def summary(self):
        """"""
        if self._summary is None:
            self._summary = "No summary for element."
            for doc in self.docstring:
                if doc.doctype == "summary":
                    self._summary = doc.contents
                    break

            #If a parameter, member or local tag has dimensions or other children,
            #then the inner-text is not the right thing to use; find a grand-child
            #summary tag instead.
            if self._summary == "No summary for element." and len(self.docstring) > 0:
                summary = self.doc_children("summary")
                if len(summary) > 0:
                    self._summary = summary[0].contents
                else:
                    self._summary = self.docstring[0].contents

        return self._summary
148152
def summary(self):
        """"""
        return "\n".join([
            "Transaction:",
            "  When:        " + self.date.strftime("%a %d %b %Y"),
            "  Description: " + self.desc.replace('\n', ' '),
            "  For amount:  {}".format(self.amount),
            "  From:        {}".format(
                ", ".join(map(lambda x: x.account, self.src)) if self.src \
                    else "UNKNOWN"
            ),
            "  To:          {}".format(
                ", ".join(map(lambda x: x.account, self.dst)) if self.dst \
                    else "UNKNOWN"
            ),
            ""
        ])
965526
def scan_totals(report):
    
    ok = field_value(report["ok_role"], "ok", c.LOG_COLOR["ok"], 0)
    missing_readme = field_value(report["missing_readme_role"],
                                 "missing readme(s)",
                                 c.LOG_COLOR["missing_readme"], 16)

    missing_meta = field_value(report["missing_meta_role"],
                               "missing meta(s)",
                               c.LOG_COLOR["missing_meta"], 16)

    print "\n{0} {1} {2}".format(ok, missing_readme, missing_meta)
547479
def print_summary(ui)
      # Print whether it passed/failed at the top
      if failed?
        ui.puts "\n[!] Failed\n".red
      else
        ui.notice "Passed"
      end

      # A generic proc to handle the similarities between
      # errors and warnings.
      do_rules = proc do |name, rules|
        unless rules.empty?
          ui.puts ""
          ui.section(name.bold) do
            rules.each do |rule|
              title = rule.title.bold + " - #{rule.object_applied_to}"
              subtitles = [rule.description, link(rule.ref)]
              subtitles += [rule.metadata[:files].join(":")] if rule.metadata[:files]
              ui.labeled(title, subtitles)
              ui.puts ""
            end
          end
        end
      end

      # Run the rules
      do_rules.call("Errors".red, errors)
      do_rules.call("Warnings".yellow, warnings)
    end
1317130
def total_form_count(self):
        
        total_forms = super().total_form_count()
        if not self.data and not self.files and self.initial_form_count() > 0:
            total_forms -= self.extra
        return total_forms
168247
def showSectionsHeaders(peInstance):
    
    
    print "[+] Sections information:\n"
    print "--> NumberOfSections: %d\n" % peInstance.ntHeaders.fileHeader.numberOfSections.value
    for section in peInstance.sectionHeaders:
        fields = section.getFields()
        for field in fields:
            if isinstance(fields[field],  datatypes.String):
                fmt = "%s = %s"
            else:
                fmt = "%s = 0x%08x"
            print fmt % (field,  fields[field].value)
        print "\n"
93818
def print_summary(self) -> None:
        
        print("Tasks execution time summary:")
        for mon_task in self._monitor_tasks:
            print("%s:\t%.4f (sec)" % (mon_task.task_name, mon_task.total_time))
1280706
def fields_for(context, form, template="includes/form_fields.html"):
    
    context["form_for_fields"] = form
    return get_template(template).render(context)
718388
def summary(self):
        """"""

        res = ("nlive: {:d}\n"
               "niter: {:d}\n"
               "ncall: {:d}\n"
               "eff(%): {:6.3f}\n"
               "logz: {:6.3f} +/- {:6.3f}"
               .format(self.nlive, self.niter, sum(self.ncall),
                       self.eff, self.logz[-1], self.logzerr[-1]))

        print('Summary\n=======\n'+res)