from utils.GetTime import * from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() mongodb = MongoDB() mongo_uri = "mongodb://{}:{}@{}:{}/resource".format( config['mongodb']['username'], config['mongodb']['password'], config['mongodb']['host'], config['mongodb']['port']) mongodb.init(mongo_uri, "resource", "display") def get_personal_course_info(name): return name @server.route('/course/query/<name>', methods=['GET']) def CourseQuery(name): if request.method == 'GET': status = 1 try:
from utils.GetTime import * from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() ResourceDB = MongoDB() ResourceDB.init("mongodb://*****:*****@121.40.82.87:15001", "resource", "display") def get_personal_info(name): return name @server.route('/personal/info/<name>', methods=['GET']) def PersonalInfo(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr,
import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess from auth.user import User import datetime logger = get_log() config = get_config() mongodb = MongoDB() __MAX_AGE = int(config['auth']['max_age']) user_handler = User(logger, __MAX_AGE) @server.route('/index/display', methods=['POST']) def IndexDisplay(): if request.method == 'POST': status = 1 try: account = request.cookies.get('account') info = { 'ip': request.remote_addr, 'url': request.url, 'interface': "IndexDisplay", 'method': 'POST',
from flask import request, session, redirect, render_template, url_for from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() mongo = MongoDB() def get_personal_info(name): return name @server.route('/personal/info/<name>', methods=['GET']) def PersonalInfo(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr, 'url': request.url, 'interface': "PersonalInfo"
from flask import request, session, redirect, render_template, url_for from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() mongodb = MongoDB() mongodb.init("resource", "display") def get_personal_course_info(name): return name @server.route('/course/query/<name>', methods=['GET']) def CourseQuery(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr, 'url': request.url,