{"id":13648283,"url":"https://github.com/OIerDb-ng/OIer","last_synced_at":"2025-04-22T07:31:11.489Z","repository":{"id":37571728,"uuid":"121328643","full_name":"OIerDb-ng/OIer","owner":"OIerDb-ng","description":"A database for OIers","archived":false,"fork":false,"pushed_at":"2023-08-25T12:58:57.000Z","size":101190,"stargazers_count":592,"open_issues_count":17,"forks_count":61,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-08-03T01:38:31.565Z","etag":null,"topics":["noi","oier","py-csv"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OIerDb-ng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-13T02:21:40.000Z","updated_at":"2024-05-27T06:41:51.000Z","dependencies_parsed_at":"2022-07-15T21:47:58.525Z","dependency_job_id":"20365c44-0283-4b53-bf24-e3a296594432","html_url":"https://github.com/OIerDb-ng/OIer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OIerDb-ng%2FOIer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OIerDb-ng%2FOIer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OIerDb-ng%2FOIer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OIerDb-ng%2FOIer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OIerDb-ng","download_url":"https://codeload.github.com/OIerDb-ng/OIer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223892364,"owners_count":17220745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["noi","oier","py-csv"],"created_at":"2024-08-02T01:04:06.646Z","updated_at":"2024-11-09T22:31:38.379Z","avatar_url":"https://github.com/OIerDb-ng.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/WZKSDN/OIer/raw/master/on_server/assets/logo-white.png\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eOIerDb\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eOIerDb is a database for Chinese OI participants.\u003c/p\u003e\n\u003cp align=\"center\"\u003eOIerDb 是中国信息学竞赛选手的一个数据库.\u003c/p\u003e\n\n\u003e A next generation OIerDb is now available at [OIerDb-ng/OIerDb](https://github.com/OIerDb-ng/OIerDb).\n\n\u003e 新版 OIerDb 现已推出，请前往 [OIerDb-ng/OIerDb](https://github.com/OIerDb-ng/OIerDb) 查看。\n\n### 如何订正数据\n\n[请点我了解数据修复](https://github.com/nocrizwang/OIer/wiki/如何订正数据)\n\n### The following data are the unlicensed data gathered and formatted by fjzzq2002 from noi.cn. These data are modified and completed.\n- CTSC 2010-2017\n- APIO 2010-2017\n- NOI 2010-2017\n- NOI D类 2014-2017\n- WC 2015-2017\n- NOIP 2013-2017\n\n### The rest of the data are directly from noi.cn, including:\n\n- CTSC 2018-2019\n- APIO 2018-2019\n- NOI 2009 / 2018-2019\n- NOI type D 2010-2013 / 2018-2019\n- WC 2018-2019\n- NOIP 2010-2012 (not complete) / 2018\n\n\n\n### 这些数据是在开源项目中，由fjzzq2002整理的，并进行了部分完善\n- CTSC 2010-2017\n- APIO 2010-2017\n- NOI 2010-2017\n- NOI D类 2014-2017\n- WC 2015-2017\n- NOIP 2013-2017\n\n### 其余数据来源于NOI官网，包括\n\n- CTSC 2018-2019\n- APIO 2018-2019\n- NOI 2009 / 2018-2019\n- NOI 非ABC类选手 2010-2013 / 2018-2019\n- WC 2018-2019\n- NOIP 2010-2012 (提高组一等奖) / 2018\n\n将来会及时更新新数据，也可能会添加缺失数据。\n## 捐赠记录\n\n|日期 |金额 |备注 |\n| -----------: | -----------: | -----------: |\n|2019-03-07 |20.00元 |杭心语 北京大学 |\n|2019-03-09 |20.00元 |无 |\n|2019-03-10 |10.00元 |无 |\n|2019-03-14 |6.66元 |无 |\n|2019-03-15 |10.00元 |小伙子加油啊 |\n|2019-03-16 |5.00元 |Level -1 |\n|2019-03-18 |10.00元 |无 |\n|2019-03-18 |6.00元 |无 |\n|2019-03-18 |9.99元 |白雪粉粉何所似 |\n|2019-03-21 |30.00元 |无 |\n|2019-03-22 |10.00元 |捐赠给OIerDb，并Orz |\n|2019-03-23 |17.00元 |无 |\n|2019-03-24 |10.00元 |资瓷oierdb！ |\n|2019-03-24 |100.00元 |oierdb捐助 |\n|2019-03-25 |6.00元 |备注能留的也太少了⑧ |\n|2019-03-25 |5.00元 |无 |\n|2019-03-28 |10.00元 |无 |\n|2019-03-29 |30.00元 |enor2017 |\n|2019-03-30 |5.00元 |无 |\n|2019-03-30 |23.33元 |Orz 无限仰慕作者 |\n|2019-04-02 |15.00元 |无 |\n|2019-04-02 |200.00元 |西安铁一中教练aqx |\n|2019-07-25 |10.00元 |无 |\n|2019-07-30 |10.00元 |无 |\n|2019-07-31 |3.50元 |@imikeliu 捐 |\n|2019-08-02 |20.00元 |oierdb |\n|2019-08-15 |10.00元 |无 |\n|2019-08-16 |10.00元 |无 |\n|2019-08-18 |5.00元 |无 |\n|2019-08-30 |1000.00元 |洛谷捐助 |\n|2019-09-06 |50.00元 |gbakkk5951 |\n|2019-09-25 |2.33元 |无 |\n|2019-09-25 |2.33元 |Github.com/panda2134 |\n|2019-09-26 |10.00元 |无 |\n|2019-10-01 |0.10元 |无 |\n|2019-10-12 |5.00元 |无 |\n|2019-10-28 |20.00元 |无 |\n|2019-11-01 |8.00元 |无 |\n|2019-11-10 |20.00元 |Andrew82 |\n|2019-11-13 |10.00元 |滋瓷之坤哥哥QwQ |\n|2019-11-29 |20.00元 |无 |\n|2019-12-07 |11.11元 |无 |\n|2019-12-07 |1.28元 |无 |\n|2019-12-11 |66.00元 |发个红包，加油！ |\n|2019-12-14 |10.00元 |无 |\n|2019-12-21 |10.00元 |无 |\n|2019-12-21 |1.00元 |无 |\n|2019-12-23 |10.24元 |无 |\n|2019-12-23 |20.20元 |wzk2020出线冲冲冲！ |\n|2020-01-19 |9.99元 |卑微果壳 |\n|2020-01-30 |5.00元 |无 |\n|2020-02-16 |1.00元 |无 |\n|2020-12-02 |10.00元 |Fighting~~~ |\n|2020-12-02 |5.00元 |无 |\n|2020-12-10 |100.00元 |yloi |\n|2020-12-16 |10.00元 |无 |\n|2021-01-25 |1.00元 |加油 |\n|2021-01-28 |5.00元 |无 |\n|2021-02-19 |100.00元 |无 |\n|2021-02-22 |20.21元 |无 |\n|2021-02-22 |99.82元 |来自蔡德仁的凝视 |\n|2021-02-22 |100.00元 |skyline |\n|2021-02-24 |10.22元 |For OIer Amethyst |\n|2021-02-25 |200.00元 |无 |\n|2021-02-25 |1.00元 |无  |\n|2021-03-06 |2.00元 |无  |\n|2021-03-14 |5.00元 |来自退役选手的感谢  |\n|2021-04-06 |6.66元 |才注意到能捐款  |\n|2021-04-10 |10.00元 |无  |\n|2021-04-13 |9.99元 |希望OIerDb能够长久  |\n|2021-05-10 |50.00元 |长沙  |\n|2021-05-23 |100.00元 |无  |\n|2021-06-01 |10.00元 |无  |\n|2021-06-03 |200.00元 |杨博洋 计蒜客  |\n|2021-06-07 |15.00元 |祝oierdb更好！  |\n|2021-06-16 |200.00元 |无  |\n|2021-06-28 |33.00元 |33DAI  |\n|2021-07-19 |50.00元 |a999999捐款50  |\n|2021-07-22 |10.00元 |OierBBS  |\n|2021-08-05 |666.00元 |左季初（压岁钱）捐款  |\n## 搭建指南\n\n这个项目是\"OIerDb\",但其实可以方便地改装成为任何一个学科竞赛获奖的数据库。项目由如下几部分组成：\n\n### 合并及数据预处理\n\n#### 原始数据文件\n\n##### data.txt\n\ndata.txt中是所有的获奖记录，实则为csv格式，每一行格式如下：\n\n`比赛名称,奖项,姓名,年级,学校,分数,省份,性别,`\n\n下面是一个例子\n\n`NOI2018,金牌,杨骏昭,高一,南京外国语学校,522,江苏,男,`\n\n需要注意的是，如果其中有一项缺省，逗号的数目不能减少，且每行最后还有一个逗号。\n\n##### school_oped.txt\n\nschool_oped.txt中是表示学校合并信息的文件，同时记录有学校所属的省份。每一行格式如下：\n\n`省份,地市,学校名称1,学校名称2,(更多学校名称，结尾无逗号)`\n\n下面是一个例子\n\n`江苏,苏州市,江苏省苏州中学,江苏省苏州中学校,苏州中学`\n\n需要注意，每一个在`data.txt`中出现的学校名称都应当在这个文件中出现。\n在`getter.py`中提供了一个基于百度地图api的从学校名称找定位的函数，通过这个函数可以初步地获得学校所在省份和地市，并合并一下定位相同的学校。这个效果并不充分，合并更多学校很大程度上基于人工判断，如果有人希望部署这个系统至其他位置，可参考本项目中`school_oped.txt`中做出的合并。\n\n#### 合并及数据处理脚本\n\n两个脚本均是`python3`脚本，并需要`pypinyin`才能够正常运行。\n\n##### new_merger.py\n\nnew_merger.py 是最重要的数据合并器。\n\nnew_merger.py 从 `data.txt` 和 `school_oped.txt` 读入数据，并输出csv格式到`result.txt`中。\n\n##### school_analyzer.py\n\nschool_analyzer.py 是学校获奖记录统计及排名器。\n\nnew_merger.py 从 `data.txt` 和 `school_oped.txt` 读入数据，并输出csv格式到`OI_school.txt`中。\n\n这个脚本将每个学校的获奖记录统计，并计算分数。分数由一个函数f(排名，比赛类型，比赛年份)得出\n\nf(排名，比赛类型，比赛年份) = 0.8 ^ (今年年份-比赛年份) * g(排名*400/总参赛人数) * 比赛权重\n\ng(x)在x = 0-60时为 100-40上的线性函数，x在60-250上为 36 - 7.5 上的线性函数，x在250-400上为7.5-0上的线性函数。\n\n`权重 = {\"NOI\":1,\"NOID类\":0.75,\"CTSC\":0.6,\"WC\":0.5,\"APIO\":0.4,\"NOIP提高\":0.1,\"NOIP普及\":0.04}`\n\n如果您有兴趣修改这个评分函数（或参数），请对比说明您的函数（或参数）的优越性。毕竟现在应用的也是一念之间的产物。\n\n### 在线部署\n\n[作者的部署](http://bytew.net/OIer)\n\n作者的部署使用了`MySQL`，但实际上您使用什么数据库都可以（尽管这里只提供了php格式的查询MySQL数据库并返回的代码）。在更新/新添加数据时，先运行数据预处理的脚本，而后将生成的csv格式数据导入到数据库中，就结束了。\n\n#### search.php 和 school.php\n\n根据查询查表，而后返回 json 格式的数据。您需要更改php中的数据库信息以适应自己的设置。具体实现可能不是很漂亮。\n\n欢迎您来作出贡献，提出意见和建议，或者自己搭一个玩玩。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOIerDb-ng%2FOIer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOIerDb-ng%2FOIer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOIerDb-ng%2FOIer/lists"}