<?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>Bikram Mann</title>
	<atom:link href="https://www.bikrammann.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bikrammann.com</link>
	<description>Passion and Persistence is the Key to Success</description>
	<lastBuildDate>Fri, 03 Jun 2016 22:46:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>How to automatically restart tomcat after system reboot &#8211; Ubuntu Linux</title>
		<link>https://www.bikrammann.com/how-to-automatically-restart-tomcat-after-system-reboot-ubuntu-linux/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Fri, 03 Jun 2016 22:45:23 +0000</pubDate>
				<category><![CDATA[Tomcat]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=363</guid>

					<description><![CDATA[First create a file in /etc/init.d/tomcat sudo nano  /etc/init.d/tomcat Then add the contents below #!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin start() { sh /home/server/tomcat/bin/startup.sh # Change this location to your tomcat directory } stop() { sh /home/server/tomcat/bin/shutdown.sh # Change this location to your tomcat directory } case $1 in start&#124;stop) $1;; restart) stop; start;; *) echo "Run as $0 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>First create a file in /etc/init.d/tomcat</strong></p>
<pre><code>
sudo nano  /etc/init.d/tomcat
</code></pre>
<p><strong>Then add the contents below</strong></p>
<pre><code>#!/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
 sh /home/server/tomcat/bin/startup.sh # Change this location to your tomcat directory
}

stop() {
 sh /home/server/tomcat/bin/shutdown.sh # Change this location to your tomcat directory
}

case $1 in
  start|stop) $1;;
  restart) stop; start;;
  *) echo "Run as $0 &lt;start|stop|restart&gt;"; exit 1;;
esac</code></pre>
<p><strong>Change permissions</strong></p>
<pre><code>chmod 755 /etc/init.d/tomcat</code></pre>
<p><strong>Update symlinks</strong></p>
<pre><code>update-rc.d tomcat defaults</code></pre>
<p><strong>Test, if you did everything correctly by</strong></p>
<pre><code>
sudo service tomcat &lt;stop|start|restart&gt;
</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Start a Startup &#8211; Standford University</title>
		<link>https://www.bikrammann.com/how-to-start-a-startup-standford-university/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Thu, 19 May 2016 06:51:16 +0000</pubDate>
				<category><![CDATA[Random]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=361</guid>

					<description><![CDATA[Wonderful series on &#8220;How to Start a Startup&#8221;. Highly Recommended]]></description>
										<content:encoded><![CDATA[<p>Wonderful series on &#8220;How to Start a Startup&#8221;. Highly Recommended</p>
<p><iframe title="Lecture 1 - How to Start a Startup (Sam Altman, Dustin Moskovitz)" width="625" height="352" src="https://www.youtube.com/embed/CBYhVcO4WgI?list=PL5q_lef6zVkaTY_cT1k7qFNF2TidHCe-1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Computer Science for Business Leaders 2016</title>
		<link>https://www.bikrammann.com/computer-science-for-business-leaders-2016/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Thu, 12 May 2016 23:52:48 +0000</pubDate>
				<category><![CDATA[Random]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=358</guid>

					<description><![CDATA[New to programming ? No, problem David Malan got you covered.]]></description>
										<content:encoded><![CDATA[<p>New to programming ? No, problem David Malan got you covered.</p>
<p><iframe title="Privacy, Security, Society - Computer Science for Business Leaders 2016" width="625" height="352" src="https://www.youtube.com/embed/WMYyD5zx9_c?list=PLhQjrBD2T383wBEMbMIpdWghyHVQU2wB_" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_2/Paying_the_Minimum.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_2_paying_the_minimum-py/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:56:27 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=346</guid>

					<description><![CDATA[def calculate_balance(balance, annualInterestRate, monthlyPaymentRate): totalPaid = 0 remainingBalance = balance for month in range(1,13): monthlyInterestRate = annualInterestRate / 12.0 minimumMonthlyPayment = round((monthlyPaymentRate * remainingBalance),2) totalPaid += minimumMonthlyPayment monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2) print("Month: {}".format(month)) print("Minimum monthly payment: {}".format(minimumMonthlyPayment)) print("Remaining Balance: {}".format(remainingBalance)) print("Total paid: {}".format(totalPaid)) print("Remaining Balance: {}".format(remainingBalance)) calculate_balance(balance, [&#8230;]]]></description>
										<content:encoded><![CDATA[<pre><code>def calculate_balance(balance, annualInterestRate, monthlyPaymentRate):

    totalPaid = 0
    remainingBalance = balance

    for month in range(1,13):
        monthlyInterestRate = annualInterestRate / 12.0
        minimumMonthlyPayment = round((monthlyPaymentRate * remainingBalance),2)
        totalPaid += minimumMonthlyPayment
        monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment
        remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2)

        print("Month: {}".format(month))
        print("Minimum monthly payment: {}".format(minimumMonthlyPayment))
        print("Remaining Balance: {}".format(remainingBalance))

    print("Total paid: {}".format(totalPaid))
    print("Remaining Balance: {}".format(remainingBalance))


calculate_balance(balance, annualInterestRate, monthlyPaymentRate)

</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_2/Paying_Debt_Off_in_a_Year.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_2_paying_debt_off_in_a_year-py/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:54:24 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=343</guid>

					<description><![CDATA[def calculate_balance(balance, annualInterestRate): monthlyInterestRate = annualInterestRate / 12.0 remainingBalance = balance minimumMonthlyPayment = 0 while True: minimumMonthlyPayment += 10 for _ in range(0,12): monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2) if remainingBalance &#60; 0: break else: remainingBalance = balance print("Lowest Payment: {}".format(minimumMonthlyPayment)) calculate_balance(balance, annualInterestRate)]]></description>
										<content:encoded><![CDATA[<pre><code>def calculate_balance(balance, annualInterestRate):

    monthlyInterestRate = annualInterestRate / 12.0
    remainingBalance = balance
    minimumMonthlyPayment = 0

    while True:
        minimumMonthlyPayment += 10

        for _ in range(0,12):
            monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment
            remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2)

        if remainingBalance &lt; 0:
            break
        else:
            remainingBalance = balance

    print("Lowest Payment: {}".format(minimumMonthlyPayment))

calculate_balance(balance, annualInterestRate)

</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_2/Bisection_Search.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_2_bisection_search-py/</link>
					<comments>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_2_bisection_search-py/#comments</comments>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:52:21 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=341</guid>

					<description><![CDATA[def calculate_balance(balance, annualInterestRate): monthlyInterestRate = annualInterestRate / 12.0 lowerBound = balance / 12 upperBound = (balance * (1+ monthlyInterestRate)**12)/12 minimumMonthlyPayment = (upperBound + lowerBound)/2.0 while True: remainingBalance = balance for _ in range(0,12): monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2) if remainingBalance &#60;= 0 and remainingBalance &#62;= -0.01: break else: [&#8230;]]]></description>
										<content:encoded><![CDATA[<pre><code>def calculate_balance(balance, annualInterestRate):

    monthlyInterestRate = annualInterestRate / 12.0
    lowerBound = balance / 12
    upperBound = (balance * (1+ monthlyInterestRate)**12)/12
    minimumMonthlyPayment = (upperBound + lowerBound)/2.0

    while True:
        remainingBalance = balance

        for _ in range(0,12):
            monthlyUpaidBalance = remainingBalance - minimumMonthlyPayment
            remainingBalance = round(monthlyUpaidBalance + (monthlyInterestRate * monthlyUpaidBalance),2)

        if remainingBalance &lt;= 0 and remainingBalance &gt;= -0.01:
            break
        else:
            if remainingBalance &gt; 0:
                lowerBound = minimumMonthlyPayment
            else:
                upperBound = minimumMonthlyPayment
        minimumMonthlyPayment = (upperBound + lowerBound)/2.0

    print("Lowest Payment: {}".format(round(minimumMonthlyPayment,2)))

calculate_balance(balance, annualInterestRate)
</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_2_bisection_search-py/feed/</wfw:commentRss>
			<slash:comments>17</slash:comments>
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_1/item_order.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_1_item_order-py/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:49:06 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=339</guid>

					<description><![CDATA[order = "" def item_order(order): salad = order.count("salad") hamburger = order.count("hamburger") water = order.count("water") return("salad:{} hamburger:{} water:{}".format(salad, hamburger, water)) item_order(order)]]></description>
										<content:encoded><![CDATA[<pre><code>order = ""
def item_order(order):

    salad = order.count("salad")
    hamburger = order.count("hamburger")
    water = order.count("water")

    return("salad:{} hamburger:{} water:{}".format(salad, hamburger, water))

item_order(order)

</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_1/count_vowels.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_1_count_vowels-py/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:46:50 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=336</guid>

					<description><![CDATA[def count_vowels(s): count = 0 for char in s: if char in 'aeiou': count += 1 print("Number of vowels: {}".format(count)) count_vowels(s)]]></description>
										<content:encoded><![CDATA[<pre><code>def count_vowels(s):
    count = 0
    for char in s:
        if char in 'aeiou':
            count += 1
    print("Number of vowels: {}".format(count))

count_vowels(s)

</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>edX_MITx_6.00.1x/Problem_Set_1/count_occurrence.py</title>
		<link>https://www.bikrammann.com/edx_mitx_6-00-1x_problem_set_1_count_occurrence-py/</link>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Wed, 06 Apr 2016 19:44:16 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=334</guid>

					<description><![CDATA[def count_occurrence(s): count = 0 pos = s.find("bob") while pos != -1: count += 1 pos = s.find("bob", pos+1) print("Number of times bob occurs is: {}".format(count)) count_occurrence(s)]]></description>
										<content:encoded><![CDATA[<pre><code>def count_occurrence(s):
    count = 0
    pos = s.find("bob")
    while pos != -1:
        count += 1
        pos = s.find("bob", pos+1)
    print("Number of times bob occurs is: {}".format(count))

count_occurrence(s)
</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automate Facebook Login and Status Update with Python Selenium</title>
		<link>https://www.bikrammann.com/automate-facebook-login-and-status-update-with-python-selenium/</link>
					<comments>https://www.bikrammann.com/automate-facebook-login-and-status-update-with-python-selenium/#comments</comments>
		
		<dc:creator><![CDATA[bikrammann]]></dc:creator>
		<pubDate>Thu, 31 Mar 2016 18:27:57 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.bikrammann.com/?p=324</guid>

					<description><![CDATA[You can download the source code from my GitHub page https://github.com/bikrammann/web_crawler/blob/master/Automate_Facebook_Login_and_Status_Update.py Step 1 &#8211; Required imports import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys Step 2 &#8211; Create Firefox object and use get method then sleep for 5 seconds driver = webdriver.Firefox() # Firefox Browser [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>You can download the source code from my GitHub page<br />
<a href="https://github.com/bikrammann/web_crawler/blob/master/Automate_Facebook_Login_and_Status_Update.py" target="_blank">https://github.com/bikrammann/web_crawler/blob/master/Automate_Facebook_Login_and_Status_Update.py<br />
</a></p>
<p><strong>Step 1</strong> &#8211; Required imports</p>
<pre><code>
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
</code>
</pre>
<p><strong>Step 2</strong> &#8211; Create Firefox object and use get method then sleep for 5 seconds</p>
<pre><code>
driver = webdriver.Firefox() # Firefox Browser
driver.get('http://www.facebook.com')
time.sleep(5)
</code>
</pre>
<p>To use Google Chrome with Selenium, First install Google Chrome Driver from &#8216;https://sites.google.com/a/chromium.org/chromedriver/&#8217;. Then replace &#8216;C:/chrome/chromedriver.exe&#8217; with your chrome driver path</p>
<pre><code>
# Replace
driver = webdriver.Firefox() # Firefox Browser
# With
driver = webdriver.Chrome('C:/chrome/chromedriver.exe') # Chrome Browser
</code>
</pre>
<p><strong>Step 3</strong> &#8211; Locate email address and password field on Facebook Login Page</p>
<pre><code>
username = driver.find_element_by_name("email")
password = driver.find_element_by_name("pass")
</code></pre>
<p><strong>Step 4</strong> &#8211; Add values to email address and password fields</p>
<pre><code> 
username.send_keys("example@gmail.com")
password.send_keys("password123")
</code></pre>
<p><strong>Step 5</strong> &#8211; Sleep for 1 second, then press the login button</p>
<pre><code>
time.sleep(1)
driver.find_element_by_id("loginbutton").click()
</code></pre>
<p><strong>Step 6</strong> &#8211; Locate the text box where it says &#8220;What&#8217;s on your mind?&#8221;</p>
<pre><code>
message = driver.find_element(By.XPATH, "//textarea[@name='xhpc_message']")
</code></pre>
<p><strong>Step 7</strong> &#8211; Click the text box area to get it in focus where it says &#8220;What&#8217;s on your mind?&#8221;</p>
<pre><code>
ActionChains(driver) \
    .key_down(Keys.CONTROL) \
    .click(message) \
    .key_up(Keys.CONTROL) \
    .perform()
</code></pre>
<p><strong>Step 8</strong> &#8211; Message for status update</p>
<pre><code>
message.send_keys("Ha Ha")
</code></pre>
<p><strong>Step 9</strong> &#8211; Press the post button to submit the status update</p>
<pre><code>
driver.find_element(By.XPATH, '//button[text()="Post"]').click()
time.sleep(5)
</code></pre>
<p><strong>Step 10</strong> &#8211; Close the browser</p>
<pre><code>
driver.close()
</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bikrammann.com/automate-facebook-login-and-status-update-with-python-selenium/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
