Derivation of Euler equations from quantum and classical microscopic dynamics