20260126
This commit is contained in:
1 parent
262b081f94
commit
b39962d282
2 files changed
+57
-55
No files matched your search
+14
-14
@@ -2388,15 +2388,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 3,
|
||||||
"id": "6f9768ce-2ef5-4253-9fc6-49dbdcf00a19",
|
"id": "6f9768ce-2ef5-4253-9fc6-49dbdcf00a19",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T14:01:06.244749Z",
|
"iopub.execute_input": "2026-01-26T00:23:12.431562Z",
|
||||||
"iopub.status.busy": "2026-01-22T14:01:06.243759Z",
|
"iopub.status.busy": "2026-01-26T00:23:12.431028Z",
|
||||||
"iopub.status.idle": "2026-01-22T14:01:06.255504Z",
|
"iopub.status.idle": "2026-01-26T00:23:12.445584Z",
|
||||||
"shell.execute_reply": "2026-01-22T14:01:06.254604Z",
|
"shell.execute_reply": "2026-01-26T00:23:12.445023Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T14:01:06.244689Z"
|
"shell.execute_reply.started": "2026-01-26T00:23:12.431511Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -2750,15 +2750,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": 5,
|
||||||
"id": "9ecd3ad8-c8af-4f3e-90e5-1618fea905a4",
|
"id": "9ecd3ad8-c8af-4f3e-90e5-1618fea905a4",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T14:01:37.481771Z",
|
"iopub.execute_input": "2026-01-26T00:23:50.478969Z",
|
||||||
"iopub.status.busy": "2026-01-22T14:01:37.481188Z",
|
"iopub.status.busy": "2026-01-26T00:23:50.478655Z",
|
||||||
"iopub.status.idle": "2026-01-22T14:01:37.700702Z",
|
"iopub.status.idle": "2026-01-26T00:23:50.553333Z",
|
||||||
"shell.execute_reply": "2026-01-22T14:01:37.700220Z",
|
"shell.execute_reply": "2026-01-26T00:23:50.552804Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T14:01:37.481723Z"
|
"shell.execute_reply.started": "2026-01-26T00:23:50.478944Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -2766,7 +2766,7 @@
|
|||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
"\n",
|
"\n",
|
||||||
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp']\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",
|
"with open(filename,'r') as fl:\n",
|
||||||
" dict1 = json.load(fl) \n",
|
" dict1 = json.load(fl) \n",
|
||||||
"data_list = []\n",
|
"data_list = []\n",
|
||||||
@@ -2848,7 +2848,7 @@
|
|||||||
" list6.append('')\n",
|
" list6.append('')\n",
|
||||||
" i+=1\n",
|
" i+=1\n",
|
||||||
" data_list.append(list6)\n",
|
" data_list.append(list6)\n",
|
||||||
"filename = 'data/中心健康检测人员(20260122).xlsx'\n",
|
"filename = 'data/物华社区检测人员(20260123).xlsx'\n",
|
||||||
"wb = openpyxl.Workbook()\n",
|
"wb = openpyxl.Workbook()\n",
|
||||||
"sheet = wb.active\n",
|
"sheet = wb.active\n",
|
||||||
"title = ['编号', '姓名', '性别', '单位/部门', '年龄', '身高', '体重', 'bmi', '肺活量', '得分', '握力', '得分', '坐位体前屈', '得分', '纵跳', '得分', '俯卧撑', '得分', '单脚站立', '得分', '选择反应时', '得分', '台阶指数', '得分', '一分钟仰卧起坐', '得分', '中医体质', '是否倾向', '平和', '气虚', '阳虚', '阴虚', '痰湿', '湿热', '血瘀', '气郁', '特禀', '成就感', '愉快心理', '放松程度', '压力应对', '体力充沛', '情感充沛度', '颈椎', '胸椎', '腰椎', '骶尾椎']\n",
|
"title = ['编号', '姓名', '性别', '单位/部门', '年龄', '身高', '体重', 'bmi', '肺活量', '得分', '握力', '得分', '坐位体前屈', '得分', '纵跳', '得分', '俯卧撑', '得分', '单脚站立', '得分', '选择反应时', '得分', '台阶指数', '得分', '一分钟仰卧起坐', '得分', '中医体质', '是否倾向', '平和', '气虚', '阳虚', '阴虚', '痰湿', '湿热', '血瘀', '气郁', '特禀', '成就感', '愉快心理', '放松程度', '压力应对', '体力充沛', '情感充沛度', '颈椎', '胸椎', '腰椎', '骶尾椎']\n",
|
||||||
|
|||||||
+43
-41
@@ -10,15 +10,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 22,
|
||||||
"id": "272aca0e-b70c-46fe-ae58-ad8aaa5b9fa5",
|
"id": "272aca0e-b70c-46fe-ae58-ad8aaa5b9fa5",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T13:27:05.690761Z",
|
"iopub.execute_input": "2026-01-26T00:17:22.475278Z",
|
||||||
"iopub.status.busy": "2026-01-22T13:27:05.690222Z",
|
"iopub.status.busy": "2026-01-26T00:17:22.474637Z",
|
||||||
"iopub.status.idle": "2026-01-22T13:27:05.710714Z",
|
"iopub.status.idle": "2026-01-26T00:17:22.498993Z",
|
||||||
"shell.execute_reply": "2026-01-22T13:27:05.710237Z",
|
"shell.execute_reply": "2026-01-26T00:17:22.498203Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T13:27:05.690707Z"
|
"shell.execute_reply.started": "2026-01-26T00:17:22.475218Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"48 ok\n"
|
"30 ok\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"wb = openpyxl.load_workbook('data/中心健康检测人员.xlsx',data_only=True)\n",
|
"wb = openpyxl.load_workbook('data/物华社区人员名单.xlsx',data_only=True)\n",
|
||||||
"sheet = wb.active\n",
|
"sheet = wb.active\n",
|
||||||
"# sheets = wb.sheetnames\n",
|
"# sheets = wb.sheetnames\n",
|
||||||
"person = {}\n",
|
"person = {}\n",
|
||||||
@@ -46,11 +46,13 @@
|
|||||||
" dict1 = {}\n",
|
" dict1 = {}\n",
|
||||||
" dict1['name'] = sheet.cell(n, 2).value\n",
|
" dict1['name'] = sheet.cell(n, 2).value\n",
|
||||||
" dict1['sex'] = sheet.cell(n, 3).value\n",
|
" dict1['sex'] = sheet.cell(n, 3).value\n",
|
||||||
" \n",
|
" if sheet.cell(n, 4).value is not None:\n",
|
||||||
" dict1['unit'] = sheet.cell(n, 4).value\n",
|
" dict1['unit'] = sheet.cell(n, 4).value\n",
|
||||||
|
" else:\n",
|
||||||
|
" dict1['unit'] = ''\n",
|
||||||
" dict1['birth'] = str(sheet.cell(n, 5).value).replace('/','-').split(' ')[0] \n",
|
" dict1['birth'] = str(sheet.cell(n, 5).value).replace('/','-').split(' ')[0] \n",
|
||||||
" person[code] = dict1\n",
|
" person[code] = dict1\n",
|
||||||
"filename = 'data/中心健康检测人员.json'\n",
|
"filename = 'data/物华社区人员.json'\n",
|
||||||
"with open(filename, 'w') as fl:\n",
|
"with open(filename, 'w') as fl:\n",
|
||||||
" json.dump(person, fl, ensure_ascii=False)\n",
|
" json.dump(person, fl, ensure_ascii=False)\n",
|
||||||
"print(len(person),'ok')"
|
"print(len(person),'ok')"
|
||||||
@@ -118,15 +120,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": 23,
|
||||||
"id": "32ef3c92-8644-4421-a9dd-8ae901cb2710",
|
"id": "32ef3c92-8644-4421-a9dd-8ae901cb2710",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T13:30:00.421898Z",
|
"iopub.execute_input": "2026-01-26T00:20:02.929642Z",
|
||||||
"iopub.status.busy": "2026-01-22T13:30:00.420630Z",
|
"iopub.status.busy": "2026-01-26T00:20:02.929123Z",
|
||||||
"iopub.status.idle": "2026-01-22T13:30:00.440823Z",
|
"iopub.status.idle": "2026-01-26T00:20:02.939997Z",
|
||||||
"shell.execute_reply": "2026-01-22T13:30:00.439903Z",
|
"shell.execute_reply": "2026-01-26T00:20:02.939492Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T13:30:00.421820Z"
|
"shell.execute_reply.started": "2026-01-26T00:20:02.929607Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -134,7 +136,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"29\n"
|
"30\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -147,11 +149,11 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"re_ta = {}\n",
|
"re_ta = {}\n",
|
||||||
"list1 = []\n",
|
"list1 = []\n",
|
||||||
"filename = 'data/中心健康检测人员.json'\n",
|
"filename = 'data/物华社区人员.json'\n",
|
||||||
"with open(filename,'r') as fl:\n",
|
"with open(filename,'r') as fl:\n",
|
||||||
" dict1 = json.load(fl) \n",
|
" dict1 = json.load(fl) \n",
|
||||||
"\n",
|
"\n",
|
||||||
"filename = 'data/marks_20260122.csv'\n",
|
"filename = 'data/marks_20260126.csv'\n",
|
||||||
"with open(filename,'r',newline='') as csv_file:\n",
|
"with open(filename,'r',newline='') as csv_file:\n",
|
||||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||||
" header = next(fl) \n",
|
" header = next(fl) \n",
|
||||||
@@ -189,7 +191,7 @@
|
|||||||
" score = result[4] \n",
|
" score = result[4] \n",
|
||||||
" re_ta[user][item_name]['成绩'] = score\n",
|
" re_ta[user][item_name]['成绩'] = score\n",
|
||||||
"\n",
|
"\n",
|
||||||
"filename = 'data/result_中心健康检测人员.json'\n",
|
"filename = 'data/result_物华社区人员.json'\n",
|
||||||
"with open(filename,'w') as fl:\n",
|
"with open(filename,'w') as fl:\n",
|
||||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||||
"print(len(re_ta))"
|
"print(len(re_ta))"
|
||||||
@@ -205,15 +207,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": 24,
|
||||||
"id": "728c6978-bc53-44e4-b986-a13d5e2cd889",
|
"id": "728c6978-bc53-44e4-b986-a13d5e2cd889",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T13:30:37.706987Z",
|
"iopub.execute_input": "2026-01-26T00:20:19.361876Z",
|
||||||
"iopub.status.busy": "2026-01-22T13:30:37.706464Z",
|
"iopub.status.busy": "2026-01-26T00:20:19.361616Z",
|
||||||
"iopub.status.idle": "2026-01-22T13:30:37.725209Z",
|
"iopub.status.idle": "2026-01-26T00:20:19.369408Z",
|
||||||
"shell.execute_reply": "2026-01-22T13:30:37.724253Z",
|
"shell.execute_reply": "2026-01-26T00:20:19.368888Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T13:30:37.706936Z"
|
"shell.execute_reply.started": "2026-01-26T00:20:19.361855Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -221,7 +223,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"ok! 29\n"
|
"ok! 30\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -232,7 +234,7 @@
|
|||||||
"\n",
|
"\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','height','weight']\n",
|
||||||
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp']\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",
|
"with open(filename,'r') as fl:\n",
|
||||||
" dict2 = json.load(fl) \n",
|
" dict2 = json.load(fl) \n",
|
||||||
"for k, v in dict2.items():\n",
|
"for k, v in dict2.items():\n",
|
||||||
@@ -255,7 +257,7 @@
|
|||||||
" dict2[k][item_en]['score'] = My.cal_score(data1)\n",
|
" dict2[k][item_en]['score'] = My.cal_score(data1)\n",
|
||||||
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
|
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"filename = 'data/result_中心健康检测人员.json'\n",
|
"filename = 'data/result_物华社区人员.json'\n",
|
||||||
"with open(filename,'w') as fl:\n",
|
"with open(filename,'w') as fl:\n",
|
||||||
" json.dump(dict2,fl , ensure_ascii=False) \n",
|
" json.dump(dict2,fl , ensure_ascii=False) \n",
|
||||||
"print('ok!',len(dict2)) "
|
"print('ok!',len(dict2)) "
|
||||||
@@ -300,7 +302,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"dict1 = {}\n",
|
"dict1 = {}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"filename = 'data/result_中心健康检测人员.json'\n",
|
"filename = 'data/result_物华社区人员.json'\n",
|
||||||
"with open(filename,'r') as fl:\n",
|
"with open(filename,'r') as fl:\n",
|
||||||
" dict1 = json.load(fl)\n",
|
" dict1 = json.load(fl)\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -353,15 +355,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 21,
|
"execution_count": 25,
|
||||||
"id": "d451cce5-e3a3-4909-bd13-807ddf82059a",
|
"id": "d451cce5-e3a3-4909-bd13-807ddf82059a",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-01-22T13:55:59.725677Z",
|
"iopub.execute_input": "2026-01-26T00:22:27.314429Z",
|
||||||
"iopub.status.busy": "2026-01-22T13:55:59.725108Z",
|
"iopub.status.busy": "2026-01-26T00:22:27.313838Z",
|
||||||
"iopub.status.idle": "2026-01-22T13:56:14.228014Z",
|
"iopub.status.idle": "2026-01-26T00:22:41.731103Z",
|
||||||
"shell.execute_reply": "2026-01-22T13:56:14.226903Z",
|
"shell.execute_reply": "2026-01-26T00:22:41.730020Z",
|
||||||
"shell.execute_reply.started": "2026-01-22T13:55:59.725621Z"
|
"shell.execute_reply.started": "2026-01-26T00:22:27.314373Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -369,7 +371,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"29\n"
|
"30\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -382,11 +384,11 @@
|
|||||||
"headers = {\n",
|
"headers = {\n",
|
||||||
" \"Content-Type\": \"application/json; charset=UTF-8\"\n",
|
" \"Content-Type\": \"application/json; charset=UTF-8\"\n",
|
||||||
" }\n",
|
" }\n",
|
||||||
"filename = 'data/result_中心健康检测人员.json'\n",
|
"filename = 'data/result_物华社区人员.json'\n",
|
||||||
"with open(filename,'r') as fl:\n",
|
"with open(filename,'r') as fl:\n",
|
||||||
" dict1 = json.load(fl)\n",
|
" dict1 = json.load(fl)\n",
|
||||||
"list1 = []\n",
|
"list1 = []\n",
|
||||||
"file_path ='./中心健康检测/'\n",
|
"file_path ='./物华社区/'\n",
|
||||||
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
|
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
|
||||||
"i=0\n",
|
"i=0\n",
|
||||||
"list2 = []\n",
|
"list2 = []\n",
|
||||||
@@ -396,7 +398,7 @@
|
|||||||
" \n",
|
" \n",
|
||||||
" id = str(k).rjust(4,\"0\")\n",
|
" id = str(k).rjust(4,\"0\")\n",
|
||||||
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
|
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
|
||||||
" mydata['title'] = '中心健康体质检测'\n",
|
" mydata['title'] = '物华社区'\n",
|
||||||
" mydata['subtitle'] = v['unit']\n",
|
" mydata['subtitle'] = v['unit']\n",
|
||||||
" mydata['id'] = id\n",
|
" mydata['id'] = id\n",
|
||||||
" mydata['name'] = v['name']\n",
|
" mydata['name'] = v['name']\n",
|
||||||
|
|||||||
Reference in new issue
Block a user