Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Python 3 compatibly issues #59

Open
cclauss opened this issue Sep 16, 2018 · 3 comments
Open

Python 3 compatibly issues #59

cclauss opened this issue Sep 16, 2018 · 3 comments

Comments

@cclauss
Copy link

cclauss commented Sep 16, 2018

flake8 testing of https://github.com/donnemartin/data-science-ipython-notebooks on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./scipy/thinkplot.py:475:14: F821 undefined name 'xp'
        xs = xp.delete(xs, 0)
             ^
./data/titanic/myfirstforest.py:84:19: E999 SyntaxError: invalid syntax
print 'Training...'
                  ^
./data/titanic/gendermodel.py:47:46: E999 SyntaxError: invalid syntax
print 'Proportion of women who survived is %s' % proportion_women_survived
                                             ^
./data/titanic/genderclassmodel.py:42:10: F821 undefined name 'xrange'
for i in xrange(number_of_classes):
         ^
./data/titanic/genderclassmodel.py:43:14: F821 undefined name 'xrange'
    for j in xrange(number_of_price_brackets):
             ^
./data/titanic/genderclassmodel.py:84:14: F821 undefined name 'xrange'
    for j in xrange(number_of_price_brackets):
             ^
./deep-learning/keras-tutorial/deep_learning_models/vgg19.py:163:9: F821 undefined name 'preprocess_input'
    x = preprocess_input(x)
        ^
./deep-learning/keras-tutorial/deep_learning_models/vgg19.py:167:25: F821 undefined name 'decode_predictions'
    print('Predicted:', decode_predictions(preds))
                        ^
./deep-learning/keras-tutorial/deep_learning_models/resnet50.py:242:9: F821 undefined name 'preprocess_input'
    x = preprocess_input(x)
        ^
./deep-learning/keras-tutorial/deep_learning_models/resnet50.py:246:25: F821 undefined name 'decode_predictions'
    print('Predicted:', decode_predictions(preds))
                        ^
./deep-learning/keras-tutorial/deep_learning_models/vgg16.py:161:9: F821 undefined name 'preprocess_input'
    x = preprocess_input(x)
        ^
./deep-learning/keras-tutorial/deep_learning_models/vgg16.py:165:25: F821 undefined name 'decode_predictions'
    print('Predicted:', decode_predictions(preds))
                        ^
./deep-learning/keras-tutorial/solutions/sol_112.py:2:1: E999 SyntaxError: invalid syntax
%timeit -n 1 -r 1 ann.train(zip(X,y), iterations=100)
^
./deep-learning/keras-tutorial/solutions/sol_111.py:2:1: E999 SyntaxError: invalid syntax
%timeit -n 1 -r 1 ann.train(zip(X,y), iterations=2)
^
./deep-learning/theano-tutorial/rnn_tutorial/lstm_text.py:255:22: E999 SyntaxError: invalid syntax
        print 'epoch:', epoch
                     ^
./deep-learning/tensor-flow-examples/multigpu_basics.py:84:37: E999 SyntaxError: invalid syntax
print "Single GPU computation time: " + str(t2_1-t1_1)
                                    ^
./deep-learning/tensor-flow-examples/input_data.py:95:34: F821 undefined name 'xrange'
      fake_image = [1.0 for _ in xrange(784)]
                                 ^
./deep-learning/tensor-flow-examples/input_data.py:97:35: F821 undefined name 'xrange'
      return [fake_image for _ in xrange(batch_size)], [
                                  ^
./deep-learning/tensor-flow-examples/input_data.py:98:31: F821 undefined name 'xrange'
          fake_label for _ in xrange(batch_size)]
                              ^
6     E999 SyntaxError: invalid syntax
13    F821 undefined name 'xrange'
19
@donnemartin
Copy link
Owner

Hi @cclauss, thanks for reporting this issue!

@cclauss
Copy link
Author

cclauss commented Oct 23, 2019

Is it rocket science too fix this stuff?

@rubenvarela
Copy link

@cclauss where's the pull request?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@rubenvarela @cclauss @donnemartin and others