当前位置: 首页>>代码示例>>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;未经允许,请勿转载。