Popular recipes by FB36 http://code.activestate.com/recipes/users/4172570/2017-06-06T03:48:09-07:00ActiveState Code RecipesInteractive Mandelbrot Fractal Using HTML5 Canvas (JavaScript)
2017-06-06T03:48:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580804-interactive-mandelbrot-fractal-using-html5-canvas/
<p style="color: grey">
JavaScript
recipe 580804
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/canvas/">canvas</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>).
</p>
<p>Interactive Mandelbrot Fractal Using HTML5 Canvas.</p>
<p>(Download and save as html file and open it.)</p>
<p>(Tested only using Firefox browser.)</p>
Reversi Othello (Python)
2016-09-19T18:03:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580698-reversi-othello/
<p style="color: grey">
Python
recipe 580698
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/games/">games</a>).
</p>
<p>Reversi/Othello Board Game using Minimax, Alpha-Beta Pruning, Negamax, Negascout algorithms.</p>
Hamming Error Correction Code (Python)
2016-07-23T07:58:14-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580691-hamming-error-correction-code/
<p style="color: grey">
Python
recipe 580691
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/encoding/">encoding</a>, <a href="/recipes/tags/engineering/">engineering</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>Hamming(7,4) Error Correction Code (ECC).</p>
Simple Infix Expression Evaluation (Python)
2015-11-07T18:44:05-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579122-simple-infix-expression-evaluation/
<p style="color: grey">
Python
recipe 579122
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/stack/">stack</a>).
</p>
<p>Simple infix expression evaluation using a stack.</p>
Image to ASCII Art Converter (Python)
2016-09-25T21:24:12-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580702-image-to-ascii-art-converter/
<p style="color: grey">
Python
recipe 580702
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>ASCII Art Generator (Image to ASCII Art Converter)</p>
<p>Input file maybe JPG, PNG, GIF etc.
Output file name maybe output.txt etc.</p>
Image Projection Onto Sphere (Python)
2016-07-31T22:50:28-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580695-image-projection-onto-sphere/
<p style="color: grey">
Python
recipe 580695
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/imaging/">imaging</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>Image projection onto sphere using Equirectangular map projection.</p>
<p>Download the test image from the Wikipedia page!</p>
Image Resizer (Python)
2016-05-22T16:45:52-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580663-image-resizer/
<p style="color: grey">
Python
recipe 580663
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/utilities/">utilities</a>, <a href="/recipes/tags/utility/">utility</a>).
Revision 2.
</p>
<p>Image resizer/converter command-line utility.</p>
Convert CSV to XML (Python)
2010-10-11T06:20:19-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577423-convert-csv-to-xml/
<p style="color: grey">
Python
recipe 577423
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/xml/">xml</a>).
</p>
<p>Convert CSV to XML.</p>
Random Planet Generator Using Plasma Fractal (Python)
2016-01-25T23:05:25-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580495-random-planet-generator-using-plasma-fractal/
<p style="color: grey">
Python
recipe 580495
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
</p>
<p>Random Planet Generator using 3D Plasma Fractal and Voxel-based Ray Tracing for rendering.</p>
<p>Instead of generating 2D Plasma Fractal and projecting onto sphere, it generates 3D Plasma Fractal (cube) and cuts sphere from it.</p>
Infix Expression Evaluation (Python)
2015-11-08T05:08:26-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579123-infix-expression-evaluation/
<p style="color: grey">
Python
recipe 579123
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/stack/">stack</a>).
</p>
<p>Infix expression evaluation using two stacks.</p>
Reaction Diffusion Simulation (Python)
2015-10-16T19:52:02-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579114-reaction-diffusion-simulation/
<p style="color: grey">
Python
recipe 579114
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>).
Revision 2.
</p>
<p>Reaction-Diffusion Simulation using Gray-Scott Model.</p>
Quasicrystal Pattern Generator (Python)
2015-08-08T20:50:23-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579094-quasicrystal-pattern-generator/
<p style="color: grey">
Python
recipe 579094
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
</p>
<p>Quasicrystal Pattern Generator</p>
CSV to Flat File Converter (Python)
2015-08-02T17:31:59-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579091-csv-to-flat-file-converter/
<p style="color: grey">
Python
recipe 579091
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>Converts a CSV file to a flat file (table).</p>
2D Discrete Fourier Transform (Python)
2015-01-03T03:39:34-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578997-2d-discrete-fourier-transform/
<p style="color: grey">
Python
recipe 578997
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/signal_processing/">signal_processing</a>).
</p>
<p>2D Discrete Fourier Transform (DFT) and its inverse.</p>
<p>Calculates 2D DFT of an image and recreates the image using inverse 2D DFT.</p>
<p>Computation is slow so only suitable for thumbnail size images.</p>
Discrete Fourier Transform (Python)
2014-12-27T21:43:53-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578994-discrete-fourier-transform/
<p style="color: grey">
Python
recipe 578994
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/signal/">signal</a>, <a href="/recipes/tags/signal_processing/">signal_processing</a>).
</p>
<p>Discrete Fourier Transform and Inverse Discrete Fourier Transform</p>
<p>To test, it creates an input signal using a Sine wave that has known frequency, amplitude, phase.
Later it calculates DFT of the input signal and finds its frequency, amplitude, phase to compare.</p>
Send messages between computers (Python)
2014-01-01T22:11:30-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578802-send-messages-between-computers/
<p style="color: grey">
Python
recipe 578802
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/chat/">chat</a>, <a href="/recipes/tags/port/">port</a>, <a href="/recipes/tags/socket/">socket</a>).
</p>
<p>Simple scripts to chat between computers in the same network.</p>
<p>Both computers must be running both of these scripts and target ip addresses must be set correctly.</p>
<p>(IP address of a computer can be found using ipconfig command.)</p>
Shortcut Utility (Python)
2015-03-29T20:45:57-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579041-shortcut-utility/
<p style="color: grey">
Python
recipe 579041
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/desktop/">desktop</a>, <a href="/recipes/tags/directories/">directories</a>, <a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/ui/">ui</a>, <a href="/recipes/tags/utilities/">utilities</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>I dislike filling my desktop with shortcut icons in Windows.
This code enables creating shortcuts in a CSV file.</p>
Draw Text To Image (Python)
2015-07-13T18:04:30-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579013-draw-text-to-image/
<p style="color: grey">
Python
recipe 579013
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/pil/">pil</a>).
Revision 2.
</p>
<p>PIL does not allow resizing default bitmap font.
This code resizes it by itself.</p>
<p>The disadvantage is slow speed but the advantage is it becomes possible to set color of each pixel of text foreground and background.</p>
<p>As an example I set foreground to reverse colors and background to grayscale.</p>
Mandelbrot Fractal image output to ppm file (Python)
2015-01-17T19:21:47-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579006-mandelbrot-fractal-image-output-to-ppm-file/
<p style="color: grey">
Python
recipe 579006
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
</p>
<p>It creates image output without using any external library.</p>
<p>PPM image files can be viewed and converted to other image file formats using many applications, GIMP or IrfanView for example.</p>
Image Converter (Python)
2015-01-18T19:14:38-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579007-image-converter/
<p style="color: grey">
Python
recipe 579007
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/conversions/">conversions</a>, <a href="/recipes/tags/convert/">convert</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>Converts an image from one format to another using PIL.</p>