<jupyter_start><jupyter_text>\begin{equation*} J(x1,x2,...xn) = \frac{\left( \sum_{i=1}^{n} x_i \right)^2} {\left( n \sum_{i=1}^{n} x_i^2 \right)}\end{equation*}<jupyter_code>def get_jain(resources):
    denom = 0
    nom = 0
    for r in resources:
        nom += r
        denom += r * r
    nom = nom * nom
    denom = len(resources) * denom
    return nom/denom
for example_of_resources in examples_of_resources :
    print(get_jain(example_of_resources))<jupyter_output>1.0
0.8888888888888888
0.6049382716049383
0.5050505050505051
0.3333333333333333
0.3333333333333333
0.3333333333333333
0.25
0.1
{'fraction_non_alphanumeric': 0.14143094841930118, 'fraction_numerical': 0.194675540765391, 'mean_word_length': 3.894308943089431, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '321393', 'license': 'MIT', 'n_tokens_mistral': 314, 'n_tokens_neox': 252, 'n_words': 46, 'path': 'jain_fairness_index.ipynb', 'repo_name': 'Wanibzh29/hello-world-python', 'size': '601'}