<commit_before>#  File:       pythagorean_triplet.py
#  Purpose:    A Pythagorean triplet program
#  Programmer: <NAME>
#  Course:     Exercism
#  Date:       Thursday 29 September 2016, 04:30 PM


def triplets_in_range(min_value, max_value):
    triple = set()
    for a in range(min_value, max_value + 1):
        for b in range(a, max_value + 1):
            for c in range(b, max_value + 1):
                if a**2 + b**2 == c**2:
                    triple.update([(a, b, c)])
    return triple<commit_msg>Add is_coprime function<commit_after>#  File:       pythagorean_triplet.py
#  Purpose:    A Pythagorean triplet program
#  Programmer: <NAME>
#  Course:     Exercism
#  Date:       Thursday 29 September 2016, 04:30 PM

from fractions import gcd


def triplets_in_range(min_value, max_value):
    triple = set()
    for a in range(min_value, max_value + 1):
        for b in range(a, max_value + 1):
            for c in range(b, max_value + 1):
                if a**2 + b**2 == c**2:
                    triple.update([(a, b, c)])
    return triple


def is_coprime(a, b):
    return gcd(a, b) == 1

    
{'fraction_non_alphanumeric': 0.11369740376007162, 'fraction_numerical': 0.02954341987466428, 'mean_word_length': 2.288235294117647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3389026', 'n_tokens_mistral': 427, 'n_tokens_neox': 390, 'n_words': 114}