20240321
This commit is contained in:
1 parent
3ecb5dc566
commit
2d9913581f
2 files changed
+588
-29
No files matched your search
+29
-29
@@ -280,15 +280,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 97,
|
||||
"execution_count": 103,
|
||||
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-01-03T14:02:28.840955Z",
|
||||
"iopub.status.busy": "2024-01-03T14:02:28.840736Z",
|
||||
"iopub.status.idle": "2024-01-03T14:02:28.856652Z",
|
||||
"shell.execute_reply": "2024-01-03T14:02:28.856241Z",
|
||||
"shell.execute_reply.started": "2024-01-03T14:02:28.840937Z"
|
||||
"iopub.execute_input": "2024-03-21T07:32:21.775359Z",
|
||||
"iopub.status.busy": "2024-03-21T07:32:21.774903Z",
|
||||
"iopub.status.idle": "2024-03-21T07:32:21.809322Z",
|
||||
"shell.execute_reply": "2024-03-21T07:32:21.808037Z",
|
||||
"shell.execute_reply.started": "2024-03-21T07:32:21.775322Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -297,8 +297,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"44\n",
|
||||
"44\n"
|
||||
"74\n",
|
||||
"74\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -331,11 +331,11 @@
|
||||
"re_ta = {}\n",
|
||||
"dict1 = {}\n",
|
||||
"list1 = []\n",
|
||||
"filename = 'data/中国石化化工销售.json'\n",
|
||||
"filename = 'data/东营老年大学.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/places_result_20240103.csv'\n",
|
||||
"filename = 'data/places_result_20240321.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
@@ -376,7 +376,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_中国石化化工销售.json'\n",
|
||||
"filename = 'data/result_东营老年大学.json'\n",
|
||||
"\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||
@@ -393,15 +393,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 98,
|
||||
"execution_count": 105,
|
||||
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-01-03T14:03:22.531744Z",
|
||||
"iopub.status.busy": "2024-01-03T14:03:22.531496Z",
|
||||
"iopub.status.idle": "2024-01-03T14:03:22.548680Z",
|
||||
"shell.execute_reply": "2024-01-03T14:03:22.548172Z",
|
||||
"shell.execute_reply.started": "2024-01-03T14:03:22.531714Z"
|
||||
"iopub.execute_input": "2024-03-21T08:42:07.845829Z",
|
||||
"iopub.status.busy": "2024-03-21T08:42:07.845385Z",
|
||||
"iopub.status.idle": "2024-03-21T08:42:07.884449Z",
|
||||
"shell.execute_reply": "2024-03-21T08:42:07.883406Z",
|
||||
"shell.execute_reply.started": "2024-03-21T08:42:07.845792Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -511,7 +511,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_中国石化化工销售.json'\n",
|
||||
"filename = 'data/result_东营老年大学.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict2 = json.load(fl) \n",
|
||||
"for k, v in dict2.items():\n",
|
||||
@@ -532,7 +532,7 @@
|
||||
" dict2[k][item_en]['score'] = cal_score(data1)\n",
|
||||
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
|
||||
"\n",
|
||||
"filename = f'data/result_中国石化化工销售.json'\n",
|
||||
"filename = f'data/result_东营老年大学.json'\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(dict2,fl , ensure_ascii=False) \n",
|
||||
"print('ok!') "
|
||||
@@ -695,15 +695,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 102,
|
||||
"execution_count": 108,
|
||||
"id": "b123ee6b-85d2-4660-b226-321832a6b796",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-03-15T11:34:16.320686Z",
|
||||
"iopub.status.busy": "2024-03-15T11:34:16.320229Z",
|
||||
"iopub.status.idle": "2024-03-15T11:34:17.378622Z",
|
||||
"shell.execute_reply": "2024-03-15T11:34:17.378123Z",
|
||||
"shell.execute_reply.started": "2024-03-15T11:34:16.320649Z"
|
||||
"iopub.execute_input": "2024-03-21T08:46:57.703552Z",
|
||||
"iopub.status.busy": "2024-03-21T08:46:57.703093Z",
|
||||
"iopub.status.idle": "2024-03-21T08:47:18.057243Z",
|
||||
"shell.execute_reply": "2024-03-21T08:47:18.056037Z",
|
||||
"shell.execute_reply.started": "2024-03-21T08:46:57.703496Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -712,7 +712,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2\n"
|
||||
"62\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -725,11 +725,11 @@
|
||||
"headers = {\n",
|
||||
" \"Content-Type\": \"application/json; charset=UTF-8\"\n",
|
||||
" }\n",
|
||||
"filename = 'data/result_样本.json'\n",
|
||||
"filename = 'data/result_东营老年大学1.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = []\n",
|
||||
"fiie_path ='./样本/'\n",
|
||||
"file_path ='./东营老年大学/'\n",
|
||||
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
|
||||
"i=0\n",
|
||||
"list2 = []\n",
|
||||
@@ -738,7 +738,7 @@
|
||||
" mydata = {}\n",
|
||||
" \n",
|
||||
" id = str(k).rjust(4,\"0\")\n",
|
||||
" mydata['path'] = fiie_path+id+'-'+ v['name']+'.pdf'\n",
|
||||
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
|
||||
" mydata['title'] = '体质监测报告样本'\n",
|
||||
" mydata['subtitle'] = v['unit']\n",
|
||||
" mydata['id'] = id\n",
|
||||
|
||||
Reference in new issue
Block a user