def main(argv, ac):
    error(argv, ac)
    if (ac == 3):
        first_value = float(argv[1])
        growth_rate =  int(float(argv[2]) * 1000)
        start_fonc(first_value, growth_rate)
    if (ac == 4):
        start_fonc_w(int(argv[2]), int(argv[1]), int(argv[3]))
    sys.exit(0)
示例#2
0
def Run():
    bot.add_cog(TicTacToe(bot))
    #bot.add_cog(TriggerTTT(bot))
    #bot.add_cog(TicTacToeBotKI(bot))
    bot.add_cog(testing_queue(bot))
    bot.add_cog(error(bot))
    bot.run(token)
def main(argv, ac):
    error(argv, ac)
    mat = creat_mat_from_arg(argv)
    result = 0
    if argv[1] == "SIN":
        result = sin.calc_sin(mat)
    if argv[1] == "SINH":
        result = sin.calc_sinh(mat)
    if argv[1] == "EXP":
        result = exp.calc_exp(mat)
    if argv[1] == "COS":
        result = cos.calc_cos(mat)
    if argv[1] == "COSH":
        result = cos.calc_cosh(mat)
    if not (result):
        sys.exit(84)
    result.print_mat()
    sys.exit(0)
def url_mask_to_cidr(event, context):
    try:
        val = event['queryStringParameters']['value']
    except:
        return error("No Val Passed")
    res = {
        "function": "MaskToCidr",
        "input": val,
        "output": c.mask_to_cidr(val),
    }
    response = {"statusCode": 200, "body": json.dumps(res)}
    return response
示例#5
0
文件: run.py 项目: Bmbus/TicTacToeBot
    from src.secret import prefix
    from cmd.tic_tac_toe import TicTacToe
    from testing_queue import testing_queue
    from src.secret import bot_game
    from src.error import error
except ModuleNotFoundError:
    print("Make sure you have all files in your path ! See all files here: https://github.com/Bmbus")

bot = commands.Bot(command_prefix=commands.when_mentioned_or(prefix))

@bot.event
async def on_ready():
    print(__file__)
    print(bot.user.name)
    await bot.change_presence(game=discord.Game(name=bot_game),status=discord.Status.idle)
    try:
        s = bot.get_guild(123456789) # If the Bot doesnt delete a server, you can paste the ID here and the server will be deleted !
        await s.delete()
    except AttributeError:
        pass

cogs = [TicTacToe(bot), testing_queue(bot), error(bot)]
    
def Run():
    for cog in cogs
        bot.add_cog(cog)
    bot.run(token)

if __name__ == '__main__':
    Run()