This commit is contained in:
512song committed 2024-07-10 00:42:23 +08:00
1 parent 962ba2c329
commit daceb1e68d
4 files changed
+2588 -2276

No files matched your search

+38 -305
View File
@@ -252,28 +252,12 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": null,
"id": "033cc564-4aa9-4e88-b38b-ec62a02b1661",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"436\n",
"436\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import datetime\n",
@@ -1157,27 +1141,12 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": null,
"id": "38b01352-28cc-448f-8ca7-19d61cbeebc0",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
@@ -1228,27 +1197,12 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": null,
"id": "ab7cc750-bff0-44ec-8652-21f8dc3100ef",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -1281,32 +1235,12 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": null,
"id": "5e15984f-0747-48ea-b71e-ffc8e30775c9",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"男性学生人数: 281\n",
"男性学生平均成绩: 71.68982206405693\n",
"女性学生人数: 237\n",
"女性学生平均成绩: 73.33818565400843\n",
"参加测试学生人数: 518\n",
"所有学生平均成绩: 72.44399613899613\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -1353,27 +1287,12 @@
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": null,
"id": "bb71c8d2-e445-48c3-8673-84c965f6efe2",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -1402,27 +1321,12 @@
},
{
"cell_type": "code",
"execution_count": 70,
"execution_count": null,
"id": "35558059-3e86-4e74-8fde-794d1b2933c4",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -1458,50 +1362,12 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": null,
"id": "68de3c86-53e5-470f-9afb-6781df3c1449",
"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": []
},
"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"
]
}
],
"outputs": [],
"source": [
"filename = f'data/grade_长岭学生.json'\n",
"\n",
@@ -2003,28 +1869,12 @@
},
{
"cell_type": "code",
"execution_count": 89,
"execution_count": null,
"id": "48f91581-2556-40d0-b0fe-ee98edb3983f",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"436\n",
"436\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import datetime\n",
@@ -2117,27 +1967,12 @@
},
{
"cell_type": "code",
"execution_count": 90,
"execution_count": null,
"id": "160841a0-a092-4457-8ce0-fe39910c5da5",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok!\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import time\n",
@@ -2271,28 +2106,12 @@
},
{
"cell_type": "code",
"execution_count": 91,
"execution_count": null,
"id": "ed4c5a19-1c9e-4c63-8fdd-30b36ecc047a",
"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": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"404\n",
"ok!\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
@@ -2368,31 +2187,12 @@
},
{
"cell_type": "code",
"execution_count": 87,
"execution_count": null,
"id": "14788ff3-0f3d-4ba2-b162-1f0663389a9d",
"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": []
},
"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"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -2435,34 +2235,12 @@
},
{
"cell_type": "code",
"execution_count": 88,
"execution_count": null,
"id": "257917a2-5b29-4cd9-a798-4fd8e75ffe9c",
"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": []
},
"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"
]
}
],
"outputs": [],
"source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n",
"\n",
@@ -2495,30 +2273,10 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "0b877c2a-7fb3-4b34-81ab-58b9a09c4890",
"metadata": {
"execution": {
"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 名'"
]
}
],
"metadata": {},
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -2552,15 +2310,15 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"id": "610b20f3-9fd8-46fc-b8ee-d48c4c854289",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-05T08:16:56.784551Z",
"iopub.status.busy": "2024-07-05T08:16:56.783955Z",
"iopub.status.idle": "2024-07-05T08:16:56.816327Z",
"shell.execute_reply": "2024-07-05T08:16:56.815741Z",
"shell.execute_reply.started": "2024-07-05T08:16:56.784528Z"
"iopub.execute_input": "2024-07-08T07:09:49.763833Z",
"iopub.status.busy": "2024-07-08T07:09:49.763076Z",
"iopub.status.idle": "2024-07-08T07:09:49.792041Z",
"shell.execute_reply": "2024-07-08T07:09:49.791388Z",
"shell.execute_reply.started": "2024-07-08T07:09:49.763760Z"
}
},
"outputs": [
@@ -2609,27 +2367,10 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "1e2d586e-6ff5-4fd1-a909-278d23e54561",
"metadata": {
"execution": {
"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"
]
}
],
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"import time\n",
@@ -2687,17 +2428,9 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "64c6e1e3-801c-4573-b78f-5a9e842597a9",
"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"
}
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",