Unless another penalty is expressly provided by this code for any particular provision or section, every person convicted of a violation of any provision of this code or any rule or regulation adopted or issued in pursuance thereof, shall be punished by a fine of not more than $500 and costs of prosecution or by imprisonment for not more than 90 days, or by both such fine and imprisonment; unless there is a fine or penalty specifically set forth in that penalty which provides for a greater penalty, and in that event, such greater penalty shall control. Each act of violation and every day upon which any such violation shall occur shall constitute a separate offense. The penalty provided by this section, unless another penalty is expressly provided, shall apply to the amendment of any section of this code whether or not such penalty is re-enacted in the amendatory ordinance.