This commit is contained in:
512song@sina.com committed 2022-12-12 15:36:48 +08:00
1 parent 20146bccbd
commit 2043c814a1
2 files changed
+134 -255

No files matched your search

+34 -143
View File
@@ -213,16 +213,9 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": null,
"id": "9aaa35a7-13e2-4ece-a9fd-931ad00e89d3",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T09:22:24.792753Z",
"iopub.status.busy": "2022-10-18T09:22:24.792240Z",
"iopub.status.idle": "2022-10-18T09:22:24.824328Z",
"shell.execute_reply": "2022-10-18T09:22:24.823342Z",
"shell.execute_reply.started": "2022-10-18T09:22:24.792705Z"
},
"tags": []
},
"outputs": [],
@@ -308,49 +301,12 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": null,
"id": "5678472e-b131-4940-9161-240dcd3461bb",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T09:18:04.991734Z",
"iopub.status.busy": "2022-10-18T09:18:04.991171Z",
"iopub.status.idle": "2022-10-18T09:18:05.041377Z",
"shell.execute_reply": "2022-10-18T09:18:05.040521Z",
"shell.execute_reply.started": "2022-10-18T09:18:04.991685Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"u_6300b7d4bc5a0_ayO3NftEDA 手机尾号3202用户 None 18705333202\n",
"u_lp_1663327661_63245dad5f702_I8JfuY 任振华 None 18705336366\n",
"u_6300b888d3aac_O39r6KCeML 王勇威 王勇威 18705336122\n",
"u_6300b8a21e3fe_zWo6UFSjrS 宗力 宗力 18705336363\n",
"u_lp_1663138566_63217b06daf80_S7mJ25 薛林 薛林 18705333903\n",
"u_lp_1664546227_6336f5b346d80_TiNiu1 房思春 房思春 18705333715\n",
"u_lp_1664617172_63380ad429dcb_svfFT3 海涛 祝学迎 18705336376\n",
"u_lp_1665641415_6347abc77a7ef_yV6Wox 董凯 董凯 15269362037\n",
"u_lp_1663406890_6325932a5caff_2RIkq2 祁河成 祁河成 18705333738\n",
"u_6325217365e69_WctQcZFuHb 张红海 张红海 18705333887\n",
"u_lp_1662620239_6319924fdf4a4_pB11t3 刘军 None 18705336318\n",
"u_lp_1661481758_6308331eaba3a_TQ1j6B 交警 翟峰 交警 翟峰 18705336675\n",
"u_lp_1663329993_632466c92bc76_uSmR9Q 孔晓晖 None 18705336315\n",
"u_lp_1663634037_63290a75694c9_cbt0Ld 王维军 快乐先行 18705336077\n",
"u_lp_1663649808_63294810ce3fd_UEPrNX 刘浩 刘浩 18705333203\n",
"u_lp_1663722388_632a6394b6954_7SupvO 李传生 李传生 18705336807\n",
"u_lp_1661486861_6308470de5d47_QzgTmI 张俊杰 张俊杰 18705336069\n",
"u_lp_1664162704_63311b90e964c_jPlmpl 童保华 None 18705333707\n",
"u_lp_1665036891_633e725b684d3_hsCm37 刘进 None 18705336031\n",
"u_lp_1663295972_6323e1e4caea7_fc1HXu 于会萍 None 18705333513\n",
"u_lp_1663325439_632454ff8b99b_DrUT6S 孙孝伟 None 18705336682\n",
"u_lp_1663577491_63282d93ea1e9_JDfOU8 王青海 王青海 18705336039\n",
"u_lp_1663663112_63297c08977aa_7gPZEP 车西冬 None 18705333710\n"
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -389,16 +345,9 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": null,
"id": "c1a5aaef-70be-4fd2-9384-983aeb59f491",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T09:22:39.019143Z",
"iopub.status.busy": "2022-10-18T09:22:39.018621Z",
"iopub.status.idle": "2022-10-18T09:22:39.175590Z",
"shell.execute_reply": "2022-10-18T09:22:39.174572Z",
"shell.execute_reply.started": "2022-10-18T09:22:39.019095Z"
},
"tags": []
},
"outputs": [],
@@ -476,7 +425,7 @@
" list2 = [k,v['name'],v['phone'],v['unit'],dk,sc]\n",
" list1.append(list2)\n",
"title = ['昵称','姓名','手机号','部门','打卡次数','累计学习时长']\n",
"filename = 'data/交警支队学习情况表221018.xlsx'\n",
"filename = 'data/交警支队学习情况表221212.xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
@@ -504,27 +453,12 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": null,
"id": "a4886e66-99d1-4f24-9d53-29a239e62bad",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T09:22:14.008683Z",
"iopub.status.busy": "2022-10-18T09:22:14.008151Z",
"iopub.status.idle": "2022-10-18T09:22:14.070260Z",
"shell.execute_reply": "2022-10-18T09:22:14.068944Z",
"shell.execute_reply.started": "2022-10-18T09:22:14.008634Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -610,75 +544,12 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": null,
"id": "ee4bb827-287f-4b1f-8dbd-d595cb010892",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T09:03:41.966475Z",
"iopub.status.busy": "2022-10-18T09:03:41.965956Z",
"iopub.status.idle": "2022-10-18T09:03:42.048247Z",
"shell.execute_reply": "2022-10-18T09:03:42.047389Z",
"shell.execute_reply.started": "2022-10-18T09:03:41.966426Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 u_6173e42182911_TnumhwOZG9 子墨 李文静 13718887655\n",
"2 u_6162ec35ad7b7_ey2oOCfUP7 小新卖蜡笔? 高峻超 17860246118\n",
"3 u_lp_1663297930_6323e98a33794_jNgzRD 冬日 冬日 \n",
"4 u_631899e2ad8f9_MhSqCAUX9R 手机尾号0101用户 伴着幸福的人 13605330101\n",
"5 u_6159638142ba1_S9otgjwjX7 宗瑾 宗瑾 18801062497\n",
"6 u_5f05c79ebb792_GDNNK8BWSI 奇奇 亓玉芬 15210715398\n",
"7 u_lp_1663134862_63216c8e0cf6d_5J5DmF 王青 王青 18615337165\n",
"8 u_lp_1663141739_6321876b2363b_S78cx0 霖山听海 霖山听海 \n",
"9 u_lp_1663326669_632459cda856f_GjFOVL 淄博最后的ikun 淄博最后的ikun \n",
"10 u_lp_1663413836_6325ae4cbb828_HSEYyB 妮妮 妮妮 13953380271\n",
"11 u_lp_1663554446_6327d38ef1069_MD1305 XZJ \n",
"12 u_lp_1664171121_63313c71a0f2f_fDvfoo 枕霞旧友 \n",
"13 u_lp_1664546227_6336f5b346d80_TiNiu1 房思春 房思春 \n",
"14 u_lp_1664617172_63380ad429dcb_svfFT3 海涛 祝学迎 13581027888\n",
"15 u_lp_1665225083_6341517b8211a_qiMkIj 阳光zj 阳光zj 13969307666\n",
"16 u_lp_1665641415_6347abc77a7ef_yV6Wox 董凯 董凯 13806481277\n",
"17 u_6319e7da6947f_GN6dmtH3ed 左登峰 左登峰 13964365877\n",
"18 u_lp_1663369088_6324ff80bc705_NgNTWu 我爱我家 \n",
"19 u_lp_1663406890_6325932a5caff_2RIkq2 祁河成 祁河成 \n",
"20 u_lp_1663136362_6321726a8403d_Ht7c9d 王洪珍 王洪珍 \n",
"21 u_6322e3966d41b_rVdSm1pZXH 驀然回首 驀然回首 15953356111\n",
"22 u_6325217365e69_WctQcZFuHb 张红海 张红海 13508951662\n",
"23 u_lp_1662620239_6319924fdf4a4_pB11t3 刘军 \n",
"24 u_lp_1663136658_6321739213909_ttFs3c 朱红霞 朱红霞 \n",
"25 u_lp_1661481758_6308331eaba3a_TQ1j6B 交警 翟峰 交警 翟峰 \n",
"26 u_lp_1663138780_63217bdc3fd19_e8t54f 顺其自然2 \n",
"27 u_lp_1663139478_63217e96c3954_EZvqh2 ???? ???? \n",
"28 u_lp_1664611559_6337f4e73b030_R1Og5Q ???? ???? 13287063721\n",
"29 u_633666862f1b1_XU3mwbtuGf 淬剑 \n",
"30 u_lp_1663119922_632132323da11_n9FmTv 王丽君 王丽君 13475518973\n",
"31 u_lp_1663124329_63214369d8508_N2CO9q 于立霞 于立霞 13953320629\n",
"32 u_lp_1663141198_6321854e76c00_Ab89tb 邓立群 邓立群 \n",
"33 u_lp_1663141485_6321866daf613_4NCc9M 耿晓龙 耿晓龙 \n",
"34 u_lp_1663329993_632466c92bc76_uSmR9Q 孔晓晖 \n",
"35 u_lp_1663551502_6327c80ec1d59_LP3Qr5 梦想成真 梦想成真 15264337301\n",
"36 u_lp_1663634037_63290a75694c9_cbt0Ld 王维军 快乐先行 13869376228\n",
"37 u_lp_1663649808_63294810ce3fd_UEPrNX 刘浩 刘浩 \n",
"38 u_lp_1663722388_632a6394b6954_7SupvO 李传生 李传生 13806431511\n",
"39 u_lp_1664653781_633899d5b97fb_LBp28e 淡若悠然 \n",
"40 u_lp_1661486861_6308470de5d47_QzgTmI 张俊杰 张俊杰 13655339406\n",
"41 u_lp_1664162704_63311b90e964c_jPlmpl 童保华 \n",
"42 u_lp_1665036891_633e725b684d3_hsCm37 刘进 \n",
"43 u_lp_1663142645_63218af5905c5_gqmABq 靥暖 \n",
"44 u_lp_1663225682_6322cf52dde88_qbC3Rs 许志国 \n",
"45 u_lp_1663295972_6323e1e4caea7_fc1HXu 于会萍 \n",
"46 u_lp_1663325439_632454ff8b99b_DrUT6S 孙孝伟 \n",
"47 u_lp_1663555784_6327d8c8c9e25_cLIVK4 便士 便士 \n",
"48 u_lp_1663577491_63282d93ea1e9_JDfOU8 王青海 王青海 \n",
"49 u_lp_1663663112_63297c08977aa_7gPZEP 车西冬 \n"
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -897,12 +768,32 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"id": "65ef74b4-4667-422c-b610-63b517edd75d",
"metadata": {
"execution": {
"iopub.execute_input": "2022-12-12T07:27:51.724770Z",
"iopub.status.busy": "2022-12-12T07:27:51.724234Z",
"iopub.status.idle": "2022-12-12T07:27:51.754962Z",
"shell.execute_reply": "2022-12-12T07:27:51.753806Z",
"shell.execute_reply.started": "2022-12-12T07:27:51.724722Z"
},
"tags": []
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"王冉冉 支队办公室 18705333037 ['《百日筑基', '《百日筑基']\n",
"甘斌发 高新区大队 18705333209 ['《百日筑基', '《百日筑基']\n",
"岳科学 桓台大队 18705332172 ['《百日筑基', '《百日筑基']\n",
"罗苓秋 支队办公室 18705333111 ['《百日筑基', '《百日筑基']\n",
"魏文静 支队救助办 18705333237 ['《百日筑基', '《百日筑基']\n",
"李溯影 支队政治处 18705333055 ['《百日筑基', '《百日筑基', '《百日筑基']\n"
]
}
],
"source": [
"import json\n",
"import os\n",
@@ -910,13 +801,13 @@
"import csv\n",
"import re\n",
"\n",
"fi_path = 'data/交警支队/时长/'\n",
"fi_path = 'data/交警支队/打卡/'\n",
"fl = glob.glob(f'{fi_path}*.csv')\n",
"\n",
"list1 = []\n",
"dict1 = {}\n",
"for fn in fl:\n",
" with open(fn,'r',newline='',encoding='gb18030') as csv_file:\n",
" with open(fn,'r',newline='') as csv_file:\n",
" fl1 = csv.reader(csv_file,delimiter=',')\n",
" zb = fn.split('-')[3]\n",
" #header = next(fl1)\n",
@@ -929,7 +820,7 @@
" dict1[m_id].append(zb)\n",
" #list1.append(line)\n",
" i +=1\n",
"filename = 'data/交警支队小鹅通信息.json'\n",
"filename = 'data/交警支队小鹅通信息221018.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl) \n",
"dict3 = {}\n",