Returns the header of the block
347245
def header(self):
        
        if self._block_header is None:
            self._block_header = BlockHeader()
            self._block_header.ParseFromString(self.block.header)
        return self._block_header
1121909
def get_header(self):
        
        raw_header = yield get_arg(self, 1)
        if not self.serializer:
            raise tornado.gen.Return(raw_header)
        else:
            header = self.serializer.deserialize_header(raw_header)
            raise tornado.gen.Return(header)
287789
def get_header():
        
        username, userid, uname = get_user_information()

        header = '''\
# This Slurm batch script was generated
# By user: %s (%s)
# On host: %s
# At date: %s
# Using: Pyqueue v%s

''' % (username, userid, uname, datetime.now().strftime('%a. %B  %w %X %Y'), __version__)

        return header
1223081
function getCurrentHeader (tree) {
  const heading = []
  while (headIsH2(tree.children) === false && tree.children.length > 0) {
    heading.push(tree.children.shift())
  }
  return heading
}
223471
function code_header() {
    $lines = array(
      "@file",
      $this->fileDocblockSummary(),
    );
    $code = $this->docBlock($lines);
    // Blank line after the file docblock.
    $code[] = '';
    return $code;
  }
708152
def header(self, text, level, raw=None):
        
        return '\n{0}\n{1}\n'.format(text,
                                     self.hmarks[level] * column_width(text))
812213
def header(self):
        

        if self._header_encoding is None:
            return self._header
        else:
            return self._header.decode(self._header_encoding)
1165477
def get_blocks_struct(self):
        """"""
        cur_x = 0
        cur_y = 0
        cur_z = 0
        blocks = {}
        for block_id in self.blocksList:
            blocks[(cur_x,cur_y,cur_z)] = block_id
            cur_y += 1
            if (cur_y > 127):
                cur_y = 0
                cur_z += 1
                if (cur_z > 15):
                    cur_z = 0
                    cur_x += 1
        return blocks
1335005
def get_header(self, header_name):
        
        if header_name in self.headers:
            return self.headers[header_name]
        return self.add_header_name(header_name)
347576
def _header(self, pam=False):
        """"""
        if pam or self.magicnum == b'P7':
            header = "\n".join((
                "P7",
                "HEIGHT %i" % self.height,
                "WIDTH %i" % self.width,
                "DEPTH %i" % self.depth,
                "MAXVAL %i" % self.maxval,
                "\n".join("TUPLTYPE %s" % unicode(i) for i in self.tupltypes),
                "ENDHDR\n"))
        elif self.maxval == 1:
            header = "P4 %i %i\n" % (self.width, self.height)
        elif self.depth == 1:
            header = "P5 %i %i %i\n" % (self.width, self.height, self.maxval)
        else:
            header = "P6 %i %i %i\n" % (self.width, self.height, self.maxval)
        if sys.version_info[0] > 2:
            header = bytes(header, 'ascii')
        return header
1201313
def to_header(self):
        """"""
        ranges = []
        for begin, end in self.ranges:
            if end is None:
                ranges.append("%s-" % begin if begin >= 0 else str(begin))
            else:
                ranges.append("%s-%s" % (begin, end - 1))
        return "%s=%s" % (self.units, ",".join(ranges))
412333
def build_block(self):
        
        header_bytes = self.block_header.SerializeToString()
        block = Block(header=header_bytes,
                      header_signature=self._header_signature)
        block.batches.extend(self.batches)
        return block
1186323
def header(self):
        """"""
        total_length = self.total_length()
        res = [0x06, 0x10, 0, 0, 0, 0]
        res[2] = (self.service_type_id >> 8) & 0xff
        res[3] = (self.service_type_id >> 0) & 0xff
        res[4] = (total_length >> 8) & 0xff
        res[5] = (total_length >> 0) & 0xff
        return res
25395
def get_block_header_by_hash(self, block_hash: Hash32) -> BlockHeader:
        
        validate_word(block_hash, title="Block Hash")
        return self.chaindb.get_block_header_by_hash(block_hash)
697926
def _get_headers(self):
        

        header = self.lines[0]
        self.lines = self.lines[1:]

        self.headers = \
            [self.clean(h) for h in header.split(self.seperator)]
        if self.is_strip:
            self.headers = self.headers[1:-1]
        return self.headers
652560
def header_output(self):
        '''
        '''
        result = []
        for key in self.keys():
            result.append(key + '=' + self.get(key).value)
        return '; '.join(result)
1108912
def getheader(self, name, default=None):
        
        return self.response.headers.get(name, default)