you could include some code that is "calling home". meaning sending you a Telegram message or something like that. but anyone could remove that code if he has access to the pure python code so that is not a guarantee that you will know if someone is useing it. in general, i wouldn't assume that someoen would use it unlicensed. professors have an image and they surely don't want to be the one prof that didn't pay for something and was using it illegally.
Обсуждают сегодня