GO:0016174:   NAD(P)H oxidase activity
Catalysis of the reaction: NAD(P)H + H+ + O2 = NAD(P)+ + hydrogen peroxide.