20230118 afternoon 录入22届第二轮讲义
This commit is contained in:
parent
bb5be75cee
commit
215ed72021
|
|
@ -19,7 +19,7 @@
|
|||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\"\"\"这里编辑题号(列表)后将在vscode中打开窗口, 编辑后保存关闭, 随后运行第二个代码块\"\"\"\n",
|
||||
"problems = \"31188\"\n",
|
||||
"problems = \"12671\"\n",
|
||||
"\n",
|
||||
"def generate_number_set(string,dict):\n",
|
||||
" string = re.sub(r\"[\\n\\s]\",\"\",string)\n",
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.15"
|
||||
"version": "3.8.15 (default, Nov 24 2022, 14:38:14) [MSC v.1916 64 bit (AMD64)]"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"首个空闲id: 12760 , 直至 020000\n",
|
||||
"首个空闲id: 13287 , 直至 020000\n",
|
||||
"首个空闲id: 21441 , 直至 030000\n",
|
||||
"首个空闲id: 31204 , 直至 999999\n"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#修改起始id,出处,文件名\n",
|
||||
"starting_id = 12760\n",
|
||||
"origin = \"2023届静安区一模\"\n",
|
||||
"filename = r\"C:\\Users\\weiye\\Documents\\wwy sync\\临时工作区\\静安一模.tex\"\n",
|
||||
"editor = \"20230110、3\\t王伟叶\"\n",
|
||||
"indexed = True\n"
|
||||
"starting_id = 12781\n",
|
||||
"origin = \"2022届高三第二轮复习讲义\"\n",
|
||||
"filename = r\"C:\\Users\\weiye\\Documents\\wwy sync\\临时工作区\\第二轮讲义转码.tex\"\n",
|
||||
"editor = \"20230118\\t王伟叶\"\n",
|
||||
"indexed = False\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
@ -256,7 +256,7 @@
|
|||
" text1 = re.sub(\"\\{[\\s]+?\",\"{\",text1)\n",
|
||||
" text1 = re.sub(\"[\\s]+?\\}\",\"}\",text1)\n",
|
||||
" #填空题的处理\n",
|
||||
" text1 = re.sub(\"[ _]{2,}\",r\"\\\\blank{50}\",text1)\n",
|
||||
" # text1 = re.sub(\"[ _]{2,}\",r\"\\\\blank{50}\",text1)\n",
|
||||
" #选择题的处理\n",
|
||||
" text1 = re.sub(r\"\\(\\\\blank\\{50\\}\\)\",\"\\\\\\\\bracket{20}\",text1)\n",
|
||||
" text1 = re.sub(r\"\\([\\s]{1,10}\\)\",\"\\\\\\\\bracket{20}\",text1)\n",
|
||||
|
|
@ -264,8 +264,8 @@
|
|||
" text1 = re.sub(\",[ ]*\",\", \",text1)\n",
|
||||
" text1 = re.sub(r\"\\.\\}\",\"}\",text1)\n",
|
||||
" text1 = re.sub(r\"\\n\\d{1,3}\\.\",r\"\\n\\\\item \",text1)\n",
|
||||
" text1 = re.sub(r\"\\s{2,}\\.\",r\"\\\\blank{50}.\",text1)\n",
|
||||
" text1 = re.sub(r\"\\s{2,}\\,\",r\"\\\\blank{50},\",text1)\n",
|
||||
" # text1 = re.sub(r\"\\s{2,}\\.\",r\"\\\\blank{50}.\",text1)\n",
|
||||
" # text1 = re.sub(r\"\\s{2,}\\,\",r\"\\\\blank{50},\",text1)\n",
|
||||
" text1 = re.sub(r\"\\\\bracket\\{20\\}\\n\",r\"\\\\bracket{20}.\\n\",text1)\n",
|
||||
" modified_texts.append(text1)\n",
|
||||
"\n",
|
||||
|
|
@ -274,6 +274,9 @@
|
|||
" #合并一些公式中的无效空格\n",
|
||||
" for i in range(2):\n",
|
||||
" equation1 = re.sub(r\"([0-9A-Z])\\s+([0-9A-Z])\",lambda x:x.group(1)+x.group(2),equation1)\n",
|
||||
" #改变组合数和排列数\n",
|
||||
" equation1 = re.sub(r\"([CP])(_[^_\\^]{,5}\\^)\",lambda x:r\"\\mathrm{\"+x.group(1)+\"}\"+x.group(2),equation1)\n",
|
||||
" \n",
|
||||
" modified_equations.append(equation1)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
|
@ -307,7 +310,7 @@
|
|||
"modified_data = modified_data.replace(r\"\\vec\",r\"\\overrightarrow \")\n",
|
||||
"modified_data = modified_data.replace(r\"\\bar\",r\"\\overline \")\n",
|
||||
"#mathpix的极限修改\n",
|
||||
"modified_data = modified_data.replace(r\"\\lim[\\s]*_{n \\rightarrow \\infty}\",r\"\\displaystyle\\lim_{n\\to\\infty}\")\n",
|
||||
"modified_data = re.sub(r\"\\\\lim[\\s]*_\\{n \\\\to \\\\infty\\}\",r\"\\\\displaystyle\\\\lim_{n\\\\to\\\\infty}\",modified_data)\n",
|
||||
"#mathpix的顿号修改\n",
|
||||
"modified_data = modified_data.replace(r\" 、 \",r\"$、$\")\n",
|
||||
"#改slant等\n",
|
||||
|
|
|
|||
9662
题库0.3/Problems.json
9662
题库0.3/Problems.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue