The judge or any authorized presiding officer of the municipal court may punish for any violation of a city ordinance or law by fine not exceeding $1,000.00; by imprisonment not to exceed six months; by work in the work gang on the public streets, or on such public works as the authorities may employ the work gang, or by any one or both of these punishments in the discretion of the judge or presiding officer of said court.