Popular recipes by Captain DeadBones http://code.activestate.com/recipes/users/4184772/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> 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> 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> A Complete Morse Code Generator in Python with Sound (Python) 2013-01-08T18:13:33-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578411-a-complete-morse-code-generator-in-python-with-sou/ <p style="color: grey"> Python recipe 578411 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/morse_code/">morse_code</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>This is a complete Morse Code Generator with sound. You can <a href="http://temp3.net/thelivingpearl_downloads/morse_sound_files.zip">download the sound files (ogg) for Morse Code</a>. For more information checkout the article <a href="http://thelivingpearl.com/2013/01/08/morse-code-and-dictionaries-in-python-with-sound/">Morse Code and Dictionaries in Python</a></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> 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> 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> 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> Russian Multiplication in Python (Python) 2013-06-18T15:25:02-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578567-russian-multiplication-in-python/ <p style="color: grey"> Python recipe 578567 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. This version follows the Russian Multiplication Algorithm. I worte for my blog <a href="http://thelivingpearl.com/basic-multiplication-in-python/">Captain DeadBones Chronicles</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> 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> 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> Basic Multiplication in Python (Python) 2013-06-18T15:21:08-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578564-basic-multiplication-in-python/ <p style="color: grey"> Python recipe 578564 by <a href="/recipes/users/4184772/">Captain DeadBones</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> 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> 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> Ten's Multiplication Algorithms in Python (Python) 2013-06-18T15:23:36-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578566-tens-multiplication-algorithms-in-python/ <p style="color: grey"> Python recipe 578566 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. This is following a Ten's multiplication algorithms. I worte for my blog <a href="http://thelivingpearl.com/basic-multiplication-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> 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> Simple Morse Code Translator in Python (Python) 2013-01-08T18:02:46-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578407-simple-morse-code-translator-in-python/ <p style="color: grey"> Python recipe 578407 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/morse_code/">morse_code</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>This is a basic Morse Code Generator in python. I wrote it for an article I put together <a href="http://thelivingpearl.com/2013/01/08/morse-code-and-dictionaries-in-python-with-sound/">Morse Code and Dictionaries in Python</a></p>