<?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>Ali&#039;s Blog &#187; python</title>
	<atom:link href="http://www.almahdi.cc/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.almahdi.cc</link>
	<description>Made from the best stuff on earth</description>
	<lastBuildDate>Tue, 24 Jan 2012 10:16:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Loading fixed width lines in MySQL</title>
		<link>http://www.almahdi.cc/mysql/loading-fixed-width-lines-in-mysql/</link>
		<comments>http://www.almahdi.cc/mysql/loading-fixed-width-lines-in-mysql/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 09:28:37 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ali]]></category>
		<category><![CDATA[Ali Almahdi]]></category>
		<category><![CDATA[ali almahdi blog]]></category>
		<category><![CDATA[ali almahdi twitter]]></category>
		<category><![CDATA[ali blog]]></category>
		<category><![CDATA[Almahdi]]></category>
		<category><![CDATA[linux replace text]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://almahdi.cc/?p=460</guid>
		<description><![CDATA[Today I required to load a file into a database, the file requires some parsing to be loaded. Normal developer would load the file using a programming language, do the parsing and insert into the table. However, for me, I thought I would do it using MySQL DATA LOAD, it is faster and yet, no [...]]]></description>
			<content:encoded><![CDATA[<p>Today I required to load a file into a database, the file requires some parsing to be loaded. Normal developer would load the file using a programming language, do the parsing and insert into the table. However, for me, I thought I would do it using MySQL DATA LOAD, it is faster and yet, no programming language required to load the files.</p>
<p>I am posting a sample code on how to parse files line by line using MySQL.</p>
<blockquote>
<div id="_mcePaste">LOAD DATA LOCAL INFILE &#8216;path/to/my/file&#8217; into table [table-name]</div>
<div id="_mcePaste">(@line)</div>
<div id="_mcePaste">set field1 = SUBSTR(@line,1,10),</div>
<div id="_mcePaste">field2 = SUBSTR(@line, 11,12),</div>
<div id="_mcePaste">field3 = SUBSTR(@line, 48,19)</div>
</blockquote>
<p>Now, what I did, is I just parsed text, since the file was not delimited but it had fixed width.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.almahdi.cc%2Fmysql%2Floading-fixed-width-lines-in-mysql%2F&amp;title=Loading%20fixed%20width%20lines%20in%20MySQL" id="wpa2a_2"><img src="http://www.almahdi.cc/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.almahdi.cc/mysql/loading-fixed-width-lines-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Programming!</title>
		<link>http://www.almahdi.cc/programming/python-programming/</link>
		<comments>http://www.almahdi.cc/programming/python-programming/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 05:05:03 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ali]]></category>
		<category><![CDATA[Ali Almahdi]]></category>
		<category><![CDATA[Almahdi]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://almahdi.cc/?p=429</guid>
		<description><![CDATA[I have tried Python earlier, but its syntax didn&#8217;t make sense to me. Several weeks later, I wanted write a small app, so, I thought, why not try to write it in Python.. Just give it a try&#8230; So, I start writing the app in Python, it took longer than it should have, but it [...]]]></description>
			<content:encoded><![CDATA[<p>I have tried Python earlier, but its syntax didn&#8217;t make sense to me. Several weeks later, I wanted write a small app, so, I thought, why not try to write it in Python.. Just give it a try&#8230; So, I start writing the app in Python, it took longer than it should have, but it was done! Now, I can program in Python. I am so happy that I have finished writing my app in Python. Looks like Python has been added to my portfolio of programming languages.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.almahdi.cc%2Fprogramming%2Fpython-programming%2F&amp;title=Python%20Programming%21" id="wpa2a_4"><img src="http://www.almahdi.cc/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.almahdi.cc/programming/python-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A new year arrives and new projects to come</title>
		<link>http://www.almahdi.cc/programming/a-new-year-arrives-and-new-projects-to-come/</link>
		<comments>http://www.almahdi.cc/programming/a-new-year-arrives-and-new-projects-to-come/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 18:49:21 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ali]]></category>
		<category><![CDATA[Ali Almahdi]]></category>
		<category><![CDATA[Almahdi]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[Marwan]]></category>
		<category><![CDATA[Marwan Alsabbagh]]></category>
		<category><![CDATA[N900]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[pygtk]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://almahdi.cc/?p=388</guid>
		<description><![CDATA[A new year arrived, and new projects are arriving&#8230; My friend Marwan and myself started having several projects to be developed for the Maemo powered devices. However, after discussion today, we have agreed on developing stuff to be cross platform. Most of our development well be in Python GTK. The agreement is that Marwan will [...]]]></description>
			<content:encoded><![CDATA[<p>A new year arrived, and new projects are arriving&#8230; My friend Marwan and myself started having several projects to be developed for the Maemo powered devices. However, after discussion today, we have agreed on developing stuff to be cross platform. Most of our development well be in Python GTK.</p>
<p>The agreement is that Marwan will do most of the development, I will be maintaining the projects. I will be responsible of the packaging and bug fixing and some development. Marwan will be doing the core of the applications.</p>
<p>We will be registering a new domain and it will be dedicated for our joint projects. We have lots of ideas, so wish us luck!!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.almahdi.cc%2Fprogramming%2Fa-new-year-arrives-and-new-projects-to-come%2F&amp;title=A%20new%20year%20arrives%20and%20new%20projects%20to%20come" id="wpa2a_6"><img src="http://www.almahdi.cc/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.almahdi.cc/programming/a-new-year-arrives-and-new-projects-to-come/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

