Do not curse a judge
“Do not curse God” Shmoth 22:27
If someone cursed a judge using the Divine name or a substitute name of God, he should be lashed twice.
The verse is a warning not to blaspheme God.
If someone blaspheme God by a substitute name, he transgressed
If someone blasphemed God using the Divine name itself the punishment stated explicitly –
“he who blasphemes the name of God shall be put to death, the entire community shall stone him” Vayikra 24:16
If one blasphemes even if he retracts in the time it takes to say a few words, at this time when we do not judge capital cases he is excommunicated and we keep our distance from him.
This applies in all places at all times for men and women.