msticpy/sectools/tiproviders/ti_provider_base.py
def entropy(input_str: str) -> float:
    """Compute entropy of input string."""
    str_len = float(len(input_str))
    return -sum(
        map(
            lambda a: (a / str_len) * math.log2(a / str_len),
            Counter(input_str).values(),
        )
    )
Compute entropy of input string.
Compute entropy of input string.
Compute entropy of input string .
def entropy(input_str: str) -> float:
    str_len = float(len(input_str))
    return -sum(
        map(
            lambda a: (a / str_len) * math.log2(a / str_len),
            Counter(input_str).values(),
        )
    )
def entropy ( input_str : str ) -> float : str_len = float ( len ( input_str ) ) return - sum ( map ( lambda a : ( a / str_len ) * math . log2 ( a / str_len ) , Counter ( input_str ) . values ( ) , ) )
Compute entropy of input string.
Compute entropy of input string .
"""Compute entropy of input string."""
input_str
str