Source code of chinas sentencing program revealed
I was getting really curious of how such a program was implemented, which tools were used and so on. So I did some research and finally got the full source code from one of my super secret hacker snitches.
I'm even allowed to post it here without permission, since all code from china is automatically licensed under an open source license (this is because communism and open source are practically the same thing. Thanks to the Microsoft guys pointing this out).
Here it is:
years_in_jail = 5
for word in evidence:
if word in ["freedom", "falun gong", "democracy"]:
years_in_jail += 10
print "I recommend a %d year sentence.", years_in_jail
As a sidenote: The program was first written in Ruby but it had to be ported to Python because of Rubys poor unicode support.