From 7fdca495abb2c1c5b605a9789e9526ffa90b1204 Mon Sep 17 00:00:00 2001 From: 512song Date: Wed, 9 Nov 2022 14:41:26 +0800 Subject: [PATCH] 20221109 --- 体测单位/巴陵石化.ipynb | 58 +++++++---------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) diff --git a/体测单位/巴陵石化.ipynb b/体测单位/巴陵石化.ipynb index d3490cb..7099c5f 100644 --- a/体测单位/巴陵石化.ipynb +++ b/体测单位/巴陵石化.ipynb @@ -10,27 +10,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "a27e986c-0c40-4792-b24d-03b19df707a9", "metadata": { - "execution": { - "iopub.execute_input": "2022-11-08T12:44:07.296735Z", - "iopub.status.busy": "2022-11-08T12:44:07.296180Z", - "iopub.status.idle": "2022-11-08T12:44:08.671501Z", - "shell.execute_reply": "2022-11-08T12:44:08.670323Z", - "shell.execute_reply.started": "2022-11-08T12:44:07.296686Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -72,27 +57,12 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "e5e4145b-d575-46b5-a530-c722668f76f3", "metadata": { - "execution": { - "iopub.execute_input": "2022-11-08T12:45:30.125598Z", - "iopub.status.busy": "2022-11-08T12:45:30.125074Z", - "iopub.status.idle": "2022-11-08T12:45:30.758312Z", - "shell.execute_reply": "2022-11-08T12:45:30.757020Z", - "shell.execute_reply.started": "2022-11-08T12:45:30.125550Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import time\n", @@ -147,16 +117,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "0582bc84-7234-415f-9715-66c27b6b8f91", "metadata": { - "execution": { - "iopub.execute_input": "2022-11-08T12:46:03.182505Z", - "iopub.status.busy": "2022-11-08T12:46:03.181985Z", - "iopub.status.idle": "2022-11-08T12:46:05.094052Z", - "shell.execute_reply": "2022-11-08T12:46:05.092913Z", - "shell.execute_reply.started": "2022-11-08T12:46:03.182458Z" - }, "tags": [] }, "outputs": [], @@ -288,8 +251,7 @@ "\n", "for k, v in dict1.items():\n", " m_name = v['name']\n", - " m_depart = v['unit']\n", - " depart.append(m_depart) \n", + " m_depart = v['unit'] \n", " dict2[int(k)] = [m_name,m_depart]\n", "\n", "\n", @@ -303,9 +265,9 @@ "\n", "for n in old: \n", " o_name = f'{fi_path}/{n}.pdf'\n", - " if not os.path.exists(f'{fi_path}/new/{dict2[n][1]}'):\n", - " os.mkdir(f'{fi_path}/new/{dict2[n][1]}') \n", - " n_name = f'{fi_path}/new/{dict2[n][1]}/{str(n).rjust(5,\"0\")}-{dict2[n][0]}.pdf'\n", + " if not os.path.exists(f'{fi_path}/new/{dict2[int(n)][1]}'):\n", + " os.mkdir(f'{fi_path}/new/{dict2[int(n)][1]}') \n", + " n_name = f'{fi_path}/new/{dict2[int(n)][1]}/{str(n).rjust(5,\"0\")}-{dict2[int(n)][0]}.pdf'\n", " if not os.path.exists(n_name):\n", " shutil.copyfile(o_name,n_name)\n", " print(n_name)" @@ -419,7 +381,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" },