20230522
This commit is contained in:
1 parent
2e7d800503
commit
91ae3fce79
3 files changed
+599
-129
No files matched your search
+122
-67
@@ -10,15 +10,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": 10,
|
||||
"id": "1b92b7c5-cb77-49da-95b7-34827ecf1d16",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-16T06:27:55.181932Z",
|
||||
"iopub.status.busy": "2023-05-16T06:27:55.181018Z",
|
||||
"iopub.status.idle": "2023-05-16T06:27:57.546786Z",
|
||||
"shell.execute_reply": "2023-05-16T06:27:57.545822Z",
|
||||
"shell.execute_reply.started": "2023-05-16T06:27:55.181895Z"
|
||||
"iopub.execute_input": "2023-05-18T12:36:59.824733Z",
|
||||
"iopub.status.busy": "2023-05-18T12:36:59.824148Z",
|
||||
"iopub.status.idle": "2023-05-18T12:37:02.051168Z",
|
||||
"shell.execute_reply": "2023-05-18T12:37:02.050045Z",
|
||||
"shell.execute_reply.started": "2023-05-18T12:36:59.824691Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -27,9 +27,9 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"8206\n",
|
||||
"8171\n",
|
||||
"8109\n",
|
||||
"8208\n",
|
||||
"8208\n",
|
||||
"8208\n",
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
@@ -76,19 +76,19 @@
|
||||
" if sheet.cell(n,12).value is not None:\n",
|
||||
" dict1['工作性质'] = sheet.cell(n, 11).value\n",
|
||||
" person[code] = dict1\n",
|
||||
"jianyuan = [6484,7110,6441,6541,6543,6549,6555,6600,2958,2981,3033,3231,3249,3287,3228,7741,7749,7794,7799,7806,7837,7863,7870,7880,7894,7895,7904,7936,7947,7953,7958,7968,7969,7974,8086,8114]\n",
|
||||
"#jianyuan = [6484,7110,6441,6541,6543,6549,6555,6600,2958,2981,3033,3231,3249,3287,3228,7741,7749,7794,7799,7806,7837,7863,7870,7880,7894,7895,7904,7936,7947,7953,7958,7968,7969,7974,8086,8114]\n",
|
||||
"\n",
|
||||
"print(len(person))\n",
|
||||
"for k in jianyuan:\n",
|
||||
" if k in person.keys():\n",
|
||||
" del person[k]\n",
|
||||
"#for k in jianyuan:\n",
|
||||
"# if k in person.keys():\n",
|
||||
"# del person[k]\n",
|
||||
"print(len(person))\n",
|
||||
"bianwai =[449,6839]\n",
|
||||
"for i in range(7139,7200):\n",
|
||||
" bianwai.append(i)\n",
|
||||
"for k in bianwai:\n",
|
||||
" if k in person.keys():\n",
|
||||
" del person[k]\n",
|
||||
"#bianwai =[449,6839]\n",
|
||||
"#for i in range(7139,7200):\n",
|
||||
"# bianwai.append(i)\n",
|
||||
"#for k in bianwai:\n",
|
||||
"# if k in person.keys():\n",
|
||||
"# del person[k]\n",
|
||||
"print(len(person))\n",
|
||||
"filename = 'data/燕山石化人员名单.json'\n",
|
||||
"with open(filename, 'w') as fl:\n",
|
||||
@@ -106,15 +106,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"execution_count": 4,
|
||||
"id": "71e1ec6a-6797-4496-969a-1d1461b9ea58",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-16T08:36:31.303752Z",
|
||||
"iopub.status.busy": "2023-05-16T08:36:31.302937Z",
|
||||
"iopub.status.idle": "2023-05-16T08:36:31.711617Z",
|
||||
"shell.execute_reply": "2023-05-16T08:36:31.710715Z",
|
||||
"shell.execute_reply.started": "2023-05-16T08:36:31.303711Z"
|
||||
"iopub.execute_input": "2023-05-17T08:58:25.400000Z",
|
||||
"iopub.status.busy": "2023-05-17T08:58:25.399131Z",
|
||||
"iopub.status.idle": "2023-05-17T08:58:25.810982Z",
|
||||
"shell.execute_reply": "2023-05-17T08:58:25.810241Z",
|
||||
"shell.execute_reply.started": "2023-05-17T08:58:25.399960Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -123,12 +123,10 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"214\n",
|
||||
"8151 赵春先 已测试!\n",
|
||||
"999 张术申 已测试!\n",
|
||||
"2709 刘巍 已测试!\n",
|
||||
"214\n",
|
||||
"7598\n"
|
||||
"133\n",
|
||||
"2004 刘鹏 已测试!\n",
|
||||
"133\n",
|
||||
"7730\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -151,7 +149,7 @@
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/places_result_20230516.csv'\n",
|
||||
"filename = 'data/places_result_20230517.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
@@ -184,7 +182,7 @@
|
||||
" else:\n",
|
||||
" for k1,v1 in v.items():\n",
|
||||
" dict2[k][k1] = v1\n",
|
||||
"filename = 'data/result_燕山石化(20230516).json'\n",
|
||||
"filename = 'data/result_燕山石化(20230517).json'\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||
"print(len(re_ta))\n",
|
||||
@@ -204,15 +202,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"execution_count": 5,
|
||||
"id": "c24880ad-bbbd-4ad8-a894-cbcea389e822",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-16T08:37:27.708591Z",
|
||||
"iopub.status.busy": "2023-05-16T08:37:27.707778Z",
|
||||
"iopub.status.idle": "2023-05-16T08:37:27.839300Z",
|
||||
"shell.execute_reply": "2023-05-16T08:37:27.838623Z",
|
||||
"shell.execute_reply.started": "2023-05-16T08:37:27.708561Z"
|
||||
"iopub.execute_input": "2023-05-17T09:00:37.129834Z",
|
||||
"iopub.status.busy": "2023-05-17T09:00:37.129418Z",
|
||||
"iopub.status.idle": "2023-05-17T09:00:37.212119Z",
|
||||
"shell.execute_reply": "2023-05-17T09:00:37.211419Z",
|
||||
"shell.execute_reply.started": "2023-05-17T09:00:37.129806Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -224,7 +222,7 @@
|
||||
"items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"title = ['编号','姓名','性别','单位','车间','班组','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"\n",
|
||||
"filename = 'data/result_燕山石化(20230516).json'\n",
|
||||
"filename = 'data/result_燕山石化(20230517).json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
@@ -249,7 +247,7 @@
|
||||
" else:\n",
|
||||
" list2.append('') \n",
|
||||
" list1.append(list2)\n",
|
||||
"filename = 'data/燕山石化体测情况表(20230516).xlsx'\n",
|
||||
"filename = 'data/燕山石化体测情况表(20230517).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -269,15 +267,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 198,
|
||||
"execution_count": 12,
|
||||
"id": "79c9c728-12e9-4107-bc5a-8c3e3d8b64a6",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-08T00:52:23.460649Z",
|
||||
"iopub.status.busy": "2023-05-08T00:52:23.459824Z",
|
||||
"iopub.status.idle": "2023-05-08T00:52:25.090804Z",
|
||||
"shell.execute_reply": "2023-05-08T00:52:25.090044Z",
|
||||
"shell.execute_reply.started": "2023-05-08T00:52:23.460608Z"
|
||||
"iopub.execute_input": "2023-05-18T12:37:39.026994Z",
|
||||
"iopub.status.busy": "2023-05-18T12:37:39.026072Z",
|
||||
"iopub.status.idle": "2023-05-18T12:37:41.214470Z",
|
||||
"shell.execute_reply": "2023-05-18T12:37:41.213773Z",
|
||||
"shell.execute_reply.started": "2023-05-18T12:37:39.026953Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -289,7 +287,7 @@
|
||||
"items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"title = ['编号','姓名','性别','单位','车间','班组','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"\n",
|
||||
"filename = 'data/result_燕山石化.json'\n",
|
||||
"filename = 'data/result_燕山石化-all.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
@@ -314,7 +312,7 @@
|
||||
" else:\n",
|
||||
" list2.append('') \n",
|
||||
" list1.append(list2)\n",
|
||||
"filename = 'data/燕山石化体测情况表(截至20230506).xlsx'\n",
|
||||
"filename = 'data/燕山石化体测情况表.xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -523,15 +521,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": 3,
|
||||
"id": "641863ef-324f-4c33-a0a9-699031afb6f1",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-11T04:50:37.384699Z",
|
||||
"iopub.status.busy": "2023-05-11T04:50:37.383858Z",
|
||||
"iopub.status.idle": "2023-05-11T04:50:37.543557Z",
|
||||
"shell.execute_reply": "2023-05-11T04:50:37.542638Z",
|
||||
"shell.execute_reply.started": "2023-05-11T04:50:37.384657Z"
|
||||
"iopub.execute_input": "2023-05-17T01:34:11.475000Z",
|
||||
"iopub.status.busy": "2023-05-17T01:34:11.474266Z",
|
||||
"iopub.status.idle": "2023-05-17T01:34:11.673023Z",
|
||||
"shell.execute_reply": "2023-05-17T01:34:11.672256Z",
|
||||
"shell.execute_reply.started": "2023-05-17T01:34:11.474959Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -540,7 +538,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[['4025', '马珺', '教育培训中心工会', '身高,体重,选择反应时'], ['7790', '吴志鹏', '生产运行保障中心', '身高,体重,握力'], ['8151', '赵春先', '合成树脂厂', '身高,体重,握力'], ['7682', '孙宏林', '有机化工厂工会', '肺活量,身高,体重'], ['2004', '刘鹏', '合成树脂厂', '身高,体重,握力'], ['3125', '李志斌', '化学品厂工会', '身高,体重,握力']]\n"
|
||||
"[['4025', '马珺', '教育培训中心工会', '身高,体重,选择反应时'], ['7790', '吴志鹏', '生产运行保障中心', '身高,体重,握力'], ['3377', '安明海', '检验计量中心工会', '俯卧撑,纵跳'], ['3520', '于海军', '检验计量中心工会', '握力'], ['3125', '李志斌', '化学品厂工会', '身高,体重,握力'], ['5690', '胡勇', '热电厂工会', '身高,体重'], ['4551', '韩立江', '炼油厂工会', '身高,体重'], ['8150', '王重荃', '高科公司工会', '台阶指数']]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -566,7 +564,7 @@
|
||||
" dict3[k] = list1\n",
|
||||
"list1 = []\n",
|
||||
"for k, v in dict3.items():\n",
|
||||
" if len(v)<4 and '身高' in v and '体重' in v:\n",
|
||||
" if len(v)<4 and '身高' in v and '体重' in v or ((len(v)<3 and '身高' not in v and '体重' not in v)):\n",
|
||||
" list2 = []\n",
|
||||
" xm = ','.join(v)\n",
|
||||
" list2.append(k)\n",
|
||||
@@ -575,7 +573,7 @@
|
||||
" list2.append(xm)\n",
|
||||
" list1.append(list2)\n",
|
||||
"print(list1)\n",
|
||||
"filename = 'data/燕山石化测试项目不足人员(截止5月11日).xlsx'\n",
|
||||
"filename = 'data/燕山石化测试项目不足人员(截止5月16日).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"#sheet.append(title)\n",
|
||||
@@ -595,15 +593,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": 11,
|
||||
"id": "b735248a-c1b0-4e90-8df4-37cd7625cb1a",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-14T14:16:50.290820Z",
|
||||
"iopub.status.busy": "2023-05-14T14:16:50.290016Z",
|
||||
"iopub.status.idle": "2023-05-14T14:16:51.077768Z",
|
||||
"shell.execute_reply": "2023-05-14T14:16:51.076992Z",
|
||||
"shell.execute_reply.started": "2023-05-14T14:16:50.290789Z"
|
||||
"iopub.execute_input": "2023-05-18T12:37:18.648377Z",
|
||||
"iopub.status.busy": "2023-05-18T12:37:18.647570Z",
|
||||
"iopub.status.idle": "2023-05-18T12:37:19.435077Z",
|
||||
"shell.execute_reply": "2023-05-18T12:37:19.434303Z",
|
||||
"shell.execute_reply.started": "2023-05-18T12:37:18.648344Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -612,8 +610,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"7117\n",
|
||||
"7117\n"
|
||||
"7734\n",
|
||||
"7734\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -636,7 +634,7 @@
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/places_result_20230514.csv'\n",
|
||||
"filename = 'data/places_result_20230518.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
@@ -664,6 +662,63 @@
|
||||
"print(len(re_ta))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fbdf2c54-7303-43ad-bbec-0fbcd033603a",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 统计测试人数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"id": "6d10738f-8da8-4f18-970b-e67433a06661",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-05-18T12:55:07.441554Z",
|
||||
"iopub.status.busy": "2023-05-18T12:55:07.440708Z",
|
||||
"iopub.status.idle": "2023-05-18T12:55:07.819534Z",
|
||||
"shell.execute_reply": "2023-05-18T12:55:07.818801Z",
|
||||
"shell.execute_reply.started": "2023-05-18T12:55:07.441512Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"7734\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import time\n",
|
||||
"import csv\n",
|
||||
"\n",
|
||||
"person = set()\n",
|
||||
"filename = 'data/places_result_20230518.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
" for line in fl:\n",
|
||||
" #line = re.sub('[\\r\\n\\f ]{1,}', '', line)\n",
|
||||
" list1.append(line)\n",
|
||||
"#print(list1)\n",
|
||||
"filename = 'data/燕山石化人员名单.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"for result in list1:\n",
|
||||
" user = str(result[2])\n",
|
||||
" if user in dict1.keys():\n",
|
||||
" person.add(user)\n",
|
||||
"\n",
|
||||
"print(len(person))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5bdcad97-309f-4d29-82c4-b53c68b9ee22",
|
||||
|
||||
Reference in new issue
Block a user