| 
														
															@@ -6,7 +6,7 @@ import json 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from tqdm import tqdm 
														 | 
														
														 | 
														
															 from tqdm import tqdm 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from pandas import DataFrame 
														 | 
														
														 | 
														
															 from pandas import DataFrame 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from argparse import ArgumentParser 
														 | 
														
														 | 
														
															 from argparse import ArgumentParser 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-from datetime import datetime, timedelta 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+from datetime import datetime 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from applications import DeNetMysql, PQMySQL, longArticlesMySQL, bot, Functions 
														 | 
														
														 | 
														
															 from applications import DeNetMysql, PQMySQL, longArticlesMySQL, bot, Functions 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from applications.const import updateAccountReadRateTaskConst 
														 | 
														
														 | 
														
															 from applications.const import updateAccountReadRateTaskConst 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -14,9 +14,9 @@ from config import apolloConfig 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const = updateAccountReadRateTaskConst() 
														 | 
														
														 | 
														
															 const = updateAccountReadRateTaskConst() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 config = apolloConfig() 
														 | 
														
														 | 
														
															 config = apolloConfig() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-unauthorized_account = json.loads(config.getConfigValue("unauthed_account_fans")) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+unauthorized_account = json.loads(config.getConfigValue("unauthorized_gh_id_fans")) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 functions = Functions() 
														 | 
														
														 | 
														
															 functions = Functions() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-read_rate_table = "long_articles_read_rate" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+read_rate_table = "long_articles_read_rate_dev" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 def filter_outlier_data(group, key='show_view_count'): 
														 | 
														
														 | 
														
															 def filter_outlier_data(group, key='show_view_count'): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -150,8 +150,7 @@ def cal_account_read_rate(gh_id_tuple) -> DataFrame: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         dt = functions.timestamp_to_str(timestamp=line['publish_timestamp'], string_format='%Y-%m-%d') 
														 | 
														
														 | 
														
															         dt = functions.timestamp_to_str(timestamp=line['publish_timestamp'], string_format='%Y-%m-%d') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         fans = fans_dict_each_day.get(gh_id, {}).get(dt, 0) 
														 | 
														
														 | 
														
															         fans = fans_dict_each_day.get(gh_id, {}).get(dt, 0) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if not fans: 
														 | 
														
														 | 
														
															         if not fans: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            account_name = line['accountName'] 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            fans = int(unauthorized_account.get(account_name, 0)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fans = int(unauthorized_account.get(gh_id, 0)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         line['fans'] = fans 
														 | 
														
														 | 
														
															         line['fans'] = fans 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if fans > 1000: 
														 | 
														
														 | 
														
															         if fans > 1000: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             line['readRate'] = line['show_view_count'] / fans if fans else 0 
														 | 
														
														 | 
														
															             line['readRate'] = line['show_view_count'] / fans if fans else 0 
														 |