llSourcell / Reinforcement_Learning_for_Stock_Prediction

This is the code for "Reinforcement Learning for Stock Prediction" By Siraj Raval on Youtube
641 stars 363 forks source link

Python 3 compatibility issues #3

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

flake8 testing of https://github.com/llSourcell/Reinforcement_Learning_for_Stock_Prediction on Python 3.6.3

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

./evaluate.py:9:50: E999 SyntaxError: invalid syntax
    print "Usage: python evaluate.py [stock] [model]"
                                                 ^
./functions.py:27:11: F821 undefined name 'xrange'
    for i in xrange(n - 1):
          ^
./train.py:6:59: E999 SyntaxError: invalid syntax
    print "Usage: python train.py [stock] [window] [episodes]"
                                                          ^
./agent/agent.py:47:12: F821 undefined name 'xrange'
        for i in xrange(l - batch_size + 1, l):
           ^
2     E999 SyntaxError: invalid syntax
2     F821 undefined name 'xrange'
4
bartimusprimed commented 6 years ago

Fixed in pull request I submitted

llSourcell commented 6 years ago

fixed