It shall be unlawful to explode any fire-crackers, roman candles, sky-rockets or any kind of fireworks in any unincorporated town or village in this state, within three hundred yards of any railroad depot, and cotton or hay warehouse or any cotton-yard. And any one violating the provisions of this section shall, upon conviction, before any justice of the peace, be fined not more than ten dollars nor less than one dollar, or imprisoned not more than ten days, or may be both fined and imprisoned.