Popular recipes by Mohammad Taha Jahangir http://code.activestate.com/recipes/users/4188847/2014-11-06T07:29:12-08:00ActiveState Code RecipesWait for network service to appear (Python)
2014-11-06T07:29:12-08:00Mohammad Taha Jahangirhttp://code.activestate.com/recipes/users/4188847/http://code.activestate.com/recipes/578955-wait-for-network-service-to-appear/
<p style="color: grey">
Python
recipe 578955
by <a href="/recipes/users/4188847/">Mohammad Taha Jahangir</a>
(<a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/socket/">socket</a>).
</p>
<p>This script allows you to wait until specified port is opened on remote server. This can be useful in automation jobs - restarting server, wake on lan etc. It can also be used for monitoring distant service/site.</p>
<p>The main problem that this script solves is that you need to handle two different timeouts when opening probing socket, and it is not described in python documentation. See <a href="http://bugs.python.org/issue5293" rel="nofollow">http://bugs.python.org/issue5293</a> for more information.</p>
Public Key Encryption (RSA) (Python)
2013-12-27T06:43:59-08:00Mohammad Taha Jahangirhttp://code.activestate.com/recipes/users/4188847/http://code.activestate.com/recipes/578797-public-key-encryption-rsa/
<p style="color: grey">
Python
recipe 578797
by <a href="/recipes/users/4188847/">Mohammad Taha Jahangir</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/inverse/">inverse</a>, <a href="/recipes/tags/multiplicative/">multiplicative</a>, <a href="/recipes/tags/primality_testing/">primality_testing</a>, <a href="/recipes/tags/primes/">primes</a>, <a href="/recipes/tags/publickey/">publickey</a>, <a href="/recipes/tags/rsa/">rsa</a>).
Revision 3.
</p>
<p>Simple code to create and use public/private keypairs. Accompanied by a rudimentary encoder.</p>