<commit_before>import math

from src.constants import PI
from src.experimental.legendre import Legendre


# n! where n >= 0
def Factorial(n):
    if n <= 1:
        return 1

    result = n

    while n > 1:
        n -= 1
        result *= n

    return result

# Normalization constant for a Spherical Harmonic function
def K(l, m):
    K = ((2.0 * l + 1.0) * Factorial(l - m)) / ((4.0 * PI) * Factorial(l + m))
    return math.sqrt(K)


# Sample a Spherical Harmonic function Y(l, m) at a point on the unit sphere<commit_msg>Removed the constants module and used math.pi instead.<commit_after>import math

from src.experimental.legendre import Legendre


# n! where n >= 0
def Factorial(n):
    if n <= 1:
        return 1

    result = n

    while n > 1:
        n -= 1
        result *= n

    return result

# Normalization constant for a Spherical Harmonic function
def K(l, m):
    K = ((2.0 * l + 1.0) * Factorial(l - m)) / ((4.0 * math.pi) * Factorial(l + m))
    return math.sqrt(K)


# Sample a Spherical Harmonic function Y(l, m) at a point on the unit sphere
{'fraction_non_alphanumeric': 0.11183597390493942, 'fraction_numerical': 0.02050326188257223, 'mean_word_length': 2.464516129032258, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6309171', 'n_tokens_mistral': 390, 'n_tokens_neox': 354, 'n_words': 138}