From cd8958986f5bd6cd5b645934059e58c5a9911500 Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Thu, 13 Oct 2022 06:48:30 +0800 Subject: [PATCH] 20221013 morning --- 工具/关键字筛选题号.ipynb | 101 ++----------------------------------- 工具/文本文件/题号筛选.txt | 1 + 工具/题号选题pdf生成.ipynb | 10 ++-- 题库0.3/Problems.json | 4 +- 4 files changed, 12 insertions(+), 104 deletions(-) create mode 100644 工具/文本文件/题号筛选.txt diff --git a/工具/关键字筛选题号.ipynb b/工具/关键字筛选题号.ipynb index b661d593..c6fe7a71 100644 --- a/工具/关键字筛选题号.ipynb +++ b/工具/关键字筛选题号.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -11,17 +11,9 @@ "0" ] }, - "execution_count": 3, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" - }, - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mThe Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details." - ] } ], "source": [ @@ -29,14 +21,14 @@ "\n", "\"\"\"---设置关键字, 同一field下不同选项为or关系, 同一字典中不同字段间为and关系, 不同字典间为or关系, _not表示列表中的关键字都不含, 同一字典中的数字用来供应同一字段不同的条件之间的and---\"\"\"\n", "keywords_dict_table = [\n", - " {\"tags\":[\"一\",\"二\",\"三\",\"五\"], \"usages\":[\"班\"]}\n", + " {\"tags\":[\"八\"]}\n", "]\n", "\"\"\"---关键字设置完毕---\"\"\"\n", "# 示例: keywords_dict_table = [\n", "# {\"tags\": [\"第三单元\"], \"content1\": [r\"[\\d]\\alpha\",\"2x\"], \"content2\": [\"sin\"], \"content3\": [\"cos\"],\"content4\": [\"cot\"], \"content5\": [\"tan\"]},\n", "# ]\n", "\"\"\"---设置输出文件名---\"\"\"\n", - "filename = \"临时文件/题号筛选.txt\"\n", + "filename = \"文本文件/题号筛选.txt\"\n", "\"\"\"---文件名设置完毕---\"\"\"\n", "\n", "\n", @@ -83,91 +75,6 @@ "os.system(\"code \"+filename)" ] }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "condition1 = {\"content\":[\"柱\",\"锥\",\"球\",\"台\"], \"content_not\":[\"体积\",\"表面积\",\"侧面积\"], \"tags\":[\"第六单元\",\"\"]}" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'content': ['柱', '锥', '球', '台'],\n", - " 'content_not': ['体积', '表面积', '侧面积'],\n", - " 'tags': ['第六单元']}" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "condition1" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "match_condition(pro_dict[\"030140\"],condition1)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'id': '030140',\n", - " 'content': '如果平行于一个正棱锥底面的截面面积是底面面积的$\\\\dfrac 12$, 那么截面截一条侧棱所得两条线段的比是\\\\blank{50}.',\n", - " 'objs': [],\n", - " 'tags': [],\n", - " 'genre': '',\n", - " 'ans': '',\n", - " 'solution': '',\n", - " 'duration': -1,\n", - " 'usages': [],\n", - " 'origin': '人教B版教材例题与习题',\n", - " 'edit': ['20221010\\t王伟叶'],\n", - " 'same': [],\n", - " 'related': [],\n", - " 'remark': '',\n", - " 'space': ''}" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "pro_dict[\"030140\"]" - ] - }, { "cell_type": "code", "execution_count": null, diff --git a/工具/文本文件/题号筛选.txt b/工具/文本文件/题号筛选.txt new file mode 100644 index 00000000..f2430395 --- /dev/null +++ b/工具/文本文件/题号筛选.txt @@ -0,0 +1 @@ +000218,000219,000220,000221,000222,000223,000224,000225,000226,000227,000228,000229,000230,000231,000332,000333,000340,000345,000350,000351,000359,000373,000375,000384,000385,000391,000393,000398,000401,000410,000412,000418,000420,000435,000439,000444,000453,000455,000461,000462,000470,000478,000483,000491,000502,000503,000512,000519,000521,000531,000532,000539,000545,000563,000564,000568,000580,000581,000593,000600,000601,000611,000620,000624,000632,000635,000640,000654,000658,000659,000672,000685,000694,000695,000704,000712,000714,000722,000735,000737,000744,000753,000765,000773,000774,000779,000800,000809,000811,000812,000823,000828,000829,000837,000844,000849,000866,000873,000877,000885,000889,000901,000906,000914,000927,000929,000951,000969,002519,002520,002521,002522,002523,002524,002525,002526,002527,002528,002529,002530,002531,002532,002533,002534,002535,002536,002537,002538,002539,002540,002541,002542,002543,002544,002545,002546,002547,002548,002549,002550,002551,002552,002553,002554,002555,002556,002557,002558,002559,002560,002561,002562,002563,002564,002565,002566,002567,002568,002569,002570,002571,002572,002573,002574,002575,002576,002577,002578,002579,002580,002581,002582,002583,002584,002585,002586,002587,002588,002589,002590,002591,002592,002593,002594,002595,002596,002597,002598,002599,002600,002601,002602,002603,002604,002605,002606,002607,002608,002609,002610,002611,002612,002613,002614,002615,002616,002617,002618,002619,002620,002621,002622,002623,002624,002625,002626,002627,002628,002629,002630,002631,002632,002633,002634,002635,002636,002637,002638,002639,002640,002641,002642,002643,002644,002645,002646,002647,002648,002649,002650,002651,002652,002653,002654,002655,002656,002657,002658,002659,002660,002661,002662,002663,002664,002665,003567,003568,003569,003570,003571,003572,003573,003574,003575,003577,003578,003580,003581,003582,003583,003584,003585,003586,003588,003594,003598,003618,003634,003640,003654,003660,003666,003674,003727,003734,003735,003750,003751,003764,003787,003806,003812,003825,003840,003851,003855,003867,003872,003873,003876,003883,003887,003899,003914,003942,003947,003962,003972,003976,003977,003978,003979,003983,003991,003992,003993,003997,003998,004015,004016,004017,004018,004019,004020,004021,004022,004023,004024,004025,004026,004027,004028,004029,004030,004031,004032,004033,004034,004035,004036,004037,004038,004039,004040,004041,004042,004043,004044,004045,004046,004062,004077,004087,004104,004110,004127,004131,004148,004150,004170,004174,004192,004193,004211,004212,004231,004232,004250,004257,004262,004297,004298,004324,004341,004342,004363,004394,004402,004428,004430,004450,004453,004459,004473,004475,004478,004499,004517,004535,004536,004558,004560,004572,004573,004574,004575,004576,004577,004578,004579,004580,004581,004582,004583,004584,004585,004586,004587,004588,004589,004590,004591,004592,004593,004594,004595,004596,004597,004598,004599,004600,004601,004602,004603,004604,004605,004606,004607,004608,004609,004610,004611,004612,004613,004614,004615,004616,004617,004618,004625,004647,004663,004670,004678,004686,004690,004711,004712,004727,004731,004747,004750,007353,007354,007355,007356,007357,007358,007359,007360,007361,007362,007363,007364,007365,007366,007367,007368,007369,007370,007371,007372,007373,007374,007375,007376,007377,007378,007379,007380,007381,007382,007383,007384,007385,007386,007387,007388,007389,007390,007391,007392,007393,007394,007395,007396,007397,007398,007399,007400,007401,007402,007403,007404,007405,007406,007407,007408,007409,007410,007411,007412,007413,007414,007415,007416,007417,007418,007419,007420,007421,007422,007423,007424,007425,007426,007427,007428,007429,007430,007431,007432,007433,007434,007435,007436,007437,007438,007439,007440,007441,007442,007443,007444,007445,007446,007447,007448,007449,007450,007451,007452,007453,007454,007455,007456,007457,007458,007459,007460,007461,007462,007463,007464,007465,007466,007467,007468,007469,007470,007471,007472,007473,007474,007475,007476,007477,007478,007479,007480,007481,007482,007483,007484,007485,007486,007487,007488,007489,007490,007491,007492,007493,007494,007495,007496,007497,007498,007499,007500,007501,007502,007503,007504,007505,007506,007507,007508,007509,007510,007511,007512,007513,007514,007515,007516,007517,007518,007519,007520,007521,007522,007523,007524,007525,007526,007527,007528,007529,007530,007531,007532,007533,007534,007535,007536,007537,007538,007539,007540,007541,007542,007543,007544,007545,007546,007547,007548,007549,007550,007551,007552,007553,007554,007555,007556,007557,007558,007559,007560,007561,007562,007563,007564,007565,007566,007567,007568,007569,007570,007571,007572,007573,007574,007575,007576,007577,007578,007579,007580,007581,007582,007583,007584,007585,007586,007587,007588,007589,007590,007591,007592,007593,007594,007595,007596,007597,007598,007599,007600,007601,007602,007603,007604,007605,007606,007607,007608,007609,007610,007611,007612,007613,007614,007615,007616,007617,007618,007619,007620,007621,007622,007623,007624,007625,007626,007627,007628,007629,007630,007631,007632,007633,007634,007635,007636,007637,007638,007639,007640,007641,007642,007643,007644,007645,007646,007647,007648,007649,007650,007651,007652,007653,007654,007655,007656,007657,007658,007659,007660,007661,007662,007663,007664,007665,007666,007667,007668,007669,007670,007671,007672,007673,007674,007675,007676,007677,007678,007679,009246,009247,009248,009249,009250,009251,009252,009253,009254,009255,009256,009257,009258,009259,009260,009261,009262,009263,009264,009265,009266,009267,009268,009269,009270,009271,009272,009273,009274,009275,009276,009277,009278,009279,009280,009281,009282,009283,009284,009285,009286,009287,009288,009289,009290,009291,009292,009293,009294,009295,009296,009297,009298,009299,009300,009301,009302,009303,009304,009305,009306,009307,009308,009309,009310,009311,009312,009313,009314,009315,009316,009317,009318,009319,009320,009321,009322,009323,009324,009325,009326,009327,009328,009329,009330,009331,009332,009333,009334,009335,009336,009337,009338,009339,009340,009341,009342,009343,009344,009345,009346,009347,009348,009349,009350,009351,009352,009353,009354,009355,009356,009357,009358,009359,009360,009361,009362,009363,009364,009365,009366,009391,009403,009404,009405,009406,009407,009408,009409,009410,009411,009413,009418,009419,009420,009421,009422,009423,009425,009733,009734,009735,009736,009737,009738,009739,009740,009741,009742,009743,009744,009745,009746,009747,009748,009749,009750,009751,009752,009753,009754,009755,009756,009757,009758,009759,009760,009761,009762,009763,009764,009765,009766,009767,009768,009769,009770,009771,009772,009773,009774,009775,009776,009777,009778,009779,009927,009928,009929,009930,009931,009932,009933,009934,009935,009936,009937,009938,009939,009940,009941,009942,009943,009944,009945,009946,009947,009948,009949,009950,009951,009952,009953,009954,009955,009956,009957,009958,009959,009960,009961,009962,009963,009964,009965,009966,009967,009968,009969,009990,009992,010005,010006,010007,010008,010009,010010,010011,010012,010013,010014,010015,010016,010534,010535,010536,010537,010538,010539,010540,010541,010542,010543,010544,010545,010546,010547,010548,010549,010550,010551,010552,010553,010554,010555,010556,010557,010558,010559,010560,010831,010832,010833,010834,010835,010836,010837,010838,010839,010840,010841,010842,010843,010844,010845,010846,010847,010848,010849,010850,010851,010852,010853,010854,010855,010856,010857,010858,010859,010860,010861,010862,010863,010864,010865,010866,010867,010868,010869,010870,010871,010872,010873,010874,010875,010876,010877,010878,010879,010880,010881,010882,010883,010884,010885,010886,010887,010888,010889,010890,010891,010892,010893,010894,010895,010896,010897,010898,010899,010900,010901,010902,010903,030022,030071 \ No newline at end of file diff --git a/工具/题号选题pdf生成.ipynb b/工具/题号选题pdf生成.ipynb index 58239068..9cfd0f44 100644 --- a/工具/题号选题pdf生成.ipynb +++ b/工具/题号选题pdf生成.ipynb @@ -26,7 +26,7 @@ "\"\"\"---设置题目列表---\"\"\"\n", "#留空为编译全题库, a为读取临时文件中的题号筛选.txt文件生成题库\n", "problems = r\"\"\"\n", - "30119,1682,30120,30115,30125,30127,30121,1695,207,9191,9200,30117,30122,7379,1697,1700,1704,3984,9227,198,214,9716,10510,30128,197,9202,1712,9717,30124,30139,10523,30116,30142,203,9239,10531,30130,30131,3996,9412,10529,3982,30126,30137,\n", + "a\n", "\n", "\"\"\"\n", "\"\"\"---设置题目列表结束---\"\"\"\n", @@ -88,7 +88,7 @@ "if problems.strip() == \"\":\n", " problem_list = list(pro_dict.keys())\n", "elif problems.strip()[0] == \"a\":\n", - " with open(\"临时文件/题号筛选.txt\",\"r\",encoding = \"utf8\") as f:\n", + " with open(\"文本文件/题号筛选.txt\",\"r\",encoding = \"utf8\") as f:\n", " problems = f.read()\n", " problem_list = [id for id in generate_number_set(problems.strip(),pro_dict) if id in pro_dict]\n", "else:\n", @@ -174,7 +174,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.9.7 ('base')", + "display_name": "Python 3.8.8 ('base')", "language": "python", "name": "python3" }, @@ -188,12 +188,12 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.8.8" }, "orig_nbformat": 4, "vscode": { "interpreter": { - "hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba" + "hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac" } } }, diff --git a/题库0.3/Problems.json b/题库0.3/Problems.json index d13a285f..f2a5574f 100644 --- a/题库0.3/Problems.json +++ b/题库0.3/Problems.json @@ -89157,7 +89157,7 @@ }, "003534": { "id": "003534", - "content": "已知复数z满足$|z-3+4\\mathrm{i}|=2$,\\\\\n(1) 求$|z+1|$的取值范围;\\\\\n(2) 求出使$|z+1|$取最大值的$z$的值.", + "content": "已知复数$z$满足$|z-3+4\\mathrm{i}|=2$,\\\\\n(1) 求$|z+1|$的取值范围;\\\\\n(2) 求出使$|z+1|$取最大值的$z$的值.", "objs": [ "K0514007B" ], @@ -90391,7 +90391,7 @@ "content": "某学校组织学生参加英语测试, 成绩的频率分布直方图如图所示, 数据的分组依$[20,40)$, $[40,60)$, $[60,80)$, $[80,100)$, 若低于$60$分的人数是$15$人, 则该班的学生人数是\\blank{50}.\n\\begin{center}\n\\begin{tikzpicture}[>=latex, line cap = round, line join = round, scale = 1.2]\n \\draw [->] (-2,0) -- (6.5,0) node [below] {成绩(分)};\n \\draw [->] (0,-1) -- (0,3) node [left] {$\\dfrac{\\text{频率}}{\\text{组距}}$};\n \\draw (0,0) node [below left] {$O$};\n \\draw (1,0) -- (1,0.5) -- (2,0.5);\n \\draw (2,0) -- (2,1) -- (3,1);\n \\draw (3,0) -- (3,2) -- (4,2) -- (4,0);\n \\draw (4,1.5) -- (5,1.5) -- (5,0);\n \\draw [dashed] (0,0.5) -- (1,0.5) (0,1) -- (2,1) (0,1.5) -- (4,1.5) (0,2) -- (3,2);\n \\foreach \\i in {20,40,...,100}\n \\draw ({\\i/20},0) node [below] {$\\i$};\n \\foreach \\i in {0.005,0.01,0.015,0.02}\n \\draw (-1.2,{\\i*100}) node [right] {$\\i$};\n\\end{tikzpicture}\n\\end{center}", "objs": [], "tags": [ - "第八单元" + "第九单元" ], "genre": "填空题", "ans": "",