Any person or entity who shall violate any of the technical codes or fail to comply therewith, or who shall do work in violation of a detailed statement or drawing submitted and permitted hereunder, or who shall violate or fail to comply with any order made thereunder, shall, for each such failure or violation or noncompliance, be guilty of a misdemeanor and be punished, in the discretion of the judge of the superior court or the judge of the magistrate court, according to the penalties provided in section 1-9. It shall be a separate offense for each and every day or portion thereof during which any violation of any of the provisions of this chapter is committed or continued, and upon conviction there shall be punishment as provided by state laws.