A New York City law on the books barring those convicted of so-called public corruption crimes from running for public office is unconstitutional, a Manhattan judge has ruled.