It's an python code to allocate your time via hosts file.
Please add this code block to the very beginning of your hosts file:
#work time
0.0.0.0 renren.com #work label
0.0.0.0 weibo.com #work label
0.0.0.0 acfun.tv #work label
0.0.0.0 tieba.baidu.com #work label
127.0.0.1 localhost
And add this workAndRest.pyw to your windows schedule.