Top-rated recipes by Captain DeadBones http://code.activestate.com/recipes/users/4184772/top/2014-02-22T06:13:41-08:00ActiveState Code RecipesThe Game of Tic Tac Toe in Python (Python)
2014-01-31T02:39:48-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578816-the-game-of-tic-tac-toe-in-python/
<p style="color: grey">
Python
recipe 578816
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/beginner/">beginner</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>I thought this is a fun game to program. Easy to program and can teach a lot. </p>
<p><a href="http://thelivingpearl.com">Captain DeadBones</a></p>
The Game of Battleships in Python (Python)
2014-02-22T06:13:41-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578836-the-game-of-battleships-in-python/
<p style="color: grey">
Python
recipe 578836
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/beginner/">beginner</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>Another fun game that is fun to program and play. No special AI (yet). But still and entertaining game. </p>
<p>For more info about <a href="http://thelivingpearl.com/2014/02/17/the-game-of-battleships-in-python/">Battleships in Python</a> follow the link. </p>
Plain Text Editor in Python (Python)
2013-06-18T15:33:01-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578568-plain-text-editor-in-python/
<p style="color: grey">
Python
recipe 578568
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/editor/">editor</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/text_processing/">text_processing</a>).
</p>
<p>Just a simple text editor written in Python with Tk for graphics. </p>
<p>Check out my blog <a href="http://thelivingpearl.com/">Captain DeadBones Chronicles</a></p>
Simple Substitution Cipher Algorithm (Python)
2013-06-03T17:51:00-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578544-simple-substitution-cipher-algorithm/
<p style="color: grey">
Python
recipe 578544
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/cipher/">cipher</a>, <a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote It converts any plain text into a Caesar Cipher message. For more information <a href="http://thelivingpearl.com/2013/06/03/caesar-ciphers-in-python/">Caesar Ciphers In Python</a></p>
Sending Email From A Python Program (Python)
2014-01-10T20:13:45-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578807-sending-email-from-a-python-program/
<p style="color: grey">
Python
recipe 578807
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/smtp/">smtp</a>, <a href="/recipes/tags/time/">time</a>).
Revision 4.
</p>
<p>I put together this code for one of my programs and decided to share it. You may never know when you will need you Python Program to send an email to someone. <a href="http://thelivingpearl.com/2014/01/10/sending-email-from-python-using-command-line/">Sending Email From Python</a>. </p>
<p>NOTE: You will have to change the account setup variables to your own. The server is currently configured o Gmail, but you can use this script with any server. </p>
Verify html form with JavaScript (JavaScript)
2013-07-15T12:19:53-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578606-verify-html-form-with-javascript/
<p style="color: grey">
JavaScript
recipe 578606
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/form/">form</a>, <a href="/recipes/tags/javascript/">javascript</a>).
</p>
<p>I wrote this for a <a href="http://thelivingpearl.com/2013/07/15/the-guest-book-problem/">php Guest Book</a> app I wrote. </p>
Detect what browser your website is being accessed from using php (PHP)
2013-06-19T20:09:55-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578571-detect-what-browser-your-website-is-being-accessed/
<p style="color: grey">
PHP
recipe 578571
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/browser/">browser</a>, <a href="/recipes/tags/php/">php</a>, <a href="/recipes/tags/server/">server</a>).
</p>
<p>This is a short hack on how to figure out what OS you site is being accessed from. This is useful if you want to redirect to different versions of your site through php. </p>
Brute Force Break Caesar Cipher in Python (Python)
2013-06-03T17:54:16-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578546-brute-force-break-caesar-cipher-in-python/
<p style="color: grey">
Python
recipe 578546
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/bruteforce/">bruteforce</a>, <a href="/recipes/tags/cipher/">cipher</a>, <a href="/recipes/tags/decryption/">decryption</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote it generates all the combinations possible for brute force breaking a Caesar Cipher. For more information <a href="http://thelivingpearl.com/2013/06/03/caesar-ciphers-in-python/">Caesar Ciphers In Python</a></p>
Storing a Single Username and Encrypted Password to a File (Python)
2013-01-31T02:07:25-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578443-storing-a-single-username-and-encrypted-password-t/
<p style="color: grey">
Python
recipe 578443
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote to check user passwords. It stores data using SHA one-way function. For more information <a href="http://thelivingpearl.com/2013/01/29/authentication-of-users-and-passwords-in-python/">Authentication Of Users And Passwords In Python</a></p>
Bisection Method in Python (Python)
2013-01-16T16:37:33-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578417-bisection-method-in-python/
<p style="color: grey">
Python
recipe 578417
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/bisect/">bisect</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This is a quick way to do bisection method in python. I wrote his code as part of an article, <a href="http://thelivingpearl.com/2013/01/15/the-easy-way-to-solve-equations-in-python/">How to solve equations using python</a></p>
Temperature Conversation Application in Python (Python)
2014-01-03T01:29:28-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578804-temperature-conversation-application-in-python/
<p style="color: grey">
Python
recipe 578804
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/temperature/">temperature</a>, <a href="/recipes/tags/units/">units</a>).
</p>
<p>This is a basic program in python that can cover between units of temperature. This was written for an article on <a href="http://thelivingpearl.com/2014/01/02/temperature-conversation-application-in-python/">How to use modules in Python</a>. </p>
kth compsite number (Python)
2013-07-15T14:34:07-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578607-kth-compsite-number/
<p style="color: grey">
Python
recipe 578607
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/kth/">kth</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>Found this Interview question. Here is my solution to it.</p>
<p>Assume f(x,y,z) = a^x * b^y * c^z</p>
<p>The x, y and z are integers larger than or equal to zero. Find the kth number in the series this function produces.</p>
<p>Check out my blog <a href="http://thelivingpearl.com/">Captain DeadBones Chronicles</a></p>
Simple Addition Multiplication in Python (Python)
2013-06-18T15:21:45-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578565-simple-addition-multiplication-in-python/
<p style="color: grey">
Python
recipe 578565
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/multiplication/">multiplication</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>Here is a very simple program in Python to multiply 2 numbers. I worte for my blog <a href="http://thelivingpearl.com/basic-multiplication-in-python/">Captain DeadBones Chronicles</a></p>
The game of Hangman in Python (Python)
2013-06-06T21:55:18-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578551-the-game-of-hangman-in-python/
<p style="color: grey">
Python
recipe 578551
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>Here is my version of the Game of Hangman in Python. I worte for my blog <a href="http://thelivingpearl.com/2013/06/06/the-game-of-hangman-in-python/">Captain DeadBones Chronicles</a></p>
Complex Methods to Compute Pi in Python (Python)
2013-06-03T18:08:19-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578548-complex-methods-to-compute-pi-in-python/
<p style="color: grey">
Python
recipe 578548
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/pi/">pi</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote about computing Pi with Python. This module uses the Decimal library. For more information <a href="http://thelivingpearl.com/2013/05/28/computing-pi-with-python/">How to Compute Pi in Python</a></p>
Simple Method to Compute Pi in Python (Python)
2013-06-03T18:06:43-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578547-simple-method-to-compute-pi-in-python/
<p style="color: grey">
Python
recipe 578547
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/pi/">pi</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote about computing Pi with Python. For more information <a href="http://thelivingpearl.com/2013/05/28/computing-pi-with-python/">How to Compute Pi in Python</a></p>
Caesar Ciphers Program in Python (Python)
2013-06-03T17:52:24-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578545-caesar-ciphers-program-in-python/
<p style="color: grey">
Python
recipe 578545
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/cipher/">cipher</a>, <a href="/recipes/tags/encryption_decryption/">encryption_decryption</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This script was written for an article I wrote it encrypts and decrypts any plain text into a Caesar Cipher message. For more information <a href="http://thelivingpearl.com/2013/06/03/caesar-ciphers-in-python/">Caesar Ciphers In Python</a></p>
Code To Store Encrypted Password in a File (Python)
2013-01-19T04:07:50-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578430-code-to-store-encrypted-password-in-a-file/
<p style="color: grey">
Python
recipe 578430
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Password Request Code + Reading Password from File (Python)
2013-01-19T04:06:45-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578429-password-request-code-reading-password-from-file/
<p style="color: grey">
Python
recipe 578429
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Play a Sound File in Python using PyGame (Python)
2013-01-08T18:08:55-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578410-play-a-sound-file-in-python-using-pygame/
<p style="color: grey">
Python
recipe 578410
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sound/">sound</a>).
</p>
<p>This is how you can play an ogg sound file in python using the pygame library. This is part of an article about <a href="http://thelivingpearl.com/2013/01/08/morse-code-and-dictionaries-in-python-with-sound/">Morse Code and Dictionaries in Python</a></p>