main
HuangHai 1 week ago
parent 904a50fb0b
commit bc4293ebb2

@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.10 (6)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="D:\anaconda3\envs\py310" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="D:\anaconda3\envs\lightrag" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (6)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="D:\anaconda3\envs\py310" project-jdk-type="Python SDK" />
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

@ -0,0 +1,57 @@
import base64
import json
import urllib.request
ENCODING = 'utf-8'
def get_img_base64(img_file):
with open(img_file, 'rb') as infile:
s = infile.read()
return base64.b64encode(s).decode(ENCODING)
def predict(url, appcode, img_base64, kv_configure):
param = {}
param['image'] = img_base64
if kv_configure is not None:
param['configure'] = json.dumps(kv_configure)
body = json.dumps(param)
data = bytes(body, "utf-8")
headers = {'Authorization': 'APPCODE %s' % appcode}
request = urllib.request.Request(url=url, headers=headers, data=data)
try:
response = urllib.request.urlopen(request, timeout=10)
return response.code, response.headers, response.read()
except urllib.request.HTTPError as e:
return e.code, e.headers, e.read()
def demo():
AppKey = '204917800'
AppSecret = 'rmIcdp5is0hM2e4KBC3Ned9aFGBYGU2F'
AppCode = '3a9b1eeacf6a4a7c9b6f3157feb61fa7'
url = 'https://form.market.alicloudapi.com/api/predict/ocr_table_parse'
img_file = '1.png'
# configure = {'side': 'face'}
# 如果没有configure字段configure设为None
# configure = None
configure = {"format": "html", "dir_assure": False, "line_less": True}
img_base64data = get_img_base64(img_file)
stat, header, content = predict(url, AppCode, img_base64data, configure)
if stat != 200:
print('Http status code: ', stat)
print('Error msg in header: ', header['x-ca-error-message'] if 'x-ca-error-message' in header else '')
print('Error msg in body: ', content)
exit()
result_str = content
print(result_str.decode(ENCODING))
# result = json.loads(result_str)
if __name__ == '__main__':
demo()

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="D:\anaconda3\envs\raganything" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="D:\anaconda3\envs\raganything" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="D:\anaconda3\envs\raganything" project-jdk-type="Python SDK" />
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/dsOcr.iml" filepath="$PROJECT_DIR$/.idea/dsOcr.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

@ -0,0 +1,35 @@
| | | | |
| --------- | -------------------- | ---- | ----- |
| 一批次666 | 东北师范大学附属中学 | 统招 | 721.6 |
| | 长春市十一高 | 统招 | 710.1 |
| | 长春市二中 | 统招 | 697 |
| | 吉林省实验中学 | 统招 | 690.1 |
| | 长春外国语 | 统招 | 689.6 |
| | 长春市第二实验 | 统招 | 682.1 |
| | 长春市实验 | 统招 | 676.8 |
| | 长春市六中 | 统招 | 666 |
| | 长春汽车厂六中 | 统招 | 666 |
| 二批次586 | 师大青华 | 私立 | 705.6 |
| | 吉大 | 私立 | 701.1 |
| | 二中精致 | 私立 | 687.3 |
| | 八中 | 统招 | 677 |
| | 五中 | 统招 | 664 |
| | 省实验繁荣 | 私立 | 662.3 |
| | 希望 | 统招 | 651.4 |
| | 师大净月慧泽 | 私立 | 651 |
| | 北师大博硕 | 私立 | 646.9 |
| | 十七中 | 统招 | 643.3 |
| | 汽三 | 统招 | 637.6 |
| | 一中 | 统招 | 633.5 |
| | 北湖 | 私立 | 630.5 |
| | 二十九中 | 统招 | 624.8 |
| | 养正 | 统招 | 623.3 |
| | 十中 | 统招 | 620.5 |
| | 文理 | 私立 | 616.4 |
| | 七中 | 统招 | 614.4 |
| | 朝中 | 统招 | 613.8 |
| | 一三七中学 | 统招 | 611.8 |
| | 解放 | 私立 | 608.2 |
| | 力旺 | 私立 | 586 |
| | 日章学园 | 私立 | 586 |
| | 清浦 | 私立 | 586 |

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

@ -0,0 +1,5 @@
私有化部署MinerU 与应用实践
https://article.juejin.cn/post/7490746158648475657
在线解析图片
https://mineru.net/OpenSourceTools/Extractor

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

@ -0,0 +1,7 @@
长春市2025年中考各批次录取最低控制线确定如下
第一批次城区普通高中 689分
第二批次城区普通高中 590分
第三批次城区普通高中 573分
中等职业学校的综合高中班录取不低于第三批次城区普通高中最低控制线下60分。
来源:长春市教育考试院
Loading…
Cancel
Save