A self-described anarchist and “hacktivist” from Chicago was sentenced to 10 years in prison Friday for illegally accessing computer systems of law enforcement agencies and government contractors.