All Projects → moremind → AutoAddProblem

moremind / AutoAddProblem

Licence: MIT License
qduoj自动化加题-该项目已经停止更新

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to AutoAddProblem

tiny-autocomplete
A small and snappy (2k minified+gzipped!) JavaScript autocomplete plugin for Zepto and jQuery
Stars: ✭ 33 (+43.48%)
Mutual labels:  autocomplete
frontal
An Angular select/dropdown component
Stars: ✭ 20 (-13.04%)
Mutual labels:  autocomplete
autocomplete
Efficient and effective query auto-completion in C++.
Stars: ✭ 28 (+21.74%)
Mutual labels:  autocomplete
react-native-dropdown-autocomplete
Autocomplete input with dropdown modal component for React native. Useful for pages with multiple autocomplete's.
Stars: ✭ 97 (+321.74%)
Mutual labels:  autocomplete
lsp signature.nvim
LSP signature hint as you type
Stars: ✭ 915 (+3878.26%)
Mutual labels:  autocomplete
clui
A command system with extra steps
Stars: ✭ 18 (-21.74%)
Mutual labels:  autocomplete
psonic
Sonic is a super fast auto suggestion engine built by the team at crisp.chat, a customer engagement platform. its built in Rust and they officially support a javascript client, but if you want to use sonic via php, this is the library that you can look for. Completely unit tested, and adheres to modern coding standards, and offers a clean api to…
Stars: ✭ 90 (+291.3%)
Mutual labels:  autocomplete
Alter-Entity-Autocomplete
Drupal 8 module to alter Entity Autocomplete suggestion list.
Stars: ✭ 38 (+65.22%)
Mutual labels:  autocomplete
prosemirror-autocomplete
Autocomplete suggestions for ProseMirror
Stars: ✭ 23 (+0%)
Mutual labels:  autocomplete
config
Fig's integrations with bash, zsh, fish, ssh, and tmux. Also contains Fig's installation and update scripts. Finally, this repo is the root of the .fig folder that is installed on your computer when you download Fig!
Stars: ✭ 44 (+91.3%)
Mutual labels:  autocomplete
extensions
Angular Material Extensions Library.
Stars: ✭ 203 (+782.61%)
Mutual labels:  autocomplete
go-getoptions
Fully featured Go (golang) command line option parser with built-in auto-completion support.
Stars: ✭ 41 (+78.26%)
Mutual labels:  autocomplete
tabnine-vim
Vim client for TabNine. https://vimawesome.com/plugin/tabnine-vim
Stars: ✭ 652 (+2734.78%)
Mutual labels:  autocomplete
EasyGoServer
一个能够仅仅依赖你创建好的 sql 文件,就能 自动帮你生成基础服务端框架代码 的 go server 框架
Stars: ✭ 49 (+113.04%)
Mutual labels:  autocomplete
vue-thailand-address
🇹🇭 Thai address input for Vue.
Stars: ✭ 44 (+91.3%)
Mutual labels:  autocomplete
SwitchCaseGenerator
An Xcode Source Editor Extension that generates a swift switch case statement based on selected enum cases
Stars: ✭ 63 (+173.91%)
Mutual labels:  autocomplete
autocomplete
Simple accessible autocomplete for vanilla javacript with support for remote & local data, ~3KB gzip
Stars: ✭ 38 (+65.22%)
Mutual labels:  autocomplete
pico8-emmylua-definitions
EmmyLua intellisense definitions for PICO-8
Stars: ✭ 25 (+8.7%)
Mutual labels:  autocomplete
vanilla-place-picker
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android
Stars: ✭ 113 (+391.3%)
Mutual labels:  autocomplete
nama
Namespaced Aliases: organize and easily find aliases using autocomplete & namespacing
Stars: ✭ 26 (+13.04%)
Mutual labels:  autocomplete

BZOJ数据:链接: https://pan.baidu.com/s/1ug7XIaOKxHPyZHV4iNxS8Q?pwd=uyj9 提取码: uyj9 复制这段内容后打开百度网盘手机App,操作更方便哦

缘由

QDUOJ的开发以及众多OJ的题库,使得我们自动化添加题目更加轻松。前提是您需要获得各OJ的测试数据。请注意本方法只用在您的机器上运行即可,不用再OJ服务器运行!

概况

目前主要模块分为

  • 爬虫部分-WebSpider
  • 自动化加题部分-AddProblem

用了爬虫scrapy,并且爬虫获取到的数据相对而言文档更容易解析与添加。如果您能够通过pandoc转文件后,将文本提取出来也可以。

需要安装的软件

  • Python3.6
  • MongoDB(V3.4)
  • MongoDB 客户端工具-推荐使用RoBo 3T

Mongo安装教程:mongo安装(教程源于-李子园的梦想)

数据(某OJ数据&已经解压完成的)

1000-1999-Testcase数据链接:https://pan.baidu.com/s/1SvCgulQt8rn8m7w0cbMExQ 密码:jg7m

2000-2499-Testcase数据链接:https://pan.baidu.com/s/1tgr1M-VsRrzaEjXPmA3NCA 密码:4mpf

2500-2999-Testcase数据链接:https://pan.baidu.com/s/1X3HVJTGCFhHo-p6R_G0sSw 密码:scgq

3000-3499-Testcase数据链接:https://pan.baidu.com/s/1KjosY3Sr7XbSqbZo4Cdfkg 密码:rdr4

3500-3999-Testcase数据链接:https://pan.baidu.com/s/16eJWeheUgKJeuQDGVSKHuw 密码:goii

4000-4499-Testcase数据连接:https://pan.baidu.com/s/1Yt-MZHvDPGtQooUgt9yJ1Q 密码:1pu0

4500-4999-Testcase数据连接:https://pan.baidu.com/s/1Dz9bDHzkpsx9jOxHSp2IeQ 密码:tv9g

题目数据

https://finen-1251602255.cos.ap-shanghai.myqcloud.com/file/bzoj_problem.zip

您可以直接通过MongoDB将将该数据导入到您的Mongo中。 导入命令如下:

linux下可以使用:mongorestore -d <db_name> <bson_folder>
windows下可以使用:mongorestore.exe -d <db_name> <bson_folder>

windows下: mongorestore.exe -d bzoj D:\Mongo\bin\dump\bzoj_problem\problem.bson
linux下: mongorestore -d bzoj /usr/DB/bzoj_problem/problem.bson

如果您对爬虫有兴趣可以参看1.0版本进行对题目数据进行爬取。 https://github.com/hirCodd/AutoAddProblem/blob/master/README_1.0.md

图片位置

在本项目中已经提供BZOJ,所以您可以直接在BZOJ解压包中看到JudgeOnline找到upload以及images两个图片目录,你只需要将这个两个目录复制到已经部署好的qduoj的public目录下即可。 dir

安装自动加题所需要的库

  1. webdriver
  2. selenium
  3. pymongo

安装方法:

pip install selenium
pip install pymongo

webdriver下载地址:chromedriver webdriver放置位置如下:

webdriver

  • 执行自动加题

也需要修改您的url以及mongoDB配置,以及OJ的管理员的用户名、密码。

  1. url在add_problem.py
  2. MongoDB配置在settings.py
  3. OJ用户名以及密码在config.py
  4. 修改zip_dir = "E:\Problem\Testcase\ok"为您重新压缩后的目录。
  • 执行:python add_problem.py

某些bug

  • 因为BZOJ数据问题,可能导致添加题目突然中止,你可能需要执行删除数据库文档的命令,然后重新执行:python add_problem.py即可再次添加题目。

在delete.py中,你需要修改count的值以及for循环的值,删除已经添加得文档。示例如下:

# 删除编号自1200开始,至1245的所有文档数据
for i in range(0, 46):
    count = 1200
    count = count+i
    print(count)
    db.problem.delete_one({"problem_no": str(count)})

oj oj1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].