import random
import hashlib


def get_string_value(s: str) -> float:
    """Calculates a float value for the given string between 0 and 1."""
    # save random state
    state = random.getstate()

    # seed random with md5sum of string
    md5sum = hashlib.md5(s.encode("utf-8")).digest()
    random.seed(md5sum)

    # get first value (reproducible because of known seed)
    value = random.random()

    # reset random state
    random.setstate(state)

    return value