20240710
This commit is contained in:
1 parent
962ba2c329
commit
daceb1e68d
4 files changed
+2587
-2275
No files matched your search
+88
-29
@@ -256,6 +256,65 @@
|
|||||||
"print('ok')"
|
"print('ok')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "ad5a702c-1503-463f-9d02-b78b881aad1b",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### 生成项目信息"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 31,
|
||||||
|
"id": "5071c245-3fdb-4c16-8f15-998af7c1d2fe",
|
||||||
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2024-07-09T02:15:58.088695Z",
|
||||||
|
"iopub.status.busy": "2024-07-09T02:15:58.087921Z",
|
||||||
|
"iopub.status.idle": "2024-07-09T02:15:58.100168Z",
|
||||||
|
"shell.execute_reply": "2024-07-09T02:15:58.098962Z",
|
||||||
|
"shell.execute_reply.started": "2024-07-09T02:15:58.088624Z"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"ok\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"import json\n",
|
||||||
|
"\n",
|
||||||
|
"filename = '../item.json'\n",
|
||||||
|
"item = {}\n",
|
||||||
|
"unit = {}\n",
|
||||||
|
"with open(filename,'r') as fl:\n",
|
||||||
|
" dict1 = json.load(fl) \n",
|
||||||
|
"for k,v in dict1.items():\n",
|
||||||
|
" item[k] = v\n",
|
||||||
|
" del item[k]['divisor']\n",
|
||||||
|
"item['1']['en'] = 'lung'\n",
|
||||||
|
"item['2']['en'] = 'grip'\n",
|
||||||
|
"item['3']['en'] = 'flexion'\n",
|
||||||
|
"item['4']['en'] = 'jump'\n",
|
||||||
|
"item['5']['en'] = 'pushup'\n",
|
||||||
|
"item['6']['en'] = 'balance'\n",
|
||||||
|
"item['7']['en'] = 'reaction'\n",
|
||||||
|
"item['8']['en'] = 'step'\n",
|
||||||
|
"item['9']['en'] = 'situp'\n",
|
||||||
|
"item['10']['en'] = 'height'\n",
|
||||||
|
"item['11']['en'] = 'weight'\n",
|
||||||
|
"\n",
|
||||||
|
"filename = 'data/体质检测项目信息.json'\n",
|
||||||
|
"with open(filename, 'w') as fl:\n",
|
||||||
|
" json.dump(item, fl, ensure_ascii=False)\n",
|
||||||
|
"print('ok')"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "59f5708d-c2d0-4470-b2f4-b9face431865",
|
"id": "59f5708d-c2d0-4470-b2f4-b9face431865",
|
||||||
@@ -372,15 +431,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": 26,
|
||||||
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
|
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2024-06-05T08:38:54.344213Z",
|
"iopub.execute_input": "2024-07-08T07:09:55.402103Z",
|
||||||
"iopub.status.busy": "2024-06-05T08:38:54.343465Z",
|
"iopub.status.busy": "2024-07-08T07:09:55.401378Z",
|
||||||
"iopub.status.idle": "2024-06-05T08:38:54.410170Z",
|
"iopub.status.idle": "2024-07-08T07:09:55.420303Z",
|
||||||
"shell.execute_reply": "2024-06-05T08:38:54.409619Z",
|
"shell.execute_reply": "2024-07-08T07:09:55.419806Z",
|
||||||
"shell.execute_reply.started": "2024-06-05T08:38:54.344132Z"
|
"shell.execute_reply.started": "2024-07-08T07:09:55.402036Z"
|
||||||
},
|
},
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
@@ -389,8 +448,8 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"709\n",
|
"80\n",
|
||||||
"709\n"
|
"80\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -423,11 +482,11 @@
|
|||||||
"re_ta = {}\n",
|
"re_ta = {}\n",
|
||||||
"dict1 = {}\n",
|
"dict1 = {}\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/places_result_20240605.csv'\n",
|
"filename = 'data/places_result_20240705.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",
|
||||||
@@ -468,7 +527,7 @@
|
|||||||
" score = int(result[4])/item[m_item]['divisor'] \n",
|
" score = int(result[4])/item[m_item]['divisor'] \n",
|
||||||
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
|
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
|
||||||
"print(len(re_ta))\n",
|
"print(len(re_ta))\n",
|
||||||
"filename = 'data/result_中安联合.json'\n",
|
"filename = 'data/result_湖南石化青年.json'\n",
|
||||||
"\n",
|
"\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",
|
||||||
@@ -485,15 +544,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": 27,
|
||||||
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
|
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2024-06-05T08:39:59.079134Z",
|
"iopub.execute_input": "2024-07-08T07:10:41.383092Z",
|
||||||
"iopub.status.busy": "2024-06-05T08:39:59.078630Z",
|
"iopub.status.busy": "2024-07-08T07:10:41.382308Z",
|
||||||
"iopub.status.idle": "2024-06-05T08:39:59.141794Z",
|
"iopub.status.idle": "2024-07-08T07:10:41.404375Z",
|
||||||
"shell.execute_reply": "2024-06-05T08:39:59.141195Z",
|
"shell.execute_reply": "2024-07-08T07:10:41.403415Z",
|
||||||
"shell.execute_reply.started": "2024-06-05T08:39:59.079087Z"
|
"shell.execute_reply.started": "2024-07-08T07:10:41.383013Z"
|
||||||
},
|
},
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
@@ -603,7 +662,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",
|
||||||
@@ -624,7 +683,7 @@
|
|||||||
" dict2[k][item_en]['score'] = cal_score(data1)\n",
|
" dict2[k][item_en]['score'] = 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 = f'data/result_中安联合.json'\n",
|
"filename = f'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!') "
|
"print('ok!') "
|
||||||
@@ -787,15 +846,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": 28,
|
||||||
"id": "b123ee6b-85d2-4660-b226-321832a6b796",
|
"id": "b123ee6b-85d2-4660-b226-321832a6b796",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2024-06-05T08:52:25.451985Z",
|
"iopub.execute_input": "2024-07-08T09:19:02.767495Z",
|
||||||
"iopub.status.busy": "2024-06-05T08:52:25.451119Z",
|
"iopub.status.busy": "2024-07-08T09:19:02.766758Z",
|
||||||
"iopub.status.idle": "2024-06-05T08:58:26.399739Z",
|
"iopub.status.idle": "2024-07-08T09:19:45.858591Z",
|
||||||
"shell.execute_reply": "2024-06-05T08:58:26.398553Z",
|
"shell.execute_reply": "2024-07-08T09:19:45.857695Z",
|
||||||
"shell.execute_reply.started": "2024-06-05T08:52:25.451918Z"
|
"shell.execute_reply.started": "2024-07-08T09:19:02.767428Z"
|
||||||
},
|
},
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
@@ -804,7 +863,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"709\n"
|
"80\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -817,11 +876,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",
|
||||||
@@ -831,7 +890,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",
|
||||||
|
|||||||
+38
-305
@@ -252,28 +252,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 76,
|
"execution_count": null,
|
||||||
"id": "033cc564-4aa9-4e88-b38b-ec62a02b1661",
|
"id": "033cc564-4aa9-4e88-b38b-ec62a02b1661",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:09:44.065510Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:09:44.065032Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:09:44.126813Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:09:44.126202Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:09:44.065472Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"436\n",
|
|
||||||
"436\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import datetime\n",
|
"import datetime\n",
|
||||||
@@ -1157,27 +1141,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 45,
|
"execution_count": null,
|
||||||
"id": "38b01352-28cc-448f-8ca7-19d61cbeebc0",
|
"id": "38b01352-28cc-448f-8ca7-19d61cbeebc0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T07:40:45.818048Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T07:40:45.817653Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T07:40:46.111376Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T07:40:46.110921Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T07:40:45.818014Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
@@ -1228,27 +1197,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 49,
|
"execution_count": null,
|
||||||
"id": "ab7cc750-bff0-44ec-8652-21f8dc3100ef",
|
"id": "ab7cc750-bff0-44ec-8652-21f8dc3100ef",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T07:50:23.851597Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T07:50:23.851131Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T07:50:23.884379Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T07:50:23.883103Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T07:50:23.851548Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -1281,32 +1235,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 52,
|
"execution_count": null,
|
||||||
"id": "5e15984f-0747-48ea-b71e-ffc8e30775c9",
|
"id": "5e15984f-0747-48ea-b71e-ffc8e30775c9",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T07:58:16.601462Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T07:58:16.600990Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T07:58:16.616444Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T07:58:16.615337Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T07:58:16.601425Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"男性学生人数: 281\n",
|
|
||||||
"男性学生平均成绩: 71.68982206405693\n",
|
|
||||||
"女性学生人数: 237\n",
|
|
||||||
"女性学生平均成绩: 73.33818565400843\n",
|
|
||||||
"参加测试学生人数: 518\n",
|
|
||||||
"所有学生平均成绩: 72.44399613899613\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -1353,27 +1287,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 63,
|
"execution_count": null,
|
||||||
"id": "bb71c8d2-e445-48c3-8673-84c965f6efe2",
|
"id": "bb71c8d2-e445-48c3-8673-84c965f6efe2",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T08:46:27.643939Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T08:46:27.643406Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T08:46:27.677668Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T08:46:27.676266Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T08:46:27.643901Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -1402,27 +1321,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 70,
|
"execution_count": null,
|
||||||
"id": "35558059-3e86-4e74-8fde-794d1b2933c4",
|
"id": "35558059-3e86-4e74-8fde-794d1b2933c4",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T09:09:19.094296Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T09:09:19.093852Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T09:09:19.120750Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T09:09:19.119594Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T09:09:19.094259Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -1458,50 +1362,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 69,
|
"execution_count": null,
|
||||||
"id": "68de3c86-53e5-470f-9afb-6781df3c1449",
|
"id": "68de3c86-53e5-470f-9afb-6781df3c1449",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-10-06T09:01:17.624309Z",
|
|
||||||
"iopub.status.busy": "2023-10-06T09:01:17.623830Z",
|
|
||||||
"iopub.status.idle": "2023-10-06T09:01:17.635805Z",
|
|
||||||
"shell.execute_reply": "2023-10-06T09:01:17.634865Z",
|
|
||||||
"shell.execute_reply.started": "2023-10-06T09:01:17.624272Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"六年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 74.24\n",
|
|
||||||
"女生测试得分情况: 74.14\n",
|
|
||||||
"年级测试得分情况: 74.19\n",
|
|
||||||
"五年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 72.11\n",
|
|
||||||
"女生测试得分情况: 72.54\n",
|
|
||||||
"年级测试得分情况: 72.33\n",
|
|
||||||
"四年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 69.87\n",
|
|
||||||
"女生测试得分情况: 71.98\n",
|
|
||||||
"年级测试得分情况: 70.93\n",
|
|
||||||
"三年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 67.49\n",
|
|
||||||
"女生测试得分情况: 71.17\n",
|
|
||||||
"年级测试得分情况: 69.33\n",
|
|
||||||
"二年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 75.3\n",
|
|
||||||
"女生测试得分情况: 76.06\n",
|
|
||||||
"年级测试得分情况: 75.68\n",
|
|
||||||
"一年级测试得分情况:\n",
|
|
||||||
"男生测试得分情况: 72.66\n",
|
|
||||||
"女生测试得分情况: 73.44\n",
|
|
||||||
"年级测试得分情况: 73.05\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"filename = f'data/grade_长岭学生.json'\n",
|
"filename = f'data/grade_长岭学生.json'\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -2003,28 +1869,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 89,
|
"execution_count": null,
|
||||||
"id": "48f91581-2556-40d0-b0fe-ee98edb3983f",
|
"id": "48f91581-2556-40d0-b0fe-ee98edb3983f",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:37:33.794840Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:37:33.794387Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:37:33.887950Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:37:33.887437Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:37:33.794797Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"436\n",
|
|
||||||
"436\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import datetime\n",
|
"import datetime\n",
|
||||||
@@ -2117,27 +1967,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 90,
|
"execution_count": null,
|
||||||
"id": "160841a0-a092-4457-8ce0-fe39910c5da5",
|
"id": "160841a0-a092-4457-8ce0-fe39910c5da5",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:37:41.993070Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:37:41.992677Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:37:42.024279Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:37:42.023829Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:37:41.993038Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok!\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import time\n",
|
"import time\n",
|
||||||
@@ -2271,28 +2106,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 91,
|
"execution_count": null,
|
||||||
"id": "ed4c5a19-1c9e-4c63-8fdd-30b36ecc047a",
|
"id": "ed4c5a19-1c9e-4c63-8fdd-30b36ecc047a",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:37:46.266558Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:37:46.266103Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:37:46.337714Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:37:46.336373Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:37:46.266521Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"404\n",
|
|
||||||
"ok!\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
@@ -2368,31 +2187,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 87,
|
"execution_count": null,
|
||||||
"id": "14788ff3-0f3d-4ba2-b162-1f0663389a9d",
|
"id": "14788ff3-0f3d-4ba2-b162-1f0663389a9d",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:30:14.828302Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:30:14.827804Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:30:14.849786Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:30:14.848591Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:30:14.828264Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"0~255分人数:96人,男性:88人,女性:8人\n",
|
|
||||||
"256~332分人数:217人,男性:175人,女性:42人\n",
|
|
||||||
"333~367分人数:62人,男性:43人,女性:19人\n",
|
|
||||||
"368~500分人数:27人,男性:19人,女性:8人\n",
|
|
||||||
"402\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -2435,34 +2235,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 88,
|
"execution_count": null,
|
||||||
"id": "257917a2-5b29-4cd9-a798-4fd8e75ffe9c",
|
"id": "257917a2-5b29-4cd9-a798-4fd8e75ffe9c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2023-12-02T09:30:49.967886Z",
|
|
||||||
"iopub.status.busy": "2023-12-02T09:30:49.967396Z",
|
|
||||||
"iopub.status.idle": "2023-12-02T09:30:49.987381Z",
|
|
||||||
"shell.execute_reply": "2023-12-02T09:30:49.986279Z",
|
|
||||||
"shell.execute_reply.started": "2023-12-02T09:30:49.967848Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"20~24岁平均成绩:2.79分,人数:81人,男性:63人\n",
|
|
||||||
"25~29岁平均成绩:2.76分,人数:35人,男性:29人\n",
|
|
||||||
"30~34岁平均成绩:2.76分,人数:49人,男性:45人\n",
|
|
||||||
"35~39岁平均成绩:2.94分,人数:36人,男性:33人\n",
|
|
||||||
"40~44岁平均成绩:2.88分,人数:32人,男性:28人\n",
|
|
||||||
"45~49岁平均成绩:2.99分,人数:95人,男性:57人\n",
|
|
||||||
"50~54岁平均成绩:2.83分,人数:57人,男性:53人\n",
|
|
||||||
"55~69岁平均成绩:2.52分,人数:17人,男性:17人\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n",
|
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -2495,30 +2273,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": null,
|
||||||
"id": "0b877c2a-7fb3-4b34-81ab-58b9a09c4890",
|
"id": "0b877c2a-7fb3-4b34-81ab-58b9a09c4890",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"execution": {
|
"outputs": [],
|
||||||
"iopub.execute_input": "2024-07-05T08:13:23.061813Z",
|
|
||||||
"iopub.status.busy": "2024-07-05T08:13:23.061107Z",
|
|
||||||
"iopub.status.idle": "2024-07-05T08:13:23.223541Z",
|
|
||||||
"shell.execute_reply": "2024-07-05T08:13:23.222824Z",
|
|
||||||
"shell.execute_reply.started": "2024-07-05T08:13:23.061752Z"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"ename": "ValueError",
|
|
||||||
"evalue": "invalid literal for int() with base 10: '姓\\xa0 名'",
|
|
||||||
"output_type": "error",
|
|
||||||
"traceback": [
|
|
||||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
|
||||||
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
|
||||||
"Cell \u001b[0;32mIn[4], line 12\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m n \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;241m2\u001b[39m, sheet\u001b[38;5;241m.\u001b[39mmax_row\u001b[38;5;241m+\u001b[39m\u001b[38;5;241m1\u001b[39m):\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m sheet\u001b[38;5;241m.\u001b[39mcell(n,\u001b[38;5;241m1\u001b[39m)\u001b[38;5;241m.\u001b[39mvalue \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m---> 12\u001b[0m code \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mint\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43msheet\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcell\u001b[49m\u001b[43m(\u001b[49m\u001b[43mn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m4\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 13\u001b[0m person\u001b[38;5;241m.\u001b[39msetdefault(code, {})\n\u001b[1;32m 14\u001b[0m dict1 \u001b[38;5;241m=\u001b[39m {}\n",
|
|
||||||
"\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: '姓\\xa0 名'"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
"import json\n",
|
"import json\n",
|
||||||
@@ -2552,15 +2310,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": 8,
|
||||||
"id": "610b20f3-9fd8-46fc-b8ee-d48c4c854289",
|
"id": "610b20f3-9fd8-46fc-b8ee-d48c4c854289",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2024-07-05T08:16:56.784551Z",
|
"iopub.execute_input": "2024-07-08T07:09:49.763833Z",
|
||||||
"iopub.status.busy": "2024-07-05T08:16:56.783955Z",
|
"iopub.status.busy": "2024-07-08T07:09:49.763076Z",
|
||||||
"iopub.status.idle": "2024-07-05T08:16:56.816327Z",
|
"iopub.status.idle": "2024-07-08T07:09:49.792041Z",
|
||||||
"shell.execute_reply": "2024-07-05T08:16:56.815741Z",
|
"shell.execute_reply": "2024-07-08T07:09:49.791388Z",
|
||||||
"shell.execute_reply.started": "2024-07-05T08:16:56.784528Z"
|
"shell.execute_reply.started": "2024-07-08T07:09:49.763760Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -2609,27 +2367,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"id": "1e2d586e-6ff5-4fd1-a909-278d23e54561",
|
"id": "1e2d586e-6ff5-4fd1-a909-278d23e54561",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"execution": {
|
"outputs": [],
|
||||||
"iopub.execute_input": "2024-07-05T08:17:44.237801Z",
|
|
||||||
"iopub.status.busy": "2024-07-05T08:17:44.236968Z",
|
|
||||||
"iopub.status.idle": "2024-07-05T08:17:44.258525Z",
|
|
||||||
"shell.execute_reply": "2024-07-05T08:17:44.258007Z",
|
|
||||||
"shell.execute_reply.started": "2024-07-05T08:17:44.237723Z"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"80\n",
|
|
||||||
"80\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import time\n",
|
"import time\n",
|
||||||
@@ -2687,17 +2428,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": null,
|
||||||
"id": "64c6e1e3-801c-4573-b78f-5a9e842597a9",
|
"id": "64c6e1e3-801c-4573-b78f-5a9e842597a9",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2024-07-05T08:18:34.776458Z",
|
|
||||||
"iopub.status.busy": "2024-07-05T08:18:34.775705Z",
|
|
||||||
"iopub.status.idle": "2024-07-05T08:18:34.806013Z",
|
|
||||||
"shell.execute_reply": "2024-07-05T08:18:34.805581Z",
|
|
||||||
"shell.execute_reply.started": "2024-07-05T08:18:34.776387Z"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
|
|||||||
+1268
-1012
File diff suppressed because it is too large.
Load diff
+1193
-929
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user