Popular recipes by Tomáš Rampas http://code.activestate.com/recipes/users/4179816/2014-11-20T20:00:27-08:00ActiveState Code RecipesBoost::Python callback triggered from Non-Python created threads (C++) 2014-11-20T20:00:27-08:00Tomáš Rampashttp://code.activestate.com/recipes/users/4179816/http://code.activestate.com/recipes/578967-boostpython-callback-triggered-from-non-python-cre/ <p style="color: grey"> C++ recipe 578967 by <a href="/recipes/users/4179816/">Tomáš Rampas</a> (<a href="/recipes/tags/boost/">boost</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Consider we have virtual/abstract C++ class that's fully implemented in Python. And for some sake of necessity we have a callback method (e.g. as some sort of event) that is being triggered from different thread on C++ side. In such case corresponding callback methods have to manage GIL state via PyGILState_STATE. So the resulting C++ callback class definition will look like follows (notice that Python method calls are wrapped up with GIL state handling code).</p> Proxying WCF service (XML) 2014-11-07T13:03:18-08:00Tomáš Rampashttp://code.activestate.com/recipes/users/4179816/http://code.activestate.com/recipes/578958-proxying-wcf-service/ <p style="color: grey"> XML recipe 578958 by <a href="/recipes/users/4179816/">Tomáš Rampas</a> (<a href="/recipes/tags/dotnet/">dotnet</a>, <a href="/recipes/tags/fiddler/">fiddler</a>, <a href="/recipes/tags/wcf/">wcf</a>). </p> <p>Sometimes capturing WCF service communication e.g. with Fiddler is necessary. Following is the part of WCF service application config proxying WCF to localhost:8888</p> Script for GAE Blobstore migration from Master Slave to High Replication Datastore (Python) 2011-11-04T14:56:56-07:00Tomáš Rampashttp://code.activestate.com/recipes/users/4179816/http://code.activestate.com/recipes/577941-script-for-gae-blobstore-migration-from-master-sla/ <p style="color: grey"> Python recipe 577941 by <a href="/recipes/users/4179816/">Tomáš Rampas</a> (<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/blobstore/">blobstore</a>, <a href="/recipes/tags/gae/">gae</a>, <a href="/recipes/tags/hrd/">hrd</a>, <a href="/recipes/tags/master_slave/">master_slave</a>, <a href="/recipes/tags/migration/">migration</a>, <a href="/recipes/tags/python/">python</a>). Revision 20. </p> <p>This code helped me with blobstore content migration of my GAE app from M/S storage to HRD. Prerequisite for this is copying data located in Masterslave datastore to HRD first so they exist on both Datastores. Be aware pls, that this migration script has impact on outgoing and incoming bandwidth of your apps so it affects your GAE resources utilization.</p>