<?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>Software Artist</title>
	<atom:link href="http://gowrishankarnath.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gowrishankarnath.com</link>
	<description>My Thoughts, My Learnings</description>
	<lastBuildDate>Sun, 04 Feb 2018 20:46:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	

<image>
	<url>http://gowrishankarnath.com/wp-content/uploads/2015/11/cropped-gs1-32x32.png</url>
	<title>Software Artist</title>
	<link>http://gowrishankarnath.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Python Application Programming Course Material VTU, Belagavi</title>
		<link>http://gowrishankarnath.com/python-application-programming-course-material-vtu-belagavi/</link>
		<comments>http://gowrishankarnath.com/python-application-programming-course-material-vtu-belagavi/#respond</comments>
		<pubDate>Sun, 04 Feb 2018 20:44:17 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[VTU]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=575</guid>
		<description><![CDATA[<p>I have uploaded the course material for &#8220;Python Application Programming&#8221;, as prescribed by Visvesvaraya Technological University, Belagavi popularly known as VTU. You will find slide deck (ppts) for all the units with programming examples. Also, few model question papers are provided for reference. Python_Application_Programming_VTU</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/python-application-programming-course-material-vtu-belagavi/">Python Application Programming Course Material VTU, Belagavi</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>I have uploaded the course material for &#8220;Python Application Programming&#8221;, as prescribed by Visvesvaraya Technological University, Belagavi popularly known as VTU.</p>
<p>You will find slide deck (ppts) for all the units with programming examples.</p>
<p>Also, few model question papers are provided for reference.</p>
<p><a href="http://gowrishankarnath.com/wp-content/uploads/2018/02/Python_Application_Programming_VTU.zip">Python_Application_Programming_VTU</a></p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/python-application-programming-course-material-vtu-belagavi/">Python Application Programming Course Material VTU, Belagavi</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/python-application-programming-course-material-vtu-belagavi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Programming of Raspberry Pi using PyCharm</title>
		<link>http://gowrishankarnath.com/remote-programming-raspberry-pi-using-pycharm/</link>
		<comments>http://gowrishankarnath.com/remote-programming-raspberry-pi-using-pycharm/#respond</comments>
		<pubDate>Mon, 19 Dec 2016 12:07:47 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=556</guid>
		<description><![CDATA[<p>This tutorial is about using PyCharm IDE on a Windows machine to remotely execute Python 2.7 programs on Raspberry Pi. Despite my best efforts I could not find a step by step tutorial on how to remotely connect PyCharm to Raspberry Pi and use the Raspberry Pi python interpreter to execute the programs. So I’m [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/remote-programming-raspberry-pi-using-pycharm/">Remote Programming of Raspberry Pi using PyCharm</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">This tutorial is about using PyCharm IDE on a Windows machine to remotely execute Python 2.7 programs on Raspberry Pi. Despite my best efforts I could not find a step by step tutorial on how to remotely connect PyCharm to Raspberry Pi and use the Raspberry Pi python interpreter to execute the programs. So I’m listing out the steps here. This tutorial is tested on a Windows 10 machine and Raspberry Pi running Raspbian OS.</p>
<p style="text-align: justify;"><strong>Step</strong> <strong>1</strong>: Ensure the Windows Machine and Raspberry Pi are part of the same Network.</p>
<p style="text-align: justify;"><strong>Step 2:</strong> Install PyCharm Professional Edition on you Windows machine.</p>
<p style="text-align: justify;"><strong>Step 3:</strong> You need to get the IP Address of Raspberry Pi. To do so, open the Terminal window on raspberry pi and type the following command <strong>ifconfig</strong></p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/1.png" rel="attachment wp-att-557"><img class="wp-image-557 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/1-300x182.png" alt="1" width="605" height="367" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/1-300x182.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/1.png 583w" sizes="(max-width: 605px) 100vw, 605px" /></a></p>
<p style="text-align: justify;">As can be seen from the screenshot, Raspberry Pi is connected to the Wireless LAN and the address is 172.16.2.100. It may vary on your Raspberry Pi. Make a note of this address.</p>
<p style="text-align: justify;"><strong>Step 4:</strong> Once you have obtained the Address, go to your home directory and create a folder as shown in the below screenshot. This folder is used to store the Python programs.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/2.png" rel="attachment wp-att-558"><img class="wp-image-558 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/2-300x108.png" alt="2" width="411" height="148" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/2-300x108.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/2.png 332w" sizes="(max-width: 411px) 100vw, 411px" /></a></p>
<p style="text-align: justify;"><strong>Step 5:</strong> Invoke your PyCharm IDE. Create a new Project. Go to File <strong>→</strong> New Project <strong>→</strong> Pure Python → Give a Project Name. In my case it is RaspberryPiProject.</p>
<p style="text-align: justify;"><strong>Step 6:</strong> Right Click on RaspberryPiProject and select New → Python File and give a name to python file. In my case it is rasp.py</p>
<p style="text-align: justify;"><strong>Step 7:</strong> Write the line <strong>print “Hello RaspberryPi” </strong>in the editor.</p>
<p style="text-align: justify;"><strong>Step 8:</strong> Now go to File  → Settings</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/3.png" rel="attachment wp-att-559"><img class="wp-image-559 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/3-300x77.png" alt="3" width="627" height="161" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/3-300x77.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/3.png 657w" sizes="(max-width: 627px) 100vw, 627px" /></a></p>
<p style="text-align: justify;">On the left pane of the window you should see Project:RaspberryPiProject. (If you have given a different name then it may differ from what is displayed here) Expand it and Click on Project Interpreter</p>
<p style="text-align: justify;">On the right pane of the window, click at the end of Project Interpreter and select Add Remote option as shown below.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/4.png" rel="attachment wp-att-560"><img class="wp-image-560 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/4-300x66.png" alt="4" width="586" height="129" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/4-300x66.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/4.png 623w" sizes="(max-width: 586px) 100vw, 586px" /></a></p>
<p style="text-align: justify;">A Remote Python Interpreter window pops up.</p>
<p style="text-align: justify;"><strong>Step 9:</strong> Configure the Remote Python Interpreter window.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/5.png" rel="attachment wp-att-561"><img class="wp-image-561 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/5-300x178.png" alt="5" width="580" height="344" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/5-300x178.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/5.png 429w" sizes="(max-width: 580px) 100vw, 580px" /></a></p>
<p style="text-align: justify;">Write the IP address of the Raspberry Pi you earlier made note of in the Host option. Give the user name and password. Specify the Python interpreter path on raspberry pi. Click OK. Now you should see the Python Interpreter found in Raspberry Pi.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/6.png" rel="attachment wp-att-562"><img class="wp-image-562 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/6-300x63.png" alt="6" width="595" height="125" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/6-300x63.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/6.png 625w" sizes="(max-width: 595px) 100vw, 595px" /></a></p>
<p style="text-align: justify;"><strong>Step 10:</strong>  Now go to Tools à Deployment → Configuration and click on + sign on the left pane. You should see a window.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/7.png" rel="attachment wp-att-563"><img class="wp-image-563 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/7-300x98.png" alt="7" width="603" height="197" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/7-300x98.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/7.png 625w" sizes="(max-width: 603px) 100vw, 603px" /></a></p>
<p style="text-align: justify;">At this stage RaspberryPi will be treated as a Server machine. Give a name to your RaspberryPi server (in my case it is GS_Research) and select the type as SFTP and click OK</p>
<p style="text-align: justify;"><strong>Step 11:</strong> Click on the Connections tab and specify the IP address of the RaspberryPi again in SFTP host</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/8.png" rel="attachment wp-att-564"><img class="wp-image-564 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/8-300x176.png" alt="8" width="597" height="350" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/8-300x176.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/8.png 625w" sizes="(max-width: 597px) 100vw, 597px" /></a></p>
<p style="text-align: justify;">Leave the port and Root path as it is. Specify the User Name and Password</p>
<p style="text-align: justify;">Then click on Mappings tab.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/9.png" rel="attachment wp-att-565"><img class="wp-image-565 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/9-300x120.png" alt="9" width="603" height="241" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/9-300x120.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/9.png 624w" sizes="(max-width: 603px) 100vw, 603px" /></a></p>
<p style="text-align: justify;">Specify the local path where you have stored the python project in the Windows machine. Then specify the path which we had created to store the Python programs on raspberry pi i.e.,<strong> /home/pi/pywork </strong>and click OK.</p>
<p style="text-align: justify;"><strong>Step 12:</strong> Now we need to upload the Python file created on a Windows machine on to Raspberry Pi and compile the program using Raspberry Pi Python Interpreter.</p>
<p style="text-align: justify;">Go to Tools → Deployment → Upload to GS_Research.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/10.png" rel="attachment wp-att-566"><img class="wp-image-566 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/10-300x189.png" alt="10" width="583" height="367" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/10-300x189.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/10.png 623w" sizes="(max-width: 583px) 100vw, 583px" /></a></p>
<p style="text-align: justify;">Remember, here GS_Research is the name given to the Raspberry Pi server. At the bottom pane, you can see that the file is successfully uploaded.</p>
<p style="text-align: justify;">Now open the terminal window again on the Raspberry Pi and go to the path where you intended to store Python programs. If you have followed the instructions then the path is /home/pi/pywork. You should see the rasp.py file in there.</p>
<p style="text-align: justify;"><strong>Step 13:</strong> You need to sync the Python code with Raspberry Pi as and when you write your code in PyCharm. To do that go to Tools → Deployment → Sync with Deployed to GS_Research.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/12/11.png" rel="attachment wp-att-567"><img class="wp-image-567 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/12/11-300x103.png" alt="11" width="612" height="210" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/12/11-300x103.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/12/11.png 624w" sizes="(max-width: 612px) 100vw, 612px" /></a></p>
<p style="text-align: justify;">Happy Coding…</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/remote-programming-raspberry-pi-using-pycharm/">Remote Programming of Raspberry Pi using PyCharm</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/remote-programming-raspberry-pi-using-pycharm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nomenclature for Naming Published Research Papers</title>
		<link>http://gowrishankarnath.com/nomenclature-naming-published-research-papers/</link>
		<comments>http://gowrishankarnath.com/nomenclature-naming-published-research-papers/#respond</comments>
		<pubDate>Sun, 24 Jul 2016 16:01:02 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=551</guid>
		<description><![CDATA[<p>Recently, I was asked to collect the research papers published by all the faculty member in our department. This made me to think, what might be the best way to collect and sort these papers? I thought of coming up with a naming convention for these papers based on requirements as mentioned below. On any [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/nomenclature-naming-published-research-papers/">Nomenclature for Naming Published Research Papers</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Recently, I was asked to collect the research papers published by all the faculty member in our department. This made me to think, what might be the best way to collect and sort these papers?</p>
<p style="text-align: justify;">I thought of coming up with a naming convention for these papers based on requirements as mentioned below.</p>
<ol style="text-align: justify;">
<li>On any given day, I should be able to pick the exact paper belonging to a particular faculty.</li>
<li>Keep track of number of papers published by each faculty.</li>
<li>Whether the paper is published in Journal or Conference.</li>
<li>Ability to sort the papers year wise.</li>
</ol>
<p style="text-align: justify;">Based on the above requirements I devised the following way to name each file.</p>
<ol style="text-align: justify;">
<li>Paper name is divided into six components. Each of these components is separated by a Hyphen.</li>
<li>First component is the type of paper. If the paper is published in International Journal then use the Keyword<strong> IJ</strong>, likewise for International Conference use <strong>IC</strong>, for National Journal use <strong>NJ</strong> and for National Conference use <strong>NC</strong></li>
<li>Second component is the name of the concerned faculty. Use the first three letters of the faculty name. For e.g., if the faculty name is Patrick.G.S then the second component will be PAT.</li>
<li>Third component is the initials of the concerned faculty. So w.r.t. the above name the third component will be GS (exclude dots).</li>
<li>Fourth component is the month in which the paper was published. For e.g., if the paper is published in the month of March then use the numeral 03. (prefix 0 for single digits)</li>
<li>Fifth component is the year in which the paper was published. For e.g., if the paper is published in the year 2016 then it’ll be the fifth component.</li>
<li>Sixth component is the count of the number of papers the faculty has published under a particular category of IJ or IC or NJ or NC.</li>
</ol>
<p style="text-align: justify;">Based on the requirements discussed, if for e.g., Prof. Patrick.G.S has published in 2 International Journals and in 2 International Conferences then the nomenclature for these papers will be as shown below:</p>
<p style="text-align: justify;"><strong>For International Journal</strong></p>
<p style="text-align: justify;">IJ-PAT-GS-03-2016-1</p>
<p style="text-align: justify;">IJ-PAT-GS-05-2016-2</p>
<p style="text-align: justify;"><strong>For International Conference</strong></p>
<p style="text-align: justify;">IC-PAT-GS-10-2016-1</p>
<p style="text-align: justify;">IC-PAT-GS-11-2016-2</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/07/paper.png" rel="attachment wp-att-552"><img class="wp-image-552 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/07/paper-300x133.png" alt="paper" width="548" height="243" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/07/paper-300x133.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/07/paper.png 765w" sizes="(max-width: 548px) 100vw, 548px" /></a></p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/nomenclature-naming-published-research-papers/">Nomenclature for Naming Published Research Papers</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/nomenclature-naming-published-research-papers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traverse and Rename files in folder</title>
		<link>http://gowrishankarnath.com/traverse-rename-files-folder/</link>
		<comments>http://gowrishankarnath.com/traverse-rename-files-folder/#respond</comments>
		<pubDate>Wed, 11 May 2016 14:46:37 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Files]]></category>
		<category><![CDATA[Folders]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=533</guid>
		<description><![CDATA[<p>I recently encountered a problem wherein I had to traverse through all the files in a folder and rename each file. The original files is as shown below having a set of characters and number separated by an &#8220;-&#8221; (hyphen) with jpg extension. d6445cef9361a2bf-1.jpg d6445cef9361a2bf-2.jpg d6445cef9361a2bf-3.jpg and so on. Here, the requirement was to remove [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/traverse-rename-files-folder/">Traverse and Rename files in folder</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I recently encountered a problem wherein I had to traverse through all the files in a folder and rename each file.</p>
<p style="text-align: justify;">The original files is as shown below having a set of characters and number separated by an &#8220;-&#8221; (hyphen) with jpg extension.</p>
<p style="text-align: justify;"><strong>d6445cef9361a2bf-1.jpg</strong></p>
<p style="text-align: justify;"><strong>d6445cef9361a2bf-2.jpg</strong></p>
<p style="text-align: justify;"><strong>d6445cef9361a2bf-3.jpg and so on.</strong></p>
<p style="text-align: justify;">Here, the requirement was to remove the left part of the &#8220;-&#8221; (hyphen) and retain only the number and the extension.</p>
<p style="text-align: justify;">So, here is my approach.</p>
<pre class="brush: python; title: ; notranslate">
from glob import glob
import os

pathFromUser = input(&quot;Enter the Path&quot;)
files_list = glob(os.path.join(pathFromUser, '*.jpg'))
for each_file in files_list:
    number = os.path.basename(each_file).split(&quot;-&quot;)[1].split(&quot;.&quot;)[0]
    os.rename(each_file, number + &quot;.jpg&quot;)
</pre>
<p style="text-align: justify;">In line 4, we ask the user to enter the path for the folder which contains all the files. In line 5, a list of all the files in the folder is assigned to the list called files_list. One should be aware that it&#8217;s not only the filename but a combination of both path and filename i.e., C:\foldername\d6445cef9361a2bf-1.jpg. In line 6, we loop through each file in the list. In line 7, the basename method is used to obtain the name of the file from the path and then we split the filename based on &#8220;-&#8221; (hyphen) and we again split the resultant value based on &#8220;.&#8221; (dot). This line results in a number present in the file and is assigned to the variable number. Then we use the method <strong>rename</strong> to rename each file to the value that is present in the number.</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/traverse-rename-files-folder/">Traverse and Rename files in folder</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/traverse-rename-files-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Software Stack for Python Platform: From Academia to Industry</title>
		<link>http://gowrishankarnath.com/open-source-software-stack-python-platform-academia-industry/</link>
		<comments>http://gowrishankarnath.com/open-source-software-stack-python-platform-academia-industry/#respond</comments>
		<pubDate>Mon, 02 May 2016 13:42:00 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=528</guid>
		<description><![CDATA[<p>“Open Source Software Stack for Python Platform: From Academia to Industry”, Proceedings of CSI Communications, Vol. 40, Issue No. , April 2016, pp:21 – 23 (ISSN:0970-647X) http://csi-india.org/digital_magazine/April2016//mobile/index.html#p=21</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/open-source-software-stack-python-platform-academia-industry/">Open Source Software Stack for Python Platform: From Academia to Industry</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><strong>“Open Source Software Stack for Python Platform: From Academia to Industry”, </strong>Proceedings of CSI Communications, Vol. 40, Issue No. , April 2016, pp:21 – 23 (ISSN:0970-647X)</p>
<p style="text-align: justify;">
<p style="text-align: justify;"><a href="http://csi-india.org/digital_magazine/April2016//mobile/index.html#p=21">http://csi-india.org/digital_magazine/April2016//mobile/index.html#p=21</a></p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/open-source-software-stack-python-platform-academia-industry/">Open Source Software Stack for Python Platform: From Academia to Industry</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/open-source-software-stack-python-platform-academia-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using RStudio with GitHub</title>
		<link>http://gowrishankarnath.com/using-rstudio-github/</link>
		<comments>http://gowrishankarnath.com/using-rstudio-github/#respond</comments>
		<pubDate>Sun, 06 Mar 2016 19:46:28 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[GitHub]]></category>
		<category><![CDATA[R Programming]]></category>
		<category><![CDATA[RStudio]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=487</guid>
		<description><![CDATA[<p>Introduction This tutorial Introduces the reader to step by step instruction in using RStudio IDE with GitHub. Using RStudio with GitHub All these steps are tested on a Windows 10 machine with RStudio version 0.99.x. I assume that you have already already installed RStudio and GitHub. If you haven&#8217;t still installed GitHub then please follow [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/using-rstudio-github/">Using RStudio with GitHub</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h1 style="text-align: justify;">Introduction</h1>
<p style="text-align: justify;">This tutorial Introduces the reader to step by step instruction in using RStudio IDE with GitHub.</p>
<h1 style="text-align: justify;">Using RStudio with GitHub</h1>
<p style="text-align: justify;">All these steps are tested on a Windows 10 machine with RStudio version 0.99.x. I assume that you have already already installed RStudio and GitHub. If you haven&#8217;t still installed GitHub then please follow the first 6 steps of <strong>Install GitHub</strong> portion found at</p>
<p style="text-align: justify;">
<blockquote class="wp-embedded-content" data-secret="VLCCfR3hOD"><p><a href="http://gowrishankarnath.com/configuring-pycharm-to-work-with-enthought-canopy-and-github/">Configuring PyCharm to Work With Enthought Canopy and GitHub</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" src="http://gowrishankarnath.com/configuring-pycharm-to-work-with-enthought-canopy-and-github/embed/#?secret=VLCCfR3hOD" data-secret="VLCCfR3hOD" width="600" height="338" title="&#8220;Configuring PyCharm to Work With Enthought Canopy and GitHub&#8221; &#8212; Software Artist" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p style="text-align: justify;">Assuming that both RStudio and GitHub is configured properly, type the following two command at the command prompt.</p>
<p style="text-align: justify;"><strong>git config –global user.name “your GitHub account name”                                                    </strong></p>
<p style="text-align: justify;"><strong>git config –global user.email “GitHubEmail@something.com”</strong></p>
<h3 style="text-align: justify;">Step1:</h3>
<p style="text-align: justify;">Go to your GitHub account and create an repository. To create an repository go to the upper right corner and click on the <strong>&#8220;+&#8221; </strong>sign.</p>
<p style="text-align: justify;">
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/1.png" rel="attachment wp-att-488"><img class="wp-image-488 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/1-300x44.png" alt="1" width="600" height="88" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/1-300x44.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/1-768x112.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/1.png 950w" sizes="(max-width: 600px) 100vw, 600px" /></a>A pop up appears asking you to create a New repository. Click on <strong>New repository.  </strong></p>
<h3 style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/2.png" rel="attachment wp-att-489"><img class="wp-image-489 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/2-300x46.png" alt="2" width="737" height="113" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/2-300x46.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/2-768x118.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/2.png 941w" sizes="(max-width: 737px) 100vw, 737px" /></a>Step 2:</h3>
<p style="text-align: justify;">You will be taken to a new page and in the Repository name box write as <strong>RStudioGitHubTutorial</strong> and click on <strong>CreateRepository</strong> button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/3.png" rel="attachment wp-att-490"><img class="wp-image-490 alignright" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/3-300x235.png" alt="3" width="609" height="477" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/3-300x235.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/3-768x603.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/3.png 920w" sizes="(max-width: 609px) 100vw, 609px" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">You will be taken to the next page giving you more information about the repository you have just created.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/4.png" rel="attachment wp-att-491"><img class="alignnone  wp-image-491" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/4-300x210.png" alt="4" width="601" height="421" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/4-300x210.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/4-768x539.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/4-1024x718.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/4.png 1253w" sizes="(max-width: 601px) 100vw, 601px" /></a></p>
<h3 style="text-align: justify;">Step 3:</h3>
<p style="text-align: justify;">Copy the URL of the Git repository you have created.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/5.png" rel="attachment wp-att-492"><img class="wp-image-492 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/5-300x210.png" alt="5" width="610" height="427" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/5-300x210.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/5-768x537.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/5-1024x716.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/5.png 1251w" sizes="(max-width: 610px) 100vw, 610px" /></a></p>
<h3 style="text-align: justify;">Step 4:</h3>
<p style="text-align: justify;">Start your RStudio. Go to File menu -&gt; Click on New Project.</p>
<p style="text-align: justify;">A window appears where in you have different ways of creating a project.</p>
<p style="text-align: justify;">Click on <strong>Version Control. </strong></p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/6.png" rel="attachment wp-att-493"><img class="wp-image-493 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/6-300x212.png" alt="6" width="617" height="436" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/6-300x212.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/6.png 534w" sizes="(max-width: 617px) 100vw, 617px" /></a></p>
<p style="text-align: justify;">You&#8217;ll be taken to the next window and click on Git option.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/7.png" rel="attachment wp-att-494"><img class="wp-image-494 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/7-300x211.png" alt="7" width="616" height="433" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/7-300x211.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/7.png 535w" sizes="(max-width: 616px) 100vw, 616px" /></a></p>
<p style="text-align: justify;">Paste the URL that you copied from step 3 in the Repository URL text box.</p>
<p style="text-align: justify;">The Project directory name text box automatically gets filled.</p>
<p style="text-align: justify;">Specify the directory under which this project has to be created. In my case it&#8217;s C:/RWork.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/8.png" rel="attachment wp-att-495"><img class="wp-image-495 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/8-300x214.png" alt="8" width="620" height="442" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/8-300x214.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/8.png 531w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<h3 style="text-align: justify;">Step 5:</h3>
<p style="text-align: justify;">Go to File menu -&gt; Select New File -&gt; click on R Script.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/9.png" rel="attachment wp-att-496"><img class="wp-image-496 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/9-300x210.png" alt="9" width="614" height="430" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/9-300x210.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/9.png 764w" sizes="(max-width: 614px) 100vw, 614px" /></a></p>
<p style="text-align: justify;">This creates an empty R file. Save this file by clicking on the Save button and name this file as Tutorial.R.</p>
<p style="text-align: justify;">Type the following line in the editor.</p>
<p style="text-align: justify;"><strong>print &#8220;First Commit&#8221; </strong></p>
<p style="text-align: justify;">Save the file.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/10.png" rel="attachment wp-att-497"><img class="wp-image-497 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/10-300x146.png" alt="10" width="616" height="300" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/10-300x146.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/10-768x375.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/10-1024x500.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/10.png 1283w" sizes="(max-width: 616px) 100vw, 616px" /></a></p>
<h3 style="text-align: justify;">Step 6:</h3>
<p style="text-align: justify;">Click on the Git button as shown in the below figure and select Commit option.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/11.png" rel="attachment wp-att-499"><img class="wp-image-499 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/11-300x147.png" alt="11" width="616" height="302" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/11-300x147.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/11-768x377.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/11-1024x503.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/11.png 1284w" sizes="(max-width: 616px) 100vw, 616px" /></a></p>
<p style="text-align: justify;">You&#8217;ll be taken to a new window. Select all the check boxes in the left pane and in the in the <strong>Commit Message</strong> pane type as First Commit and click on Commit button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/12.png" rel="attachment wp-att-500"><img class="wp-image-500 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/12-300x139.png" alt="12" width="615" height="285" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/12-300x139.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/12-768x357.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/12.png 997w" sizes="(max-width: 615px) 100vw, 615px" /></a></p>
<p style="text-align: justify;">Another windows appears saying that the commit has been carried out at the local repository. Your local repository is the as that of the Project Directory which you created in Step 4. Click on Close button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/13.png" rel="attachment wp-att-501"><img class="wp-image-501 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/13-300x118.png" alt="13" width="610" height="240" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/13-300x118.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/13-768x303.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/13.png 999w" sizes="(max-width: 610px) 100vw, 610px" /></a></p>
<p style="text-align: justify;">Now click on the Push button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/14.png" rel="attachment wp-att-502"><img class="wp-image-502 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/14-300x94.png" alt="14" width="610" height="191" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/14-300x94.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/14-768x240.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/14.png 998w" sizes="(max-width: 610px) 100vw, 610px" /></a></p>
<p style="text-align: justify;">You&#8217;ll be asked to enter your GitHub User Name as shown in below figure. Enter your GitHub account name and press OK button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/15.png" rel="attachment wp-att-503"><img class="wp-image-503 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/15-300x107.png" alt="15" width="611" height="218" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/15-300x107.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/15-768x273.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/15.png 997w" sizes="(max-width: 611px) 100vw, 611px" /></a></p>
<p style="text-align: justify;">Then enter your GitHub password and press OK button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/16.png" rel="attachment wp-att-504"><img class="wp-image-504 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/16-300x109.png" alt="16" width="611" height="222" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/16-300x109.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/16-768x278.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/16.png 996w" sizes="(max-width: 611px) 100vw, 611px" /></a></p>
<h3 style="text-align: justify;">Step 7:</h3>
<p style="text-align: justify;">Navigate to the repository in your GitHub account and you can see that many new files have been added.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/17.png" rel="attachment wp-att-505"><img class="alignnone  wp-image-505" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/17-300x156.png" alt="17" width="615" height="320" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/17-300x156.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/17-768x399.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/17-1024x532.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/17.png 1243w" sizes="(max-width: 615px) 100vw, 615px" /></a></p>
<p style="text-align: justify;">Click on Tutorial.R file to view it&#8217;s contents.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/18.png" rel="attachment wp-att-506"><img class="alignnone  wp-image-506" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/18-300x108.png" alt="18" width="611" height="220" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/18-300x108.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/18-768x276.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/18-1024x368.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/18.png 1242w" sizes="(max-width: 611px) 100vw, 611px" /></a></p>
<h3 style="text-align: justify;">Step 8:</h3>
<p style="text-align: justify;">Again in the RStudio editor add another line as</p>
<p style="text-align: justify;"><strong>print(&#8220;Second Commit&#8221;)</strong></p>
<p style="text-align: justify;">Click on the Git button and select Commit option.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2.png" rel="attachment wp-att-516"><img class="alignnone  wp-image-516" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2-300x88.png" alt="23" width="603" height="177" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2-300x88.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2-768x225.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2-1024x300.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/23-2.png 1282w" sizes="(max-width: 603px) 100vw, 603px" /></a></p>
<p style="text-align: justify;">In the window that appears, on the left pane select the check box and in the Commit message right pane type <strong>Second Commit </strong>and click on Commit button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/19.png" rel="attachment wp-att-507"><img class="alignnone  wp-image-507" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/19-300x124.png" alt="19" width="607" height="251" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/19-300x124.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/19-768x317.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/19.png 995w" sizes="(max-width: 607px) 100vw, 607px" /></a></p>
<p style="text-align: justify;">Click on the Push button found in the right top corner. You will be asked to enter your GitHub User Name. Fill the text box with your Git Hub account name and click OK button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/20.png" rel="attachment wp-att-508"><img class="alignnone  wp-image-508" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/20-300x107.png" alt="20" width="614" height="219" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/20-300x107.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/20-768x274.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/20.png 991w" sizes="(max-width: 614px) 100vw, 614px" /></a></p>
<p style="text-align: justify;">Fill the text box with GitHub account password and click OK button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/21.png" rel="attachment wp-att-509"><img class="alignnone  wp-image-509" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/21-300x109.png" alt="21" width="603" height="219" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/21-300x109.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/21-768x279.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/21.png 995w" sizes="(max-width: 603px) 100vw, 603px" /></a></p>
<p style="text-align: justify;">You can view the latest changes by navigating to your online GitHub Account and by clicking on the Tutorial.R button.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1.png" rel="attachment wp-att-514"><img class="alignnone  wp-image-514" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1-300x119.png" alt="22" width="607" height="241" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1-300x119.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1-768x306.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1-1024x407.png 1024w, http://gowrishankarnath.com/wp-content/uploads/2016/03/22-1.png 1239w" sizes="(max-width: 607px) 100vw, 607px" /></a></p>
<p style="text-align: justify;">If you want to see the history of all the changes done to the file then again click on GIT button and select History option as shown in the below figure.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/23.png" rel="attachment wp-att-511"><img class="alignnone  wp-image-511" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/23-300x172.png" alt="23" width="612" height="351" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/23-300x172.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/23.png 664w" sizes="(max-width: 612px) 100vw, 612px" /></a></p>
<p style="text-align: justify;">Click on the appropriate Commit Message and select View File link as show in the below figure.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2016/03/24.png" rel="attachment wp-att-512"><img class="alignnone  wp-image-512" src="http://gowrishankarnath.com/wp-content/uploads/2016/03/24-300x184.png" alt="24" width="608" height="373" srcset="http://gowrishankarnath.com/wp-content/uploads/2016/03/24-300x184.png 300w, http://gowrishankarnath.com/wp-content/uploads/2016/03/24-768x471.png 768w, http://gowrishankarnath.com/wp-content/uploads/2016/03/24.png 1003w" sizes="(max-width: 608px) 100vw, 608px" /></a></p>
<h1 style="text-align: justify;">Conclusion</h1>
<p style="text-align: justify;">This article gives you step by step instructions on how to work with RStudio and GitHub.</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/using-rstudio-github/">Using RStudio with GitHub</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/using-rstudio-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet of Things (IoT) Syllabus for the Department of Computer Science and Engineering at Dr.Ambedkar Institute of Technology</title>
		<link>http://gowrishankarnath.com/468-2/</link>
		<comments>http://gowrishankarnath.com/468-2/#comments</comments>
		<pubDate>Tue, 19 Jan 2016 16:10:41 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Internet of Things]]></category>
		<category><![CDATA[IoT]]></category>
		<category><![CDATA[Syllabus]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=468</guid>
		<description><![CDATA[<p>SUBJECT TITLE: Internet of Things (IoT)   SUBJECT CODE: 15CS822 No. of Credits:4:0:0:0 No. of Lecture hours per week:4 Exam Duration :3 hours Exam Marks: 100 Total No. of Lecture hours: 52   Course Objectives: The objective of the course is to: Vision and Introduction to IoT. Understand IoT Market perspective. Data and Knowledge Management [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/468-2/">Internet of Things (IoT) Syllabus for the Department of Computer Science and Engineering at Dr.Ambedkar Institute of Technology</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<table style="height: 179px;" width="607">
<tbody>
<tr>
<td rowspan="3" width="129"><a href="http://gowrishankarnath.com/wp-content/uploads/2015/10/ait.png"><img class="alignnone  wp-image-16" src="http://gowrishankarnath.com/wp-content/uploads/2015/10/ait.png" alt="ait" width="85" height="100" /></a></td>
<td style="text-align: center;" colspan="3" width="690">SUBJECT TITLE: <strong>Internet of Things (IoT)</strong></p>
<p><strong> </strong></td>
</tr>
<tr>
<td style="text-align: center;" width="248"><strong>SUBJECT CODE: 15CS822</strong></td>
<td style="text-align: center;" width="222"><strong>No. of Credits:4:0:0:0</strong></td>
<td style="text-align: center;" width="221"><strong>No. of Lecture hours per week:4</strong></td>
</tr>
<tr>
<td style="text-align: center;" width="248"><strong>Exam Duration :3 hours</strong></td>
<td style="text-align: center;" width="222"><strong>Exam Marks: 100</strong></td>
<td style="text-align: center;" width="221"><strong>Total No. of Lecture hours: 52</strong></td>
</tr>
</tbody>
</table>
<p><strong> </strong></p>
<p style="text-align: justify;"><strong>Course Objectives:</strong></p>
<p style="text-align: justify;">The objective of the course is to:</p>
<ol>
<li style="text-align: justify;">Vision and Introduction to IoT.</li>
<li style="text-align: justify;">Understand IoT Market perspective.</li>
<li style="text-align: justify;">Data and Knowledge Management and use of Devices in IoT Technology.</li>
<li style="text-align: justify;">Understand State of the Art &#8211; IoT Architecture.</li>
<li style="text-align: justify;">Real World IoT Design Constraints, Industrial Automation and Commercial Building Automation in IoT.</li>
</ol>
<p>&nbsp;</p>
<table width="872">
<tbody>
<tr>
<td style="text-align: center;" width="62"><strong>Unit No</strong></td>
<td style="text-align: center;" width="713"><strong>Syllabus Content</strong></td>
<td style="text-align: center;" width="98"><strong>No. of </strong></p>
<p><strong>Hours</strong></td>
</tr>
<tr>
<td style="text-align: center;" width="62">1</td>
<td style="text-align: justify;" width="713"><strong>M2M to IoT</strong>-The Vision-Introduction, From M2M to IoT, M2M towards IoT-the global context, A use case example, Differing Characteristics.</td>
<td style="text-align: center;" width="98">10</td>
</tr>
<tr>
<td style="text-align: center;" width="62">2</td>
<td width="713">
<p style="text-align: justify;"><strong>M2M to IoT &#8211; A Market Perspective</strong>&#8211; Introduction, Some Definitions, M2M Value Chains, IoT Value Chains, An emerging industrial structure for IoT, The international driven global value chain and global information monopolies. <strong>M2M to IoT-An Architectural Overview</strong>&#8211; Building an architecture, Main design principles and needed capabilities, An IoT architecture outline, standards considerations.</p>
</td>
<td style="text-align: center;" width="98">10</td>
</tr>
<tr>
<td style="text-align: center;" width="62">3</td>
<td width="713">
<p style="text-align: justify;"><strong>M2M and IoT Technology Fundamentals-</strong> Devices and gateways, Local and wide area networking, Data management, Business processes in IoT, Everything as a Service(XaaS), M2M and IoT Analytics, Knowledge Management</p>
</td>
<td style="text-align: center;" width="98">11</td>
</tr>
<tr>
<td style="text-align: center;" width="62">4</td>
<td width="713">
<p style="text-align: justify;"><strong>IoT Architecture-State of the Art &#8211;</strong> Introduction, State of the art, <strong>Architecture Reference Model-</strong> Introduction, Reference Model and architecture, IoT reference Model</p>
</td>
<td style="text-align: center;" width="98">10</td>
</tr>
<tr>
<td style="text-align: center;" width="62">5</td>
<td width="713">
<p style="text-align: justify;"><strong>IoT Reference Architecture-</strong> Introduction, Functional View, Information View, Deployment and Operational View, Other Relevant architectural views. <strong>Real-World Design Constraints-</strong> Introduction, Technical Design constraints-hardware is popular again, Data representation and visualization, Interaction and remote control. <strong>Industrial Automation-</strong> Service-oriented architecture-based device integration, SOCRADES: realizing the enterprise integrated Web of Things, IMC-AESOP: from the Web of Things to the Cloud of Things, <strong>Commercial Building Automation-</strong> Introduction, Case study: phase one-commercial building automation today, Case study: phase two- commercial building automation in the future.</p>
</td>
<td style="text-align: center;" width="98">11</td>
</tr>
</tbody>
</table>
<p><strong><u>Textbook:</u></strong></p>
<ul>
<li>Jan Holler, Vlasios Tsiatsis, Catherine Mulligan, Stefan Avesand, Stamatis Karnouskos, David Boyle, <strong>“From Machine-to-Machine to the Internet of Things: Introduction to a New Age of Intelligence”,</strong> 1<sup>st</sup> Edition, Academic Press, 2014.</li>
</ul>
<p><strong><u>Reference Books:</u></strong></p>
<ul>
<li style="text-align: justify;">Vijay Madisetti and Arshdeep Bahga, <strong>“Internet of Things (A Hands-on-Approach)”, </strong>1<sup>st</sup> Edition, VPT, 2014.</li>
<li style="text-align: justify;">Francis daCosta, <strong>“Rethinking the Internet of Things: A Scalable Approach to Connecting Everything”,</strong> 1<sup>st</sup> Edition, Apress Publications, 2013</li>
</ul>
<p><strong> </strong></p>
<p><strong>NOTE: One question each from units 1, 2 and 4.</strong></p>
<p><strong>               Two questions from unit-3</strong></p>
<p><strong>               Two questions from unit-5</strong></p>
<p>&nbsp;</p>
<p><strong>Course Outcomes:</strong></p>
<p>At the end of the course the student will be able to:</p>
<ol>
<li>Understand the vision of IoT from a global context.</li>
<li>Determine the Market perspective of IoT.</li>
<li>Use of Devices, Gateways and Data Management in IoT.</li>
<li>Building state of the art architecture in IoT.</li>
<li>Application of IoT in Industrial and Commercial Building Automation and Real World Design Constraints.</li>
</ol>
<p style="text-align: justify;"><em><strong>Syllabus prepared by me for the Department of Computer Science and Engineering at Dr.Ambedkar Institute of Technology, Bangalore, Karnataka, India.</strong></em></p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/468-2/">Internet of Things (IoT) Syllabus for the Department of Computer Science and Engineering at Dr.Ambedkar Institute of Technology</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/468-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Read and Write JSON with Python</title>
		<link>http://gowrishankarnath.com/read-write-json-python/</link>
		<comments>http://gowrishankarnath.com/read-write-json-python/#respond</comments>
		<pubDate>Thu, 24 Dec 2015 18:30:34 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=384</guid>
		<description><![CDATA[<p>Introduction JSON stands for JavaScript Object Notation (http://www.json.org) and was proposed by Douglas Crockford. JSON is an easy to understand data exchange format which is independent of programming languages. Why JSON? JSON allows websites to load data quickly and asynchronously in the background without much delay. JSON doesn&#8217;t have end tags like XML, is shorter [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/read-write-json-python/">Read and Write JSON with Python</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p style="text-align: justify;">JSON stands for JavaScript Object Notation (<a href="http://www.json.org">http://www.json.org</a>) and was proposed by <a href="https://en.wikipedia.org/wiki/Douglas_Crockford" target="_blank">Douglas Crockford</a>. JSON is an easy to understand data exchange format which is independent of programming languages.</p>
<h2><strong>Why JSON?</strong></h2>
<p style="text-align: justify;">JSON allows websites to load data quickly and asynchronously in the background without much delay.</p>
<p style="text-align: justify;">JSON doesn&#8217;t have end tags like XML, is shorter than XML and lightweight.</p>
<p style="text-align: justify;">JSON is preferred way of exchanging data in AJAX requests and in REST architecture.</p>
<p style="text-align: justify;">JSON data is offered by API&#8217;s hosted by Google, Facebook, Microsoft, SalesForce, Twitter, LinkedIn and others.</p>
<h2><strong>JSON Syntax</strong></h2>
<p style="text-align: justify;">JSON is made up of string:value pairs. An <em><strong>object</strong></em> represents these string:value pairs. An object may contain a number of individual string:value pairs or a string may contain multiple string:value pairs (nested string:value pairs) or an <em><strong>array</strong></em> of string:value pairs (array of objects) or all of these.</p>
<p style="text-align: justify;">An object should be enclosed within parenthesis { } and an array of objects should be enclosed within square brackets [ ]. Each string is followed by a : (colon)  and each of these string:value pairs should be separated by a comma.</p>
<p style="text-align: justify;"><em><strong>An object with Individual string:value pairs</strong></em></p>
<p style="text-align: justify;">This JSON object has individual string:value pairs, separated by comma and enclosed within parenthesis { }.</p>
<pre class="brush: jscript; title: ; notranslate">
{
    &quot;FirstName&quot;:&quot;Bhairav&quot;,
    &quot;MiddleName&quot;:&quot;S&quot;,
    &quot;LastName&quot;:&quot;Ram&quot;
}
</pre>
<p style="text-align: justify;"><em><strong>An object with string containing multiple string:value pairs (nested string:value pairs)</strong></em></p>
<p style="text-align: justify;">This JSON object is already enclosed within parenthesis { } and also the string &#8220;Contact&#8221; has few other nested string:value pairs.</p>
<pre class="brush: jscript; title: ; notranslate">
{
    &quot;Contact&quot;:{
        &quot;Phone&quot;:9988776655,
        &quot;Email&quot;:&quot;bhairav@gmail.com&quot;
}
</pre>
<p style="text-align: justify;"><em><strong>An object with array of string:value pairs (array of JSON objects)<br />
</strong></em></p>
<p style="text-align: justify;">This JSON object is enclosed within parenthesis { }. The string &#8220;Address&#8221; is followed by an array of JSON objects separated by comma and enclosed within brackets [ ].</p>
<pre class="brush: jscript; title: ; notranslate">
{
    &quot;Address&quot;:[
        {
            &quot;Type&quot;:&quot;Office&quot;,
            &quot;ZipNumber&quot;:560056,
            &quot;Street&quot;:&quot;Nagarbhavi Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        },
        {
            &quot;Type&quot;:&quot;Home&quot;,
            &quot;ZipNumber&quot;:560004,
            &quot;Street&quot;:&quot;Gandhi Bazaar Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        }
    ]
}
</pre>
<p style="text-align: justify;">So we came across various JSON verbs like object, string:value and array. An string should be enclosed within double quotes. A value can be a number, string, object itself, true value, false value or null value.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/Verbs.png"><img class="wp-image-419 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/Verbs-102x300.png" alt="Verbs" width="157" height="462" /></a>As seen in below figure, JSON object starts at line-1 and ends at line-26. In line-7 a number value is assigned to string Phone. Nested string:value pairs starts from line-6 to line-9. An array of json objects starts from line-10 and ends at line-25.<a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/json.png"><img class="wp-image-417 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/json-300x225.png" alt="json" width="621" height="466" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/json-300x225.png 300w, http://gowrishankarnath.com/wp-content/uploads/2015/12/json.png 800w" sizes="(max-width: 621px) 100vw, 621px" /></a>Below figure depicts how JSON verbs compare with Python identifiers.</p>
<p><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/jsonPy.png"><img class="size-medium wp-image-443 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/jsonPy-288x300.png" alt="jsonPy" width="288" height="300" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/jsonPy-288x300.png 288w, http://gowrishankarnath.com/wp-content/uploads/2015/12/jsonPy.png 327w" sizes="(max-width: 288px) 100vw, 288px" /></a></p>
<h2><strong>Read JSON with Python</strong></h2>
<p style="text-align: justify;">Here we import the package json in line-1. From line-4 to line-29, we create an JSON object. This JSON object is then converted into a string by enclosing it within quotes and is assigned to the variable input. This JSON object cannot be assigned directly to a variable, instead In line-32, we make use of the method loads in json library to convert json object into Python dictionary and assign it to a dictionary variable jsonObjectInfo. If we want to print the value of string FirstName then the code is jsonObjectInfo[&#8216;FirstName&#8217;]. We use a for loop to loop through the array Address.</p>
<p style="text-align: justify;">If you already have an existing json file then we can open that file using open method where f is a file handler (or TextIOWrapper) and load that file handler using open method. Here &#8216;r&#8217; is the reading mode in which the file is opened. While working with a file we use the method load and not loads.</p>
<pre class="brush: jscript; title: ; notranslate">
import json

input = '''
{
    &quot;FirstName&quot;:&quot;Bhairav&quot;,
    &quot;MiddleName&quot;:&quot;S&quot;,
    &quot;LastName&quot;:&quot;Ram&quot;,
    &quot;DateOfBirth&quot;:&quot;09-01-1984&quot;,
    &quot;Contact&quot;:{
        &quot;Phone&quot;:9988776655,
        &quot;Email&quot;:&quot;bhairav@gmail.com&quot;
    },
    &quot;Address&quot;:[
        {
            &quot;Type&quot;:&quot;Office&quot;,
            &quot;ZipNumber&quot;:560056,
            &quot;Street&quot;:&quot;Nagarbhavi Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        },
        {
            &quot;Type&quot;:&quot;Home&quot;,
            &quot;ZipNumber&quot;:560004,
            &quot;Street&quot;:&quot;Gandhi Bazaar Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        }
    ]
}
        '''
print(type(input))
jsonObjectInfo = json.loads(input)
print(type(jsonObjectInfo))
print(jsonObjectInfo)
print(&quot;First Name is {0}&quot;.format(jsonObjectInfo['FirstName']))
print(&quot;Middle Name is {0}&quot;.format(jsonObjectInfo['MiddleName']))
print(&quot;Last Name is {0}&quot;.format(jsonObjectInfo['LastName']))
print(&quot;Date of Birth is {0}&quot;.format(jsonObjectInfo['DateOfBirth']))
print(&quot;Phone Number is {0}&quot;.format(jsonObjectInfo['Contact']['Phone']))
print(&quot;Email ID is is {0}&quot;.format(jsonObjectInfo['Contact']['Email']))
print(&quot;-----------------**************---------------&quot;)
for eachJsonObject in jsonObjectInfo['Address']:
    print(&quot;Address Type is {0}&quot;.format(eachJsonObject['Type']))
    print(&quot;Zip Number is {0}&quot;.format(eachJsonObject['ZipNumber']))
    print(&quot;Street Name is {0}&quot;.format(eachJsonObject['Street']))
    print(&quot;City Name is {0}&quot;.format(eachJsonObject['City']))
    print(&quot;Country Name is {0}&quot;.format(eachJsonObject['Country']))
    print(&quot;-----------------**************---------------&quot;)


# Reading JSON data back from a file called JSONData.json
#Use the method json.load()
#It's just load and not loads()
#Decode JSON Data
with open('JSONData.json', 'r') as f:
     data = json.load(f)

print(data)
</pre>
<blockquote>
<div><strong>Output:</strong></div>
<div></div>
<div>&lt;class &#8216;str&#8217;&gt;<br />
&lt;class &#8216;dict&#8217;&gt;<br />
{&#8216;Address&#8217;: [{&#8216;City&#8217;: &#8216;Bangalore&#8217;, &#8216;Street&#8217;: &#8216;Nagarbhavi Road&#8217;, &#8216;Type&#8217;: &#8216;Office&#8217;, &#8216;Country&#8217;: &#8216;India&#8217;, &#8216;ZipNumber&#8217;: 560056}, {&#8216;City&#8217;: &#8216;Bangalore&#8217;, &#8216;Street&#8217;: &#8216;Gandhi Bazaar Road&#8217;, &#8216;Type&#8217;: &#8216;Home&#8217;, &#8216;Country&#8217;: &#8216;India&#8217;, &#8216;ZipNumber&#8217;: 560004}], &#8216;FirstName&#8217;: &#8216;Bhairav&#8217;, &#8216;LastName&#8217;: &#8216;Ram&#8217;, &#8216;Contact&#8217;: {&#8216;Phone&#8217;: 9988776655, &#8216;Email&#8217;: &#8216;bhairav@gmail.com&#8217;}, &#8216;DateOfBirth&#8217;: &#8217;09-01-1984&#8242;, &#8216;MiddleName&#8217;: &#8216;S&#8217;}<br />
First Name is Bhairav<br />
Middle Name is S<br />
Last Name is Ram<br />
Date of Birth is 09-01-1984<br />
Phone Number is 9988776655<br />
Email ID is is bhairav@gmail.com<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;**************&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Address Type is Office<br />
Zip Number is 560056<br />
Street Name is Nagarbhavi Road<br />
City Name is Bangalore<br />
Country Name is India<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;**************&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Address Type is Home<br />
Zip Number is 560004<br />
Street Name is Gandhi Bazaar Road<br />
City Name is Bangalore<br />
Country Name is India<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;**************&#8212;&#8212;&#8212;&#8212;&#8212;<br />
{&#8220;FirstName&#8221;: &#8220;Bhairav&#8221;, &#8220;MiddleName&#8221;: &#8220;S&#8221;, &#8220;Address&#8221;: [{&#8220;ZipNumber&#8221;: 560056, &#8220;Street&#8221;: &#8220;Nagarbhavi Road&#8221;, &#8220;Country&#8221;: &#8220;India&#8221;, &#8220;City&#8221;: &#8220;Bangalore&#8221;, &#8220;Type&#8221;: &#8220;Office&#8221;}, {&#8220;ZipNumber&#8221;: 560004, &#8220;Street&#8221;: &#8220;Gandhi Bazaar Road&#8221;, &#8220;Country&#8221;: &#8220;India&#8221;, &#8220;City&#8221;: &#8220;Bangalore&#8221;, &#8220;Type&#8221;: &#8220;Home&#8221;}], &#8220;LastName&#8221;: &#8220;Ram&#8221;, &#8220;DateOfBirth&#8221;: &#8220;09-01-1984&#8221;, &#8220;Contact&#8221;: {&#8220;Phone&#8221;: 9988776655, &#8220;Email&#8221;: &#8220;bhairav@gmail.com&#8221;}}</div>
</blockquote>
<h2><strong>Write JSON with Python</strong></h2>
<p style="text-align: justify;">We create a Python dictionary data and is converted to JSON objects by using the method dumps from json library.</p>
<p style="text-align: justify;">We can save the json objects into a file by using the method dump from json library. The file should be opened in write mode.</p>
<pre class="brush: jscript; title: ; notranslate">
import json

data = {
    &quot;FirstName&quot;:&quot;Bhairav&quot;,
    &quot;MiddleName&quot;:&quot;S&quot;,
    &quot;LastName&quot;:&quot;Ram&quot;,
    &quot;DateOfBirth&quot;:&quot;09-01-1984&quot;,
    &quot;Contact&quot;:{
        &quot;Phone&quot;:9988776655,
        &quot;Email&quot;:&quot;bhairav@gmail.com&quot;
    },
    &quot;Address&quot;:[
        {
            &quot;Type&quot;:&quot;Office&quot;,
            &quot;ZipNumber&quot;:560056,
            &quot;Street&quot;:&quot;Nagarbhavi Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        },
        {
            &quot;Type&quot;:&quot;Home&quot;,
            &quot;ZipNumber&quot;:560004,
            &quot;Street&quot;:&quot;Gandhi Bazaar Road&quot;,
            &quot;City&quot;:&quot;Bangalore&quot;,
            &quot;Country&quot;:&quot;India&quot;
        }
    ]
}

#json.dumps() method turns a Python data structure into JSON:
jsonData = json.dumps(data)
print(jsonData)

# Writing JSON data into a file called JSONData.json
#Use the method called json.dump()
#It's just dump() and not dumps()
#Encode JSON data
with open('JSONData.json', 'w') as f:
     json.dump(jsonData, f)
</pre>
<blockquote><p><strong>Output:</strong></p>
<p>{</p>
<p>&#8220;LastName&#8221;:&#8221;Ram&#8221;,<br />
&#8220;Address&#8221;:[<br />
{<br />
&#8220;ZipNumber&#8221;:560056,<br />
&#8220;City&#8221;:&#8221;Bangalore&#8221;,<br />
&#8220;Country&#8221;:&#8221;India&#8221;,<br />
&#8220;Type&#8221;:&#8221;Office&#8221;,<br />
&#8220;Street&#8221;:&#8221;Nagarbhavi Road&#8221;<br />
},<br />
{<br />
&#8220;ZipNumber&#8221;:560004,<br />
&#8220;City&#8221;:&#8221;Bangalore&#8221;,<br />
&#8220;Country&#8221;:&#8221;India&#8221;,<br />
&#8220;Type&#8221;:&#8221;Home&#8221;,<br />
&#8220;Street&#8221;:&#8221;Gandhi Bazaar Road&#8221;<br />
}<br />
],<br />
&#8220;Contact&#8221;:{<br />
&#8220;Phone&#8221;:9988776655,<br />
&#8220;Email&#8221;:&#8221;bhairav@gmail.com&#8221;<br />
},<br />
&#8220;MiddleName&#8221;:&#8221;S&#8221;,<br />
&#8220;FirstName&#8221;:&#8221;Bhairav&#8221;,<br />
&#8220;DateOfBirth&#8221;:&#8221;09-01-1984&#8243;</p>
<p>}</p></blockquote>
<h2><strong>Conclusion<br />
</strong></h2>
<p style="text-align: justify;">The code in the article is available @ <a href="https://github.com/gowrishankarnath/JSONProcessingWithPython">https://github.com/gowrishankarnath/JSONProcessingWithPython</a></p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/read-write-json-python/">Read and Write JSON with Python</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/read-write-json-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Application Fundamentals and Activity Class</title>
		<link>http://gowrishankarnath.com/android-application-fundamentals-and-activity-class/</link>
		<comments>http://gowrishankarnath.com/android-application-fundamentals-and-activity-class/#respond</comments>
		<pubDate>Sat, 19 Dec 2015 17:25:19 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Activity Life Cycle]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=431</guid>
		<description><![CDATA[<p>Android Application Components Applications are made up of a number of components which are initiated when the application starts. Each of these components have their own role in the Android ecosystem and APIs. Four important Android Application Components are Activity Services Broadcast Receivers Content Providers Activity It is designed to display. It is implemented as [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/android-application-fundamentals-and-activity-class/">Android Application Fundamentals and Activity Class</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2 style="text-align: justify;"><strong>Android Application Components</strong></h2>
<p style="text-align: justify;">Applications are made up of a number of components which are initiated when the application starts. Each of these components have their own role in the Android ecosystem and APIs.</p>
<p style="text-align: justify;">Four important Android Application Components are</p>
<ol style="text-align: justify;">
<li><strong>Activity</strong></li>
<li><strong>Services</strong></li>
<li><strong>Broadcast Receivers</strong></li>
<li><strong>Content Providers</strong></li>
</ol>
<p style="text-align: justify;"><em><strong>Activity</strong></em></p>
<p style="text-align: justify;">It is designed to display. It is implemented as the Java Class. Its the main class the users see when they run the application. Activity class are designed to provide GUI to the user. This enables the user to give and take information from an application. An Activity class should implement a single, focused task the user can do.</p>
<p style="text-align: justify;"><em><strong>Services</strong></em></p>
<p style="text-align: justify;">The Services run in the background. Services have two purposes</p>
<ol style="text-align: justify;">
<li>To perform long running operation away from the main UI Thread.</li>
<li>It provides a way for different processes to request operation and share data.</li>
</ol>
<p style="text-align: justify;"><em><strong>Broadcast Receivers</strong></em></p>
<p style="text-align: justify;">They listen to and respond to receivers. They play the role the role of subscriber in the subscriber/publisher pattern. Events are represented by INTENT class.</p>
<p style="text-align: justify;">Broadcast receivers receive and respond to the broadcast receivers. An e.g., of the broadcast receivers is the way an SMS is notified. The SMS application software sits waiting for SMS and it broadcasts once it receives an SMS. Then there is another application which corresponds to this intent and the notification is placed on the notification bar.</p>
<p style="text-align: justify;"><em><strong>Content Providers</strong></em></p>
<p style="text-align: justify;">They allow you to store and share data across different applications. It uses database style interface. It handles low level inter-process communications so that the different applications can share data.</p>
<h2 style="text-align: justify;"><strong>Building an Application</strong></h2>
<p style="text-align: justify;">First you create source code and non source code resources that make up our application. The tool compiles the source code and prepares the resources. The output of this step is an Android package or an <span style="text-decoration: underline;"><em><strong>apk,</strong></em></span> which corresponds to an exe.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/Build.png"><img class="wp-image-432 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/Build-300x79.png" alt="Build" width="585" height="154" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/Build-300x79.png 300w, http://gowrishankarnath.com/wp-content/uploads/2015/12/Build.png 747w" sizes="(max-width: 585px) 100vw, 585px" /></a>It is then digitally signed to identify that you are the developer. Then the apk is installed on a device or an emulator.</p>
<h4 style="text-align: justify;"><strong>Steps in Creating an Android Application</strong></h4>
<ol>
<li>Define Resources</li>
<li>Implement Application Classes</li>
<li>Package Application</li>
<li>Install and Run the Application</li>
</ol>
<h5><strong>Define Resources</strong></h5>
<p style="text-align: justify;">Android applications are more than source code. They include non source code entities like layouts, strings, Images, Menus and Animations.</p>
<p style="text-align: justify;">Managing the resources separately from the application has many advantages. It allows the Applications to be customized for different devices and users. You can just change the resources and the same gets reflected on the application without changing the source code of the application.</p>
<p style="text-align: justify;">One common resource type is string. There are three types of strings in android</p>
<ol>
<li>string</li>
<li>string array</li>
<li>plurals</li>
</ol>
<p style="text-align: justify;">Plurals are basically string arrays that can be used to chose specific strings that are associated with certain quantities. Such as one book, two books.</p>
<p style="text-align: justify;">A string is typically stored in XML file RES/Values/*.xml. For e.g., &lt;string name = &#8220;hello&#8221;&gt; Hello World &lt;/string&gt;. A string can be accessed by other resources as @string/string_name. In Java a string is accessed as R.string.string_name.</p>
<p style="text-align: justify;"><em><strong>User Interface Layout</strong></em></p>
<p style="text-align: justify;">The user interface layout is specified in XML files. Some tools allow visual layouts. UI related XML files are usually stored in RES/layout/*.xml.</p>
<p style="text-align: justify;">The same can be accessed in Java using R.layout.layout_name. Other resources can access these files as @layout/layout_name.</p>
<p style="text-align: justify;">Android allows you to create multiple layout files and it allows you to chose those layout files in runtime.</p>
<p style="text-align: justify;"><em><strong>R.Java</strong></em></p>
<p style="text-align: justify;">Resources can be accessed using R.Java.something. At compilation time, resources are used to generate the R.Java class.</p>
<h5 style="text-align: justify;"><strong>Implementing Java Classes</strong></h5>
<p style="text-align: justify;">This involves implementing atleast one Java class activity. An entry point to Java class activity iis one oncreate() method. The application typically gets initialized by the oncreate() method.</p>
<h5 style="text-align: justify;"><strong>Package Application</strong></h5>
<p style="text-align: justify;">This information is written in Android Manifest.xml. This file contains wide variety of packaging information. They include the application name, list of components that make up the application, permission that need to run the application, the hardware features like camera, the minimum API level on  which this application can run.</p>
<h5 style="text-align: justify;"><strong>Install and Run the application</strong></h5>
<p style="text-align: justify;">From the Android Studio you can run in the emulator or in the device.</p>
<h2 style="text-align: justify;"><strong>The Activity Class</strong></h2>
<p style="text-align: justify;">Activity classes are the primary classes for interacting with the users. It provides a visual interface with which the user can interact with the application. An activity should be a modular. It should focus on one single task such as viewing an email message, showing a login screen. You&#8217;ll create an application by sewing together multiple activities together. Each of these activities have single purpose and the user needs to navigate through these different activities.</p>
<h5 style="text-align: justify;"><strong>Navigation through Activities</strong></h5>
<p style="text-align: justify;">Android helps in navigating through these activities in several ways. It is done through</p>
<ol>
<li style="text-align: justify;">Tasks</li>
<li style="text-align: justify;">The Task Backstack</li>
<li style="text-align: justify;">Ensure that the activities are properly suspended, resumed and destroyed as necessary</li>
</ol>
<p><em><strong>Tasks</strong></em></p>
<p style="text-align: justify;">In Android a task is a set of related activities. These related activities don&#8217;t have to be a part of the same application. Most of the tasks start at the Home screen.</p>
<p style="text-align: justify;"><em><strong>Task Backstack</strong></em></p>
<p style="text-align: justify;">When an activity is launched it goes to the top of the backstack as part of the current backstack.</p>
<p style="text-align: justify;">When that activity is destroyed when the user clicks on back button or when the application terminates itself the activity is popped off the backstack.</p>
<p style="text-align: justify;"><em>Backstack is nothing but a stack for different activities based on their priorities. It acts like a stack to store different activities.</em></p>
<h5><strong>The Activity Life Cycle</strong></h5>
<p style="text-align: justify;">The Android application have a life cycle. An Activity is created, suspended, resumed and destroyed as necessary when an application executes. An application may not be in total control over the life cycle of these activities.</p>
<p style="text-align: justify;">Some of these actions depend on the choice the user makes. Some of these depend on the android itself. If for e.g., that the device is running low on battery, the Android OS may kill some of the activities to get back the resources.</p>
<p style="text-align: justify;"><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/activity_lifecycle.png"><img class="wp-image-435 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/activity_lifecycle-232x300.png" alt="activity_lifecycle" width="626" height="809" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/activity_lifecycle-232x300.png 232w, http://gowrishankarnath.com/wp-content/uploads/2015/12/activity_lifecycle.png 513w" sizes="(max-width: 626px) 100vw, 626px" /></a>When an activity starts it can be in an <em><strong>Resume/Running </strong></em>state i.e. it&#8217;ll be visible to the user and the user can interact with it.</p>
<p style="text-align: justify;"><em><strong>An activity can be paused</strong></em></p>
<p style="text-align: justify;">It may be visible but the user will not be interacting with this activity. He may be interacting with another activity. An paused activity can be terminated by the Android. When an activity is <strong>stopped</strong> it is no longer visible and can be terminated.</p>
<p style="text-align: justify;"><em>Android announces Activity life cycle changes to the Activity by calling specific activity methods </em>like protected void onCreate(Bundle SavedInstanceState), protected void onStart(), protected void onResume(), protected void onRestart(), protected void onStop(), protected void onDestroy().</p>
<p style="text-align: justify;">The Android application doesn&#8217;t work by themselves. There is an back and forth collaboration between the Android application and the Android OS itself. You have to understand the rule of these collaborations if you have to have the applications working properly.</p>
<p style="text-align: justify;"><em>When the activities are about to become visible then the Android calls onStart() method or sometimes the onRestart() method. </em></p>
<p style="text-align: justify;"><em>When the activity is about to become non visible then the android calls the onStop() method.</em></p>
<p style="text-align: justify;">Visible lifetime of an activity is between onStart() method and onStart() method.</p>
<p style="text-align: justify;">When an activity is visible on the screen, there are times when the user can interact with it and sometimes may not. This happens when the device goes to sleep. In that case the user cannot interact with the activity, even though the activity is in the foreground.</p>
<p style="text-align: justify;"><em>When the activity is again ready for the user interaction then the Android calls the onResume() method. </em></p>
<p style="text-align: justify;"><em>If the activity is able to stop interacting with the user then the Android calls the onPause() method.</em></p>
<p style="text-align: justify;"><em>If the activity is able to stop interacting with the user then the Android calls the onPause() method.</em></p>
<p style="text-align: justify;"><em>If the activity is invisible and in foreground then its life cycle is between onResume() and onPause().</em></p>
<h5 style="text-align: justify;"><strong>onCreate()</strong></h5>
<p style="text-align: justify;">This method is called when Activity is first created. It&#8217;ll call super.onCreate() which allows Android to do its own initialization. It&#8217;ll set the Activity&#8217;s content view. It tells what the Activity&#8217;s user interface should be. It retains and capture any information in reference to UI views as necessary. It configures the GUI views as necessary.</p>
<h5 style="text-align: justify;"><strong>onRestart()</strong></h5>
<p style="text-align: justify;">This method is called when the activity becomes visible and is about to start to interact with the user. This starts only foreground behaviors like starting animation.</p>
<h5 style="text-align: justify;"><strong>onPause()</strong></h5>
<p style="text-align: justify;">This method is called when we want to switch to another activity. For e.g., when we want to shutdown foreground only behavior.</p>
<h5 style="text-align: justify;"><strong>onStop()</strong></h5>
<p style="text-align: justify;">This method is called when the application is no longer visible to the user. May be this activity can be restarted later.</p>
<h5 style="text-align: justify;"><strong>onDestroy()</strong></h5>
<p style="text-align: justify;">This method is called when the application needs to be terminated. It helps in releasing the activity resources.</p>
<h4 style="text-align: justify;"><strong>Starting Activities</strong></h4>
<p style="text-align: justify;">Lets see how one activity can start or call another activity programmatically. First, you need to create an <em>Intent</em> object that specifies the activity that you need to start. Then you need to pass this newly created Intent to methods such as startActivity(), startActivityForResult().</p>
<p style="text-align: justify;"><em><strong>startActivity()</strong></em></p>
<p style="text-align: justify;">This method will start the desired activity, pushing the current activity away from the foreground.</p>
<p style="text-align: justify;"><em><strong>startActivityForResult()</strong></em></p>
<p style="text-align: justify;">This method will also act as startActivity() along with the desire that the started activity will return back to the called activity. This is done by calling a callback method, when the called activity finishes to return a result.</p>
<p style="text-align: justify;">Once the new activity  is called, then it should return the result back to the calling activity. This can be done by calling  the Activity.setResult().</p>
<p style="text-align: justify;">public final void setResult(int resultCode);</p>
<p style="text-align: justify;">public final void setResult(int resultCode, Intent Data);</p>
<p style="text-align: justify;">These resultCode includes some built in data like RESULT_CANCELED, RESULT_OK, CUSTOMRESULTCODE can also be added by the user.</p>
<h4 style="text-align: justify;"><strong>Configuration Changes</strong></h4>
<p style="text-align: justify;">It relates to application resources like languages, keyboard availability, service orientation. Device configuration can change at runtime. On configuration changes the Android kills the current activity and then restarts it.</p>
<p style="text-align: justify;">Since the configuration changes happen regularly/frequently, it needs to be reflected fast. Say for e.g., if the activity orientation is landscape or portrait. The activity can go from landscape mode to portrait mode. This kills the previous activity.</p>
<p style="text-align: justify;">To handle these changes, Java provides two ways to do this. When the changes are occurring, you can create and retain or save the objects containing important state information. Another option is to manually handle the configuration changes.</p>
<p style="text-align: justify;"><em><strong>Retaining an Object</strong></em></p>
<p style="text-align: justify;">Hard to recompute data can be cached to speed up handling of configuration changes. This is done using Fragment class.</p>
<p style="text-align: justify;"><em><strong>Manually handling the Reconfiguration Changes</strong></em></p>
<p style="text-align: justify;">You need to declare those specific changes that your activity will handle in AndroidManifest.xml file. For e.g., &lt;activity android:name = &#8220;.MyActivity&#8221; android:configChanges = &#8220;orientation/screensize/keyboardhidden&#8221;&gt;. Here the activity name is MyActivity. This will handle the changes to orientation or screen size or keyboard accessibility.</p>
<p style="text-align: justify;">When these configuration changes occur at runtime, the activity&#8217;s onConfigurationChanged() method is called. A configuration object is passed to this method specifying the new device configuration. Then our code can read this object and make what ever changes needs to be done.</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/android-application-fundamentals-and-activity-class/">Android Application Fundamentals and Activity Class</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/android-application-fundamentals-and-activity-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Android Platform and Android Development Environment</title>
		<link>http://gowrishankarnath.com/introduction-to-android-platform-and-android-development-environment/</link>
		<comments>http://gowrishankarnath.com/introduction-to-android-platform-and-android-development-environment/#respond</comments>
		<pubDate>Fri, 18 Dec 2015 17:28:39 +0000</pubDate>
		<dc:creator><![CDATA[gowrishankarnath]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Android Architecture]]></category>

		<guid isPermaLink="false">http://gowrishankarnath.com/?p=421</guid>
		<description><![CDATA[<p>The Android Platform The Android Platform is a software stack for Mobile Devices consisting of OS Kernel, System Libraries, Application Frameworks and Key Applications. Android provides SDK for creating Applications. Android SDK consists of libraries, development tools and lots of documentation. The Android Architecture Android architecture consists of different layers like Linux Kernel, Libraries, Android [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/introduction-to-android-platform-and-android-development-environment/">Introduction to Android Platform and Android Development Environment</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2 style="text-align: justify;"><strong>The Android Platform</strong></h2>
<p style="text-align: justify;">The Android Platform is a software stack for Mobile Devices consisting of OS Kernel, System Libraries, Application Frameworks and Key Applications.</p>
<p style="text-align: justify;">Android provides SDK for creating Applications. Android SDK consists of libraries, development tools and lots of documentation.</p>
<h2 style="text-align: justify;"><strong>The Android Architecture</strong></h2>
<p style="text-align: justify;">Android architecture consists of different layers like Linux Kernel, Libraries, Android RunTime, Application Framework. All of these layers will be used to develop Android Applications.</p>
<p><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/android-Architecture.png"><img class="wp-image-422 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/android-Architecture-300x243.png" alt="android Architecture" width="614" height="497" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/android-Architecture-300x243.png 300w, http://gowrishankarnath.com/wp-content/uploads/2015/12/android-Architecture-1024x831.png 1024w" sizes="(max-width: 614px) 100vw, 614px" /></a></p>
<h4><strong>Linux Kernel</strong></h4>
<p style="text-align: justify;">It&#8217;s the lowest layer of Android. It provides Android specific generic operating system services like security, memory and process management, File and Network Input/Output.</p>
<p style="text-align: justify;">Android has a customized Linux kernel that is specific to Android. It provides power management, memory sharing and management (due to less memory constraints of mobile devices). Inter-process communication is allowed wherein it allows several processes to communicate among themselves in a sophisticated manner.</p>
<p style="text-align: justify;">Device drivers needs to be plugged in, so that Android software can communicate with wide range of hardware devices like memory, radio, camera etc.</p>
<h4 style="text-align: justify;"><strong>System Libraries</strong></h4>
<p style="text-align: justify;">These are written in C/C++. Hence they are called native libraries. Android has its own C library. These system C libraries handle lot of core performance sensitive activities like rendering the images, updating the pages.</p>
<p style="text-align: justify;">System C library is also called as<em><strong> BIONIC LIBC</strong></em>. It implements standard system calls which does things like process and thread creation, mathematical computations, memory allocation and much more.</p>
<p style="text-align: justify;"><em><strong>Surface manager</strong></em></p>
<p style="text-align: justify;">It updates the display</p>
<p style="text-align: justify;"><em><strong>Media Framework</strong> </em></p>
<p style="text-align: justify;">To play audio/video</p>
<p style="text-align: justify;"><em><strong>Webkit</strong></em></p>
<p style="text-align: justify;">For rendering and displaying web pages.</p>
<p style="text-align: justify;"><em><strong>OpenGL</strong></em></p>
<p style="text-align: justify;">Performs and plays high end graphics.</p>
<p style="text-align: justify;"><em><strong>SQLite</strong></em></p>
<p style="text-align: justify;">Perform in memory relational database.</p>
<h4 style="text-align: justify;">Android RunTime</h4>
<p style="text-align: justify;">It supports writing and running android applications. Two main components are Core Java Libraries and Dalvik Virtual Machine.</p>
<p><em><strong>Core Java Libraries </strong></em></p>
<p style="text-align: justify;">The Android application is written in Java programming language. So Android makes available a number of Java libraries.</p>
<p style="text-align: justify;">The Core Java library is made up of basic Java classes like Java.*, Javax.*</p>
<p style="text-align: justify;">Android packages that are specific to the application life cycle are android.*</p>
<p style="text-align: justify;">Internet/Web Services packages are org.*</p>
<p style="text-align: justify;">Unit Testing packages are JUnit.*</p>
<p><em><strong>Dalvik Virtual Machine</strong></em></p>
<p style="text-align: justify;">Applications are executed by the Dalvik Virtual Machine (DVM). Typical workflow is</p>
<ol style="text-align: justify;">
<li>Application is written in Java</li>
<li>Java Compiler compiles the application to multiple Java Byte code file.</li>
<li>A tool called DX will convert the Java Byte Code file to a single DX Byte code file. (The file will have .dex extension. For e.g., classes.dex)</li>
<li>This dex file is packaged with other application resources and installed on to the devices.</li>
<li>When the user finally launches the application the Dalvik Virtual Machine executes the dex byte code file.</li>
</ol>
<p style="text-align: justify;">The reason for doing all of this or using the Dalvik Virtual Machine is DVM is designed to run in resource constrained environment which is a typical scenario for mobile devices. Resource constrained because when compared to desktop PCs/Laptops, the mobile devices have</p>
<ol>
<li>Slower CPU</li>
<li>Less RAM</li>
<li>Limited Batter</li>
</ol>
<h4><strong>Application Framework Layer</strong></h4>
<p>It has many reusable software components.</p>
<p><em><strong>View System</strong></em></p>
<p>Contains many common graphical items like buttons, icons that many applications include in their user interface.</p>
<p><em><strong>Package Manager</strong></em></p>
<p>Keeps track of all the packages that are currently installed on the device.</p>
<p><em><strong>Window Manager</strong></em></p>
<p>Manages the many windows that comprises the application.</p>
<p><a href="http://gowrishankarnath.com/wp-content/uploads/2015/12/AndroidWindow.png"><img class="size-medium wp-image-425 aligncenter" src="http://gowrishankarnath.com/wp-content/uploads/2015/12/AndroidWindow-237x300.png" alt="AndroidWindow" width="237" height="300" srcset="http://gowrishankarnath.com/wp-content/uploads/2015/12/AndroidWindow-237x300.png 237w, http://gowrishankarnath.com/wp-content/uploads/2015/12/AndroidWindow.png 508w" sizes="(max-width: 237px) 100vw, 237px" /></a></p>
<p style="text-align: justify;"><em><strong>Resource Manager</strong></em></p>
<p style="text-align: justify;">Manages <em>non compiled</em> resources like strings, graphics and layout files.</p>
<p style="text-align: justify;"><em><strong>Activity Manager</strong></em></p>
<p style="text-align: justify;">Activity means it corresponds to single user interface screen.</p>
<p style="text-align: justify;">An App will have multiple activity through which the user needs to navigate.</p>
<p style="text-align: justify;"><em><strong>Content Providers</strong></em></p>
<p style="text-align: justify;">Content Providers are essentially databases that allows the application to store and share the structured information. Contact Content Providers stores the mobile numbers which is used by the dialler to dial the number. These are used for inter application data sharing.</p>
<p style="text-align: justify;"><em><strong>Location Manager</strong></em></p>
<p style="text-align: justify;">It allows the App to access the location information and movement information. For e.g., GPS Systems.</p>
<p style="text-align: justify;"><em><strong>Notification Manager</strong></em></p>
<p style="text-align: justify;">It allows applications to place the notification icons on the status bar when important events occur. For e.g., if I&#8217;m browsing and in between if I receive a message, then that SMS message icon is displayed in the notification bar. Notification bar will be at the very top row (in the battery row).</p>
<h3 style="text-align: justify;"><strong>Application Layer</strong></h3>
<p style="text-align: justify;">It contains standard applications like Home Screen, Contacts, Phone Dialer, Browser, Email reader and others. The better part is none of these apps are hard coded into Android. You can substitute these applications with better applications or any 3rd party applications.</p>
<h1><strong>The Android Development Environment</strong></h1>
<p style="text-align: justify;"><strong>Android Studio</strong> is the official IDE for Android application development, based on IntelliJ IDEA. On top of the capabilities you expect from IntelliJ, Android Studio offers:</p>
<ul>
<li style="text-align: justify;">Intelligent code editor</li>
<li style="text-align: justify;">Multi-screen app development, Rich layout editor with support for drag and drop theme editing</li>
<li style="text-align: justify;">Virtual devices for all shapes and sizes</li>
<li style="text-align: justify;">Code templates to help you build common app features and GitHub integration</li>
<li style="text-align: justify;">lint tools to catch performance, usability, version compatibility, and other problems</li>
<li style="text-align: justify;">Flexible Gradle-based build system</li>
<li style="text-align: justify;">Build variants and multiple apk file generation</li>
<li style="text-align: justify;">ProGuard and app-signing capabilities</li>
<li style="text-align: justify;">Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine</li>
</ul>
<h4 style="text-align: justify;"><strong>Virtual Device</strong></h4>
<p style="text-align: justify;">The Android Emulator is called Virtual Device. Following are the Pros of Android Emulator</p>
<ol>
<li style="text-align: justify;">Doesn&#8217;t require an actual device.</li>
<li style="text-align: justify;">Hardware characteristics can be easily reconfigured like setting the amount of memory.</li>
</ol>
<p style="text-align: justify;">Following are the Cons of Android Emulator</p>
<ol>
<li style="text-align: justify;">Its very slow.</li>
<li style="text-align: justify;">Some features are not well supported like Bluetooth or USB connections are not supported properly.</li>
<li style="text-align: justify;">Performance/User Experience can be misleading.</li>
</ol>
<h4 style="text-align: justify;"><strong>Debugger</strong></h4>
<p style="text-align: justify;">Tool for examining the internal state of a running application.</p>
<p style="text-align: justify;"><em><strong>DDMS</strong></em><br />
Android Studio includes a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more.</p>
<p><em><strong>Reading and Writing Logs</strong></em><br />
The Android logging system provides a mechanism for collecting and viewing system debug output.</p>
<p style="text-align: justify;"><em>Logcat</em> dumps a log of system messages, which include things such as stack traces when the emulator throws an error and messages that you have written from your application by using the Log class. You can run LogCat through ADB or from DDMS, which allows you to read the messages in real time.</p>
<p><em><strong>Improving Your Code with lint</strong></em><br />
In addition to testing that your Android application meets its functional requirements, it&#8217;s important to ensure that your code has no structural problems.</p>
<p style="text-align: justify;">Poorly structured code can impact the reliability and efficiency of your Android apps and make your code harder to maintain. For example, if your XML resource files contain unused namespaces, this takes up space and incurs unnecessary processing.</p>
<p style="text-align: justify;">Other structural issues, such as use of deprecated elements or API calls that are not supported by the target API versions, might lead to code failing to run correctly</p>
<p><em><strong>Profiling with Traceview and dmtracedump</strong></em><br />
Traceview is a graphical viewer for execution logs that you create by using the Debug class to log tracing information in your code.</p>
<p style="text-align: justify;">Traceview can help you debug your application and profile its performance.</p>
<p style="text-align: justify;">dmtracedump is a tool that gives you an alternate way of generating graphical call-stack diagrams from trace log files.</p>
<p style="text-align: justify;">The tool uses the Graphviz Dot utility to create the graphical output, so you need to install Graphviz before running dmtracedump.</p>
<p>The dmtracedump tool generates the call stack data as a tree diagram, with each call represented as a node. It shows call flow (from parent node to child nodes) using arrows.</p>
<p><em><strong>Analyzing UI Performance with Systrace</strong></em><br />
While developing your application, you should check that user interactions are buttery smooth, running at a consistent 60 frames per second. If something goes wrong, and a frame gets dropped, the first step in fixing the problem is understanding what the system is doing.</p>
<p style="text-align: justify;">The Systrace tool allows you to collect and inspect timing information across an entire Android device, which is called a trace. It shows where time and CPU cycles are being spent, displaying what each thread and process is doing at any given time. It also inpects the captured tracing information to highlight problems that it observes, from list item recycling to rendering content, and provide recommendations about how to fix them.</p>
<p>The post <a rel="nofollow" href="http://gowrishankarnath.com/introduction-to-android-platform-and-android-development-environment/">Introduction to Android Platform and Android Development Environment</a> appeared first on <a rel="nofollow" href="http://gowrishankarnath.com">Software Artist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gowrishankarnath.com/introduction-to-android-platform-and-android-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
