How to Run a simple Web.py program using Python

I am going to show you how to run a simple Hello World program using web.py ( a python framework). You should install web.py framework in you PC before you attempt this. Open notepad, copy all the below code and save the file with some name with extension .py

import web # for including all the web contents
urls=(
 '/','Index' # Here we are specifying URLs
 )

# Here the template that we need to display in our HTML Page
tmp=""" 
<html>
   <head>
      <title>Testing Web.py</title>
   </head>
   <body>
     <center>
        <h2>Hello world</h2>
     </center>
  </body>
</html>"""
#class name
class Index: 
    def GET(self):
    return tmp

#main funtion
if __name__=='__main__':
app=web.application(urls,globals())
app.run()

I saved the above file as sample.py. Then you can run this program like this
Take terminal and go to the specified path where you saved the python file. In my case I saved the file in Desktop.
Go to the Specified path like this – C:\Users\DELL\Desktop\
screen1
Then type the name of python file followed by the port number that we need to run the page. 
C:\Users\DELL\Desktop>python sample.py 9999
screen2
Click enter to run the program. Then it will show the localhost address where the file is running.
C:\Users\DELL\Desktop>python sample.py 9999
http://0.0.0.0:9999/
screen3
The webpage is running in the http://0.0.0.0:9999/
Open a browser and paste the address, then you can view your “Hello World” web page.
screen4
Hope you will try after reading this. Thanks for reading and kindly submit your feedback.

How to install neo4j graph database in Ubuntu 12.04 LTS

Neo4j is a Graph Database. A Graph Database stores data in a Graph, the most generic of data structures,
capable of elegantly representing any kind of data in a highly accessible way. Neo4j’s data model is a Graph, in particular a Property Graph. Cypher is Neo4j’s graph query language and also Cypher is a declarative query language.
The installation of neo4j is as follows
First of all download the neo4j communtiy server from the following link
http://download.neo4j.org/artifact?edition=community&version=2.1.2&distribution=tarball&dlid=4618742&_ga=1.217727826.578371986.1403416140

Then check whether the java installed in the ubuntu is Oracle 7 or not.

$ java -version

If java version is Open jdk version, then follow the procedures given below:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer
Then you will find out that the java version is up to date (ie.Oracle 7). The next step is go to the path where the  neo4j communtiy server is downloaded. For example, if I dowloaded the file in my Downloads folder, then I should go to that folder and extract the neo4j-community-2.1.2-unix.tar.gz that we downloaded. After extraction, go to that particular folder.
$ cd /Downloads/neo4j-community-2.1.2/bin
$ sudo ./neo4j start
This will start the neo4j in your system. For the neo4j interface go to the local host address:
http://localhost:7474/
The you will get a page like this:
Screenshot from 2014-06-22 22:56:20
 
 Source: http://www.neo4j.org/download/linux

Welcome to my website…!!

Hello everybody, welcome to my tech blog. In this blog, you can see my academic stuffs, academic programs, reviews about technologies, my solved problems related to programming languages like Java, Python, Scheme and also some installation procedures of some new technologies for helping the beginners.

I am pursuing my Masters of Science (Information Technology)  at Indian Institute of Information Technology & Management – Kerala (IIITM-K), Technopark, Thiruvananthapuram, Kerala which is under Government of Kerala and Accredited by the famous Cochin University of Science & technology (CUSAT). My areas of interests is Open source, Big Data, Cloud Computing, Data mining and technologies like hadoop. I have interest in social networking as well as learning new technologies and try it out by myself.

I welcome your feedback, criticisms and suggestions for improving my website. Thank you..:)