20221013 morning

This commit is contained in:
weiye.wang 2022-10-13 06:48:30 +08:00
parent dae232ce42
commit cd8958986f
4 changed files with 12 additions and 104 deletions

View File

@ -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 <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. View Jupyter <a href='command:jupyter.viewOutput'>log</a> 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,

File diff suppressed because one or more lines are too long

View File

@ -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"
}
}
},

View File

@ -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": "",