Пример #1
0
class CovidStatus(Resource):
    def __init__(self):
        self.dao = CovidStatusDao()

    def get(self):
        result = self.dao.find_all()
        return jsonify([item.json for item in result])
Пример #2
0
class CovidStatusToArray(Resource):
    def __init__(self):
        self.dao = CovidStatusDao()

    def get(self):
        result = self.dao.find_all()

        result_list = []
        result_list.append("확진자")

        for item in result:
            result_list.append(item.diff)

        return result_list
Пример #3
0
    # EmotionDfo.data_pro(0, keyword)
    EmotionDfo.data_pro(0, keyword)
    FinanceKdd.get_finance(0, keyword, code_df)
    ExchangeKdd.market_index_kdd(0)
    ExchangeDfo.get_ex_df(0)
    # FinanceDfo.fina_pro(keyword)

print(f'========================= START 3 ==============================')
EmotionDao.test()

with app.app_context():
    db.create_all()
    emotion = session.query(EmotionDto)
    emotion_find_key = EmotionDao.find_by_keyword(keyword)
    # ====================== kain code ==============================
    status_count = CovidStatusDao.count()
    # ===============================================================
    # emotion_find_x = EmotionDao.find_x(keyword)
    # emotion_find_y = EmotionDao.find_y(keyword)
    # emotion_like = EmotionDao.find_like(keyword)
    # emotion_match = EmotionDao.match(emotion, keyword)
    # emotion_fi_insert = EmotionDao.find_insert(emotion, keyword)
    emotion_count = EmotionDao.count()
    stock_new_count = StockNewsDao.count()
    stock_count = StockDao.count()
    finance_count = FinanceDao.count()
    exchange_count = ExchangeDao.count()
    print(type(keyword))
    print(f'***** Emotion Total Count is {emotion_count} *****')
    if emotion_count[0] == 0:
        # if emotion_find == 0:
Пример #4
0
 def __init__(self):
     self.dao = CovidStatusDao()