def run(): system.init() loop = asyncio.get_event_loop() for task in system.tasks.values(): loop.create_task(periodic_task(task)) loop.run_forever()
def start(agent, subscriber): mib2_system.init(agent, subscriber) mib2_interfaces.init(agent, subscriber) mib2_ifMIB.init(agent, subscriber) management.init(agent, subscriber) interface.init(agent, subscriber) stats.init(agent, subscriber) device.init(agent, subscriber) operate.init(agent, subscriber) system.init(agent, subscriber)
def start(agent, subscriber): mib2_system.init(agent, subscriber) mib2_interfaces.init(agent, subscriber) mib2_ifMIB.init(agent, subscriber) operate.init(agent, subscriber) interface.init(agent, subscriber) linkagg.init(agent, subscriber) management.init(agent, subscriber) tapflow.init(agent, subscriber) tapgroup.init(agent, subscriber) stats.init(agent, subscriber) system.init(agent, subscriber)
__version__ = 'ALPHA 2.4.1' import sys as sysModule import time try: import colorama except: print("You need the colorama module! (python -m pip install colorama)") sysModule.exit() sysModule.path.insert(1, './imports') import utils, terminal, system, commands, save system.init(system) colorama.init() from colorama import Fore sysCont = save.load() if not sysCont: sysCont = system.SystemsController() #If user broke their system then quit bootPath = system.FilePath('/sys/boot.sys', sysCont.userSystem.fileSystem, True, system.sysFileHashes['boot.sys']) if bootPath.status != system.PathStatuses.PATH_VALID: sysCont.userSystem.status = system.Statuses.UNBOOTABLE comCont = commands.CommandController() terminal = terminal.Terminal(comCont) terminal.out(colorama.Style.BRIGHT, colorama.Fore.GREEN, False, False)
import discord import random import system import valorant system.init() client = discord.Client() TOKEN = 'ODA4OTIyMDU5MDE0Mjc1MTEz.YCNlXw.ztTnjdsa4_fZZmjJ-RLgB7X1_0Q' # Method to call when the bot is online @client.event async def on_ready(): print('{0.user} logged in'.format(client)) # Method to call after receiving an incoming message @client.event async def on_message(message): # check if bot is reading its own message if message.author == client.user: return # check message conditions if message.content.startswith('ply'): command = message.content.split(' ') # greet message if len(command) == 1: await message.channel.send(open('files/greet.txt').read())