To prevent and punish the discharge of firearms, rockets, gunpowder and fireworks in the streets of the city or in the vicinity of any building.