import requests


def valid_url(url):
    """valid_url.
    Pings the passed URL to validate its existence.

    :param url: URL to ping

    >>> valid_url("https://en.wikipedia.org/wiki/Double_copy_theory")
    True
    >>> valid_url("fake")
    False
    """
    try:
        ping = requests.head(url)
        return ping.status_code < 400
    except Exception:
        return False