I am not a lawyer, but I think if you do a direct cut and paste of the code then you are going to have to look at what the site's cc-wiki gives you permission to do. Personally, I think that if you read the code, understand the code, and then use that knowledge to write you own take on what the code is doing you might skirt by the copyright issue as you aren't doing a cut and paste of the code.
However, it is worth noting that you do have to be aware that there might be a patent on the code in which case you have to be aware of those issues. That is an area were you are starting to look at having a lawyer render an option on it - if you work at a company then someone in the legal department might be able to give you an answer on the quesiton.