<?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>Tyrel Souza&#039;s Blog</title>
	<atom:link href="http://www.tyrelsouza.com/d/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tyrelsouza.com/d</link>
	<description>The musings of Tyrel Souza.</description>
	<lastBuildDate>Tue, 08 May 2012 03:07:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Torch Tester for Hypertherm</title>
		<link>http://www.tyrelsouza.com/d/2012/05/07/torch-tester-for-hypertherm/</link>
		<comments>http://www.tyrelsouza.com/d/2012/05/07/torch-tester-for-hypertherm/#comments</comments>
		<pubDate>Tue, 08 May 2012 03:07:01 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=120</guid>
		<description><![CDATA[For the past three months I have been upgrading and rewriting version 2 of my software for Hypertherm. I am under a contract for my father&#8217;s company. His company is developing a machine to test how well air flows (laminar flow) through a plasma cutting torch head, and how much air leaks out over a [...]]]></description>
			<content:encoded><![CDATA[<p>For the past three months I have been upgrading and rewriting version 2 of my software for Hypertherm. I am under a contract for my father&#8217;s company.  His company is developing a machine to test how well air flows (laminar flow) through a plasma cutting torch head, and how much air leaks out over a certain time (delta pressure loss).</p>
<p>This has been a nice adventure. I am talking to the tester over serial, reading in a hand scanner (barcodes and acts as a keyboard easy), talking to a DYMO printer and using a database. </p>
<p>The serial communication was pretty straightforward. I started a new thread and listen for serial all the time. The tricky part with that was that because it was on another thread, I needed a delegate to talk to my UI when I did things like change the picture from  blank to a big red X, or update a label.</p>
<p>The hand scanner wasn&#8217;t even a factor that took longer than 10 minutes, I just pop up a dialog box asking for input.</p>
<p>The DYMO printer was the hardest part. This took me a month to figure out, I kept fighting with the printer. I could figure out how to print to the left roll, the ones we setup as as the passing labels, but I couldn&#8217;t for the life of me figure out how to get it to print to the right label, using a custom label. I tried to load the labels into data and use a StreamWriter/StreamReader object to treat that as the label, but it kept printing one that had, for reasons unknown to me, been locked into the printer. I finally gave up on using the interface they provided and am writing the label to a temporary file. The file is in the user&#8217;s %appdata% directory in a sub directory that it will not be mistakenly written to, so I feel safe doing it this way. Granted, the machine is a single purpose machine, once this program is installed it will only run this program day and night.</p>
<p>Once I got the printer working, I checked it in to github and realized it took me way longer than anticipated. I learned a lot about .NET development (by no means everything, or even most things, just a lot compared to what I did know before [nothing].)</p>
<p>Tonight while developing I decided to video some aspects of the Program.</p>
<p>The following four links are videos, showing parts of the program and machine in action.</p>
<p><a href="http://qik.com/video/50822210" title="Demo of machine with program in action.">Demo of machine with program in action.</a></p>
<p><a href="http://qik.com/video/50822753" title="Passing label">Printing a passing label from a successful test.</a></p>
<p><a href="http://qik.com/video/50823344" title="Failing Label">Printing a Failing label from a test with at least one failure.</a></p>
<p><a href="http://qik.com/video/50823082" title="The test fixture">The test fixture, showing the part.</a></p>
<p>The final video is just the part being tested, and showing the the parts that are tested. Nothing I programmed was in any way represented in the final video, but I am including it to show what I was working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/05/07/torch-tester-for-hypertherm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CFEngine3 Install on CentOS 5.7</title>
		<link>http://www.tyrelsouza.com/d/2012/05/07/cfengine3-install-on-centos-5-7/</link>
		<comments>http://www.tyrelsouza.com/d/2012/05/07/cfengine3-install-on-centos-5-7/#comments</comments>
		<pubDate>Mon, 07 May 2012 20:37:50 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=119</guid>
		<description><![CDATA[Today I was tasked with installing CFEngine3 on CentOS-5.7 (A little outdated). When installing CFEngine-3.3.1 I kept getting an error that I couldn&#8217;t find libtokyocabinet.so.9. I had to set my prefix to /usr/ because the location that tokyocabinet was installing my libraries to was not being read by CFEngine&#8217;s make script. To do this (I [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was tasked with installing CFEngine3 on CentOS-5.7 (A little outdated). When installing CFEngine-3.3.1  I kept getting an error that I couldn&#8217;t find libtokyocabinet.so.9.  I had to set my prefix to /usr/ because the location that tokyocabinet was installing my libraries to was not being read by CFEngine&#8217;s make script.<br />
To do this (I am using tokyocabinet 1.4.47)<br />
<code>...<br />
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz<br />
tar -xzvf tokyocabinet-1.4.47.tar.gz<br />
cd tokyocabinet-1.4.47/<br />
./configure --prefix=/usr/<br />
make<br />
sudo make install<br />
...</code></p>
<p>Then I was able to ./configure &#038;&#038; make &#038;&#038; make install cfengine3 without any problems.</p>
<p>So my overall script looked something like this:<br />
<code>wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz<br />
tar -xzvf tokyocabinet-1.4.47.tar.gz<br />
cd tokyocabinet-1.4.47/<br />
./configure --prefix=/usr/<br />
make<br />
sudo make install<br />
cd ..<br />
wget http://cfengine.com/source-code/download?file=cfengine-3.3.1.tar.gz<br />
tar -xzvf cfengine-3.3.1.tar.gz<br />
cd cfengine-3.3.1<br />
./configure<br />
make<br />
sudo make install<br />
sudo cp /var/cfengine/bin/cf-* /usr/bin/</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/05/07/cfengine3-install-on-centos-5-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NodeJS GanymedeTwilio</title>
		<link>http://www.tyrelsouza.com/d/2012/05/04/nodejs-ganymedetwilio/</link>
		<comments>http://www.tyrelsouza.com/d/2012/05/04/nodejs-ganymedetwilio/#comments</comments>
		<pubDate>Fri, 04 May 2012 14:12:11 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Twilio]]></category>
		<category><![CDATA[UDP]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=116</guid>
		<description><![CDATA[Last night I wrote the beginnings of my first NodeJS application. Is application even the correct word? I&#8217;ve been meaning to try out the cool API by Twilio, which is used for SMS and VoiceCalling. I decided to design a system that will be two+ endpoints. One is the main server which will listen for [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I wrote the beginnings of my first NodeJS application. Is application even the correct word? </p>
<p>I&#8217;ve been meaning to try out the cool API by Twilio, which is used for SMS and VoiceCalling. I decided to design a system that will be two+ endpoints. One is the main server which will listen for UDP messages. When it receives the correct UDP message, configured in the config(<a href="https://github.com/pgte/konphyg" title="konphyg">konphyg</a>) files, it will fire off a message to Twilio and send me a text message.</p>
<p>The next steps, which I should be getting to tonight, are to create the Arduino portion and the serial listener. The Arduino will have a button that will send a message over serial to another NodeJS listener. This will decide if the press was good enough, if it passes the debouncing filter, and then fire a message to the main Ganymede server.</p>
<p>This could be used as a little text message doorbell for when you have your music on too loud. I don&#8217;t believe I will ever sell this, as it&#8217;s just for me to get into NodeJS, but It would be fun to share with friends.</p>
<p>The source so far is located on my github at <a href="https://github.com/tyrelsouza/GanymedeTwilio" title="GanymedeTwilio">GanymedeTwilio</a>.</p>
<p>I will write more as the project continues about the different technologies and comment on my choices in the source a little bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/05/04/nodejs-ganymedetwilio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some BASH tips, C#, etc.</title>
		<link>http://www.tyrelsouza.com/d/2012/03/08/some-bash-tips-c-etc/</link>
		<comments>http://www.tyrelsouza.com/d/2012/03/08/some-bash-tips-c-etc/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 15:17:23 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=115</guid>
		<description><![CDATA[I realize I haven&#8217;t updated in a while. I haven&#8217;t had much free time recently as I&#8217;ve been working on a project for my father in C# after work hours. This is a great change from only working in Python and JavaScript recently. I&#8217;m making a program that will analyze test results from a plasma [...]]]></description>
			<content:encoded><![CDATA[<p>I realize I haven&#8217;t updated in a while. I haven&#8217;t had much free time recently as I&#8217;ve been working on a project for my father in C# after work hours. This is a great change from only working in Python and JavaScript recently. I&#8217;m making a program that will analyze test results from a plasma torch for a company called HyperTherm. My father built the physical machine, but the employees want something that they can better see the results of a passed torch unit, or a failed torch unit. This program has a bar code scanner that scans the tool used in the test and matches it up to the lot of torch parts. Another added feature is the ability to print a white label that says &#8220;UNIT PASSED&#8221; or a giant red label that says the unit failed and which of the 8 tests failed were. I had to learn how to use delegates, as my serial event listener is on a separate thread and I can&#8217;t update labels, or parts of the User Interface without them.  Still working on it, hopefully will wrap it up by Saint Patrick&#8217;s day.</p>
<p>I recently found a cool command in BASH that I hadn&#8217;t previously known.  C-o will execute the current line, and then bring the following line up from BASH history. If you have a set of commands you want to execute again, rather than having to press up 20 times, hit enter, press up 19 times, hit enter, and so on&#8230; You can just hit up 20 times. Press C-o as many times as you need to.</p>
<p>For example<br />
<code>tacidsky@ip-234:~$ touch a<br />
tacidsky@ip-234:~$ touch b<br />
tacidsky@ip-234:~$ touch c<br />
[up] [up] [up]<br />
tacidsky@ip-234:~$ touch a [C-o]<br />
tacidsky@ip-234:~$ touch b [C-o]<br />
tacidsky@ip-234:~$ touch c [C-o]</code></p>
<p>As you can see there, all I had to do was go back to the `touch a` line, and hit control-o three times and it touched the files again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/03/08/some-bash-tips-c-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Written Exam</title>
		<link>http://www.tyrelsouza.com/d/2012/02/17/written-exam/</link>
		<comments>http://www.tyrelsouza.com/d/2012/02/17/written-exam/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 18:04:23 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[flying]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=114</guid>
		<description><![CDATA[I wanted to write here that I passed my written exam for my Private Pilot&#8217;s license and am INCHES away from being a private pilot. I studied hardcore this week, and last weekend I went to a Seminar in Albany (ok.. Schenectady) and picked up what I have been forgetting from my Ground School. The [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to write here that I passed my written exam for my Private Pilot&#8217;s license and am INCHES away from being a private pilot. I studied hardcore this week, and last weekend I went to a Seminar in Albany (ok.. Schenectady) and picked up what I have been forgetting from my Ground School.</p>
<p>The next steps are to meet with mt instructor and talk about what I did wrong on the written, practice some more with actual flying, and then take the practical. The main thing holding me back right now is wind. It&#8217;s been very windy and I haven&#8217;t flown a lot since January so my skills are rusty. I need to get over my fear of winds higher than 10kts and adapt my skills to the situation.</p>
<p>I was hoping to get my license before my birthday on March 3, but I don&#8217;t think that would be doable in the following two weekends.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/02/17/written-exam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HubSpot</title>
		<link>http://www.tyrelsouza.com/d/2012/02/17/hubspot/</link>
		<comments>http://www.tyrelsouza.com/d/2012/02/17/hubspot/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 17:35:13 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=112</guid>
		<description><![CDATA[I was invited to a Hackathon that one of our client&#8217;s client was throwing. Being that I love programming and learning, I decided I would go. The event was in Cambridge, MA. I arrive early, (my friend said there would be a lot more traffic than there was at that time of day) so I [...]]]></description>
			<content:encoded><![CDATA[<p>I was invited to a Hackathon that one of our client&#8217;s client was throwing. Being that I love programming and learning, I decided I would go.</p>
<p>The event was in Cambridge, MA. I arrive early, (my friend said there would be a lot more traffic than there was at that time of day) so I got a tour of office. It&#8217;s situated in an old, what I believe to be, factory building. The coolest part of the office was that they had whiteboard paint on every wall surface, complete with markers of course.</p>
<p>The event started and people who were attending had tossed up ideas on the white board. A couple people wanted to integrate LinkedIN with HubSpot. Another person wanted to integrate Eventbrite with HubSpot, to get information to/from event goers after the event ends. I didn&#8217;t like any of those ideas and my only experience with HubSpot is their Leads API, so I stuck to what I know.</p>
<p>I had an idea for an app the second I walked in the door, it was like magic. My main hassle was that HubSpot&#8217;s Canvas integration REQUIRES HTTPS. Now, my web host is DreamHost and I am kind of cheap, so of course I don&#8217;t have any way to host a HTTPS site immediately. A big part of me wanted to bite the bullet and order a secure server from DreamHost, or setup another linode, but I felt that I&#8217;ve been spending a lot of money lately and that I would figure out a way. Adrian, my contact at HubSpot, of who I am working with on the PPC project(more on that later), walked by and saved me.</p>
<p>He asked if I had ever used GoogleAppEngine. Of course I hadn&#8217;t because I was under the belief that it cost money to use, but then I realized I was thinking of Amazon&#8217;s EC2. I sign up for GAE and within an hour I have a HelloWorld site setup. The slow part was installing Python2.5 so I could use the same version that GAE used and not have to fix a lot of backwards compatibility errors between 2.5-&gt;2.7.</p>
<p>After I had a site up that could do HTTPS I dove into programming for my HubSpot app. The app I am doing for work graphs leads per day combined with Google AdWords data per day. I decided to do something different. My app is still a graph, as graphs are fun and easy to understand by everyone.</p>
<p>This app graphs a set of leads and shows how many leads happened in a given hour for the previous day. Given extra time I would have added an interface to specify the day to graph leads, but last night my time was severely limited by the fact that I had to setup my environment for GoogleAppsEngine.</p>
<p>Improvements I can and want to do to this app are database, faster processing, and being able to select a date. I almost wanted to break down and learn NodeJS for this, because from my understanding of the event driven nature of NodeJS would be a lot easier to load data over a longer period of time, than to just load it all at once and timeout with HubSpot&#8217;s Jakarta Commons-HttpClient.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/02/17/hubspot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vertical bars in Graphite</title>
		<link>http://www.tyrelsouza.com/d/2012/02/08/vertical-bars-in-graphite/</link>
		<comments>http://www.tyrelsouza.com/d/2012/02/08/vertical-bars-in-graphite/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 20:20:20 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Graphing]]></category>
		<category><![CDATA[Graphite]]></category>
		<category><![CDATA[txStatsD]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=111</guid>
		<description><![CDATA[I am working with txStatsD and Graphite. I was having the hardest problem looking through the txStatsD code today finding how to graph something as an event, not a data point. I eventually went into every option on the graphite dashboard and found an option to make a bar. This is the option that you [...]]]></description>
			<content:encoded><![CDATA[<p>I am working with txStatsD and Graphite. I was having the hardest problem looking through the txStatsD code today finding how to graph something as an event, not a data point. I eventually went into every option on the graphite dashboard and found an option to make a bar.<br />
<a href="http://www.tyrelsouza.com/d/wp-content/uploads/2012/02/affinfinite.png"><img src="http://www.tyrelsouza.com/d/wp-content/uploads/2012/02/affinfinite-292x300.png" alt="" title="affinfinite" width="292" height="300" class="alignnone size-medium wp-image-113" /></a><br />
This is the option that you must use when you want to mark events. For example we want to know &#8220;Server restarted&#8221;, we would use this technique, as it doesn&#8217;t make sense to aggregate &#8220;server restarted&#8221;. Using nonzero as infinite is a good way to show an event took place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/02/08/vertical-bars-in-graphite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You can un-expire a GPG key.</title>
		<link>http://www.tyrelsouza.com/d/2012/01/13/you-can-un-expire-a-gpg-key/</link>
		<comments>http://www.tyrelsouza.com/d/2012/01/13/you-can-un-expire-a-gpg-key/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 22:13:36 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=109</guid>
		<description><![CDATA[Today we had a problem at work on a system. Without getting into too much detail as to give away secrets behind the verbal NDA I am behind, I will just say that it had to do with a GPG public key of mine that was expired on a dev machine, accidentally propagating during install [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had a problem at work on a system. Without getting into too much detail as to give away secrets behind the verbal NDA I am behind, I will just say that it had to do with a GPG public key of mine that was expired on a dev machine, accidentally propagating during install to a production machine.</p>
<p>This key had a sub key as well, so figuring out this was tricky.</p>
<p>To start, you can list your gpg keys like so</p>
<p><code>gpg --list-keys</code></p>
<p>This will list keys such as<br />
<code>pub   4096R/01A53981 2011-11-09 [expires: 2016-11-07]<br />
uid &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tyrel Anthony Souza (Five year key for email.) <tacidsky@tacidsky.com><br />
sub   4096R/C482F56D 2011-11-09 [expires: 2016-11-07]<br />
</code></p>
<p>To make this not expire, (same steps to change expiration date to another time), you must first edit the key<br />
<code>gpg --edit-key 01A53981</code><br />
You will then see a gpg prompt</p>
<p><code>gpg&gt;</code></p>
<p>Type &#8220;expire&#8221; in and you will be prompted for how long to change it to<br />
<code>Changing expiration time for the primary key.<br />
Please specify how long the key should be valid.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 = key does not expire<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;n&gt;  = key expires in n days<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;n&gt;w = key expires in n weeks<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;n&gt;m = key expires in n months<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;n&gt;y = key expires in n years</code></p>
<p>You are then done setting the expiration on the primary key, if you have sub key, doing this is as easy as typing<br />
<code>key 1</code><br />
and repeating the expiration step.</p>
<p>To finish and wrap things up, type <code>save</code> and you are done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/01/13/you-can-un-expire-a-gpg-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Django URLField</title>
		<link>http://www.tyrelsouza.com/d/2012/01/05/custom-django-urlfield/</link>
		<comments>http://www.tyrelsouza.com/d/2012/01/05/custom-django-urlfield/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 04:27:06 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=108</guid>
		<description><![CDATA[For work I had to write a custom url model field. This model field when setting up accepts a default protocol, and a list of other protocols. When checking the protocol, the url is split by &#8220;://&#8221;. If the split has one or two parts, then the url is validly formed. In the event of [...]]]></description>
			<content:encoded><![CDATA[<p>For work I had to write a custom url model field. This model field when setting up accepts a default protocol, and a list of other protocols.</p>
<p>When checking the protocol, the url is split by &#8220;://&#8221;. If the split has one or two parts, then the url is validly formed.<br />
In the event of a single element split, there is no protocol specified. When there is no protocol, the url is prepended with the default protocol specified. If there is a protocol, it is checked to make sure it exists in a union of the default protocol and other protocols. If it is not, a ValidationError is raised letting the user know that the protocol is not accepted.</p>
<p>This can all be found at <a href="https://github.com/tyrelsouza/customurlfield" title="Custom URLField">On my github</a>. </p>
<p>I have a couple ways I could have done this better and probably will. Improvements would be just one parameter called parameters in which it is checked if there is at least one element. Passing this, when there is no protocol specified, the first element is the default one.<br />
This would be a little cleaner.</p>
<p>this example would allow for http, https, ssh, spdy and mailto, anything else would error out.<br />
<code>facebook_page = URLField(default_protocol="http",<br />
    protocols=["https","ssh","spdy","mailto"])</code></p>
<p>The way I could improve this would be<br />
<code>facebook_page = URLField(protocols=["https","https","ssh","spdy","mailto"])</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2012/01/05/custom-django-urlfield/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Progress Bar</title>
		<link>http://www.tyrelsouza.com/d/2011/12/21/python-progress-bar/</link>
		<comments>http://www.tyrelsouza.com/d/2011/12/21/python-progress-bar/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:22:29 +0000</pubDate>
		<dc:creator>tacidsky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.tyrelsouza.com/d/?p=104</guid>
		<description><![CDATA[I was looking for a nice progress bar today at work to show progress rather than just printing &#8220;Waiting 30 seconds&#8230;&#8221; and having the script do nothing, I wanted to have a progress bar show. I found a progress bar from Corey Goldberg I did make a couple changes, and have uploaded my changes to [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a nice progress bar today at work to show progress rather than just printing &#8220;<strong><em>Waiting 30 seconds&#8230;</em></strong>&#8221; and having the script do nothing, I wanted to have a progress bar show.</p>
<p>I found a progress bar from <a title="Google code" href="http://code.google.com/p/corey-projects/source/browse/trunk/python2/progress_bar.py">Corey Goldberg</a></p>
<p>I did make a couple changes, and have uploaded my changes to my GitHub account.</p>
<p><a href="https://github.com/tyrelsouza/newPythonProgressBar">newPythonProgressBar</a></p>
<p>To use this progressbar, it is very easy.</p>
<p><code># To Setup<br />
from progress_bar import ProgressBar<br />
import sys<br />
import time<br />
def updateBar(step):<br />
&nbsp;&nbsp;&nbsp;&nbsp;p.update_time(step)<br />
&nbsp;&nbsp;&nbsp;&nbsp;sys.stdout.write("%s\r" % p)<br />
&nbsp;&nbsp;&nbsp;&nbsp;sys.stdout.flush()<br />
#<br />
# to call<br />
#<br />
wait_time = 100 # seconds<br />
p = ProgressBar(wait_time)<br />
p.empty_char = "."<br />
p.unit = "^"<br />
for step in range(wait_time+1):<br />
&nbsp;&nbsp;&nbsp;&nbsp;updateBar(step)<br />
&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(1)<br />
</code></p>
<p>It will look like this when you use it</p>
<p><code>[###...............7%..................] 7^/100^</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tyrelsouza.com/d/2011/12/21/python-progress-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

