Hacker News new | ask | show | jobs
by tyrael71 3600 days ago
These are direct solutions to the exercises. I took the class some time ago and also did it in python.
1 comments

As far as I can remember you can't submit assignments in Python, can you? Or maybe you did it in Python first, and then ported in Octave before submitting? If so, how did it work out for you? At first I thought I wanted to go down the same path (because I'm comfortable with Python but not with Octave) but then concluded it was too much trouble backporting everything.
As far as I can remember you can't submit assignments in Python, can you?

When I took the class earlier this year, the answer was - effectively - "no". I mean, yeah, you could do some trickery with calling Python from Octave using whatever FFI Octave has, or you could possibly reverse engineer the protocol they use to talk from your code to the upstream server... but anybody doing all that would be doing more work that just completing the assignments in Octave to begin with.

There exist implementations of an interface between Python and the Coursera grading server.

https://github.com/mstampfer/Coursera-Stanford-ML-Python is an example.

Of course somebody would have reverse engineered the protocol already. Oh well. I still think most people would find it easier to just do the assignments themselves than deal with all this, but I'll grant that there's "always one in every crowd" as they say.
We have Pytave. You don't need FFI anymore. Or rather, we wrote the FFI for you. Write your code in Scipy and Octave sees Octave-shaped objects in return.