def __init__(self, host): self.host = host self.direct = Direct(self) self.server = None self.sp = None self.reconnect_time = None self.reconnect_timer = None self.ready_event = Event() self.messages = []
# Direct(func6, bounds=np.array([[0,1]]*3), globalmin=GlobalMin(known=False, val=-3.86278)).run(file) # # Direct(func6, bounds=np.array([[0,1]]*6), globalmin=GlobalMin(known=False, val=-3.32237)).run(file) # # print('test Branin results:') # # file.write('test Branin results:\n') # Direct(func7, bounds=np.array([[-5,10],[0,15]]), globalmin=GlobalMin(known=True, val=0.397887)).run(file) # # print('test Shekel results:') # # file.write('test Shekel results:\n') # # Direct(func8, bounds=np.array([[0,10]]*4), globalmin=GlobalMin(known=True, val=-10.5364)).run(file) # # Direct(func8, bounds=np.array([[0,10]]*4), globalmin=GlobalMin(known=True, val=-10.4029)).run(file) # Direct(func8, bounds=np.array([[0,10]]*4), globalmin=GlobalMin(known=True, val=-10.1532)).run(file) # # print('test Shubert results:') # # file.write('test Shubert results:\n') # Direct(func9, bounds=np.array([[-10,10],[-10,10]]), globalmin=GlobalMin(known=True, val=-186.7309)).run(file) # print('test Michalewics results:') # file.write('test Michalewics results:\n') # Direct(func10, bounds=np.array([[0,np.pi]]*2), globalmin=GlobalMin(known=True, val=-1.8013)).run(file) # Direct(func10, bounds=np.array([[0,np.pi]]*5), globalmin=GlobalMin(known=True, val=-4.687658)).run(file) # Direct(func10, bounds=np.array([[0,np.pi]]*10), globalmin=GlobalMin(known=True, val=-9.66015)).run(file) print('test Schwefel results:') # file.write('test Schwefel results:\n') Direct(func11, bounds=np.array([[-500, 500]] * 4), globalmin=GlobalMin(known=True, val=0.)).run(file) file.close() except Exception: traceback.print_exc()
from events import EventCreate import pymongo import os from pymongo import MongoClient from flask import request, jsonify, json, render_template, redirect from mailhandler import Mailhandler client = MongoClient('localhost', 27017) app = Flask(__name__) app.secret_key = os.urandom(24) first = First() alma = Alumni() stud = Student() teach = Teacher() di = Direct() @app.route('/crash') def main(): raise Exception() @app.route('/') def index(): return render_template('index.html') @app.route('/homelog') def homelog(): return render_template('login.html')