Пример #1
0
from dashboard import app
import logging

logging.basicConfig(level=logging.DEBUG)

if __name__ == '__main__':
	app.run()
Пример #2
0
# -*- coding: utf-8 -*-

from dashboard import app

app.run(host="127.0.0.1", port=9090, debug=True)
Пример #3
0
from dashboard import app

if __name__ == "__main__":

    app.run(debug=True, threaded=True)
    #for multiple users set threaded = True
    #debug = true, allows the server to reload itself when changes are made
Пример #4
0
#!/usr/bin/env python
#
# Copyright (C) 2014, 2015, 2016, 2017  Linaro Ltd.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from dashboard import app


if __name__ == "__main__":
    app.run(threaded=app.config["THREADED"], debug=app.debug)
from dashboard import app

if __name__ == '__main__':
    app.run(debug=False)
Пример #6
0
#!/usr/bin/env python
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from dashboard import app


if __name__ == "__main__":
    app.run(threaded=app.config["THREADED"], debug=app.debug)
Пример #7
0
from dashboard import app

if __name__ == '__main__':
    app.run(debug=True, port=5000)
from dashboard import app
app.run(host="127.0.0.1", port=3001, debug=True)
Пример #9
0
Файл: wsgi.py Проект: EHRI/IRP2
from dashboard import app

if __name__ == "__main__":
    app.run(processes=5)
Пример #10
0
"""
This script runs the ssis-dashboard application using a development server.
"""

from os import environ
from dashboard import app

if __name__ == '__main__':
    HOST = environ.get('SERVER_HOST', 'localhost')
    try:
        PORT = int(environ.get('SERVER_PORT', '5555'))
    except ValueError:
        PORT = 5555
    app.run(HOST, PORT, threaded=True)

    
Пример #11
0
from dashboard import app

app.run(port=8080, threaded=True, debug=True)
Пример #12
0
#-*- coding:utf-8 -*-
# Copyright 2017 Xiaomi, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
base_dir = os.path.dirname(os.path.abspath(__file__))
activate_this = '%s/env/bin/activate_this.py' % base_dir
try:
    execfile(activate_this, dict(__file__=activate_this))
except:
    print "running without local python env"

import sys
sys.path.insert(0, base_dir)

from dashboard import app

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8081, debug=True)
Пример #13
0
# -*- coding: utf-8 -*-


from dashboard import app

app.run(host="0.0.0.0", port=9090, debug=True)
Пример #14
0
from dashboard import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)
Пример #15
0
# -*- coding: utf-8 -*-


from dashboard import app

app.run(host="192.168.1.104", port=9090, debug=True)
Пример #16
0
from dashboard import app

# from flask import Flask
# app = Flask(__name__)

from flask import render_template


@app.route("/")
def index():
    return render_template('index.html')


# @app.route("/")
# def get_news():
#     return "no news is good news"

if __name__ == '__main__':
    app.run(port=5000, debug=True)
Пример #17
0
from dashboard import app

if __name__ == '__main__':
    app.run(host='0.0.0.0')
Пример #18
0
from dashboard import app
import os
import atexit
app_port = int(os.getenv('VCAP_APP_PORT', '8080'))


@atexit.register
def shutdown():
    print("Shutting Down")


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=app_port, debug=False)
Пример #19
0
from dashboard import app

app.run(debug=True, threaded=True)

Пример #20
0
            logger.debug(f"Sending task {task['link']} to db")
            db_handler.add_task(task)
        tasks_sender(new_tasks)
        parsed_tasks_links = [task['link'] for task in parsed_tasks]
        time.sleep(5)


def bot_listener():
    bot.polling()


if __name__ == '__main__':
    logger.debug('Started')

    inline_argument = args.part.pop()
    if inline_argument == 'parser':
        parser()
    elif inline_argument == 'bot':
        bot_listener()
    elif inline_argument == 'dashboard':
        host, port = args.host, args.port
        app.run(debug=True, host=host, port=port)
    elif inline_argument == 'all':
        with concurrent.futures.ThreadPoolExecutor() as executor:
            threads = [executor.submit(parser), executor.submit(bot_listener), executor.submit(app.run)]

            for f in concurrent.futures.as_completed(threads):
                f.result()
    else:
        raise KeyError('Invalid argument')
Пример #21
0
from flask import render_template, request, session, url_for, flash, redirect
from dashboard import app, mongo
import models


@app.route("/")
def home():
    return render_template('testing.html')


@app.route("/upload", methods=['POST'])
def upload():
    if 'filename' in request.files:
        actualfile = request.files['filename']
        mongo.save_file(actualfile.filename, actualfile)
        mongo.db.users.insert({
            'username': request.form.get('username'),
            'filename': actualfile.filename
        })
        return "uploaded"


@app.route("/about")
def about():
    return render_template('about.html', title='About')


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8080, debug=True)
Пример #22
0
from dashboard import app

app.debug = True
#app.jinja_env.cache = {}
app.run(host='0.0.0.0', port=5000)
Пример #23
0
#!/usr/bin/env python
import os
from dashboard import app
import logging

logging.basicConfig(level=logging.DEBUG)
"""
Start a local webserver for the flask app
Useful for debug / development.

Some functionality (particularly file system access is disabled)

"""

if __name__ == '__main__':
    app.run(threaded=True, host='0.0.0.0')
Пример #24
0
from dashboard import app

if __name__ == '__main__':
    app.run(debug=True)
Пример #25
0
                deaths = details['Deaths']
                confirmed = details['Confirmed']
                recovered = details['Recovered']
                active = details['Active']
                updated = details['Last_updated']

                # Passing the data to model
                each_items = Corona(country, deaths, confirmed, recovered,
                                    active, updated)

                # Saving all data in database
                db.session.add(each_items)
                db.session.commit()
            flash('All Data Updated!')
            return redirect(url_for('tableview'))
    except IntegrityError:
        flash("Database Refreshed!", "error")
        return redirect(url_for('tableview'))


@app.route('/delete')
def delete():
    db.session.query(Corona).delete()
    db.session.commit()
    flash('All data deleted! Please refresh if you need new data')
    return redirect(url_for('tableview'))


if __name__ == "__main__":
    app.run(host='0.0.0.0', port=8080)
Пример #26
0
#!python
import os
from dashboard import app
import logging

logging.basicConfig(level=logging.DEBUG)
"""Start a local webserver for the flask app"""
# disable the debuggering pincode
os.environ["WERKZEUG_DEBUG_PIN"] = "off"
app.run(debug=True, host='0.0.0.0')

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')
Пример #27
0
# -*- coding: utf-8 -*-


from dashboard import app

app.run(host="127.0.0.1", port=9090, debug=True)
Пример #28
0
#!/usr/bin/env python
from dashboard import app, init_application

if __name__ == "__main__":
    init_application(app)
    app.debug = True
    app.testing = True
    app.run(host="0.0.0.0", port="4000", threaded=True)

Пример #29
0
from dashboard import app

if __name__ == "__main__":
    app.run()