Building and running First Django Application on Ubuntu 13.04 – Part 2

In the first part we did initial setup for developing django app on Ubuntu 13.04 .

I’m not getting enough time to continue.. soon i’ll start again.

Advertisements

Building and running First Django Application on Ubuntu 13.04 – Part 1

Django is a popular web development framework based on Python. You can read more about here.

In this first part we will do basic setup required for Django on Ubuntu 13.04. Python comes already installed in all versions of Ubuntu. This tutorial will work for Python versions 2.6 or later and may not work for 3.0+ .

To Check python version type following in terminal

Python --version

We will need pip, a tool for installing and managing Python packages. Which can be installed using this command in terminal.

sudo apt-get install python-pip

Now we will install django framework

sudo pip install django

We will also need MySQL on our system for database requirments. So go ahead and follow this link to install MySQL and PHPmyAdmin(web client for MySQL database).

Vitualenv:
Generally you should do python based development in Virtualenv, you can read more about on this tutorial
http://warpedtimes.wordpress.com/2012/09/23/a-tutorial-on-virtualenv-to-isolate-python-installations/

We will use following tools to write and execute the python codes

1. IPython : Interactive python shell unlike boring IDLE(shell which comes with standad python)
run following commands in python

Sudo apt-get install ipython && ipython-qtconsole

you can type ipython directly in console or use ipython-qtconsole – the Qt frontend.

2. Sublime-Text : Very lightweight Text-editor cum IDE. We will use sublime text for coding most of the code.
Follo instruction on this tutorial to install sublime-text on ubuntu.

Now the setup is complete. Follow Part-2 to write your first django Application.

Some Helpful Links:
https://docs.djangoproject.com/en/dev/intro/tutorial01/
http://warpedtimes.wordpress.com/2012/09/23/a-tutorial-on-virtualenv-to-isolate-python-installations/
http://gettingstartedwithdjango.com/
http://learnpythonthehardway.org/book/

Qt Creator as an IDE for C++

I was trying to learn C++ for so many months(may be years) but didn’t find any suitable IDE on which I can practice. Then few months ago, one of my friend introduced me to Qt Creator, as one of the best IDE for C++. During the free time in this summer I gave it a try and started learning the language with the help of a ebook on this IDE. And surprisingly, I found Qt Creator to be perfect in so many ways. Every feature I was looking for previously, is  available in it.

Even though, Qt Creator is basically designed for development of Qt applications but It has everything to become a full fledged C++ IDE. I tried it on ubuntu till now. It can be installed directly from software Center. Windows version is also available for download on website.

  • To properly compile and run C++ projects do as following.

– Create a new C++ Project by first clicking on File -> New File or Project then select Other Projects -> C++ Project and follow the instructions.

– You will get checkbox of shadow build, by checking it you can be sure that the source files will be in separate folder than build files.

– Now select the Project mode by clicking on the box below debug box in left side pane. Here go to Run Settings and check the Run in terminal.

– Now go to Tool menu and select Options->Environment -> General . Here look for Terminal in System. Enter /usr/bin/X11/xterm -e instead of existing text.

QtCreator is ready to compile and run your C++ projects. Use Ctrl + B to build and Ctrl + R to run or use buttons given at bottom in left panel for build and run or you can use build menu.

  • To enable C++11 support do as following.

– Find the your_project_name.pro file in your project hierarchy in Qt Creator. Just add  following line in this .pro file to enable the support

QMAKE_CXXFLAGS += -std=c++0x (or -std=gnu++0x)

– This .pro file is used qmake tool to generate makefile for your project. The above line adds flag -std=c++0x(or -std=gnu++0x) to CXFLAGS in the makefile.

– After changing anything in .pro file right click on project and Run qmake so as to generate final Makefile in your build folder

 

  • Qt Creator has many attractive features like

– Autoindentation of selected code by pressing Ctrl + /

– Autocomplete feature is awesome and better than almost all other IDEs

– Beautiful animations.

– Split screen using shortcuts like  Ctrl + E, 2 : Ctrl + E, 3 : Ctrl + E, 0

– Switch Header/Source using F4.

– Switch declaration/definition using Ctrl + Left Click .

Many more features can be found out by using the it. So Install and Experience one of the Best C++ IDE available.

GIS presentation

During this last semester(8th) I took GIS(geographic information systems) as one of the elective from Applied Mechanics system. In GIS ma’am told everyone to give to seminar presentation on some topic which will be considered for 30% weightage.

I searched over the Internet for various topics and at one of GIS website i found the topic “Decision support system for Transportation Engineering” which later I found to be more mathematical than presentable. During that time I went to koorg for the trip with friends, so this topic came into mind – “GIS in Tourism”. So finally I got a good topic and collected information for it on Internet. My seminar was better than my expectations 🙂

My presentation can be downloaded from following link

Download gisInTourism.pdf

Stanford Online course videos at openclassroom website

During Sept-Dec 2011 a lot of people enrolled for free stanford online courses. There were three courses Machine Learning, Artificial Intelligence and Database Management. I successfully completed the Machine learning course, popularly known as ml-class.

Stanford people also planned to launch as much as 16 free online courses in duration of Jan – Apr 2012. Some of which are ml-class(again), algorithm design, human computer interaction etc. But due to some internal problems course which were starting in January are not started yet and there is  no particular  information about Feb and March courses.

But there is some relief for people who wanted to attend Human-computer-interaction and algorithm design courses. All the video for these courses are already available at following link

http://openclassroom.stanford.edu/MainFolder/HomePage.php

Apart from these two course there are other free courses available at above website for studying as per your interest like Practical Unix, Web Application, Database management, machine learning(advance version which also includes ml-class videos) and few more.

You can directly go to site and view the videos. Reply to this post if you want to download those videos, I’ll tell you the way.

Now many stanford online courses are started and course material are available at the course websites.

Game-theory, algorithm-design, cryptography, model-thinking, natural-language-processing, SAAS and probabilistic-graphical-models are up.   You can check the list of courses and their links at

https://www.coursera.org/landing/hub.php

The link for downloading the videos and other resource materials are available at respective course websites.

http://www.coursera.org
Coursera.org screenshot