diff --git a/app/Article.py b/app/Article.py index e0f006a..ba253c9 100644 --- a/app/Article.py +++ b/app/Article.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- from WordFreq import WordFreq from wordfreqCMD import youdao_link, sort_in_descending_order from UseSqlite import InsertQuery, RecordQuery diff --git a/app/Login.py b/app/Login.py index db4df18..f8fc04b 100644 --- a/app/Login.py +++ b/app/Login.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- import hashlib import string from datetime import datetime, timedelta diff --git a/app/Yaml.py b/app/Yaml.py index 00974aa..7f6d992 100644 --- a/app/Yaml.py +++ b/app/Yaml.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- ''' Yaml.py 配置文件包括: diff --git a/app/difficulty.py b/app/difficulty.py index 50aa179..7d1b7bf 100644 --- a/app/difficulty.py +++ b/app/difficulty.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- ########################################################################### # Copyright 2019 (C) Hui Lan # Written permission must be obtained from the author for commercial uses. diff --git a/app/pickle_idea2.py b/app/pickle_idea2.py index 4055fc4..a4f17a4 100644 --- a/app/pickle_idea2.py +++ b/app/pickle_idea2.py @@ -68,7 +68,7 @@ def save_frequency_to_pickle(d, pickle_fname): d2 = {} for k in d: if not k in exclusion_lst and not k.isnumeric() and not len(k) < 2: - d2[k] = list(sorted(set(d[k]))) + d2[k] = list(sorted(d[k])) # This code sorts the values of the dictionary 'd' associated with the key 'k' and assigns the resulting sorted list to the key 'k' in the dictionary 'd2'. However, it does not remove duplicates from the original list, which means that it keeps track of all counts even when the same value is clicked multiple times in a row. pickle.dump(d2, f) f.close() diff --git a/app/wordfreqCMD.py b/app/wordfreqCMD.py index e56ba0c..2526cef 100644 --- a/app/wordfreqCMD.py +++ b/app/wordfreqCMD.py @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- ########################################################################### # Copyright 2019 (C) Hui Lan # Written permission must be obtained from the author for commercial uses.