Nearly a month's rain fell in four hours in parts of North Yorkshire leaving people stranded in their cars and homes.