本文整理汇总了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([])
示例2: stop
def stop(self):
Feature.stop(self)
self.background_image = np.array([])
if self.video_capture.isOpened():
self.video_capture.release()
示例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
示例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()
示例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)
示例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([])
示例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)
示例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)
示例9: __init__
def __init__(self, text_to_speech):
Feature.__init__(self)
Speaking.__init__(self, text_to_speech)
示例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()
示例11: stop
def stop(self):
Feature.stop(self)
self.background_image = np.array([])
示例12: stop
def stop(self):
Feature.stop(self)
# disable fog
glDisable(GL_FOG)
self.is_cloudy = False
示例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
示例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)
示例15: __init__
def __init__(self):
Feature.__init__(self)
self.background_image = np.array([])
self.video_capture = cv2.VideoCapture()