Retrieve minimum needs section header string from definitions.
169445
def minimum_needs_section_header_element(feature, parent):
    """"""
    _ = feature, parent  # NOQA
    header = minimum_needs_section_header['string_format']
    return header.capitalize()
121092
def get_sections(need_info):
    """"""
    sections = []
    current_node = need_info['target_node']
    while current_node:
        if isinstance(current_node, nodes.section):
            title = current_node.children[0].astext()
            # If using auto-section numbering, then Sphinx inserts
            # multiple non-breaking space unicode characters into the title
            # we'll replace those with a simple space to make them easier to
            # use in filters
            title = NON_BREAKING_SPACE.sub(' ', title)
            sections.append(title)
        current_node = getattr(current_node, 'parent', None)
    return sections
462996
def section_block(definitions, width)
      doc = []
      definitions.each do |scope, values|
        doc << "#{scope}:"
        values.each do |label, text|
          helpline = "      #{text}"
          wrapped  = word_wrap helpline, width
          doc << "  #{label}\n#{wrapped}\n"
        end
      end
      doc
    end
1129717
def _guess_header(info):
    """"""
    value = "group"
    if "metadata" in info:
        if info["metadata"]:
            return ",".join(map(str, info["metadata"].keys()))
    return value
1243152
protected StringBuffer getHeaderSection(HttpServletRequest request) {
		StringBuffer sb = new StringBuffer(mainScriptTemplate.toString());
		sb.append("JAWR.app_context_path='").append(request.getContextPath()).append("';\n");
		return sb;
	}
61687
def extract_headers(headers):
    """"""
    sorted_headers = {}
    matches = re.findall(r'(.*):\s(.*)', headers)
    for match in matches:
        header = match[0]
        value = match[1]
        try:
            if value[-1] == ',':
                value = value[:-1]
            sorted_headers[header] = value
        except IndexError:
            pass
    return sorted_headers
85376
def parse_requirements(path):
    """"""
    requirements = []
    with open(path, "rt") as reqs_f:
        for line in reqs_f:
            line = line.strip()
            if line.startswith("-r"):
                fname = line.split()[1]
                inner_path = os.path.join(os.path.dirname(path), fname)
                requirements += parse_requirements(inner_path)
            elif line != "" and not line.startswith("#"):
                requirements.append(line)
    return requirements
909691
def find_requirements(filename):
    
    import string
    content = read(filename)
    requirements = []
    for line in content.splitlines():
        line = line.strip()
        if line and line[:1] in string.ascii_letters:
            requirements.append(line)
    return requirements
712547
def get_requirements(filename='requirements.txt'):
    
    with open(filename) as f:
        return [
            line.rstrip().split('#')[0]
            for line in f.readlines()
            if not line.startswith('#')
        ]
366842
def _get_header(self):
        """"""

        try:
            header_lines = [int(e) for e in str(self.get_value('headerlines', 0)).split(',')]
        except ValueError as e:
            header_lines = [0]

        # We're processing the raw datafile, with no schema.
        header_rows = islice(self.row_generator, min(header_lines), max(header_lines) + 1)

        from tableintuit import RowIntuiter
        headers = RowIntuiter.coalesce_headers(header_rows)

        return headers
164336
def get_section_marks(self):
        """"""
        return [abc if s in self.sec2chr else "." for s, abc in self.datobj.sec2chr.items()]
1219126
def get_headers(self, cmd, msg_length, extra_headers):
        """"""
        cmd_header = "%s %s" % (cmd, PROTOCOL_VERSION)
        len_header = "Content-length: %s" % msg_length
        headers = [cmd_header, len_header]
        if self.user:
            user_header = "User: %s" % self.user
            headers.append(user_header)
        if self.gzip:
            headers.append("Compress: zlib")
        if extra_headers is not None:
            for key in extra_headers:
                if key.lower() != 'content-length':
                    headers.append("%s: %s" % (key, extra_headers[key]))
        headers.append('')
        headers.append('')
        return '\r\n'.join(headers)
1209363
def _definition(self):
        """"""
        headerReference = self._sectPr.get_headerReference(self._hdrftr_index)
        return self._document_part.header_part(headerReference.rId)
1227819
def _extract_section(sect_req, elffile, mem=None):
        
        for nseg, section in enumerate(elffile.iter_sections()):
            request = sect_req.get(section.name, None)
            if request:
                request.set_found(True)
                request.set_sect_properties(section.header.sh_addr,
                                            section.header.sh_size)
                if mem:
                    mem.add_vma(section.header.sh_addr, section.data())
                else:
                    request.memory.add_vma(section.header.sh_addr, section.data())
1016714
private Definition getDefinition(final HttpServletRequest req) {
        final String definitionToken = req.getHeader(Headers.DEFINITION.getName());
        return StringUtils.isNotBlank(definitionToken)
                ? definitionService.parseDefinition(definitionToken)
                : MissingModelElement.DEFINITION;
    }
595676
def parse_headers(self, req: Request, name: str, field: Field) -> typing.Any:
        """"""
        return core.get_value(req.headers, name, field)
124771
def _get_wrhiercfg(self):
        """"""
        prtfmt = self.gosubdag.prt_attr['fmt']
        prtfmt = prtfmt.replace('{GO} # ', '')
        prtfmt = prtfmt.replace('{D1:5} ', '')
        return {'name2prtfmt':{'ITEM':prtfmt, 'ID':'{GO}{alt:1}'},
                'max_indent': self.usrdct.get('max_indent'),
                'include_only': self.usrdct.get('include_only'),
                'item_marks': self.usrdct.get('item_marks', {}),
                'concise_prt': 'concise' in self.usrset,
                'indent': 'no_indent' not in self.usrset,
                'dash_len': self.usrdct.get('dash_len', 6),
                'sortby': self.usrdct.get('sortby')
               }