forked from mrlan/EnglishPal
				
			Merge pull request 'BugFix293' (#14) from BugFix293 into master
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/14Lanhui-Selenium
						commit
						6754930707
					
				|  | @ -99,6 +99,7 @@ def get_today_article(user_word_list, articleID): | |||
|         rq.instructions('SELECT * FROM article WHERE article_id=%d' % (articleID)) | ||||
|     rq.do() | ||||
|     result = rq.get_results() | ||||
|     random.shuffle(result) | ||||
|      | ||||
|     # Choose article according to reader's level | ||||
|     d1 = load_freq_history(path_prefix + 'static/frequency/frequency.p') | ||||
|  | @ -114,8 +115,7 @@ def get_today_article(user_word_list, articleID): | |||
|     if articleID == None: | ||||
|         for reading in result: | ||||
|             text_level = text_difficulty_level(reading['text'], d3) | ||||
|             #print('TEXT_LEVEL %4.2f' % (text_level)) | ||||
|             if within_range(text_level, user_level, 0.5): | ||||
|             if within_range(text_level, user_level, (8.0 - user_level)*0.8): | ||||
|                 d = reading | ||||
|                 break | ||||
|              | ||||
|  |  | |||
							
								
								
									
										2
									
								
								build.sh
								
								
								
								
							
							
						
						
									
										2
									
								
								build.sh
								
								
								
								
							|  | @ -10,7 +10,7 @@ sudo docker rm EnglishPal | |||
| sudo docker build -t englishpal . | ||||
| 
 | ||||
| # Run the application | ||||
| sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -t englishpal  # for permanently saving data | ||||
| sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -v /home/lanhui/englishpal/app/static/:/app/static/ -t englishpal  # for permanently saving data | ||||
| 
 | ||||
| # Save space.  Run it after sudo docker run | ||||
| sudo docker system prune -a -f | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue