<commit_before>import pickle, rsa, os

if __name__ == "__main__":
    master_tup = pickle.load(open("masterKey.pickle", "rb"))
    master_key = rsa.PrivateKey(*master_tup)

    if os.path.exists("to_sign"):
        for key in os.listdir("." + os.sep + "to_sign"):
            tup = pickle.load(open("to_sign" + os.sep + key, "rb"))
            signed = rsa.sign(str(tup), master_key, "SHA-256")
            print("Key " + str(key) + " signed")
            print("Signiture valid? " + str(rsa.verify(str(tup), signed, master_key)))
            if not os.path.exists("signed"):
                os.mkdir("signed")
            pickle.dump(signed, open("signed" + os.sep + key, "wb"), 0)


def exportProof(priv):
    tup = (priv.n, priv.e)
    proof = rsa.sign(str(tup), priv,"SHA-256")
    print("Post this proof somewhere associated with your")
    print("organization, to verify your identity.")
    print("Send that link to <EMAIL>")
    return (tup,proof)<commit_msg>More style guide issues [skip ci]<commit_after>import pickle, os
from rsa import PrivateKey, sign, verify

if __name__ == "__main__":
    master_tup = pickle.load(open("masterKey.pickle", "rb"))
    master_key = PrivateKey(*master_tup)

    if os.path.exists("to_sign"):
        for key in os.listdir("." + os.sep + "to_sign"):
            tup = pickle.load(open("to_sign" + os.sep + key, "rb"))
            signed = sign(str(tup), master_key, "SHA-256")
            print("Key " + str(key) + " signed.")
            print("Sig valid? " + str(verify(str(tup), signed, master_key)))
            if not os.path.exists("signed"):
                os.mkdir("signed")
            pickle.dump(signed, open("signed" + os.sep + key, "wb"), 0)


def exportProof(priv):
    tup = (priv.n, priv.e)
    proof = rsa.sign(str(tup), priv, "SHA-256")
    print("Post this proof somewhere associated with your")
    print("organization, to verify your identity.")
    print("Send that link to <EMAIL>")
    return (tup, proof)
{'fraction_non_alphanumeric': 0.16455696202531644, 'fraction_numerical': 0.007088607594936709, 'mean_word_length': 2.8518518518518516, 'pattern_counts': {'":': 2, '<': 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': '2518821', 'n_tokens_mistral': 674, 'n_tokens_neox': 662, 'n_words': 159}