{"id":208478,"date":"2014-01-08T16:27:02","date_gmt":"2014-01-08T12:27:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=208478"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=208478","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u043e\u043c \u0432 WoT<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043e\u0431\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0445\u0430\u0431\u0440\u0430\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e!<\/p>\n<p>  \u0421\u043a\u043e\u0440\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0434, \u043a\u0430\u043a \u044f \u0438\u0433\u0440\u0430\u044e \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435 \u0432 <a href=\"https:\/\/www.google.com.ua\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;ved=0CFIQFjAA&amp;url=http%3A%2F%2Fworldoftanks.ru%2F&amp;ei=kivNUvOrJu_jygPll4GQAQ&amp;usg=AFQjCNHT4MT3pTmiv89qQnrIPIygkDFI4g&amp;sig2=cgxdzjNpYQrvGLDoU-yIHw&amp;bvm=bv.58187178,d.bGQ\">World of Tanks<\/a>, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043c\u0438\u043c\u043e, \u043a\u0430\u043a \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u041f\u041a \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u043f\u0440\u043e\u0448\u0443 <a href=\"http:\/\/habrahabr.ru\/post\/173645\/\">\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>  \u0418\u0433\u0440\u0430\u0442\u044c \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430\u00bb.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0430\u0447\u043d\u0443 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u0432 WoT \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435 \u043e\u0442 \u00ab\u043a\u043e\u0440\u043e\u0431\u043a\u0438 360\u00bb.<\/p>\n<p>  \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0432\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0439 \u0438\u0433\u0440\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c <a href=\"http:\/\/xpadder.com\/index.php?lang=russian\">Xpadder<\/a>. \u0412\u0438\u0434\u0435\u043e, \u043a\u0430\u043a \u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/YdlJow1dPKU?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u041a\u0430\u043a \u0438\u0433\u0440\u0430\u0442\u044c? \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u0431\u043e\u044f<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/A36THknPY1U?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u041e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u044f <s>\u043d\u0435 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u0438\u043a, \u0430<\/s> \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0443\u0441\u044c, \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0438\u0436\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u043c\u043d\u043e\u0439, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u044f \u043f\u0438\u0441\u0430\u043b \u043f\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044e, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043b\u044e\u0431\u044b\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c \u0438 \u043f\u043e\u043c\u043e\u0449\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443. <br \/>  \u0412\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0441 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u043e\u043c \u0438\u043b\u0438 ForceFeedback, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0439 (\u0435\u0434\u0435\u0448\u044c \u043f\u043e \u043a\u043e\u0447\u043a\u0430\u043c \u2014 \u0435\u0441\u0442\u044c \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0443\u0434\u0430\u0440 \u043e\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \u2014 \u0435\u0441\u0442\u044c \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0438 \u0442.\u043f.). \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u0435\u043d\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0438\u0431\u0440\u043e\u043e\u0442\u0434\u0430\u0447\u0443 \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435 \u0432 \u00ab\u0442\u0430\u043d\u0447\u0438\u043a\u0430\u0445\u00bb.<br \/>  \u041f\u043e\u043a\u043e\u043f\u0430\u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u043d\u0430\u0448\u0435\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<br \/>  1. \u0412\u0441\u0451 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043d\u0430 python, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0433\u0440\u0435 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0438 \u0432\u0441\u044f (\u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u044f\u0434\u0440\u0430 BigWorld).<br \/>  2. \u041d\u0430 <a href=\"http:\/\/stackoverflow.com\/questions\/19749404\/is-it-possible-to-rumble-a-xbox-360-controller-with-python\">stackoverflow<\/a>, \u043d\u0430\u0448\u0435\u043b \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043d\u0435 \u043a\u043e\u0434, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0438 \u0432 \u0433\u0435\u0439\u043c\u043f\u0430\u0434.<br \/>  3. Wargaming \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u043e\u0438\u043b \u0432 \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f <s>\u0432\u0438\u0431\u0440\u043e\u0436\u043e\u043f\u043a\u0438<\/s> <a href=\"http:\/\/shop.gametrix.ru\/shop\/CID_13.html\">\u0432\u0438\u0431\u0440\u043e\u043d\u0430\u043a\u0438\u0434\u043a\u0438<\/a> GameTrix, \u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0438\u0431\u0440\u043e\u043d\u0430\u043a\u0438\u0434\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438 \u0432\u0435\u0441\u044c SDK \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f.<br \/>  4. \u041f\u043e\u0438\u0441\u043a \u043f\u043e \u043f\u0430\u043f\u043a\u0430\u043c \u0438\u0433\u0440\u044b \u0432\u044b\u0434\u0430\u043b \u043c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u00abWorld_of_Tanks\\res\\scripts\\client\\vibroeffect\u00bb.<\/p>\n<p>  \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432 \u00ab\u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c\u00bb SDK \u0432\u0438\u0431\u0440\u043e\u043d\u0430\u043a\u0438\u0434\u043a\u0438, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438\u0433\u0440\u044b \u2014 \u0432\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/code.google.com\/p\/wot-xvm\/\">XVM<\/a> (eXtended Visualization Mod for World of Tanks), \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c BigWorld.WGVibration \u043d\u0430 GamePadVibration, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435.<br \/>  \u041d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c python \u043d\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e ctypes, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u00ab\u0432\u0438\u0431\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u00bb \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u043c python, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 \u0438\u0433\u0440\u044b. \u0422\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/flask.pocoo.org\/\">Flask<\/a>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0438\u0439 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434 \u043f\u0440\u0438 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439\/\u0440\u0438\u043a\u043e\u0448\u0435\u0442\u043e\u0432 \u0438 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0442\u0430\u043d\u043a\u0430. \u0412\u0438\u0431\u0440\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043f\u0438\u0441\u0430\u043b\u0438\u0441\u044c \u043c\u043d\u043e\u044e \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0438\u0431\u0440\u043e\u043d\u0430\u043a\u0438\u0434\u043a\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">GPService.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">ENABLE_LOG = False d = dict() from flask import Flask from flask import request import ctypes  # Define necessary structures class XINPUT_VIBRATION(ctypes.Structure):     _fields_ = [(&quot;wLeftMotorSpeed&quot;, ctypes.c_ushort),                 (&quot;wRightMotorSpeed&quot;, ctypes.c_ushort)]  xinput = ctypes.windll.xinput1_3  # Load Xinput.dll  # Set up function argument types and return type XInputSetState = xinput.XInputSetState XInputSetState.argtypes = [ctypes.c_uint, ctypes.POINTER(XINPUT_VIBRATION)] XInputSetState.restype = ctypes.c_uint  # You can also create a helper function like this: def set_vibration(controller, left_motor, right_motor):     vibration = XINPUT_VIBRATION(int(left_motor * 65535), int(right_motor * 65535))     XInputSetState(controller, ctypes.byref(vibration))      if not ENABLE_LOG:     import logging     log = logging.getLogger('werkzeug')     log.setLevel(logging.ERROR)  app = Flask(__name__)  @app.route('\/connect') def connect():     print 'Connection checked - Ok.'     return 'True'  @app.route('\/loadEffectFromFile') def loadEffectFromFile():     effectHandle = request.args.get('effectHandle')     fileName = request.args.get('fileName')     #print      #print 'loadEffectFromFile'     #print 'effectHandle =', request.args.get('effectHandle')     #print 'fileName =', request.args.get('fileName')     if not effectHandle in d:         d[effectHandle] = fileName     return ''      @app.route('\/getEffectLength') def getEffectLength():     #print      #print 'getEffectLength'     #print 'effectHandle =', request.args.get('effectHandle')     #print 'returnedLength =', request.args.get('returnedLength')     return ''  import threading, time def shot_main():     set_vibration(0, 1.0, 1.0)     time.sleep(0.15)     set_vibration(0, 0, 0)     time.sleep(0.25)     set_vibration(0, 0.5, 0)     time.sleep(0.25)     set_vibration(0, 0.0, 0.0)  def shot_large():     set_vibration(0, 0.5, 0.6)     time.sleep(0.1)     set_vibration(0, 0.3, 0)     time.sleep(0.1)     set_vibration(0, 0.1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.5)     time.sleep(0.1)     set_vibration(0, 0.0, 0.0)      def shot_medium():     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.6, 0.6)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.1)     set_vibration(0, 0.2, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.6)     time.sleep(0.2)     set_vibration(0, 0.0, 0.0)  def shot_small():     set_vibration(0, 0.6, 0.8)     time.sleep(0.1)     set_vibration(0, 0, 0.4)     time.sleep(0.1)     set_vibration(0, 0.0, 0.0)  def hit_nonpenetration():     set_vibration(0, 0.5, 0.5)     time.sleep(0.1)     set_vibration(0, 0.0, 0.0)  def hit_ricochet():     set_vibration(0, 0.8, 0.8)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.2)     set_vibration(0, 0.0, 0.5)     time.sleep(0.05)     set_vibration(0, 0, 0)  def hit_splash():     set_vibration(0, 0.8, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0.8)     time.sleep(0.1)     set_vibration(0, 0, 0.4)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.05)     set_vibration(0, 0, 0.4)     time.sleep(0.15)     set_vibration(0, 0, 0)  def hit():     set_vibration(0, 1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.05)     set_vibration(0, 0, 1)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.05)     set_vibration(0, 0.6, 0.6)     time.sleep(0.1)     set_vibration(0, 0.5, 0.5)     time.sleep(0.05)     set_vibration(0, 0.25, 0.25)     time.sleep(0.05)     set_vibration(0, 0, 0)  def crit_contusion():     set_vibration(0, 1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.2)     set_vibration(0, 0, 0.4)     time.sleep(0.2)     set_vibration(0, 0, 0)     time.sleep(0.3)     set_vibration(0, 0, 0.3)     time.sleep(0.2)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0, 0.25)     time.sleep(0.2)     set_vibration(0, 0, 0)  def crit_death():     set_vibration(0, 1, 1)     time.sleep(0.1)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 1)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.8)     time.sleep(0.1)     set_vibration(0, 0.8, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.8)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.5, 0.5)     time.sleep(0.1)     set_vibration(0, 0.4, 0.3)     time.sleep(0.1)     set_vibration(0, 0.3, 0.1)     time.sleep(0.1)     set_vibration(0, 0.2, 0)     time.sleep(0.1)     set_vibration(0, 0.1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)  def crit_engine():     set_vibration(0, 1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0.6)     time.sleep(0.3)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.6)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0.6)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0.6)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.6)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0.6)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.2)     set_vibration(0, 0, 0)  def crit_fire():     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.3)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.5)     set_vibration(0, 0.5, 0.5)     time.sleep(2)     set_vibration(0, 0, 0)  def crit_run():     set_vibration(0, 1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.2)     set_vibration(0, 0, 0.8)     time.sleep(0.3)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.5)     time.sleep(0.3)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.8, 0)     time.sleep(0.1)     set_vibration(0, 0.6, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.1)     set_vibration(0, 0.2, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.4, 0)     time.sleep(0.1)     set_vibration(0, 0.2, 0)     time.sleep(0.1)     set_vibration(0, 0.1, 0)     time.sleep(0.1)     set_vibration(0, 0, 0)  def crit_track_move():     set_vibration(0, 0.6, 0.2)     time.sleep(0.1)     set_vibration(0, 0, 0.1)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.4)     set_vibration(0, 0, 0.1)     time.sleep(0.1)     set_vibration(0, 0, 0.05)     time.sleep(0.1)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.1)     time.sleep(0.1)     set_vibration(0, 0, 0.05)     time.sleep(0.1)     set_vibration(0, 0, 0)  def crit_track():     set_vibration(0, 0.8, 0)     time.sleep(0.05)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0, 0.8)     time.sleep(0.05)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.5, 0.5)     time.sleep(0.05)     set_vibration(0, 0, 0)     time.sleep(0.1)     set_vibration(0, 0.5, 0.5)     time.sleep(0.05)     set_vibration(0, 0, 0)          @app.route('\/startEffect') def startEffect():     handle = request.args.get('handle')     count = request.args.get('count')          if handle in d:         print 'startEffect: '+ d[handle]         if 'shot_main' in d[handle]:             print 'shot_main'             # init thread             t1 = threading.Thread(target=shot_main)             # start threads             t1.start()                                 if 'shot_large' in d[handle]:             print 'shot_large'             # init thread             t1 = threading.Thread(target=shot_large)             # start threads             t1.start()                       if 'shot_medium' in d[handle]:             print 'shot_medium'             # init thread             t1 = threading.Thread(target=shot_medium)             # start threads             t1.start()                      if 'shot_small' in d[handle]:                 print 'shot_small'             # init thread             t1 = threading.Thread(target=shot_small)             # start threads             t1.start()                      if 'hit_nonpenetration' in d[handle]:                 print 'hit_nonpenetration'             # init thread             t1 = threading.Thread(target=hit_nonpenetration)             # start threads             t1.start()                      if 'hit_ricochet' in d[handle]:                 print 'hit_ricochet'             # init thread             t1 = threading.Thread(target=hit_ricochet)             # start threads             t1.start()                      if 'hit_splash' in d[handle]:                 print 'hit_splash'             # init thread             t1 = threading.Thread(target=hit_splash)             # start threads             t1.start()                      if 'hit' in d[handle]:                 print 'hit'             # init thread             t1 = threading.Thread(target=hit)             # start threads             t1.start()          if 'crit_contusion' in d[handle]:                 print 'crit_contusion'             # init thread             t1 = threading.Thread(target=crit_contusion)             # start threads             t1.start()          if 'crit_death' in d[handle]:                 print 'crit_death'             # init thread             t1 = threading.Thread(target=crit_death)             # start threads             t1.start()          if 'crit_engine' in d[handle]:                 print 'crit_engine'             # init thread             t1 = threading.Thread(target=crit_engine)             # start threads             t1.start()          if 'crit_fire' in d[handle]:                 print 'crit_fire'             # init thread             t1 = threading.Thread(target=crit_fire)             # start threads             t1.start()          if 'crit_run' in d[handle]:                 print 'crit_run'             # init thread             t1 = threading.Thread(target=crit_run)             # start threads             t1.start()          if 'crit_track_move' in d[handle]:                 print 'crit_track_move'             # init thread             t1 = threading.Thread(target=crit_track_move)             # start threads             t1.start()          if 'crit_track' in d[handle]:                 print 'crit_track'             # init thread             t1 = threading.Thread(target=crit_track)             # start threads             t1.start()                               # print      # print 'startEffect'     # print 'handle =', handle     # print 'count =', count          return ''  if __name__ == &quot;__main__&quot;:     app.debug = True     app.run() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 <a href=\"https:\/\/drive.google.com\/file\/d\/0B7WlhvVxLC1DN1lMck1BU2VwQUU\/edit?usp=sharing\">\u043c\u043e\u0434<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u0433\u0440\u043e\u0439. <\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0439 \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435:<br \/>  1. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Python (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f <a href=\"http:\/\/\">\u0432\u0435\u0440\u0441\u0438\u044f<\/a>), \u043f\u0430\u043f\u043a\u0430 \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u00abC:\\Python27\u00bb.<\/p>\n<p>  2. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Flask, \u044f \u0434\u0435\u043b\u0430\u043b \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"http:\/\/flask.pocoo.org\/docs\/installation\/#windows-easy-installhttp:\/\/flask.pocoo.org\/docs\/installation\/%23windows-easy-install\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041a\u0430\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"http:\/\/python-distribute.org\/distribute_setup.py\">distribute_setup.py<\/a> \u0432 \u043f\u0430\u043f\u043a\u0443 \u00abC:\\temp\u00bb (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u00abWin+R\u00bb \u2014 cmd \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u00abC:\\Python27\\python.exe C:\\temp\\distribute_setup.py\u00bb \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0443 \u00abC:\\Python27\\Scripts\u00bb, \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435:<br \/>  C:\\Python27\\python.exe C:\\Python27\\Scripts\\easy_install-2.7-script.py Flask<br \/>  C:\\Python27\\python.exe C:\\Python27\\Scripts\\easy_install-2.7-script.py Jinja2<br \/>  C:\\Python27\\python.exe C:\\Python27\\Scripts\\easy_install-2.7-script.py Werkzeug<br \/>  C:\\Python27\\python.exe C:\\Python27\\Scripts\\easy_install-2.7-script.py Virtualenv<\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 GPsettings.xml \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e python \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u00abC:\\Python27\u00bb.<\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0437\u0430\u0431\u043e\u0440\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0432\u0438\u0431\u0440\u043e\u043d\u0430\u043a\u0438\u0434\u043a\u0438 \u0441\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u0423\u0434\u0430\u0447\u0438 \u0432\u0441\u0435\u043c \u0432 \u0431\u043e\u044f\u0445!    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/208478\/\"> http:\/\/habrahabr.ru\/post\/208478\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043e\u0431\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0445\u0430\u0431\u0440\u0430\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e!<\/p>\n<p>  \u0421\u043a\u043e\u0440\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0434, \u043a\u0430\u043a \u044f \u0438\u0433\u0440\u0430\u044e \u043d\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0435 \u0432 <a href=\"https:\/\/www.google.com.ua\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;ved=0CFIQFjAA&amp;url=http%3A%2F%2Fworldoftanks.ru%2F&amp;ei=kivNUvOrJu_jygPll4GQAQ&amp;usg=AFQjCNHT4MT3pTmiv89qQnrIPIygkDFI4g&amp;sig2=cgxdzjNpYQrvGLDoU-yIHw&amp;bvm=bv.58187178,d.bGQ\">World of Tanks<\/a>, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043c\u0438\u043c\u043e, \u043a\u0430\u043a \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u041f\u041a \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u043f\u0440\u043e\u0448\u0443 <a href=\"http:\/\/habrahabr.ru\/post\/173645\/\">\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>  \u0418\u0433\u0440\u0430\u0442\u044c \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430\u00bb.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-208478","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/208478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=208478"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/208478\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=208478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=208478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=208478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}