This commit is contained in:
512song committed 2024-11-06 15:41:52 +08:00
1 parent 7af0af0f7e
commit 569345e192
3 files changed
+834 -128

No files matched your search

+22 -22
View File
@@ -431,15 +431,15 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 23,
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:28:16.776885Z",
"iopub.status.busy": "2024-10-22T02:28:16.776070Z",
"iopub.status.idle": "2024-10-22T02:28:16.799797Z",
"shell.execute_reply": "2024-10-22T02:28:16.798876Z",
"shell.execute_reply.started": "2024-10-22T02:28:16.776803Z"
"iopub.execute_input": "2024-11-06T07:40:00.103580Z",
"iopub.status.busy": "2024-11-06T07:40:00.102762Z",
"iopub.status.idle": "2024-11-06T07:40:00.398714Z",
"shell.execute_reply": "2024-11-06T07:40:00.398050Z",
"shell.execute_reply.started": "2024-11-06T07:40:00.103502Z"
},
"tags": []
},
@@ -448,8 +448,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"44\n",
"44\n"
"4078\n",
"4078\n"
]
}
],
@@ -482,11 +482,11 @@
"re_ta = {}\n",
"dict1 = {}\n",
"list1 = []\n",
"filename = 'data/中国石化化工销售.json'\n",
"filename = 'data/天津石化人员2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"filename = 'data/places_result_20241022.csv'\n",
"filename = 'data/places_result_20241104.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -527,7 +527,7 @@
" score = int(result[4])/item[m_item]['divisor'] \n",
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
"print(len(re_ta))\n",
"filename = 'data/result_中国石化化工销售2023.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"\n",
"with open(filename,'w') as fl:\n",
" json.dump(re_ta, fl, ensure_ascii=False) \n",
@@ -544,15 +544,15 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 24,
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:28:54.799670Z",
"iopub.status.busy": "2024-10-22T02:28:54.798913Z",
"iopub.status.idle": "2024-10-22T02:28:54.824340Z",
"shell.execute_reply": "2024-10-22T02:28:54.823796Z",
"shell.execute_reply.started": "2024-10-22T02:28:54.799596Z"
"iopub.execute_input": "2024-11-06T07:40:45.997372Z",
"iopub.status.busy": "2024-11-06T07:40:45.996600Z",
"iopub.status.idle": "2024-11-06T07:40:46.225740Z",
"shell.execute_reply": "2024-11-06T07:40:46.225151Z",
"shell.execute_reply.started": "2024-11-06T07:40:45.997299Z"
},
"tags": []
},
@@ -662,7 +662,7 @@
"\n",
"#list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','height','weight']\n",
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp']\n",
"filename = 'data/result_中国石化化工销售2023.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl) \n",
"for k, v in dict2.items():\n",
@@ -683,7 +683,7 @@
" dict2[k][item_en]['score'] = cal_score(data1)\n",
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
"\n",
"filename = f'data/result_中国石化化工销售2023.json'\n",
"filename = f'data/result_天津石化2024.json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict2,fl , ensure_ascii=False) \n",
"print('ok!') "
@@ -729,11 +729,11 @@
"headers = {\n",
" \"Content-Type\": \"application/json; charset=UTF-8\"\n",
" }\n",
"filename = 'data/result_东营工程设计院2024_all.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"list1 = []\n",
"file_path ='./中石化石油工程设计有限公司1/'\n",
"file_path ='./天津石化2024/'\n",
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
"i=0\n",
"list2 = []\n",
@@ -743,7 +743,7 @@
" \n",
" id = str(k).rjust(4,\"0\")\n",
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
" mydata['title'] = '中石化石油工程设计有限公司'\n",
" mydata['title'] = '天津石化2024'\n",
" mydata['subtitle'] = v['unit']\n",
" mydata['id'] = id\n",
" mydata['name'] = v['name']\n",