def fitness_and_quality_parsed(mime_type, parsed_ranges):
    best_fitness, best_fit_q = -1, 0
    target_type, target_subtype, target_params = parse_media_range(mime_type)
    for type, subtype, params in parsed_ranges:
        if (type == target_type
                    or type == '*' or target_type == '*') and (
                subtype == target_subtype
                    or subtype == '*' or target_subtype == '*'):
            fitness = 0
            if type == target_type:
                fitness += 100
            if subtype == target_subtype:
                fitness += 10
            for key in target_params:
                if key != 'q' and key in params:
                    if params[key] == target_params[key]:
                        fitness += 1
            if fitness > best_fitness:
                best_fitness = fitness
                best_fit_q = params['q']
    return best_fitness, float(best_fit_q)
Retuns a hash of the file with the given name and optional content.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/util/mimeparse.py/fitness_and_quality_parsed--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/staticfiles/storage.py/CachedFilesMixin.file_hash