李梦蝶
e3d646c10c
Fix bug476
2024-05-27 21:22:56 +08:00
Lan Hui
d2f30daab1
Use PonyORM instead of class RecordQuery from UseSqlite.py. Incorporated changes from Pull Request 91 contributed by He Zhengzheng.
2023-08-12 15:29:12 +08:00
Lan Hui
ed1d0fd714
Show only one place after the decimal point.
2023-08-11 21:02:22 +08:00
Lan Hui
1b211f107d
Speed up loading next article
...
The key change is replacing "d1 = load_freq_history(path_prefix + 'static/frequency/ferquency.p)" with "d1 = load_freq_history(user_word_list)"
in function get_today_article() from Article.py. Now, with a user_word_list of size about 500, the next article can be loaded within 100ms.
The new d1 is much smaller than the old one, therefore the following computation "d3 = get_difficulty_level_for_user(d1, d2)" is much faster.
The students did not feel that loading next article is slow; this is because their frequency.p is quite small.
Also log information in app/log.txt
2023-08-11 11:59:48 +08:00
Lan Hui
06f896a33a
Update .gitignore
2023-08-10 15:22:30 +08:00
Hui Lan
dca76969eb
解决程序源文件更新了,但是 docker container 中的程序源文件没有更新的问题
...
问题出在 build.sh 中的 --mount type=volume,src=englishpal-db,target=/app 。
运行 docker container 时,会将整个 englishpal-db 对应的文件夹 /var/lib/docker/volumes/englishpal-db/_data
下面的内容拷贝到 docker container 里面的 /app 文件夹下面。
然而,/var/lib/docker/volumes/englishpal-db/_data 下面的源程序文件并不是最新的(比如其 main.py 是 7月17日的)。
将 target=/app 改为 target=/app/db。即可解决问题。
2023-08-10 14:19:37 +08:00
徐宣
f40a388277
Fix: Move wordfreqapp.db to new location
2023-06-19 14:48:35 +08:00
俞黄焘
39d96014d9
pull最新的snapshot-20230511,后更新了difficulty.py和Article.py的部分代码,提交了新的pickle文件
2023-05-18 23:29:38 +08:00
王梓铭
d30a434b2a
修改变量名had_read_articles->visited_articles
2023-04-25 17:47:51 +08:00
王梓铭
6be035f282
修复当没有找到文章或者文章读完时,直接刷新页面或者session不关闭重新进入页面,导致的错误;
2023-04-25 11:38:01 +08:00
王梓铭
03145b57d9
修复边界值问题(当刚开始就没有找到文章或者就根本被没有文章的时候,会出现上一篇按钮)
2023-04-21 02:36:51 +08:00
王梓铭
70917df47b
删除测试代码
2023-04-20 23:15:12 +08:00
王梓铭
8f132ed87b
添加了阅读完所有文章的提示
2023-04-20 22:53:30 +08:00
王梓铭
16de0a7fd9
修改变量命名:existing_articles → had_read_articles
2023-04-20 15:40:11 +08:00
王梓铭
15bb925024
将记录阅读过文章的数据结果改为字典,以及修改了flag的问题
2023-04-04 22:31:53 +08:00
Hui Lan
4417cf7017
Article.py: remove debug statement.
2023-03-30 16:10:22 +08:00
王梓铭
0c16a4dc6f
判断文章是否已经出现的语句写错位置了,改正下
2023-03-29 20:53:38 +08:00
王梓铭
944c931c9b
完成了对bug509的修复,以及重构项目(去掉了业务中的前端脚本)
2023-03-08 16:33:13 +08:00
李凯
4817557099
更新 'app/Article.py'
2022-06-11 23:20:41 +08:00
Lan Hui
18dfad910b
Use named style for sqlite3 execute()
2022-01-27 17:01:03 +08:00
Lan Hui
4d2dd2b68e
Repalce old app folder with SoftArch王炫/english-pal-master/app/
2022-01-26 21:10:09 +08:00