<commit_before>#!/usr/bin/env python

import sys
import rospy
from art_msgs.msg import Program,  ProgramBlock, ProgramItem,  ObjectType
from art_msgs.srv import storeProgram,   getObjectType,  storeObjectType
from shape_msgs.msg import SolidPrimitive
from geometry_msgs.msg import PoseStamped, PolygonStamped, Point32
from copy import deepcopy

def store_object_type(ot):

    rospy.wait_for_service('/art/db/object_type/store')

    try:
        store_object_srv = rospy.ServiceProxy('/art/db/object_type/store', storeObjectType)
        resp = store_object_srv(ot)
    except rospy.ServiceException, e:
        print "Service call failed: " + str(e)
        return

def store_program(prog):

    rospy.wait_for_service('/art/db/program/store')

    try:
        store_program_srv = rospy.ServiceProxy('/art/db/program/store', storeProgram)
        resp = store_program_srv(program=prog)
    except rospy.ServiceException, e:
        print "Service call failed: " + str(e)
        return

def main(args):

    global p

    rospy.init_node('art_db_service_tester', anonymous=True)

    prog = Program()
    prog.header.id = 0<commit_msg>init_db.py format<commit_after>#!/usr/bin/env python

import sys
import rospy
from art_msgs.msg import Program,  ProgramBlock, ProgramItem,  ObjectType
from art_msgs.srv import storeProgram,   getObjectType,  storeObjectType
from shape_msgs.msg import SolidPrimitive
from geometry_msgs.msg import PoseStamped, PolygonStamped, Point32
from copy import deepcopy


def store_object_type(ot):

    rospy.wait_for_service('/art/db/object_type/store')

    try:
        store_object_srv = rospy.ServiceProxy(
            '/art/db/object_type/store', storeObjectType)
        resp = store_object_srv(ot)
    except rospy.ServiceException, e:
        print "Service call failed: " + str(e)
        return


def store_program(prog):

    rospy.wait_for_service('/art/db/program/store')

    try:
        store_program_srv = rospy.ServiceProxy(
            '/art/db/program/store', storeProgram)
        resp = store_program_srv(program=prog)
    except rospy.ServiceException, e:
        print "Service call failed: " + str(e)
        return


def main(args):

    global p

    rospy.init_node('art_db_service_tester', anonymous=True)

    prog = Program()
    prog.header.id = 0
{'fraction_non_alphanumeric': 0.09398007795582504, 'fraction_numerical': 0.00259852750108272, 'mean_word_length': 3.51171875, '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': '2611128', 'n_tokens_mistral': 781, 'n_tokens_neox': 749, 'n_words': 160}