Skip to content
New issue

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

print() is a function in Python 3 #4

Open
cclauss opened this issue Dec 1, 2018 · 0 comments
Open

print() is a function in Python 3 #4

cclauss opened this issue Dec 1, 2018 · 0 comments

Comments

@cclauss
Copy link

cclauss commented Dec 1, 2018

flake8 testing of https://github.com/learning511/cs224n-learning-camp on Python 3.7.1

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

./assigments/assignment3/q3_gru_cell.py:73:18: F821 undefined name 'new_state'
        output = new_state
                 ^
./assigments/assignment3/q3_gru_cell.py:74:24: F821 undefined name 'new_state'
        return output, new_state
                       ^
./assigments/assignment3/q3_gru.py:92:16: F821 undefined name 'preds'
        return preds #state # preds
               ^
./assigments/assignment3/q3_gru.py:114:16: F821 undefined name 'loss'
        return loss
               ^
./assigments/assignment3/q3_gru.py:153:16: F821 undefined name 'train_op'
        return train_op
               ^
./assigments/assignment3/q1_window.py:102:10: E999 IndentationError: expected an indented block
    return windowed_data
         ^
./assigments/assignment3/q2_rnn_cell.py:70:18: F821 undefined name 'new_state'
        output = new_state
                 ^
./assigments/assignment3/q2_rnn_cell.py:71:24: F821 undefined name 'new_state'
        return output, new_state
                       ^
./assigments/assignment3/q2_rnn.py:170:16: F821 undefined name 'feed_dict'
        return feed_dict
               ^
./assigments/assignment3/q2_rnn.py:194:16: F821 undefined name 'embeddings'
        return embeddings
               ^
./assigments/assignment3/q2_rnn.py:286:16: F821 undefined name 'loss'
        return loss
               ^
./assigments/assignment3/q2_rnn.py:309:16: F821 undefined name 'train_op'
        return train_op
               ^
./assigments/assignment3/q2_rnn.py:506:32: F821 undefined name 'raw_input'
                    sentence = raw_input("input> ")
                               ^
./assigments/assignment1/q3_run.py:42:70: E999 SyntaxError: invalid syntax
print "sanity check: cost at convergence should be around or below 10"
                                                                     ^
./assigments/assignment1/q2_neural.py:62:35: E999 SyntaxError: invalid syntax
    print "Running sanity check..."
                                  ^
./assigments/assignment1/q3_sgd.py:96:31: E999 SyntaxError: invalid syntax
            print "iter %d: %f" % (iter, expcost)
                              ^
./assigments/assignment1/q2_gradcheck.py:46:42: E999 SyntaxError: invalid syntax
            print "Gradient check failed."
                                         ^
./assigments/assignment1/q4_sentiment.py:195:35: E999 SyntaxError: invalid syntax
        print "Training for reg=%f" % reg
                                  ^
./assigments/assignment1/q1_softmax.py:51:34: E999 SyntaxError: invalid syntax
    print "Running basic tests..."
                                 ^
./assigments/assignment1/q3_word2vec.py:25:36: E999 SyntaxError: invalid syntax
    print "Testing normalizeRows..."
                                   ^
./assigments/assignment1/q2_sigmoid.py:49:34: E999 SyntaxError: invalid syntax
    print "Running basic tests..."
                                 ^
./assigments/assignment1/utils/treebank.py:142:18: F821 undefined name 'xrange'
        for i in xrange(self.numSentences()):
                 ^
./assigments/assignment1/utils/treebank.py:154:30: F821 undefined name 'xrange'
        split = [[] for i in xrange(3)]
                             ^
./assigments/assignment1/utils/treebank.py:206:18: F821 undefined name 'xrange'
        for w in xrange(nTokens):
                 ^
./assigments/assignment1/utils/treebank.py:223:18: F821 undefined name 'xrange'
        for i in xrange(self.tablesize):
                 ^
./assigments/assignment1/utils/treebank.py:238:18: F821 undefined name 'xrange'
        for i in xrange(nTokens):
                 ^
./assigments/assignment2/q2_initialization.py:37:34: E999 SyntaxError: invalid syntax
    print "Running basic tests..."
                                 ^
./assigments/assignment2/q2_parser_transitions.py:88:28: E999 SyntaxError: invalid syntax
    print "{:} test passed!".format(name)
                           ^
./assigments/assignment2/q2_parser_model.py:186:37: E999 SyntaxError: invalid syntax
        print "Evaluating on dev set",
                                    ^
./assigments/assignment2/q1_softmax.py:79:55: E999 SyntaxError: invalid syntax
    print "Basic (non-exhaustive) softmax tests pass\n"
                                                      ^
./assigments/assignment2/q1_classifier.py:164:57: E999 SyntaxError: invalid syntax
            print 'Epoch {:}: loss = {:.2f} ({:.3f} sec)'.format(epoch, average_loss, duration)
                                                        ^
./assigments/assignment2/utils/general_utils.py:55:18: E999 SyntaxError: invalid syntax
        print name, "passed!"
                 ^
./assigments/assignment2/utils/parser_utils.py:343:27: E999 SyntaxError: invalid syntax
    print "Loading data...",
                          ^
16    E999 SyntaxError: invalid syntax
17    F821 undefined name 'xrange'
33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant