Generate header names for the whole structure.
2651
public function generateHeaderNames()
    {
        foreach ($this->data as $baseType => &$baseArray) {
            foreach ($baseArray as $nodeName => &$nodeData) {
                if (is_array($nodeData)) {
                    $nodeName = $this->decodeNodeName($nodeName);
                    $this->generateHeaderName(
                        $nodeData,
                        new NodePath([$baseType, $nodeName]),
                        self::ARRAY_NAME, // # root is always array
                        $baseType
                    );
                }
            }
        }
    }
266505
def _build_raw_headers(self, headers: Dict) -> Tuple:
        
        raw_headers = []
        for k, v in headers.items():
            raw_headers.append((k.encode('utf8'), v.encode('utf8')))
        return tuple(raw_headers)
232065
def _stable_names(self):
        '''
        

        '''
        stable_names=[]
        for i in range(len(self.stable_el)):
            stable_names.append(self.stable_el[i][0])
        self.stable_names=stable_names
328336
public function generateHeaders()
    {
        $this->setHeader( "Content-Type", "text/" . $this->subType . "; charset=" . $this->charset );
        $this->setHeader( "Content-Transfer-Encoding", $this->encoding );
        return parent::generateHeaders();
    }
1034269
def make_headers(headers):
    
    out = {}
    if 'etag' in headers:
        out['if-none-match'] = headers['etag']
    if 'last-modified' in headers:
        out['if-modified-since'] = headers['last-modified']
    return out
217648
def _collect_headers(self):
        
        res = []

        for prop in self.get_sorted_columns():

            main_infos = self._get_prop_infos(prop)

            if self._is_excluded(prop, main_infos):
                continue

            if isinstance(prop, RelationshipProperty):
                main_infos = self._collect_relationship(main_infos, prop, res)

                if not main_infos:
                    # If still no success, we forgot this one
                    print("Maybe there's missing some informations \
about a relationship")
                    continue
            else:
                main_infos = self._merge_many_to_one_field_from_fkey(
                    main_infos, prop, res
                )
                if not main_infos:
                    continue

            if isinstance(main_infos, (list, tuple)):
                # In case _collect_relationship returned a list
                res.extend(main_infos)
            else:
                res.append(main_infos)
        return res
618813
def _render_headers(self):
        
        headers = getattr(self, 'headers', ())
        for index, col in enumerate(headers):
            # We write the headers
            cell = self.worksheet.cell(row=1, column=index + 1)
            cell.value = col['label']

        index += 1

        extra_headers = getattr(self, 'extra_headers', ())
        for add_index, col in enumerate(extra_headers):
            cell = self.worksheet.cell(row=1, column=add_index + index + 1)
            cell.value = col['label']
675835
def prepare_headers(self, headers):
        """"""

        if headers:
            self.headers = CaseInsensitiveDict((to_native_string(name), value) for name, value in headers.items())
        else:
            self.headers = CaseInsensitiveDict()
152445
def headers_as_dict(cls, resp):
        """"""
        if six.PY2:
            pairs = [header.split(':', 1) for header in resp.msg.headers]
            return dict([(k, v.strip()) for k, v in pairs])
        else:
            return dict([(k, v.strip()) for k, v in resp.msg._headers])
851979
def Header(self):
    """"""
    # Call OnGetValue on options.
    _ = [option.OnGetValue() for option in self.options]
    return self.name
652560
def header_output(self):
        '''
        '''
        result = []
        for key in self.keys():
            result.append(key + '=' + self.get(key).value)
        return '; '.join(result)
667122
def build_headers(self):
        '''
        
        '''
        if not 'Content-Type' in self.headers:
            content_type = self.content_type
            if self.encoding != DEFAULT_ENCODING:
                content_type += '; charset=%s' % self.encoding
            self.headers['Content-Type'] = content_type

        headers = list(self.headers.items())
        # Append cookies
        headers += [
            ('Set-Cookie', cookie.OutputString())
            for cookie in self.cookies.values()
        ]
        return headers
704750
def header(fname, sep="\t"):
    
    fh = iter(nopen(fname))
    h = tokens(next(fh), sep)
    h[0] = h[0].lstrip("#")
    return h
221354
def _fetch_headers(self):
    """"""
    self._header_text, self._n_ref = self._read_top_header()
    self._ref_lengths, self._ref_names = self._read_reference_information()
    self._header = SAMHeader(self._header_text)
502123
def get_header(results):
    ''''''
    ret = ['name', ]
    values = next(iter(results.values()))
    for k, v in values.items():
        if isinstance(v, dict):
            for metric in v.keys():
                ret.append('%s:%s' % (k, metric))
        else:
            ret.append(k)
    return ret
1085233
def to_header_str(self):
        
        h_parts = []
        if self.root:
            h_parts.append(ROOT + '=' + self.root)
        if self.parent:
            h_parts.append(PARENT + '=' + self.parent)
        if self.sampled is not None:
            h_parts.append(SAMPLE + '=' + str(self.sampled))
        if self.data:
            for key in self.data:
                h_parts.append(key + '=' + self.data[key])

        return HEADER_DELIMITER.join(h_parts)
324744
def generate_general_header(headerfields, fieldtypes, firstfield, oldheader,
                            group_by_field):
    """"""
    if not oldheader:
        header = [firstfield]
    else:
        header = [firstfield] + oldheader[1:]
    poolfields = OrderedDict()
    poolfields[None] = []  # Have non-pool/set columns come before pool-columns
    if group_by_field:
        header.extend(poolfields[None])
    for fieldtype in fieldtypes:
        try:
            fields = headerfields[fieldtype]
        except KeyError:
            continue
        if type(fields) == list:
            header.extend(fields)
        elif group_by_field:
            pfmatrix = [list(x.values()) for k, x in fields.items()
                        if not HEADER_NO_PSMS_SUFFIX in k]
            header.extend([x for y in transpose(pfmatrix) for x in y])
            if fieldtype == 'isoquant':
                pfmatrix = [list(x.values()) for k, x in fields.items()
                            if HEADER_NO_PSMS_SUFFIX in k]
                header.extend([x for y in transpose(pfmatrix) for x in y])
        else:
            for pool_field in fields.values():
                for pool, field in pool_field.items():
                    try:
                        poolfields[pool].append(field)
                    except KeyError:
                        poolfields[pool] = [field]
    if poolfields and not group_by_field:
        for fields in poolfields.values():
            header.extend(fields)
    return header