This commit is contained in:
512song committed 2024-07-13 08:32:59 +08:00
1 parent daceb1e68d
commit 527c1710aa
5 files changed
+846 -792

No files matched your search

+30 -30
View File
@@ -431,15 +431,15 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 38,
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-08T07:09:55.402103Z",
"iopub.status.busy": "2024-07-08T07:09:55.401378Z",
"iopub.status.idle": "2024-07-08T07:09:55.420303Z",
"shell.execute_reply": "2024-07-08T07:09:55.419806Z",
"shell.execute_reply.started": "2024-07-08T07:09:55.402036Z"
"iopub.execute_input": "2024-07-11T02:15:15.011907Z",
"iopub.status.busy": "2024-07-11T02:15:15.011411Z",
"iopub.status.idle": "2024-07-11T02:15:15.033470Z",
"shell.execute_reply": "2024-07-11T02:15:15.032441Z",
"shell.execute_reply.started": "2024-07-11T02:15:15.011858Z"
},
"tags": []
},
@@ -448,8 +448,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"80\n",
"80\n"
"47\n",
"47\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_20240705.csv'\n",
"filename = 'data/places_result_20240710.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -508,7 +508,7 @@
" l_xm = ['weight','height','lung','grip','flexion','jump','pushup','balance','reaction','step']\n",
" else:\n",
" l_xm = ['weight','height','lung','grip','flexion','jump','balance','reaction','step','situp']\n",
" re_ta[user]['unit'] = dict1[user]['unit']\n",
" re_ta[user]['unit'] = ''#dict1[user]['unit']\n",
" #birth = date.fromisoformat(dict1[user]['birth'].replace('/','-'))\n",
" birth = date.fromisoformat(dict1[user]['birth'])\n",
" #nian = int(birth[0].strip())\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_湖南石化青年.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": 27,
"execution_count": 40,
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-08T07:10:41.383092Z",
"iopub.status.busy": "2024-07-08T07:10:41.382308Z",
"iopub.status.idle": "2024-07-08T07:10:41.404375Z",
"shell.execute_reply": "2024-07-08T07:10:41.403415Z",
"shell.execute_reply.started": "2024-07-08T07:10:41.383013Z"
"iopub.execute_input": "2024-07-11T02:17:12.600627Z",
"iopub.status.busy": "2024-07-11T02:17:12.599890Z",
"iopub.status.idle": "2024-07-11T02:17:12.621489Z",
"shell.execute_reply": "2024-07-11T02:17:12.621025Z",
"shell.execute_reply.started": "2024-07-11T02:17:12.600557Z"
},
"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_湖南石化青年.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_湖南石化青年.json'\n",
"filename = f'data/result_天宫院街道1.json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict2,fl , ensure_ascii=False) \n",
"print('ok!') "
@@ -846,15 +846,15 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 41,
"id": "b123ee6b-85d2-4660-b226-321832a6b796",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-08T09:19:02.767495Z",
"iopub.status.busy": "2024-07-08T09:19:02.766758Z",
"iopub.status.idle": "2024-07-08T09:19:45.858591Z",
"shell.execute_reply": "2024-07-08T09:19:45.857695Z",
"shell.execute_reply.started": "2024-07-08T09:19:02.767428Z"
"iopub.execute_input": "2024-07-11T02:18:04.079962Z",
"iopub.status.busy": "2024-07-11T02:18:04.079156Z",
"iopub.status.idle": "2024-07-11T02:18:13.608066Z",
"shell.execute_reply": "2024-07-11T02:18:13.606969Z",
"shell.execute_reply.started": "2024-07-11T02:18:04.079886Z"
},
"tags": []
},
@@ -863,7 +863,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"80\n"
"22\n"
]
}
],
@@ -876,11 +876,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",
"file_path ='./湖南石化青年/'\n",
"file_path ='./天宫院2024/'\n",
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
"i=0\n",
"list2 = []\n",
@@ -890,7 +890,7 @@
" \n",
" id = str(k).rjust(4,\"0\")\n",
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
" mydata['title'] = '湖南石化青年职工'\n",
" mydata['title'] = '天宫院社区'\n",
" mydata['subtitle'] = v['unit']\n",
" mydata['id'] = id\n",
" mydata['name'] = v['name']\n",