<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_input_file(resource):
 """ Parse input file into remote packages and excluded data. In addition to garbage, excluded data includes directory indexes for the time being. This will be revisited after basic functionality has been fully implemented. """

    input_resource = open(resource, 'r').read()
    remotes_list = [url for url in input_resource.split()]

    juicer.utils.Log.log_debug("Input file parsed into: %s\n" % str(remotes_list))

    remote_packages = [pkg for pkg in remotes_list if is_remote_package(pkg) is True]
    juicer.utils.Log.log_debug("remote_packages filtered into %s\n" % str(remote_packages))

    excluded_data = [datum for datum in remotes_list if datum not in remote_packages]
    juicer.utils.Log.log_debug("excluded_data filtered into %s\n" % str(excluded_data))

    http_indexes = [index for index in excluded_data if is_directory_index(index)]
    remotes_from_indexes = reduce(lambda x, y: x + parse_directory_index(y), http_indexes, [])

    return (remote_packages + remotes_from_indexes, excluded_data)