The Department of Public Health of this City and County is hereby authorized and empowered to quarantine persons, houses, places and districts within this City and County, when in its judgment it is deemed necessary to prevent the spreading of contagious or infectious diseases.