<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rabid Geek</title>
	<atom:link href="http://www.rabidgeek.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rabidgeek.net</link>
	<description></description>
	<lastBuildDate>Thu, 14 Feb 2013 03:17:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Computational Fluid Dynamics written in Python</title>
		<link>http://www.rabidgeek.net/computational-fluid-dynamics-written-in-python/</link>
		<comments>http://www.rabidgeek.net/computational-fluid-dynamics-written-in-python/#comments</comments>
		<pubDate>Fri, 18 May 2012 17:01:32 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=478</guid>
		<description><![CDATA[Over the past number of weeks, I have been learning Finite Element Analysis to use for solving the Navier-Stokes equations of fluid dynamics.  Finite Element Analysis is used to solve partial differential equations over an unstructured grid.  Usually the grid is made up of triangles or quadrilaterals.   In my case, I used triangles since any [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past number of weeks, I have been learning Finite Element Analysis to use for solving the Navier-Stokes equations of fluid dynamics.  Finite Element Analysis is used to solve partial differential equations over an unstructured grid.  Usually the grid is made up of triangles or quadrilaterals.   In my case, I used triangles since any mesh can be constructed from triangles.</p>
<p>Here are some results. The following is a simulation of Vortex Shedding of an incompressible fluid due to a circular obstacle. The simulation was written in Python using Numpy, Scipy, and Matplotlib and employs the pressure correction method.</p>
<p>Properties of the fluid:<br />
Boundary Velocities:
<p class="ql-center-displayed-equation" style="line-height: 18px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-0b3b6d01d2143708f96e512fa6d09b0e_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91;&#85;&#40;&#48;&#44;&#121;&#41;&#32;&#61;&#32;&#85;&#40;&#53;&#44;&#121;&#41;&#32;&#61;&#85;&#40;&#120;&#44;&#48;&#41;&#32;&#61;&#32;&#85;&#40;&#120;&#44;&#51;&#41;&#32;&#61;&#49;&#46;&#48;&#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p class="ql-center-displayed-equation" style="line-height: 13px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-761ee1efc4bfe82f15129c0926db21e4_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91;&#82;&#101;&#32;&#61;&#32;&#53;&#48;&#48;&#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p><center><iframe src="http://www.youtube.com/embed/xO5ufHpb1Kc" frameborder="0" width="420" height="315"></iframe></center></p>
<p>Another video with the parameters slightly changed.  This uses No-Slip boundary conditions on the top and bottom boundaries as well as a smaller fluid channel<br />
Boundary Velocities:
<p class="ql-center-displayed-equation" style="line-height: 18px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-45f07c7de9a0f62cbd069c9d3d1c332c_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91;&#85;&#40;&#48;&#44;&#121;&#41;&#32;&#61;&#32;&#85;&#40;&#53;&#44;&#121;&#41;&#32;&#61;&#32;&#49;&#46;&#48;&#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p class="ql-center-displayed-equation" style="line-height: 18px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-18156d179697267df5c6070f3258cc77_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91;&#85;&#40;&#120;&#44;&#48;&#41;&#32;&#61;&#32;&#85;&#40;&#120;&#44;&#49;&#41;&#32;&#61;&#32;&#48;&#46;&#48;&#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p class="ql-center-displayed-equation" style="line-height: 13px;"><span class="ql-right-eqno"> &nbsp; </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-cebac4c687b3f21c35549d05e5f027d9_l3.png"class="ql-img-displayed-equation" alt="&#92;&#91;&#82;&#101;&#32;&#61;&#32;&#49;&#48;&#48;&#48;&#92;&#93;" title="Rendered by QuickLaTeX.com"/></p>
<p><center><iframe src="http://www.youtube.com/embed/iBmbaf5U3FY" frameborder="0" width="420" height="315"></iframe></center></p>
<p>I will release the Python code after I have cleaned it up a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/computational-fluid-dynamics-written-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delaunay Triangulation is fun!</title>
		<link>http://www.rabidgeek.net/delaunay-triangulation-is-fun/</link>
		<comments>http://www.rabidgeek.net/delaunay-triangulation-is-fun/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:11:15 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=380</guid>
		<description><![CDATA[I&#8217;ve been trying to learn the Finite Element Method (FEM) for solving partial differential equations.  Turns out that I can&#8217;t do much with the FEM unless I have some kind of mesh, and generating a mesh is annoying.  So I looked into a way of generating one and came across Delaunay Triangulation.  The concept is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to learn the Finite Element Method (FEM) for solving partial differential equations.  Turns out that I can&#8217;t do much with the FEM unless I have some kind of mesh, and generating a mesh is annoying.  So I looked into a way of generating one and came across Delaunay Triangulation.  The concept is quite easy and thought I&#8217;d try to implement it in C++.  Here is the output of the triangulation from a random set of points:</p>
<p><a href="http://www.rabidgeek.net/wp-content/uploads/2011/11/mesh.png"><img class="aligncenter size-full wp-image-376" title="Triangular mesh generated from a random set of points" src="http://www.rabidgeek.net/wp-content/uploads/2011/11/mesh.png" alt="Triangular mesh generated from a random set of points" width="1000" height="1000" /></a></p>
<p>The code is posted on git hub.  Download it using the following commands (if you use git)</p>
<blockquote><p>git clone git://github.com/rabidgeek/Mesh-Triangulation.git</p></blockquote>
<p>Or if you prefer a downloadable link:<br />
Download: <a href="https://github.com/rabidgeek/Mesh-Triangulation/zipball/master">zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/delaunay-triangulation-is-fun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Conky + Twitter</title>
		<link>http://www.rabidgeek.net/conky-twitter/</link>
		<comments>http://www.rabidgeek.net/conky-twitter/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 23:10:05 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=187</guid>
		<description><![CDATA[I finally decided to get a Twitter account.  The first thing I wanted to do was interface it with my Conky script.  The Twitter API was a pain to use and there wasn&#8217;t much documentation on how to use it properly.  So I did some trickery and created a work around. I found a command [...]]]></description>
			<content:encoded><![CDATA[<p>I finally decided to get a Twitter account.  The first thing I wanted to do was interface it with my Conky script.  The Twitter API was a pain to use and there wasn&#8217;t much documentation on how to use it properly.  So I did some trickery and created a work around.</p>
<p>I found a command line interface for twitter called <a href="http://ubuntumanual.org/posts/253/ultimate-geek-stuff-twidge-twitter-command-line-client-for-ubuntulinux">Twidge</a> that was easy to set up and could easily read my Twitter friend&#8217;s feed and output it to the console.  This allowed me to pipe the output to a text file and then use a custom Python script to format the text the way I liked it.  The two lines that needed to be added to Conky are as follows:</p>
<pre class="brush:plain"><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-1f7b881b4cf3d91d833731a3293b33f6_l3.png" class="ql-img-inline-formula" alt="&#123;&#101;&#120;&#101;&#99;&#105;&#32;&#49;&#50;&#48;&#48;&#32;&#116;&#119;&#105;&#100;&#103;&#101;&#32;&#108;&#115;&#114;&#101;&#99;&#101;&#110;&#116;&#32;&#62;&#32;&#32;&#47;&#104;&#111;&#109;&#101;&#47;&#99;&#111;&#109;&#109;&#97;&#110;&#100;&#101;&#114;&#47;&#115;&#99;&#114;&#105;&#112;&#116;&#115;&#47;&#116;&#119;&#101;&#101;&#116;&#115;&#46;&#116;&#120;&#116;&#125;" title="Rendered by QuickLaTeX.com" style="vertical-align: -5px;"/>{execi 1200 python /home/commander/scripts/tw.py /home/commander/scripts/tweets.txt}</pre>
<p>The following is the tw.py python code that reads in the text file generated by Twidge and then reformats it to my choosing.  This code can be ignored if you just want to use the standard output that Twidge uses.  In which case the first line in the Conky script should not pipe the output to the text fiel.</p>
<pre class="brush:py">#!/usr/bin/python
#filename: tw.py
import re
import sys
from time import strftime

def format(text, indent=2, width=70):
    """
    Format a text block.

    This function formats a block of text. The text is broken into
    tokens. (Whitespace is NOT preserved.) The tokens are reassembled
    at the specified level of indentation and line width.  A string is
    returned.

    Arguments:
        `text`   -- the string to be reformatted.
        `indent` -- the integer number of spaces to indent by.
        `width`  -- the maximum width of formatted text (including indent).
    """
    width = width - indent
    out = []
    stack = [word for word in text.replace("\n", " ").split(" ") if word]
    while stack:
        line = ""
        while stack:
            if len(line) + len(" " + stack[0]) &gt; width: break
            if line: line += " "
            line += stack.pop(0)
        out.append(" "*indent + line)
    return "\n".join(out)

if len(sys.argv) != 2:
    print "Error: No input file"
    exit()

f=open(sys.argv[1], 'r')

df = f.read().split("\n")
strin = ""
name = ""
names = []
tweets = []
for l in df:
    match = re.search( "&lt;(\w*)&gt; *([\w\W]*)", l)
    if match:
         names.append(name)
         tweets.append(strin)
         name = match.group(1)
         strin = match.group(2)

    else:
         strin = strin + " " + l.strip()

# All the names are stored in an array called names, and the tweets in an array called tweets
# You cay customize the output the way you like. This method was the best for me

print "                                        TWITTER FEED"
print "                                        Last update: " + strftime("%H:%M:%S")
print "                                       ================================================="
for i in range(1,12):
    ff = format( tweets[i], 50, 100 )
    print "                                        " + names[i] + ":"
    print ff
    print ""</pre>
<p>&nbsp;</p>
<p>The final Conky output looks like (blurred for privacy):</p>
<p><a href="http://www.rabidgeek.net/wp-content/uploads/2011/09/conky+twitter.jpeg"><img class="size-full wp-image-214 aligncenter" title="conky+twitter" src="http://www.rabidgeek.net/wp-content/uploads/2011/09/conky+twitter.jpeg" alt="" width="540" height="919" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/conky-twitter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Video4Linux and Github</title>
		<link>http://www.rabidgeek.net/video4linux-and-github/</link>
		<comments>http://www.rabidgeek.net/video4linux-and-github/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 21:05:16 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=175</guid>
		<description><![CDATA[Recently I decided to try using Github to save my code.  I&#8217;ve used Subversion for a little while and before that I never used any kind of code backup software.  So far I&#8217;m liking it, I have one project up on it. I&#8217;ve been trying to experiment with Video4Linux.  I just bought a new web [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I decided to try using Github to save my code.  I&#8217;ve used Subversion for a little while and before that I never used any kind of code backup software.  So far I&#8217;m liking it, I have one project up on it.</p>
<p>I&#8217;ve been trying to experiment with Video4Linux.  I just bought a new web camera that is plug-n-play and works on linux.  So I tried to find some code that lets me get the webcamera data.  I found one example that is provided by Video4Linux so I modified it and encapsulated it into a C++ class file.  The class allows you to grab the webcam data in either YUV or RGB format, and then process the data however you want. I created an example that grabs the data and then prints out a series of bitmap images.</p>
<p>If you are using git, you can type the following to download the code.</p>
<blockquote><p>git clone git://github.com/rabidgeek/linuxWebcam</p></blockquote>
<p>Or if you do not use git and want a direct download, click the following</p>
<p>Download <a title="zip" href="https://github.com/rabidgeek/linuxWebcam/zipball/master" target="_blank">zip</a><br />
Download <a title="tar" href="https://github.com/rabidgeek/linuxWebcam/tarball/master" target="_blank">tar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/video4linux-and-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applets are up</title>
		<link>http://www.rabidgeek.net/applets-are-up/</link>
		<comments>http://www.rabidgeek.net/applets-are-up/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 18:13:31 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=152</guid>
		<description><![CDATA[If you didn&#8217;t know. I used to run www.physics-lab.net, but I stopped maintaining that site some time ago. I have now put most of the applets I had on that website on this website. So feel free to play with them. Use the above menu or the menu to the right to navigate to the [...]]]></description>
			<content:encoded><![CDATA[<p>If you didn&#8217;t know. I used to run www.physics-lab.net, but I stopped maintaining that site some time ago.  I have now put most of the applets I had on that website on this website. So feel free to play with them.  Use the above menu or the menu to the right to navigate to the different applets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/applets-are-up/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Theme</title>
		<link>http://www.rabidgeek.net/new-theme/</link>
		<comments>http://www.rabidgeek.net/new-theme/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 04:24:55 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=72</guid>
		<description><![CDATA[I think I finally settled on a new theme for my website, so I think this is official. Also, here&#8217;s Schrodinger&#8217;s equation for no apparent reason. (1) &#160; Equation 1 is Schrodinger&#8217;s equation]]></description>
			<content:encoded><![CDATA[<p>I think I finally settled on a new theme for my website, so I think this is official.</p>
<p>Also, here&#8217;s Schrodinger&#8217;s equation for no apparent reason.</p>
<p><a name="id1213773781"></a>
<p class="ql-center-displayed-equation" style="line-height: 44px;"><span class="ql-right-eqno"> (1) </span><span class="ql-left-eqno"> &nbsp; </span><img src="http://www.rabidgeek.net/wp-content/ql-cache/quicklatex.com-f678e2bf5fec1680b73c25d31cabd8cb_l3.png"class="ql-img-displayed-equation" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#32;&#40;&#32;&#45;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#104;&#98;&#97;&#114;&#94;&#50;&#125;&#123;&#50;&#109;&#125;&#32;&#92;&#110;&#97;&#98;&#108;&#97;&#94;&#50;&#32;&#43;&#32;&#86;&#40;&#92;&#118;&#101;&#99;&#32;&#114;&#41;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#32;&#41;&#32;&#92;&#112;&#115;&#105;&#40;&#92;&#118;&#101;&#99;&#32;&#114;&#41;&#32;&#61;&#32;&#69;&#32;&#92;&#112;&#115;&#105;&#40;&#92;&#118;&#101;&#99;&#32;&#114;&#41;&#32; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p>
<p>Equation <a href="#id1213773781">1</a> is Schrodinger&#8217;s equation</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal Sucks</title>
		<link>http://www.rabidgeek.net/drupal-sucks/</link>
		<comments>http://www.rabidgeek.net/drupal-sucks/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:02:11 +0000</pubDate>
		<dc:creator>Gavin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rabidgeek.net/?p=13</guid>
		<description><![CDATA[I tried Drupal, twice&#8230;it crashed both times. So I&#8217;m back to my faithful WordPress.]]></description>
			<content:encoded><![CDATA[<p>I tried Drupal, twice&#8230;it crashed both times. So I&#8217;m back to my faithful WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rabidgeek.net/drupal-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
