def _is_github_url_allowed(url):
    """Whether this is a possible well-formed URL of a GitHub repo that we want
    to index.
    """
    parts = url.split('/')

    # TODO(david): Need to figure out a way to identify whether the github repo
    #     is a vim plugin or not

    # Disallow malformed repo URLs.
    if len(parts) != 3 or len(parts[2]) < 1 or parts[2] == '\\':
        return False

    # We don't want links to vim-scripts.
    if parts[1] == 'vim-scripts':
        return False

    # GitHub static assets are not GitHub repos.
    if parts[1] == 'assets':
        return False

    return True
dataset/ETHPy150Open vim-awesome/vim-awesome/tools/scrape/build_github_index.py/_is_github_url_allowed/original