Auto-grading for Coding the Matrix, Edition One (beta version)


Make sure you have Python 3.x on your computer.  In the following, I will assume that python3 is the command used to invoke Python.  (On Windows, it might be just python.)

Create a single directory, called matrix, in which you will put all your code.

Download the submission script, submit.py, to the matrix directory.

To get your work graded,
python3 submit.py <stencil filename>
For example, to submit solutions to problems appearing in the chapter The Function, edit The_Function.py, and then use the command
python3 submit.py The_Function.py
Note that these commands are executed not from within the Python REPL, but within a console or shell or Command Prompt.

More about submit

The submit script asks for your username. This can be anything you like. When you submit a correct answer, the script stores a "receipt" in a subdirectory receipts of your matrix directory, specifying your username, the data, and the identifier of the problem you solved.

To avoid having to give your username each time you run the submit script, you can create a file profile.txt in your matrix directory with the following line in it:
USERNAME philipklein
where "philipklein" is replaced with your chosen username. Later I will write about other features of the submit script. In particular, we plan to have a leaderboard; you will be able to request that your successful submits be reported to the leaderboard.

The Stencil files


More stencil files will be added as I complete them.  Note that these are still rough and should be considered beta versions.  Contact me at info@codingthematrix.com if you have questions or bug reports.

The Function

The_Function_problems.py

python_lab.py

inverse_index_lab.py (includes most of the problems in Lab 0.6)

dictutil.py (Includes several of the problems in Lab 0.6)


The Field

The_Field_problems.py

The Vector

The_Vector_problems.py

politics_lab.py

vec.py (implementation of the Vec class)

The Vector Space

The_Vector_Space_problems.py

The Matrix

The_Matrix_problems.py

mat.py (implementation of the Mat class)

ecc_lab.py

geometry_lab.py

The Basis

The_Basis_problems.py

perspective_lab.py

Dimension

Dimension_problems.py

Gaussian Elimination

Gaussian_Elimination_problems.py

secret_sharing_lab.py

factoring_lab.py

The Inner Product

The_Inner_Product_problems.py

machine_learning_lab.py

Orthogonalization

Orthogonalization_problems.py


The Singular Value Decomposition

The_SVD_problems.py

digits_lab.py

eigenfaces_lab.py


The Eigenvector

The_Eigenvector_problems.py

pagerank_lab.py