<commit_before>from PIL import Image
import numpy as np
import subprocess
import datetime
import time
import logging


class flagcapture(object):

    def capture(self):
        self.imagename = None
        try:
            self.imagename = str(time.strftime('%H-%M-%S', datetime.datetime.now().timetuple()))+".png"
            subprocess.call("raspistill -o " + self.imagename + " -t 0")
            logging.info("capture:"+str(self.imagename))
            return True
        except:
            self.imagename = None
            logging.info("capture:Failed")
            return False

    def judge(self, selectcolor='red', selectcolor_judge=110, othercolor1_judge=100, othercolor2_judge=100):
        if self.imagename is not None:
            judgeimage = self.JudgeGoal(filename=self.imagename, selectcolor_judge=selectcolor_judge, othercolor1_judge=othercolor1_judge, othercolor2_judge=othercolor2_judge)
            judgeimage.loadimage()
            judgeimage.objectselect(colorname=selectcolor)
            logging.info("judge")
            return judgeimage.objectdirection()
        else:
            return [None, '0']<commit_msg>撮影コマンドのバグを修正<commit_after>from PIL import Image
import numpy as np
import subprocess
import datetime
import time
import logging


class flagcapture(object):

    def capture(self):
        self.imagename = None
        try:
            self.imagename = str(time.strftime('%H-%M-%S', datetime.datetime.now().timetuple()))+".png"
            subprocess.call("raspistill -o " + self.imagename + " -t 0", shell=True)
            logging.info("capture:"+str(self.imagename))
            return True
        except:
            self.imagename = None
            logging.info("capture:Failed")
            return False

    def judge(self, selectcolor='red', selectcolor_judge=110, othercolor1_judge=100, othercolor2_judge=100):
        if self.imagename is not None:
            judgeimage = self.JudgeGoal(filename=self.imagename, selectcolor_judge=selectcolor_judge, othercolor1_judge=othercolor1_judge, othercolor2_judge=othercolor2_judge)
            judgeimage.loadimage()
            judgeimage.objectselect(colorname=selectcolor)
            logging.info("judge")
            return judgeimage.objectdirection()
        else:
            return [None, '0']
{'fraction_non_alphanumeric': 0.10247503256621798, 'fraction_numerical': 0.014763352149370386, 'mean_word_length': 2.777049180327869, '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': '5967384', 'n_tokens_mistral': 690, 'n_tokens_neox': 648, 'n_words': 130}