You can put yourself as the author. If you want, you can put a comment somewhere saying it's largely copy-pasted from my code / Mehdi's code.