1. Put the code in the appendix.
When the paper is copied, the appendix is generally not copied. Most schools don't have too many requirements for appendices, but they don't. The appendix is a supplement to the content of the paper.
If the school doesn't stipulate to check the appendix again, put the code in the appendix.
2. Upload a screenshot of the code.
On the other hand, when the code must be put into the text or appendix, we can put the screenshot of the code part into the text. At present, most paper duplicate checking systems can't identify pictures, so we can effectively avoid code duplication of computer papers by taking screenshots.