Return the head of the list.
10657
public function head() : Box
    {
        // keep track of visited boxes for cycle detection
        $touched = [];
        for ($b = $this; $b->prev !== null; $b = $b->visit($touched)->prev);
        return $b;
    }
680316
def head(self, file_path):
        
        processor = lambda path, node, tail_only=True, append=False: self._handle_head(
            path, node)

        # Find items and go
        for item in self._client._find_items([file_path], processor,
                                             include_toplevel=True,
                                             include_children=False, recurse=False):
            if item:
                return item
821146
def to_header(self):
        """"""
        result = []
        for value, quality in self:
            if quality != 1:
                value = '%s;q=%s' % (value, quality)
            result.append(value)
        return ','.join(result)
444667
def _get_head_id(cls, request):
        
        head_id = request.url.query.get('head', None)

        if head_id is not None:
            cls._validate_id(head_id)

        return head_id
69482
def head(self, n=10):
        
        r = self.__repr__().split('\n')
        print('\n'.join(r[:n]), end=' ')
1020627
def headinside(self):
        
        
        h = self.model.head(self.xw + self.rw, self.yw, layers=self.layers)
        return h - self.resfac * self.parameters[:, 0]
790488
public function head()
    {
        $query = $this->getCriteria();

        $args = func_get_args();
        if(empty($args)){
            $args = null;
        }

        $response = '';

        try {
            $response = $this->client->request($this, 'head', $args, array(), $query);
        } catch(Exception $ex) {
            $this->dispatchException($ex);
        }

        return $this->transformResponse($response, true);
    }
1117432
def head(self):
        
        if self.type == "NP" and any(w.type.startswith("NNP") for w in self):
            w = find(lambda w: w.type.startswith("NNP"), reversed(self))
        elif self.type == "NP":  # "the cat" => "cat"
            w = find(lambda w: w.type.startswith("NN"), reversed(self))
        elif self.type == "VP":  # "is watching" => "watching"
            w = find(lambda w: w.type.startswith("VB"), reversed(self))
        elif self.type == "PP":  # "from up on" => "from"
            w = find(lambda w: w.type.startswith(("IN", "PP")), self)
        elif self.type == "PNP": # "from up on the roof" => "roof"
            w = find(lambda w: w.type.startswith("NN"), reversed(self))
        else:
            w = None
        if w is None:
            w = self[-1]
        return w
1188629
def _head(self, client_kwargs):
        
        with _handle_client_error():
            # Object
            if 'Key' in client_kwargs:
                header = self.client.head_object(**client_kwargs)

            # Bucket
            else:
                header = self.client.head_bucket(**client_kwargs)

        # Clean up HTTP request information
        for key in ('AcceptRanges', 'ResponseMetadata'):
            header.pop(key, None)
        return header
4526
def head(self):
        """"""
        summary = list()
        summary.append("%s %s" % (self.geotype, self.name) + "\n")
        summary.append(" - Metadata:" + "\n")
        summary.append(
            "\n".join(self._get_metadata_as_string().split("\n")[:5]) + "\n")
        summary.append("\n")
        summary.append(" - Columns:" + "\n")
        summary.append(self.columns.to_string() + "\n")
        summary.append("\n")
        summary.append(" - Table:" + "\n")
        summary.append(
            "\t".join(["Index"] + self.table.columns.tolist()) + "\n")
        summary.append(self.table.head().to_string(header=None) + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(self.table.tail().to_string(header=None) + "\n")
        return "\n".join([str(s) for s in summary])
108952
@Nonnull
    @SafeVarargs
    public static <T> NonEmptyImmutableList<T> of(@Nonnull T head, @Nonnull T... el) {
        if (el.length == 0) {
            return cons(head, ImmutableList.empty());
        }
        NonEmptyImmutableList<T> l = cons(el[el.length - 1], ImmutableList.empty());
        for (int i = el.length - 2; i >= 0; i--) {
            l = cons(el[i], l);
        }
        return cons(head, l);
    }
1299392
def head_on_file(self, file):
        """"""
        response = HeadResponse()
        if (not os.path.isfile(file)):
            response.status_code = '404'
        else:
            response.status_code = '200'
            response.headers[
                'last-modified'] = datetime_to_str(os.path.getmtime(file))
            response.headers['content-length'] = os.path.getsize(file)
        return(response)
264219
def get_or_create_head(root):
    
    head = _create_cssselector("head")(root)
    if not head:
        head = etree.Element("head")
        body = _create_cssselector("body")(root)[0]
        body.getparent().insert(0, head)
        return head
    else:
        return head[0]
190525
def get_head(self) -> Commit:
        
        head_commit = self.repo.head.commit
        return Commit(head_commit, self.path, self.main_branch)
2155
def head_object(self, bucket, object_name):
        
        details = self._details(
            method=b"HEAD",
            url_context=self._url_context(bucket=bucket, object_name=object_name),
        )
        d = self._submit(self._query_factory(details))
        d.addCallback(lambda (response, body): _to_dict(response.responseHeaders))
        return d
998447
def head(self):
        
        if self._head is None:
            self._head = self.sentence.tokens[self._head_id-1]
        return self._head
560782
def list(self, limit=None, offset=None):
        """"""
        return self._manager.list(limit=limit, offset=offset)