A person who, in the presence of a Court or magistrate, assaults or threatens to assault another, or to commit an offense against his person or property, or who contends with another with angry words, may be ordered by the Court or magistrate to give security, as in this Chapter provided, and if he refuse to do so, may be committed as provided in Section 707.