Superradiance and subradiance in a gas of two-level atoms