Before departing to the ISS, astronauts are allowed to pack some personal objects to be taken with them (see other question about packing).
What if an astronaut had some self-written software (for example a python script for managing their journal)? Would they be allowed to bring it to the ISS or are there specific tests it would have to pass before? Would they be allowed to run it on one of the debian based laptops (more on them in this question)?
And what about custom hardware (for example a t-shirt with LEDs run by a microcontroller)? Would it be allowed to bring personal devices that can run code? Are there any specific tests hardware would have to pass before being allowed?