Have you tried this demo? E.g. ask ChatGPT to produce some code, paste into the BigCode app, see which permissively licensed code on GitHub was likely used for inspiration. If motivated, generative AI app