<commit_before>
import tty, sys #used for live keyboard input
import argparse
from time import sleep
import curses

#from picamera import PiCamera

from whip import Whip

parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(help='sub-command help', dest="subparser_name")

parser_a = subparsers.add_parser('drive', help='drive help')
parser_b = subparsers.add_parser('record', help='record help')

args = parser.parse_args()


BASE_URL = 'http://localhost:8000/'
PHOTOS_PATH = '/home/wroscoe/.tmp/'



def drive():
    whip = Whip(BASE_URL)


def record(stdscr):
    ''' record pictures on an interval '''
    #camera = PiCamera()

    file_num = 0

    # do not wait for input when calling getch
    stdscr.nodelay(1)
    while True:
        # get keyboard input, returns -1 if none available
        c = stdscr.getch()
        if c != -1:
            # print numeric value
            stdscr.addstr(str(c) + ' ')
            stdscr.refresh()
            # return curser to start position
            stdscr.move(0, 0)

        sleep(1)
        print('capturing')
        #camera.capture()

        file_name = 'donkey_' + str(file_num)
        file_num += 1


<commit_msg>made manage work<commit_after>
import tty, sys #used for live keyboard input
import argparse
from time import sleep
import curses

from picamera import PiCamera

from whip import Whip

parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(help='sub-command help', dest="subparser_name")

parser_a = subparsers.add_parser('drive', help='drive help')
parser_b = subparsers.add_parser('record', help='record help')

args = parser.parse_args()


BASE_URL = 'http://localhost:8000/'
PHOTOS_PATH = '/home/wroscoe/.tmp/'



def drive():
    whip = Whip(BASE_URL)


def record(stdscr):
    ''' record pictures on an interval '''
    camera = PiCamera()

    file_num = 0

    while True:

        sleep(1)
        print('capturing')

        file_name = 'donkey_' + str(file_num) + '.jpg'
        file_num += 1

        camera.capture(file_name)


{'fraction_non_alphanumeric': 0.11485826001955034, 'fraction_numerical': 0.009286412512218964, 'mean_word_length': 3.0615079365079363, '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': '3124757', 'n_tokens_mistral': 682, 'n_tokens_neox': 644, 'n_words': 177}