Quaternion to "Dir" and "Up" vectors

As the title suggests is there script to convert Quaternions to “Dir” and “Up” vectors so that they can be applied to the camera?