From 74e6ccb79a171f6be433442f0c16d9d37c521746 Mon Sep 17 00:00:00 2001 From: liurui Date: Fri, 22 Nov 2024 17:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E7=83=AF=E7=83=83=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=9D=E5=AD=98=E5=88=B0=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/dataread.py | 3 ++- models/nerulforcastmodels.py | 2 +- 测试环境登录接口调试.ipynb | 38 ++++++++++++++++++++++-------------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/lib/dataread.py b/lib/dataread.py index 02b7eb5..3c47d49 100644 --- a/lib/dataread.py +++ b/lib/dataread.py @@ -40,7 +40,8 @@ pdfmetrics.registerFont(TTFont('SimSun', 'SimSun.ttf')) plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 -from config_jingbo import * +# from config_jingbo import * +from config_juxiting import * diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 6d54c1b..6ddfe72 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -655,7 +655,7 @@ def model_losss_juxiting(sqlitedb): df_combined3[col] = df_combined3[col].round(2) except ValueError: pass - df_combined3.to_csv(os.path.join(dataset,"df_combined3.csv"),index=False) + df_combined3.to_csv(os.path.join(dataset,"testandpredict_groupby.csv"),index=False) # 历史价格+预测价格 # 将预测结果保存到数据库 diff --git a/测试环境登录接口调试.ipynb b/测试环境登录接口调试.ipynb index 5e73a28..aee5a4c 100644 --- a/测试环境登录接口调试.ipynb +++ b/测试环境登录接口调试.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 17, "id": "31c0e11d-c87a-4e95-92a0-d1d09625e255", "metadata": {}, "outputs": [], @@ -15,17 +15,17 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 18, "id": "83c81b9e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'http://192.168.100.53:8080/jingbo-dev/api/server/login'" + "'http://10.200.32.39/jingbo-api/api/server/login'" ] }, - "execution_count": 2, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -36,14 +36,22 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, + "id": "a058f507", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 19, "id": "2b330ee3-c006-4ab1-8558-59c51ac8d86f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'data': {'account': 'api_test',\n", + "{'data': {'account': 'api_dev',\n", " 'password': 'ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=',\n", " 'tenantHashCode': '8a4577dbd919675758d57999a1e891fe',\n", " 'terminal': 'API'},\n", @@ -51,7 +59,7 @@ " 'funcOperation': '获取token'}" ] }, - "execution_count": 3, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -62,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 20, "id": "dcb6100a-ed2b-4077-a1a9-361c6cb565f9", "metadata": {}, "outputs": [], @@ -79,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 21, "id": "22c0c7c4", "metadata": {}, "outputs": [ @@ -87,7 +95,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzIxMDcwNDUsImp0aSI6ImM0Njk5ZGY3YWYwMTQ1Y2I4NWUzYjJhZTg2ZjMzYzRiIn0.EuDSlyPRNA3ULUyNHCKpj2nZCCyRqpOY72A_qkoSkJs', 'md5Token': 'af20ab3fd063d5a7e1929d1e6d393f9e'}, 'status': True}\n" + "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfZGV2IiwidGgiOiI4YTQ1NzdkYmQ5MTk2NzU3NThkNTc5OTlhMWU4OTFmZSIsImx0IjoiYXBpIiwiaXNzIjoiIiwidG0iOiJQQyIsImV4cCI6MTczMjI3NzQzMiwianRpIjoiZDdkMTkzMzNkYzA1NDM4Y2IzOWFiM2RiYWQ5MzcwMTIifQ.dPUUcEzNwmQ5j7lug6G0dSnuSdNpDzN3RvVElierjig', 'md5Token': '669b6aa68ada10fb812612a742a1e10a'}, 'status': True}\n" ] } ], @@ -97,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 22, "id": "12077ead", "metadata": {}, "outputs": [], @@ -107,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 23, "id": "a7ae21d1", "metadata": {}, "outputs": [], @@ -143,7 +151,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 24, "id": "3e1a9e67", "metadata": {}, "outputs": [ @@ -152,8 +160,8 @@ "output_type": "stream", "text": [ "预警上传中...\n", - "token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzIxMDcwNDUsImp0aSI6ImM0Njk5ZGY3YWYwMTQ1Y2I4NWUzYjJhZTg2ZjMzYzRiIn0.EuDSlyPRNA3ULUyNHCKpj2nZCCyRqpOY72A_qkoSkJs\n", - "warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': ' 停更周期 预警日期 最后更新时间 更新周期 特征名称\\n 2218 2018-10-27 2018-10-24 1.0 西北欧即期Brent211利润\\n 1023 2022-02-03 2022-01-31 1.0 B-W活跃合约价差\\n 1023 2022-02-03 2022-01-31 1.0 W-B活跃合约价差\\n 734 2022-11-19 2022-11-16 1.0 Brent/迪拜原油升贴水\\n 686 2023-01-06 2023-01-03 1.0 PVMDubaiEFS/SwapvsICEFirstMonthBrent\\n 446 2023-09-03 2023-08-31 1.0 美国RBOB期货2309月份合约价格\\n 293 2024-02-03 2024-01-31 1.0 美国墨西哥湾87#汽油现货价格\\n 265 2024-03-02 2024-02-28 1.0 Ebob连1合约\\n 223 2024-04-13 2024-04-10 1.0 中国航班执行数\\n 91 2024-08-23 2024-08-20 1.0 Kpler-海运在途原油\\n 86 2023-04-15 2023-03-31 7.0 原油:开工率:东北地区:独立炼厂(周)\\n 68 2023-08-19 2023-08-04 7.0 原油:港口库存:中国(周)\\n 30 2024-05-13 2024-04-28 7.0 中东-巴林周度原油海运出口\\n 26 2024-06-08 2024-05-24 7.0 原油:山东港口:库存:新口径(周)\\n 26 2024-06-08 2024-05-24 7.0 原油:山东港口:库存:新口径(周)超季节性/3年\\n 23 2024-06-29 2024-06-14 7.0 美国:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:墨西哥湾沿岸:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:洛基山地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:西海岸地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:东海岸地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:中西部地区:炼油厂的投入与使用情况:开工率:当周值\\n 22 2023-10-09 2023-08-27 21.0 中东-也门周度原油海运出口\\n 20 2024-11-02 2024-10-30 1.0 Brentc102:30收盘价滞后1天\\n 20 2024-11-02 2024-10-30 1.0 Brentc202:30收盘价滞后1天\\n 20 2024-11-02 2024-10-30 1.0 EFSc102:30收盘价滞后1天\\n 20 2024-11-02 2024-10-30 1.0 EFSc202:30收盘价滞后1天\\n 19 2024-11-03 2024-10-31 1.0 WTIc2-c3(结算B)\\n 19 2024-11-03 2024-10-31 1.0 Brentc2-c3(结算B)\\n 18 2024-08-05 2024-07-21 7.0 全球原油库存(剔除富查伊拉)\\n 13 2024-09-09 2024-08-25 7.0 Kpler-美国原油净进口(周度)\\n 8 2024-10-12 2024-09-27 7.0 美国墨西哥湾原油钻机数\\n 7 2024-10-19 2024-10-04 7.0 美国柴油产量占比\\n 7 2024-10-19 2024-10-04 7.0 美国汽油产量占比\\n 6 2024-11-16 2024-11-13 1.0 马瑞原油:重质:DES价:委内瑞拉(日)\\n 6 2024-11-16 2024-11-13 1.0 丙烷CFR华南/布伦特原油比价\\n 6 2024-11-16 2024-11-13 1.0 国内马瑞与SC比价\\n 6 2024-11-16 2024-11-13 1.0 马瑞原油:现货价:山东(日)\\n 5 2024-11-17 2024-11-14 1.0 OMAN原油:中质:远期现货DES价:山东(日)', 'WARNING_DATE': '2024-11-20 10:50:47'}}\n" + "token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfZGV2IiwidGgiOiI4YTQ1NzdkYmQ5MTk2NzU3NThkNTc5OTlhMWU4OTFmZSIsImx0IjoiYXBpIiwiaXNzIjoiIiwidG0iOiJQQyIsImV4cCI6MTczMjI3NzQzMiwianRpIjoiZDdkMTkzMzNkYzA1NDM4Y2IzOWFiM2RiYWQ5MzcwMTIifQ.dPUUcEzNwmQ5j7lug6G0dSnuSdNpDzN3RvVElierjig\n", + "warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': ' 停更周期 预警日期 最后更新时间 更新周期 特征名称\\n 2221 2018-10-27 2018-10-24 1.0 西北欧即期Brent211利润\\n 1026 2022-02-03 2022-01-31 1.0 B-W活跃合约价差\\n 1026 2022-02-03 2022-01-31 1.0 W-B活跃合约价差\\n 737 2022-11-19 2022-11-16 1.0 Brent/迪拜原油升贴水\\n 689 2023-01-06 2023-01-03 1.0 PVMDubaiEFS/SwapvsICEFirstMonthBrent\\n 449 2023-09-03 2023-08-31 1.0 美国RBOB期货2309月份合约价格\\n 296 2024-02-03 2024-01-31 1.0 美国墨西哥湾87#汽油现货价格\\n 268 2024-03-02 2024-02-28 1.0 Ebob连1合约\\n 226 2024-04-13 2024-04-10 1.0 中国航班执行数\\n 94 2024-08-23 2024-08-20 1.0 Kpler-海运在途原油\\n 86 2023-04-15 2023-03-31 7.0 原油:开工率:东北地区:独立炼厂(周)\\n 68 2023-08-19 2023-08-04 7.0 原油:港口库存:中国(周)\\n 30 2024-05-13 2024-04-28 7.0 中东-巴林周度原油海运出口\\n 26 2024-06-08 2024-05-24 7.0 原油:山东港口:库存:新口径(周)超季节性/3年\\n 26 2024-06-08 2024-05-24 7.0 原油:山东港口:库存:新口径(周)\\n 23 2024-11-02 2024-10-30 1.0 Brentc102:30收盘价滞后1天\\n 23 2024-11-02 2024-10-30 1.0 Brentc202:30收盘价滞后1天\\n 23 2024-11-02 2024-10-30 1.0 EFSc102:30收盘价滞后1天\\n 23 2024-11-02 2024-10-30 1.0 EFSc202:30收盘价滞后1天\\n 23 2024-06-29 2024-06-14 7.0 美国:东海岸地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:中西部地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:西海岸地区:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:墨西哥湾沿岸:炼油厂的投入与使用情况:开工率:当周值\\n 23 2024-06-29 2024-06-14 7.0 美国:洛基山地区:炼油厂的投入与使用情况:开工率:当周值\\n 22 2024-11-03 2024-10-31 1.0 WTIc2-c3(结算B)\\n 22 2023-10-09 2023-08-27 21.0 中东-也门周度原油海运出口\\n 22 2024-11-03 2024-10-31 1.0 Brentc2-c3(结算B)\\n 18 2024-08-05 2024-07-21 7.0 全球原油库存(剔除富查伊拉)\\n 13 2024-09-09 2024-08-25 7.0 Kpler-美国原油净进口(周度)\\n 8 2024-10-12 2024-09-27 7.0 美国墨西哥湾原油钻机数\\n 7 2024-10-19 2024-10-04 7.0 美国柴油产量占比\\n 7 2024-10-19 2024-10-04 7.0 美国汽油产量占比', 'WARNING_DATE': '2024-11-22 10:10:32'}}\n" ] }, {