Made in Anaconda/Spyder, Python 3.5
First part of this python code encodes given polynomial in binary form using generator polynomial. It will produce 15 bit long binary sequence.
Second part of the code decodes received word r (15 bit long sequence), and fixes two errors that are present in the received word. Output is 7 bit long word in binary form.
I used Numpy for the arrays, so you need to install that before it works properly.