<commit_before># DOCUMENTATION
# http://doc.aldebaran.com/2-5/naoqi/peopleperception/alengagementzones-api.html#alengagementzones-api

import qi
import argparse
import sys
import os
import time
import threading
import math

from naoqi import ALProxy

import conditions
from conditions import set_condition

last_personid = 0
p_dist_thres = 1.5

# function called when the signal "EngagementZones/PersonEnteredZone1" is triggered
def zone1_callback(data):
    global memory_service
    print "Person has entered Zone 1"
    set_condition(memory_service,'personhere','true')
    time.sleep(1)
    set_condition(memory_service,'personhere','false')


def rhMonitorThread (memory_service):
    global last_personid
    t = threading.currentThread()
    print "personhere thread started"

    while getattr(t, "do_run", True):
        plist = memory_service.getData("PeoplePerception/VisiblePeopleList")
        
        personid = 0
        v = 'false'
        if (plist!=None and len(plist)>0):
            personid = plist[0]

            #print 'personhere:: personid ',personid    
            pmemkey_dist = "PeoplePerception/Person/"+str(personid)+"/Distance"
            pmemkey_angles = "PeoplePerception/Person/"+str(personid)+"/AnglesYawPitch"<commit_msg>person here up to 2 m<commit_after># DOCUMENTATION
# http://doc.aldebaran.com/2-5/naoqi/peopleperception/alengagementzones-api.html#alengagementzones-api

import qi
import argparse
import sys
import os
import time
import threading
import math

from naoqi import ALProxy

import conditions
from conditions import set_condition

last_personid = 0
p_dist_thres = 2

# function called when the signal "EngagementZones/PersonEnteredZone1" is triggered
def zone1_callback(data):
    global memory_service
    print "Person has entered Zone 1"
    set_condition(memory_service,'personhere','true')
    time.sleep(1)
    set_condition(memory_service,'personhere','false')


def rhMonitorThread (memory_service):
    global last_personid
    t = threading.currentThread()
    print "personhere thread started"

    while getattr(t, "do_run", True):
        plist = memory_service.getData("PeoplePerception/VisiblePeopleList")
        
        personid = 0
        v = 'false'
        if (plist!=None and len(plist)>0):
            personid = plist[0]

            #print 'personhere:: personid ',personid    
            pmemkey_dist = "PeoplePerception/Person/"+str(personid)+"/Distance"
            pmemkey_angles = "PeoplePerception/Person/"+str(personid)+"/AnglesYawPitch"
{'fraction_non_alphanumeric': 0.09295886075949367, 'fraction_numerical': 0.00949367088607595, 'mean_word_length': 3.835564053537285, 'pattern_counts': {'":': 0, '<': 3, '<?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': '472507', 'n_tokens_mistral': 793, 'n_tokens_neox': 763, 'n_words': 178}