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

def main():
  parser = argparse.ArgumentParser()
  parser.add_argument("t", metavar = "duration", help="Duration of acquisition", type = int, nargs = '+')
  args = parser.parse_args()
  print args.t
  scope = lecroy.Lecroy()
  
  
main()<commit_msg>proof of concept oscilloscope measurement for x duration<commit_after>import sys
sys.path.insert(0, '../helpers/')
import lecroy
import argparse
import threading

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("t", metavar = "duration", help="Duration of acquisition", type = int, nargs = '+')
    args = parser.parse_args()
    print args.t
    scope = lecroy.Lecroy()
    def stop():
        scope.stop()
        scope.getHistogram()
    scope.start()
    t = threading.Timer(args.t[0], stop)
    t.start()
main()
{'fraction_non_alphanumeric': 0.1438278595696489, 'fraction_numerical': 0.0033975084937712344, 'mean_word_length': 3.752688172043011, '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': '5184519', 'n_tokens_mistral': 288, 'n_tokens_neox': 286, 'n_words': 73}