donnemartin/data-science-ipython-notebooks

Python 3 compatibly issues

Ouverte

#59 ouverte le 16 sept. 2018

 (3 commentaires) (0 réaction) (0 personne assignée)Python (8 029 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (29 313 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur