Pull a value from the header data.
167518
def parse_cookies(self, req, name, field):
        """"""
        cookie = req.cookies.get(name)

        if cookie is not None:
            return [cookie.value] if core.is_multiple(field) else cookie.value
        else:
            return [] if core.is_multiple(field) else None
1007549
def pickdata(self, data):
        
        """
        attrs = data.get(self.__options['attrkey']) or {}
        values = data.get(self.__options['valuekey']) or ''
        return (attrs, values)
529847
def _extract_header_number(lines):
    
    pair = _extract_header_value(lines[1])
    value_list = list(pair.values())
    return int(value_list[0])
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
61698
private String getDataFieldValue(String dataHeader, String fieldName) {
		String value = null;
		String token = StrUtil.format("{}=\"", fieldName);
		int pos = dataHeader.indexOf(token);
		if (pos > 0) {
			int start = pos + token.length();
			int end = dataHeader.indexOf('"', start);
			if ((start > 0) && (end > 0)) {
				value = dataHeader.substring(start, end);
			}
		}
		return value;
	}
709057
def serialize_for_header(key, value):
    """"""
    if key in QUOTE_FIELDS:
        return json.dumps(value)
    elif isinstance(value, str):
        if " " in value or "\t" in value:
            return json.dumps(value)
        else:
            return value
    elif isinstance(value, list):
        return "[{}]".format(", ".join(value))
    else:
        return str(value)
1300527
def parse_accept_header(header):
    """"""
    result = []
    for match in accept_re.finditer(header):
        quality = match.group(2)
        if not quality:
            quality = 1
        else:
            quality = max(min(float(quality), 1), 0)
        result.append((match.group(1), quality))
    return result
130966
protected Object getDataValue(Trace trace, Node node, Direction direction, Map<String, ?> headers,
            Object[] values) {
        if (source == DataSource.Content) {
            return values[index];
        } else if (source == DataSource.Header) {
            return headers.get(key);
        }
        return null;
    }
1301218
def get_data(self):
        """"""
        return self.x, self.y, self.w, self.h
330915
def _read_header(self):
        """"""
        self._header = self.cdmrf.fetch_header()
        self.load_from_stream(self._header)
556446
public String getHeaderValue( String name )
    {
        for ( Header header : headers ) {
            if ( header.getName().equals( name ) ) {
                return header.getValue();
            }
        }
        return null;
    }
266745
def get_value(self, **kwargs):
        """"""
        key = tuple(kwargs[group] for group in self.groups)
        if key not in self.data:
            self.data[key] = 0
        return self.data[key]
537331
def parse_headers(self, req, name, field):
        """"""
        # Use req.get_headers rather than req.headers for performance
        return req.get_header(name, required=False) or core.missing
1173097
def _parseHeaderValue(self, header_value):
        
        values = header_value.split(';', 1)
        if len(values) == 1:
            # There's no extra info -- return the main value and an empty dict
            return values[0], {}
        main_value, extra_values = values[0], values[1].split(';')
        extra_dict = {}
        for value_string in extra_values:
            try:
                key, value = value_string.split('=', 1)
                extra_dict[key.strip()] = value.strip()
            except ValueError:
                # Can't unpack it -- must be malformed. Ignore
                pass
        return main_value, extra_dict
157487
def _parse_header(stream):
        '''
        

        '''
        parser = _PlyHeaderParser()
        while parser.consume(stream.readline()):
            pass

        return PlyData(
            [PlyElement(*e) for e in parser.elements],
            parser.format == 'ascii',
            _byte_order_map[parser.format],
            parser.comments,
            parser.obj_info
        )
1280805
def _parse_header_code(self):
        """"""
        code, header = '', ''
        if 'OTHERS' in self.df:

            header = (self.df['OTHERS'][self.df['OTHERS']['record_name'] ==
                      'HEADER'])
            if not header.empty:
                header = header['entry'].values[0]
                s = header.split()
                if s:
                    code = s[-1].lower()
        return header, code
238357
def _extract_return(self, data):
        '''
        
        '''
        if isinstance(data, dict):
            data = data.get('return', data)

        return data