<s> from GreyMatter import notes , define_subject , tell_time , general_conversations , play_music , weather , connect_proxy , open_firefox , sleep , business_news_reader , twitter_interaction , imgur_handler , lighting <EOL> def brain ( name , speech_text , music_path , city_name , city_code , proxy_username , proxy_password , consumer_key , consumer_secret , access_token , access_token_secret , client_id , client_secret , images_path ) : <EOL> def check_message ( check ) : <EOL> """<STR_LIT>""" <EOL> words_of_message = speech_text . split ( ) <EOL> if set ( check ) . issubset ( set ( words_of_message ) ) : <EOL> return True <EOL> else : <EOL> return False <EOL> if check_message ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> general_conversations . who_are_you ( ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> twitter_interaction . post_tweet ( speech_text , consumer_key , consumer_secret , access_token , access_token_secret ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> business_news_reader . news_reader ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT:i>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:i>' ] ) : <EOL> general_conversations . how_am_i ( ) <EOL> elif check_message ( [ '<STR_LIT:all>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT:all>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT>' ] ) : <EOL> notes . show_all_notes ( ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> notes . note_something ( speech_text ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> define_subject . define_subject ( speech_text ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> general_conversations . tell_joke ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:i>' ] ) : <EOL> general_conversations . who_am_i ( name ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> general_conversations . where_born ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> general_conversations . how_are_you ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT:time>' ] ) or check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> play_music . play_shuffle ( music_path ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT>' ] ) : <EOL> play_music . play_random ( music_path ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> play_music . play_specific_music ( speech_text , music_path ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> weather . weather ( city_name , city_code ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> connect_proxy . connect_to_proxy ( proxy_username , proxy_password ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> open_firefox . open_firefox ( ) <EOL> elif check_message ( [ '<STR_LIT:time>' ] ) : <EOL> tell_time . what_is_time ( ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> imgur_handler . image_uploader ( speech_text , client_id , client_secret , images_path ) <EOL> elif check_message ( [ '<STR_LIT:all>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT:all>' , '<STR_LIT>' ] ) or check_message ( [ '<STR_LIT>' ] ) : <EOL> imgur_handler . show_all_uploads ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> lighting . feeling_angry ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> lighting . feeling_creative ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> lighting . feeling_lazy ( ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> lighting . very_dark ( ) <EOL> elif check_message ( [ '<STR_LIT>' , '<STR_LIT>' ] ) : <EOL> lighting . turn_off ( ) <EOL> elif check_message ( [ '<STR_LIT>' ] ) : <EOL> sleep . go_to_sleep ( ) <EOL> else : <EOL> general_conversations . undefined ( ) </s>
