Prints a badge overview infomation.
542768
public function print_badge_overview($badge, $context) {
        $display = "";
        $languages = get_string_manager()->get_list_of_languages();

        // Badge details.
        $display .= $this->heading(get_string('badgedetails', 'badges'), 3);
        $dl = array();
        $dl[get_string('name')] = $badge->name;
        $dl[get_string('version', 'badges')] = $badge->version;
        $dl[get_string('language')] = $languages[$badge->language];
        $dl[get_string('description', 'badges')] = $badge->description;
        $dl[get_string('createdon', 'search')] = userdate($badge->timecreated);
        $dl[get_string('badgeimage', 'badges')] = print_badge_image($badge, $context, 'large');
        $dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
        $dl[get_string('imageauthoremail', 'badges')] =
            html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail));
        $dl[get_string('imageauthorurl', 'badges')] =
            html_writer::link($badge->imageauthorurl, $badge->imageauthorurl, array('target' => '_blank'));
        $dl[get_string('imagecaption', 'badges')] = $badge->imagecaption;
        $display .= $this->definition_list($dl);

        // Issuer details.
        $display .= $this->heading(get_string('issuerdetails', 'badges'), 3);
        $dl = array();
        $dl[get_string('issuername', 'badges')] = $badge->issuername;
        $dl[get_string('contact', 'badges')] = html_writer::tag('a', $badge->issuercontact, array('href' => 'mailto:' . $badge->issuercontact));
        $display .= $this->definition_list($dl);

        // Issuance details if any.
        $display .= $this->heading(get_string('issuancedetails', 'badges'), 3);
        if ($badge->can_expire()) {
            if ($badge->expiredate) {
                $display .= get_string('expiredate', 'badges', userdate($badge->expiredate));
            } else if ($badge->expireperiod) {
                if ($badge->expireperiod < 60) {
                    $display .= get_string('expireperiods', 'badges', round($badge->expireperiod, 2));
                } else if ($badge->expireperiod < 60 * 60) {
                    $display .= get_string('expireperiodm', 'badges', round($badge->expireperiod / 60, 2));
                } else if ($badge->expireperiod < 60 * 60 * 24) {
                    $display .= get_string('expireperiodh', 'badges', round($badge->expireperiod / 60 / 60, 2));
                } else {
                    $display .= get_string('expireperiod', 'badges', round($badge->expireperiod / 60 / 60 / 24, 2));
                }
            }
        } else {
            $display .= get_string('noexpiry', 'badges');
        }

        // Criteria details if any.
        $display .= $this->heading(get_string('bcriteria', 'badges'), 3);
        if ($badge->has_criteria()) {
            $display .= self::print_badge_criteria($badge);
        } else {
            $display .= get_string('nocriteria', 'badges');
            if (has_capability('moodle/badges:configurecriteria', $context)) {
                $display .= $this->output->single_button(
                    new moodle_url('/badges/criteria.php', array('id' => $badge->id)),
                    get_string('addcriteria', 'badges'), 'POST', array('class' => 'activatebadge'));
            }
        }

        // Awards details if any.
        if (has_capability('moodle/badges:viewawarded', $context)) {
            $display .= $this->heading(get_string('awards', 'badges'), 3);
            if ($badge->has_awards()) {
                $url = new moodle_url('/badges/recipients.php', array('id' => $badge->id));
                $a = new stdClass();
                $a->link = $url->out();
                $a->count = count($badge->get_awards());
                $display .= get_string('numawards', 'badges', $a);
            } else {
                $display .= get_string('noawards', 'badges');
            }

            if (has_capability('moodle/badges:awardbadge', $context) &&
                $badge->has_manual_award_criteria() &&
                $badge->is_active()) {
                $display .= $this->output->single_button(
                        new moodle_url('/badges/award.php', array('id' => $badge->id)),
                        get_string('award', 'badges'), 'POST', array('class' => 'activatebadge'));
            }
        }

        $display .= self::print_badge_endorsement($badge);
        $display .= self::print_badge_related($badge);
        $display .= self::print_badge_alignments($badge);

        return html_writer::div($display, null, array('id' => 'badge-overview'));
    }
1254638
def _printStats(self, graph, hrlinetop=False):
        
        if hrlinetop:
            self._print("----------------", "TIP")
        self._print("Ontologies......: %d" % len(graph.all_ontologies), "TIP")
        self._print("Classes.........: %d" % len(graph.all_classes), "TIP")
        self._print("Properties......: %d" % len(graph.all_properties), "TIP")
        self._print("..annotation....: %d" % len(graph.all_properties_annotation), "TIP")
        self._print("..datatype......: %d" % len(graph.all_properties_datatype), "TIP")
        self._print("..object........: %d" % len(graph.all_properties_object), "TIP")
        self._print("Concepts(SKOS)..: %d" % len(graph.all_skos_concepts), "TIP")
        self._print("----------------", "TIP")
540129
def print_details(self):
		""""""
		print("Title:", self.title)
		print("Category:", self.category)
		print("Page: ", self.page)
		print("Size: ", self.size)
		print("Files: ", self.files)
		print("Age: ", self.age)
		print("Seeds:", self.seeders)
		print("Leechers: ", self.leechers)
		print("Magnet: ", self.magnet)
		print("Download: ", self.download)
		print("Verified:", self.isVerified)
773086
def display(self, messages, sig="", debug=False):
        """"""
        full_message = "".join(
            sig + line for line in " ".join(
                str(msg) for msg in messages
            ).splitlines(True)
        )
        if not full_message:
            full_message = sig.rstrip()
        if debug:
            printerr(full_message)
        else:
            print(full_message)
266779
def PrintStats(self):
    """"""
    self.BuildStats()
    self.PrintSummaryTable()
    self.PrintSourceTypeTable()
    self.PrintOSTable()
    self.PrintLabelTable()
97868
def OnPrintPreview(self, event):
        """"""

        print_area = self._get_print_area()
        print_data = self.main_window.print_data

        self.main_window.actions.print_preview(print_area, print_data)
1107592
def do_printActivities(self,args):
        """"""
        parser = CommandArgumentParser("printActivities")
        parser.add_argument('-r','--refresh',action='store_true',dest='refresh',help='refresh');
        args = vars(parser.parse_args(args))
        refresh = args['refresh'] or not self.activities

        if refresh:
            response = self.client.describe_scaling_activities(AutoScalingGroupName=self.scalingGroup)
            self.activities = response['Activities']
        
        index = 0
        for activity in self.activities:
            print "{}: {} -> {} {}: {}".format(index,activity['StartTime'],stdplus.defaultifyDict(activity,'EndTime',''),activity['StatusCode'],activity['Description'])
            index = index + 1
988861
def show(self):
        """"""

        if len(self.text) > self.textwidth:
            label = self.text[0:self.textwidth]
        else:
            label = self.text.rjust(self.textwidth)

        terminalSize = getTerminalSize()
        if terminalSize is None:
            terminalSize = 80
        else:
            terminalSize = terminalSize[1]

        barWidth = terminalSize - self.textwidth - 10

        if self.value is None or self.value < 0:
            pattern = self.twiddle_sequence[
                self.twiddle % len(self.twiddle_sequence)]
            self.twiddle += 1
            barSymbols = (pattern * int(math.ceil(barWidth/3.0)))[0:barWidth]
            progressFractionText = '   . %'
        else:
            progressFraction = float(self.value) / self.max

            nBlocksFrac, nBlocksInt = math.modf(
                max(0.0, min(1.0, progressFraction)) * barWidth)
            nBlocksInt = int(nBlocksInt)

            partialBlock = self.sequence[
                int(math.floor(nBlocksFrac * len(self.sequence)))]

            nBlanks = barWidth - nBlocksInt - 1
            barSymbols = (self.sequence[-1] * nBlocksInt) + partialBlock + \
                (self.sequence[0] * nBlanks)
            barSymbols = barSymbols[:barWidth]
            progressFractionText = ('%.1f%%' % (100*progressFraction)).rjust(6)

        print >>self.fid, '\r\x1B[1m' + label + '\x1B[0m [' + barSymbols + \
            ']' + progressFractionText,
        self.fid.flush()
        self.linefed = False
513100
def prt_detail(self):
        
        screen = [
            "Detail info of %s: " % self.abspath,
            "total size = %s" % string_SizeInBytes(self.size_total),
            "number of sub folders = %s" % self.num_folder_total,
            "number of total files = %s" % self.num_file_total,
            "lvl 1 file size = %s" % string_SizeInBytes(self.size_current),
            "lvl 1 folder number = %s" % self.num_folder_current,
            "lvl 1 file number = %s" % self.num_file_current,
        ]
        print("\n".join(screen))
182604
def print_role(role, detailed=True):
    """"""
    if detailed:
        print(colors.yellow(role.get('fullname')))
    else:
        print("  Role: {0}".format(role.get('fullname')))
    if detailed:
        print("    description: {0}".format(role.get('description')))
    if 'default_attributes' in role:
        print("    default_attributes:")
        _pprint(role['default_attributes'])
    if 'override_attributes' in role:
        print("    override_attributes:")
        _pprint(role['override_attributes'])
    if detailed:
        print("    run_list: {0}".format(role.get('run_list')))
    print("")
779905
def show_info(self):
        
        bytecode._PrintSubBanner("Method Information")
        bytecode._PrintDefault("%s->%s%s [access_flags=%s]\n" % (
            self.get_class_name(), self.get_name(), self.get_descriptor(),
            self.get_access_flags_string()))
362560
def overview(name, server):
    
    print('%s OVERVIEW' % name)
    print("  Interop namespace: %s" % server.interop_ns)
    print("  Brand: %s" % server.brand)
    print("  Version: %s" % server.version)
    print("  Namespaces: %s" % ", ".join(server.namespaces))
    print('  namespace_classname: %s' % server.namespace_classname)
    if VERBOSE:
        print('cimom_inst:\n%s' % server.cimom_inst.tomof())
        print('server__str__: %s' % server)
        print('server__repr__: %r' % server)
        try:
            insts = server.conn.EnumerateInstances('CIM_Namespace',
                                                   namespace=server.interop_ns)
            print('%s: Instances of CIM_Namespace' % name)
            for inst in insts:
                print('%r' % inst)
        except pywbem.Error as er:
            print('ERROR: %s: Enum CIM_Namespace failed %s' % (name, er))

        try:
            insts = server.conn.EnumerateInstances('__Namespace',
                                                   namespace=server.interop_ns)
            print('%s: Instances of __Namespace' % name)
            for inst in insts:
                print('%r' % inst)
        except pywbem.Error as er:
            print('ERROR: %s: Enum __Namespace failed %s' % (name, er))
679927
public void _showProfile() {
		System.out.println("availableProcessors=" + Runtime.getRuntime().availableProcessors() + " free memory=" + getMegaBytes(Runtime.getRuntime().freeMemory()));
		System.out.println(
				"worker blockSize=" + getMegaBytes(blockSize) + " " +
						"worker buffer Size=" + getMegaBytes(bufferSizePerWorker) + ", " +
						"max num of thread=" + maxNumOfThreads + ", " +
						"sub buffer size=" + subBufferSize + "(B)" + ", " +
						"sub thread size=" + subThreadSize + ", "
				);

		System.out.println("possible max thread=" + maxNumOfThreads * subThreadSize + " " +
				"possible max memory=" + getMegaBytes(bufferSizePerWorker * maxNumOfThreads + (subBufferSize * subThreadSize))
				);
	}
1202276
private void printStatus() {
		System.out.println("---");
		printStatistics(this.itemStatistics, "items");
		System.out.println(" * Site links: " + this.countSiteLinks);

		printStatistics(this.propertyStatistics, "properties");
	}
294753
def show(self):
        
        print("StringBlock(stringsCount=0x%x, "
              "stringsOffset=0x%x, "
              "stylesCount=0x%x, "
              "stylesOffset=0x%x, "
              "flags=0x%x"
              ")" % (self.stringCount,
                     self.stringsOffset,
                     self.styleCount,
                     self.stylesOffset,
                     self.flags))

        if self.stringCount > 0:
            print()
            print("String Table: ")
            for i, s in enumerate(self):
                print("{:08d} {}".format(i, repr(s)))

        if self.styleCount > 0:
            print()
            print("Styles Table: ")
            for i in range(self.styleCount):
                print("{:08d} {}".format(i, repr(self.getStyle(i))))
146891
def show(self):
        
        self.data()
        print("")
        self.msg.template(78)
        print("| {0}{1}{2}".format("Dependencies", " " * 20, "Packages"))
        self.msg.template(78)
        for key, value in self.dmap.iteritems():
            print("  {0}{1}{2}{3}{4}".format(
                self.green, key, self.endc, " " * (32-len(key)),
                ", ".join(value)))
        self.summary()
        if self.image:
            Graph(self.image).dependencies(self.dmap)
280595
def print_profile_info(org_vm, inst):
    
    org = org_vm.tovalues(inst['RegisteredOrganization'])
    name = inst['RegisteredName']
    vers = inst['RegisteredVersion']
    print("  %s %s Profile %s" % (org, name, vers))