當前位置: 首頁>>代碼示例>>Python>>正文


Python base.Feature類代碼示例

本文整理匯總了Python中features.base.Feature的典型用法代碼示例。如果您正苦於以下問題:Python Feature類的具體用法?Python Feature怎麽用?Python Feature使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Feature類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

 def __init__(self, text_to_speech, speech_to_text):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
     self.speech_to_text = speech_to_text
     self.neural_network = None
     self.background_image = np.array([])
     self.iris_slide = np.array([])
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:7,代碼來源:irisclassifier.py

示例2: stop

    def stop(self):
        Feature.stop(self)
        
        self.background_image = np.array([])

        if self.video_capture.isOpened():
            self.video_capture.release()
開發者ID:MYMSK4K,項目名稱:SaltwashAR,代碼行數:7,代碼來源:television.py

示例3: __init__

 def __init__(self, text_to_speech):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
     self.is_pyramid = False
     self.is_cube = False
     self.rotation = 0
     self.background_image = np.array([])
     self.speech_thread = None
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:8,代碼來源:shapes.py

示例4: __init__

 def __init__(self, text_to_speech):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
     self.background_image = np.array([])
     self.slides = []
     self.blurbs = []
     self.current_item = 0
     self.current_slide = np.array([])
     self.blurb_thread = None
     self._get_slides_and_blurbs()
開發者ID:PhloxAR,項目名稱:irobot,代碼行數:10,代碼來源:slideshow.py

示例5: start

    def start(self, args=None):
        Feature.start(self, args)
 
        # draw rotating pyramid or cube
        self.rotation += 1

        if self.is_pyramid:
            draw_pyramid(self.rotation)
        elif self.is_cube:
            draw_cube(self.rotation)
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:10,代碼來源:shapes.py

示例6: start

    def start(self, args=None):
        image = args
        Feature.start(self, args)
 
        # if slide, add to background image
        if self.iris_slide.size > 0:
            slide_offset_and_height = self.SLIDE_OFFSET + self.iris_slide.shape[0]
            slide_offset_and_width = self.SLIDE_OFFSET + self.iris_slide.shape[1] 
        
            image[self.SLIDE_OFFSET:slide_offset_and_height, self.SLIDE_OFFSET:slide_offset_and_width] = self.iris_slide
            self.background_image = image
        else:
            self.background_image = np.array([])
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:13,代碼來源:irisclassifier.py

示例7: start

    def start(self, args=None):
        Feature.start(self, args)
 
        # enable fog if cloudy
        if self.is_cloudy:
            glFogi(GL_FOG_MODE, GL_LINEAR)
            glFogfv(GL_FOG_COLOR, (0.5, 0.5, 0.5, 1.0))
            glFogf(GL_FOG_DENSITY, 0.35)
            glHint(GL_FOG_HINT, GL_NICEST)
            glFogf(GL_FOG_START, 1.0)
            glFogf(GL_FOG_END, 5.0)
            glEnable(GL_FOG)
        else:
            glDisable(GL_FOG)
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:14,代碼來源:weather.py

示例8: __init__

    def __init__(self, text_to_speech, speech_to_text):
        Feature.__init__(self)

        # setup AV Table
        self.av_table = GameTable(13, 2)
        if(self.av_table.loadParameters() == False):
            self.av_table.initialize(0.)
 
        # setup a Q-Learning agent
        learner = Q(0.5, 0.0)
        learner._setExplorer(EpsilonGreedyExplorer(0.0))
        self.agent = LearningAgent(self.av_table, learner)
 
        # setup game interaction
        self.game_interaction = GameInteraction(text_to_speech, speech_to_text)

        # setup environment
        environment = GameEnvironment(self.game_interaction)
 
        # setup task
        task = GameTask(environment, self.game_interaction)
 
        # setup experiment
        self.experiment = Experiment(task, self.agent)
開發者ID:MYMSK4K,項目名稱:SaltwashAR,代碼行數:24,代碼來源:playyourcardsright.py

示例9: __init__

 def __init__(self, text_to_speech):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
開發者ID:PhloxAR,項目名稱:irobot,代碼行數:3,代碼來源:opticalcharacterrecognition.py

示例10: __init__

 def __init__(self, speech_to_text):
     Feature.__init__(self)
     self.is_speaking = False
     self.speech_to_text = speech_to_text
     self.phrases = self._load_config()
     pygame.mixer.init()
開發者ID:MYMSK4K,項目名稱:SaltwashAR,代碼行數:6,代碼來源:phrasetranslation.py

示例11: stop

 def stop(self):
     Feature.stop(self)
     self.background_image = np.array([])
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:3,代碼來源:irisclassifier.py

示例12: stop

 def stop(self):
     Feature.stop(self)
     
     # disable fog
     glDisable(GL_FOG)
     self.is_cloudy = False
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:6,代碼來源:weather.py

示例13: __init__

 def __init__(self, text_to_speech, speech_to_text):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
     self.speech_to_text = speech_to_text
     self.is_cloudy = False
開發者ID:drat,項目名稱:SaltwashAR,代碼行數:5,代碼來源:weather.py

示例14: __init__

 def __init__(self, text_to_speech, speech_to_text):
     Feature.__init__(self)
     Speaking.__init__(self, text_to_speech)
     self.speech_to_text = speech_to_text
     self.recognizer = sr.Recognizer()
     pygame.mixer.init(frequency=8000)
開發者ID:PhloxAR,項目名稱:irobot,代碼行數:6,代碼來源:mixingdesk.py

示例15: __init__

 def __init__(self):
     Feature.__init__(self)
     self.background_image = np.array([])
     self.video_capture = cv2.VideoCapture()
開發者ID:MYMSK4K,項目名稱:SaltwashAR,代碼行數:4,代碼來源:television.py


注:本文中的features.base.Feature類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。