Read additional document summary information
430285
private function readDocumentSummaryInformation()
    {
        if (!isset($this->documentSummaryInformation)) {
            return;
        }

        //    offset: 0;    size: 2;    must be 0xFE 0xFF (UTF-16 LE byte order mark)
        //    offset: 2;    size: 2;
        //    offset: 4;    size: 2;    OS version
        //    offset: 6;    size: 2;    OS indicator
        //    offset: 8;    size: 16
        //    offset: 24;    size: 4;    section count
        $secCount = self::getInt4d($this->documentSummaryInformation, 24);
//        echo '$secCount = ', $secCount,'<br />';

        // offset: 28;    size: 16;    first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae
        // offset: 44;    size: 4;    first section offset
        $secOffset = self::getInt4d($this->documentSummaryInformation, 44);
//        echo '$secOffset = ', $secOffset,'<br />';

        //    section header
        //    offset: $secOffset;    size: 4;    section length
        $secLength = self::getInt4d($this->documentSummaryInformation, $secOffset);
//        echo '$secLength = ', $secLength,'<br />';

        //    offset: $secOffset+4;    size: 4;    property count
        $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset+4);
//        echo '$countProperties = ', $countProperties,'<br />';

        // initialize code page (used to resolve string values)
        $codePage = 'CP1252';

        //    offset: ($secOffset+8);    size: var
        //    loop through property decarations and properties
        for ($i = 0; $i < $countProperties; ++$i) {
//            echo 'Property ', $i,'<br />';
            //    offset: ($secOffset+8) + (8 * $i);    size: 4;    property ID
            $id = self::getInt4d($this->documentSummaryInformation, ($secOffset+8) + (8 * $i));
//            echo 'ID is ', $id,'<br />';

            // Use value of property id as appropriate
            // offset: 60 + 8 * $i;    size: 4;    offset from beginning of section (48)
            $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset+12) + (8 * $i));

            $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset);
//            echo 'Type is ', $type,', ';

            // initialize property value
            $value = null;

            // extract property value based on property type
            switch ($type) {
                case 0x02:    //    2 byte signed integer
                    $value = self::getInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset);
                    break;
                case 0x03:    //    4 byte signed integer
                    $value = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset);
                    break;
                case 0x0B:  // Boolean
                    $value = self::getInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset);
                    $value = ($value == 0 ? false : true);
                    break;
                case 0x13:    //    4 byte unsigned integer
                    // not needed yet, fix later if necessary
                    break;
                case 0x1E:    //    null-terminated string prepended by dword string length
                    $byteLength = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset);
                    $value = substr($this->documentSummaryInformation, $secOffset + 8 + $offset, $byteLength);
                    $value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage);
                    $value = rtrim($value);
                    break;
                case 0x40:    //    Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
                    // PHP-Time
                    $value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->documentSummaryInformation, $secOffset + 4 + $offset, 8));
                    break;
                case 0x47:    //    Clipboard format
                    // not needed yet, fix later if necessary
                    break;
            }

            switch ($id) {
                case 0x01:    //    Code Page
                    $codePage = PHPExcel_Shared_CodePage::NumberToName($value);
                    break;
                case 0x02:    //    Category
                    $this->phpExcel->getProperties()->setCategory($value);
                    break;
                case 0x03:    //    Presentation Target
                    //    Not supported by PHPExcel
                    break;
                case 0x04:    //    Bytes
                    //    Not supported by PHPExcel
                    break;
                case 0x05:    //    Lines
                    //    Not supported by PHPExcel
                    break;
                case 0x06:    //    Paragraphs
                    //    Not supported by PHPExcel
                    break;
                case 0x07:    //    Slides
                    //    Not supported by PHPExcel
                    break;
                case 0x08:    //    Notes
                    //    Not supported by PHPExcel
                    break;
                case 0x09:    //    Hidden Slides
                    //    Not supported by PHPExcel
                    break;
                case 0x0A:    //    MM Clips
                    //    Not supported by PHPExcel
                    break;
                case 0x0B:    //    Scale Crop
                    //    Not supported by PHPExcel
                    break;
                case 0x0C:    //    Heading Pairs
                    //    Not supported by PHPExcel
                    break;
                case 0x0D:    //    Titles of Parts
                    //    Not supported by PHPExcel
                    break;
                case 0x0E:    //    Manager
                    $this->phpExcel->getProperties()->setManager($value);
                    break;
                case 0x0F:    //    Company
                    $this->phpExcel->getProperties()->setCompany($value);
                    break;
                case 0x10:    //    Links up-to-date
                    //    Not supported by PHPExcel
                    break;
            }
        }
    }
253532
def summary(self, prn=None, lfilter=None):
        """"""
        for s, r in self.res:
            if lfilter is not None:
                if not lfilter(s, r):
                    continue
            if prn is None:
                print(self._elt2sum((s, r)))
            else:
                print(prn(s, r))
1228128
def add_summaries(self, step, *tags_and_values):
    """"""
    values = []
    to_print = []
    for tag, value in tags_and_values:
      values.append(tf.Summary.Value(tag=tag, simple_value=float(value)))
      to_print.append('%s=%g' % (tag, value))
    if self._summary_writer:
      summary = tf.Summary(value=values)
      event = tf.Event(wall_time=time.time(),
                       summary=summary,
                       step=int(step))
      self._summary_writer.add_event(event)
    print('[%d] %s' % (step, ', '.join(to_print)))
900772
private ExtendElement readExtend(String documentation) {
    String name = readName();
    String qualifiedName = name;
    if (!name.contains(".") && packageName != null) {
      qualifiedName = packageName + "." + name;
    }
    ExtendElement.Builder builder = ExtendElement.builder()
        .name(name)
        .qualifiedName(qualifiedName)
        .documentation(documentation);

    if (readChar() != '{') throw unexpected("expected '{'");
    while (true) {
      String nestedDocumentation = readDocumentation();
      if (peekChar() == '}') {
        pos++;
        break;
      }
      Object declared = readDeclaration(nestedDocumentation, Context.EXTEND);
      if (declared instanceof FieldElement) {
        builder.addField((FieldElement) declared);
      }
    }
    return builder.build();
  }
233797
def get_summary(self):
        
        return (self.contract.name, self.full_name, self.visibility,
                [str(x) for x in self.modifiers],
                [str(x) for x in self.state_variables_read + self.solidity_variables_read],
                [str(x) for x in self.state_variables_written],
                [str(x) for x in self.internal_calls],
                [str(x) for x in self.external_calls_as_expressions])
146717
def get_summary_data(self, sec2d_nt):
        """"""
        grouped = set()
        ungrouped = set()
        sections = set()
        secdflt = self.grprobj.hdrobj.secdflt
        for section_name, nts in sec2d_nt:
            if section_name != secdflt:
                if nts:
                    grouped.update(set(nt.GO for nt in nts))
                    sections.add(section_name)
                else:
                    ungrouped.update(set(nt.GO for nt in nts))
        return {'grouped':grouped, 'ungrouped':ungrouped, 'sections':sections}
34411
def process_summary(article):
    """"""

    summary = article.summary
    summary_parsed = BeautifulSoup(summary, 'html.parser')
    math = summary_parsed.find_all(class_='math')

    if len(math) > 0:
        last_math_text = math[-1].get_text()
        if len(last_math_text) > 3 and last_math_text[-3:] == '...':
            content_parsed = BeautifulSoup(article._content, 'html.parser')
            full_text = content_parsed.find_all(class_='math')[len(math)-1].get_text()
            math[-1].string = "%s ..." % full_text
            summary = summary_parsed.decode()

        # clear memoization cache
        import functools
        if isinstance(article.get_summary, functools.partial):
            memoize_instance = article.get_summary.func.__self__
            memoize_instance.cache.clear()

        article._summary = "%s<script type='text/javascript'>%s</script>" % (summary, process_summary.mathjax_script)
1219327
def pdf_doc_info(instance):
    
    for key, obj in instance['objects'].items():
        if ('type' in obj and obj['type'] == 'file'):
            try:
                did = obj['extensions']['pdf-ext']['document_info_dict']
            except KeyError:
                continue

            for elem in did:
                if elem not in enums.PDF_DID:
                    yield JSONError("The 'document_info_dict' property of "
                                    "object '%s' contains a key ('%s') that is"
                                    " not a valid PDF Document Information "
                                    "Dictionary key."
                                    % (key, elem), instance['id'],
                                    'pdf-doc-info')
766552
def generateSummary(self, extraLapse = TYPICAL_LAPSE):
		''' 
		'''
		scriptsRun = self.scriptsRun
		
		body = []
		
		numberOfFailed = 0
		numberWithWarnings = 0
		failedList = []
		successList = []
		warningsList = []
		
		for name, details in sorted(scriptsRun.iteritems()):
			status = None
			daysSinceSuccess = None
			
			if details["lastSuccess"] and expectedScripts.get(name):
				daysSinceSuccess = expectedScripts.get(name).getDaysSinceLastSuccess(details["lastSuccess"])
				if not expectedScripts.check(name, details["lastSuccess"], extraLapse): 
					status = "FAILED"
			else:
				status = "FAILED"
			
			if not status:
				if details["status"] & RETROSPECT_FAIL:
					status = "FAILED"
				elif details["status"] & RETROSPECT_WARNING:
					status = "WARNINGS"
				elif status != "FAILED":
					status = "OK"
			
			if details["lastSuccess"] and daysSinceSuccess:
				lastSuccessDetails = "Last successful run on %s (%0.1f days ago)" % (details["lastSuccess"], daysSinceSuccess)
			else:
				lastSuccessDetails = "No recent successful run."
			
			if details["lastRun"]:
				lastRunDetails = "Last run on %s (%s)" % (details["lastRun"], status)
			else:
				lastRunDetails = "No recent run (%s)" % status
				 
			if status == "FAILED":
				numberOfFailed += 1
				failedList.append("%s: %s. %s" % (name, lastRunDetails, lastSuccessDetails))
			elif status == "WARNINGS":
				numberWithWarnings += 1
				warningsList.append("%s: %s. %s" % (name, lastRunDetails, lastSuccessDetails))
			else:
				successList.append("%s: %s. %s" % (name, lastRunDetails, lastSuccessDetails))
		
		body = []
		if failedList:
			body.append("FAILED JOBS (%d)" % numberOfFailed)
			body.append("****************")
			for j in failedList:
				body.append(j)
			body.append("\n")
		if warningsList:
			body.append("JOBS WITH WARNINGS (%d)" % numberWithWarnings)
			body.append("***********************")
			for j in warningsList:
				body.append(j)
			body.append("\n")
		if successList:
			body.append("SUCCESSFUL JOBS")
			body.append("***************")
			for j in successList:
				body.append(j)
		
		return body, failedList
1156238
private function _readSummaryInformation()
	{
		if (!isset($this->_summaryInformation)) {
			return;
		}

		// offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)
		// offset: 2; size: 2;
		// offset: 4; size: 2; OS version
		// offset: 6; size: 2; OS indicator
		// offset: 8; size: 16
		// offset: 24; size: 4; section count
		$secCount = self::_GetInt4d($this->_summaryInformation, 24);

		// offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9
		// offset: 44; size: 4
		$secOffset = self::_GetInt4d($this->_summaryInformation, 44);

		// section header
		// offset: $secOffset; size: 4; section length
		$secLength = self::_GetInt4d($this->_summaryInformation, $secOffset);

		// offset: $secOffset+4; size: 4; property count
		$countProperties = self::_GetInt4d($this->_summaryInformation, $secOffset+4);

		// initialize code page (used to resolve string values)
		$codePage = 'CP1252';

		// offset: ($secOffset+8); size: var
		// loop through property decarations and properties
		for ($i = 0; $i < $countProperties; ++$i) {

			// offset: ($secOffset+8) + (8 * $i); size: 4; property ID
			$id = self::_GetInt4d($this->_summaryInformation, ($secOffset+8) + (8 * $i));

			// Use value of property id as appropriate
			// offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48)
			$offset = self::_GetInt4d($this->_summaryInformation, ($secOffset+12) + (8 * $i));

			$type = self::_GetInt4d($this->_summaryInformation, $secOffset + $offset);

			// initialize property value
			$value = null;

			// extract property value based on property type
			switch ($type) {
				case 0x02: // 2 byte signed integer
					$value = self::_GetInt2d($this->_summaryInformation, $secOffset + 4 + $offset);
					break;

				case 0x03: // 4 byte signed integer
					$value = self::_GetInt4d($this->_summaryInformation, $secOffset + 4 + $offset);
					break;

				case 0x13: // 4 byte unsigned integer
					// not needed yet, fix later if necessary
					break;

				case 0x1E: // null-terminated string prepended by dword string length
					$byteLength = self::_GetInt4d($this->_summaryInformation, $secOffset + 4 + $offset);
					$value = substr($this->_summaryInformation, $secOffset + 8 + $offset, $byteLength);
					$value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage);
					$value = rtrim($value);
					break;

				case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
					// PHP-time
					$value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->_summaryInformation, $secOffset + 4 + $offset, 8));
					break;

				case 0x47: // Clipboard format
					// not needed yet, fix later if necessary
					break;
			}

			switch ($id) {
				case 0x01:	//	Code Page
					$codePage = PHPExcel_Shared_CodePage::NumberToName($value);
					break;

				case 0x02:	//	Title
					$this->_phpExcel->getProperties()->setTitle($value);
					break;

				case 0x03:	//	Subject
					$this->_phpExcel->getProperties()->setSubject($value);
					break;

				case 0x04:	//	Author (Creator)
					$this->_phpExcel->getProperties()->setCreator($value);
					break;

				case 0x05:	//	Keywords
					$this->_phpExcel->getProperties()->setKeywords($value);
					break;

				case 0x06:	//	Comments (Description)
					$this->_phpExcel->getProperties()->setDescription($value);
					break;

				case 0x07:	//	Template
					//	Not supported by PHPExcel
					break;

				case 0x08:	//	Last Saved By (LastModifiedBy)
					$this->_phpExcel->getProperties()->setLastModifiedBy($value);
					break;

				case 0x09:	//	Revision
					//	Not supported by PHPExcel
					break;

				case 0x0A:	//	Total Editing Time
					//	Not supported by PHPExcel
					break;

				case 0x0B:	//	Last Printed
					//	Not supported by PHPExcel
					break;

				case 0x0C:	//	Created Date/Time
					$this->_phpExcel->getProperties()->setCreated($value);
					break;

				case 0x0D:	//	Modified Date/Time
					$this->_phpExcel->getProperties()->setModified($value);
					break;

				case 0x0E:	//	Number of Pages
					//	Not supported by PHPExcel
					break;

				case 0x0F:	//	Number of Words
					//	Not supported by PHPExcel
					break;

				case 0x10:	//	Number of Characters
					//	Not supported by PHPExcel
					break;

				case 0x11:	//	Thumbnail
					//	Not supported by PHPExcel
					break;

				case 0x12:	//	Name of creating application
					//	Not supported by PHPExcel
					break;

				case 0x13:	//	Security
					//	Not supported by PHPExcel
					break;

			}
		}
	}
960327
def stringify_summary(summary):
    
    for index, suite_summary in enumerate(summary["details"]):

        if not suite_summary.get("name"):
            suite_summary["name"] = "testcase {}".format(index)

        for record in suite_summary.get("records"):
            meta_datas = record['meta_datas']
            __stringify_meta_datas(meta_datas)
            meta_datas_expanded = []
            __expand_meta_datas(meta_datas, meta_datas_expanded)
            record["meta_datas_expanded"] = meta_datas_expanded
            record["response_time"] = __get_total_response_time(meta_datas_expanded)
1072919
def summary(self, summary):
        """"""
        if summary is not None:
            if summary == 'Clear':
                click.secho("""

   ________                    \  |  /
  / ____/ /__  ____ ______       .-.
 / /   / / _ \/ __ `/ ___/    ‒ (   ) ‒
/ /___/ /  __/ /_/ / /           `-᾿
\____/_/\___/\__,_/_/          /  |  \\

                """, fg=self.colors.YELLOW)
                click.echo()

            elif summary == 'Partly Cloudy':
                click.secho("""

    ____             __  __         ________                __
   / __ \____ ______/ /_/ /_  __   / ____/ /___  __  ______/ /_  __    \  |  /
  / /_/ / __ `/ ___/ __/ / / / /  / /   / / __ \/ / / / __  / / / /      .-.
 / ____/ /_/ / /  / /_/ / /_/ /  / /___/ / /_/ / /_/ / /_/ / /_/ /    ‒ (  .-.
/_/    \__,_/_/   \__/_/\__, /   \____/_/\____/\__,_/\__,_/\__, /        `(   ).
                       /____/                             /____/       / (___(__)

                """, fg=self.colors.WHITE)

            elif summary == 'Flurries':
                click.secho("""

    ________                _                  .--.
   / ____/ /_  ____________(_)__  _____     .-(    ).
  / /_  / / / / / ___/ ___/ / _ \/ ___/    (___.__)__)
 / __/ / / /_/ / /  / /  / /  __(__  )      *      *
/_/   /_/\__,_/_/  /_/  /_/\___/____/          *

                """, fg=self.colors.BLUE)
                click.echo()

            elif summary == 'Overcast' or summary == 'Mostly Cloudy':
                click.secho("""

   ____                                  __
  / __ \_   _____  ______________ ______/ /_       .--.
 / / / / | / / _ \/ ___/ ___/ __ `/ ___/ __/     .(    ).-.
/ /_/ /| |/ /  __/ /  / /__/ /_/ (__  ) /_      (___.__(   ).
\____/ |___/\___/_/   \___/\__,_/____/\__/            (___(__)

                """, fg=self.colors.WHITE)
                click.echo()

            elif summary == 'Snow':
                click.secho("""

   _____                            .--.
  / ___/____  ____ _      __     .-(    ).
  \__ \/ __ \/ __ \ | /| / /    (___.__)__)
 ___/ / / / / /_/ / |/ |/ /      *   *   *
/____/_/ /_/\____/|__/|__/         *   *

                """, fg=self.colors.BLUE)
                click.echo()

            elif summary == 'Light Snow':
                click.secho("""

    __    _       __    __    _____
   / /   (_)___ _/ /_  / /_  / ___/____  ____ _      __       .--.
  / /   / / __ `/ __ \/ __/  \__ \/ __ \/ __ \ | /| / /    .-(    ).
 / /___/ / /_/ / / / / /_   ___/ / / / / /_/ / |/ |/ /    (___.__)__)
/_____/_/\__, /_/ /_/\__/  /____/_/ /_/\____/|__/|__/       *  *  *
        /____/
                """, fg=self.colors.BLUE)
                click.echo()

            elif summary == 'Light Rain' or summary == 'Drizzle':
                click.secho("""

    __    _       __    __     ____        _
   / /   (_)___ _/ /_  / /_   / __ \____ _(_)___       .--.
  / /   / / __ `/ __ \/ __/  / /_/ / __ `/ / __ \   .-(    ).
 / /___/ / /_/ / / / / /_   / _, _/ /_/ / / / / /  (___.__)__)
/_____/_/\__, /_/ /_/\__/  /_/ |_|\__,_/_/_/ /_/     /  /  /
        /____/

                """, fg=self.colors.BLUE)

            elif summary == 'Rain':
                click.secho("""

    ____        _
   / __ \____ _(_)___       .--.
  / /_/ / __ `/ / __ \   .-(    ).
 / _, _/ /_/ / / / / /  (___.__)__)
/_/ |_|\__,_/_/_/ /_/     /  /  /

                """, fg=self.colors.BLUE)

            else:
                click.secho("{:=^62}".format(str(summary)), fg=self.colors.GREEN)
415911
function extractDescription(texts) {
  let document = '';
  texts.forEach(text => {
    document += text.description || '';
  });
  return document.toLowerCase();
}
603471
def print_summary(self, strm):
        """"""
        nerr = 0
        nerr += LintHelper._print_summary_map(strm, self.cpp_header_map, 'cpp-header')
        nerr += LintHelper._print_summary_map(strm, self.cpp_src_map, 'cpp-soruce')
        nerr += LintHelper._print_summary_map(strm, self.python_map, 'python')
        if nerr == 0:
            strm.write('All passed!\n')
        else:
            strm.write('%d files failed lint\n' % nerr)
        return nerr
658777
def mysummary(self):
    """"""

    if isinstance(self.underlayer, IP):
      return self.underlayer.sprintf("IGMPv3: %IP.src% > %IP.dst% %IGMPv3.type% %IGMPv3.gaddr%")
    else:
      return self.sprintf("IGMPv3 %IGMPv3.type% %IGMPv3.gaddr%")
155256
def _next(self):
        """"""
        self.summaries.rotate(-1)
        current_summary = self.summaries[0]
        self._update_summary(current_summary)
308380
def on_doctree_read(app, document):
    
    cache: Dict[type, Dict[str, object]] = {}
    for desc_node in document.traverse(addnodes.desc):
        if desc_node.get("domain") != "py":
            continue
        signature_node = desc_node.traverse(addnodes.desc_signature)[0]
        module_name = signature_node.get("module")
        object_name = signature_node.get("fullname")
        object_type = desc_node.get("objtype")
        module = importlib.import_module(module_name)
        if object_type == "class":
            handle_class(signature_node, module, object_name, cache)
        elif object_type in ("method", "attribute", "staticmethod", "classmethod"):
            handle_method(signature_node, module, object_name, cache)