diff --git a/README.md b/README.md index b31cd5a..96031d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CS224u: Natural Language Understanding -Code for [the Stanford course](http://web.stanford.edu/class/cs224u/) +Code for [the Stanford course](http://web.stanford.edu/class/cs224u/). The code is written to run under Python 3.7; [setup.ipynb](setup.ipynb) provides additional details. # Instructors diff --git a/remove_solutions.py b/remove_solutions.py deleted file mode 100644 index 1c71838..0000000 --- a/remove_solutions.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Removes the answers from homework notebooks. -""" -import json -import re -import sys - -__author__ = 'Chris Potts' - - -def main(src_filename): - output_filename = src_filename.replace('_solved', '') - doc = None - with open(src_filename, 'rt') as f: - doc = json.load(f) - new_cells = [] - for i, cell in enumerate(doc['cells']): - if cell['cell_type'] == 'code': - cell_start = cell['source'][0] - if not re.search(r"^#+\s*SOLUTION", cell_start): - removing = False - new_source = [] - for line in cell['source']: - if "# <<<<<<<<<< TO BE COMPLETED" in line: - removing = True - if not removing: - new_source.append(line) - if "# >>>>>>>>>>" in line: - removing = False - cell['source'] = new_source - new_cells.append(cell) - else: - new_cells.append(cell) - doc['cells'] = new_cells - - with open(output_filename, 'wt') as output: - json.dump(doc, output) - -if __name__ == '__main__': - - main(sys.argv[1]) diff --git a/requirements.txt b/requirements.txt index 7788d9d..b547a59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,22 +3,38 @@ # Only people working in their own virtual environments should install # them via this script. # -# numpy==1.14.0 -# scipy==1.0.0 -# matplotlib==2.1.2 -# scikit-learn >= 0.19.1 -# nltk==3.2.5 -# python-dateutil==2.6.1 -# pytest==3.0.3 +# numpy>=1.15.0 +# scipy>=1.1.0 +# matplotlib>=3.0.0 +# scikit-learn >= 0.20.0 +# nltk>=3.4.0 +# python-dateutil>=2.7.0 +# pytest==4.0.0 # jupyter==1.0.0 # ###################################################################### mittens>=0.1 +###################################################################### # For NLTK, the data distibution needs to be downloaded separately: +# # https://www.nltk.org/data.html -# Tensorflow is also required. It should be installed via the -# instructions provided by the TensorFlow team, which depend on your -# computing environment: https://www.tensorflow.org/install/ +###################################################################### +# PyTorch is required. For installation instructions, see +# +# If you're using Anaconda, we suggest +# +# conda install -c pytorch pytorch + +###################################################################### +# Tensorflow is required. It should be installed via the instructions +# provided by the TensorFlow team, which depend on your computing +# environment: +# +# https://www.tensorflow.org/install/ +# +# If you're using Anaconda, we suggest +# +# conda install -c conda-forge tensorflow