async def musi_nimi(ctx, *message): if message: try: word_len = int(message[0]) except: word_len = 4 else: word_len = 4 try: toki_pona_words = [*TOKI_PONA_DICT.keys()] toki_pona_length_words = [ word for word in toki_pona_words if len(word) == word_len ] word = get_random(toki_pona_length_words).upper() response = embed_wordle({ 'Wordle!': f'Guessing a {word_len} character toki pona word in {word_len+1} guesses...' }) await ctx.send(embed=response) await wait_for_answer(ctx, word, word_len, toki_pona_words, REGIONAL_INDICATOR_LETTERS, TOKI_ALPHABET) except Exception as error: response_text = wordle_exception(error, DEBUG) response = embed_wordle({'A wordley error!': response_text}) await ctx.send(embed=response)
cfg_pred_offset = [1,2,3,4,5] cfg_prev_range = [5,10,25,50,75,100] cfg_sample_size = [1000,2000,3000] cfg_test_size = [0.1,0.15,0.2] cfg_epochs = [25,50,75,100] cfg_batchs = [10,25,50] cfg_nodes = [50,100,200,300] cfg_emas = [15,25,50,200] cfg_pocids = [1,5,50,200] cfg_macds = [[12,26],[50,200]] cfg_dropout = [0.2,0.5,0.75] cfgs =[] default_cgf = { 'pred_offset': h.get_random(cfg_pred_offset), 'full_data': np.random.randint(2) == 0, 'prev_range': h.get_random(cfg_prev_range), 'sample_size': h.get_random(cfg_sample_size), 'test_size': 0.2,#h.get_random(cfg_test_size), 'epochs': h.get_random(cfg_epochs), 'batchs': h.get_random(cfg_batchs), 'nodes': h.get_random(cfg_nodes), 'emas': h.remove_random_list(cfg_emas), 'pocids': h.remove_random_list(cfg_pocids), 'macds': dict(enumerate(h.remove_random_list(cfg_macds))), 'rsis': [14], 'extra_layers': 0,#np.random.randint(2), 'dropout': h.get_random(cfg_dropout) } for cfg in config_list:
async def on_message(message): chat_message = message.content.lower() if DEBUG: print(str(message.author) + '\n' + str(chat_message)) if message.author == client.user: return # if Wade uses AoE shortcuts, reply with their meaning if WADE_ID and message.author.id == WADE_ID: taunt = get_aoe_taunt(AOE_TAUNTS_DICT, chat_message) if taunt: response = embed_response(taunt) await message.channel.send(embed=response) # if you @ the bot it beeps or boops if any(id in chat_message for id in [BOT_USER_ID, BOT_ROLE_ID]): beep_boop = get_random_beep_boop() response = embed_response(beep_boop) await message.channel.send(embed=response) if 'orb' in chat_message and 'i have counted' not in chat_message: orbified_message = re.sub('[aeiou]', 'orb', chat_message) await message.channel.send(orbified_message) if 'nerts' in chat_message: response = get_random(NERTS) response = embed_response(response) await message.channel.send(embed=response) if 'robot' in chat_message: friendly_message = get_random(FRIENDLY_ROBOT_ADVICE) response = embed_response(friendly_message) await message.channel.send(embed=response) if 'regulations' in chat_message: response = embed_response('Praise be the regulations') await message.channel.send(embed=response) if 'rock' in chat_message and 'fact' in chat_message: await message.add_reaction(emoji='<:rockfact:772801261103742976>') rock_message = get_random(ROCK_FACTS) response = embed_response(rock_message) await message.channel.send(embed=response) if 'guess the soup' in chat_message: await message.add_reaction(emoji='<:soupguess:806255878902513724>') if 'rule' in chat_message: response = embed_guess_the_soup_rules() await message.channel.send(embed=response) if 'tv' in chat_message and 'game' in chat_message and 'help' in chat_message: tv_games_help = get_random(TV_GAMES_HELP) response = embed_response(tv_games_help) await message.channel.send(embed=response) if 'tv games schedule' in chat_message: schedule = scrape_events_from_calender(TV_GAMES_AGENDA) print_schedule = embed_games_schedule(schedule) await message.channel.send(embed=print_schedule) if 'movie schedule' in chat_message: schedule = scrape_events_from_calender(MOVIE_AGENDA) print_schedule = embed_movie_schedule(schedule) await message.channel.send(embed=print_schedule) if any(x in chat_message.lower() for x in SHITEMASTER_HELP): embed = embed_shitemaster_email(SHITEMASTER_EMAIL) await message.author.send('', embed=embed) if S***E == '1': if 'shitemas' in chat_message: response = embed_response( 'SHITEmas is the most wonderful time of the year.') await message.channel.send(embed=response) if 's***e schedule' in chat_message: schedule = scrape_events_from_calender(SHITEMAS_AGENDA) print_schedule = embed_shitemas_schedule(schedule) await message.channel.send(embed=print_schedule) await client.process_commands(message)