When sitting in a court as a municipal court judge, the judge shall have the power to punish for contempt by fine not exceeding $100.00, by imprisonment in the manner prescribed in section 6-102 not exceeding 30 days, or by one or both, or any part thereof, in the discretion of the judge.