We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flake8 testing of https://github.com/apachecn/AiLearning on Python 3.7.0
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./src/py3.x/dl/perceptron.py:192:22: F821 undefined name 'train_and_perceptron' and_perceptron = train_and_perceptron() ^ ./src/py3.x/16.RecommenderSystems/test_基于用户.py:74:28: F821 undefined name 'u' for v, wuv in sorted(W[u].items, key=itemgetter(1), reverse=True)[0:K]: ^ ./src/py3.x/16.RecommenderSystems/test_基于用户.py:74:73: F821 undefined name 'K' for v, wuv in sorted(W[u].items, key=itemgetter(1), reverse=True)[0:K]: ^ ./src/py3.x/16.RecommenderSystems/test_lfm.py:12:16: F821 undefined name 'items_pool' item = items_pool[random.randint(0, len(items_pool) - 1)] ^ ./src/py3.x/16.RecommenderSystems/test_lfm.py:12:49: F821 undefined name 'items_pool' item = items_pool[random.randint(0, len(items_pool) - 1)] ^ ./src/py3.x/16.RecommenderSystems/test_lfm.py:23:14: F821 undefined name 'InitModel' [P, Q] = InitModel(user_items, F) ^ ./src/py3.x/16.RecommenderSystems/test_lfm.py:26:23: F821 undefined name 'RandSelectNegativeSamples' samples = RandSelectNegativeSamples(items) ^ ./src/py3.x/16.RecommenderSystems/test_lfm.py:28:29: F821 undefined name 'Predict' eui = rui - Predict(user, item) ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:10:18: F821 undefined name 'users' for i in users: ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:12:22: F821 undefined name 'users' for j in users: ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:21:18: F821 undefined name 'v' W[u][v] = cij / math.sqrt(N[i] * N[j]) ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:30:18: F821 undefined name 'users' for i in users: ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:32:22: F821 undefined name 'users' for j in users: ^ ./src/py3.x/16.RecommenderSystems/test_基于物品.py:41:18: F821 undefined name 'v' W[u][v] = cij / math.sqrt(N[i] * N[j]) ^ ./src/py3.x/16.RecommenderSystems/test_evaluation_model.py:22:16: F821 undefined name 'GetRecommendation' rank = GetRecommendation(user, N) ^ ./src/py3.x/16.RecommenderSystems/test_evaluation_model.py:36:16: F821 undefined name 'GetRecommendation' rank = GetRecommendation(user, N) ^ ./src/py3.x/16.RecommenderSystems/test_evaluation_model.py:51:16: F821 undefined name 'GetRecommendation' rank = GetRecommendation(user, N) ^ ./src/py3.x/16.RecommenderSystems/test_evaluation_model.py:68:16: F821 undefined name 'GetRecommendation' rank = GetRecommendation(user, N) ^ ./src/py3.x/nlp/6.LDA/demo.py:13:14: F821 undefined name 'corpora' dictionary = corpora.Dictionary(train) ^ ./src/py2.x/dl/perceptron.py:62:68: E999 SyntaxError: invalid syntax return self.activator(reduce(lambda a, b: a + b,map(lambda (x, w): x * w, zip(input_vec, self.weights)), 0.0) + self.bias) ^ 1 E999 SyntaxError: invalid syntax 19 F821 undefined name 'GetRecommendation' 20
The text was updated successfully, but these errors were encountered:
老哥,有心了,谢谢帮忙规范代码
Sorry, something went wrong.
OK... This last one is a bit tougher... https://github.com/apachecn/AiLearning/blob/dev/src/py2.x/dl/perceptron.py#L62
Python 2:
Python 3:
@chenyyx 瑶妹,看看这个问题
@jiangzhonglian ok,我看一下哈
chenyyx
No branches or pull requests
flake8 testing of https://github.com/apachecn/AiLearning on Python 3.7.0
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
The text was updated successfully, but these errors were encountered: