<commit_before>import sys
sys.path.insert(0, '../helpers/')
import lecroy
import argparse
import json

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("f", metavar = "exportFile", help="Name of exported file", type = str)
    args = parser.parse_args()

    scope = lecroy.Lecroy()
    print "Stopping scope"
    scope.stop()
    print "Getting Histogram"
    hist = scope.getHistogram()

    try:
        with open(args.f, "w") as f:
            json.dump(hist, f)
            print "Saved"
    except:
        print "Error saving file. Is the location writable?"
main()<commit_msg>is mdata needed from hist<commit_after>import sys
sys.path.insert(0, '../helpers/')
import lecroy
import argparse
import json

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("f", metavar = "exportFile", help="Name of exported file", type = str)
    args = parser.parse_args()

    scope = lecroy.Lecroy()
    print "Stopping scope"
    scope.stop()
    print "Getting Histogram"
    (hist,mdata) = scope.getHistogram()

    try:
        with open(args.f, "w") as f:
            json.dump(hist, f)
            print "Saved"
    except:
        print "Error saving file. Is the location writable?"
main()
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0016129032258064516, 'mean_word_length': 2.8421052631578947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5866617', 'n_tokens_mistral': 399, 'n_tokens_neox': 392, 'n_words': 115}