Installing Python 2.7.5 with Pandas 0.11.0 and NumPy 1.7.1 on Ubuntu 12.04 LTS using Virtualenv

At first install the openssl development package, which is libssl-dev, this will enable python compile
with ssl support, which we will later need to install libraries using pip:

sudo apt-get install libssl-dev

install pip and virtualenv:

sudo apt-get install python-pip
sudo pip install virtualenv

Create a local directory for new python distributoin

mkdir ~/.localpython

Download and install Python 2.7.5 in that local directory

tar jxvf Python-2.7.5.tar.bz2
cd Python-2.7.5/
make clean (optional)
./configure --prefix=/home/naved/.localpython
make install

Go to your python project directory for which you want to use the new python dist and create

virtual environment directory:

cd Coding/
virtualenv py2.7.5 --python=/home/naved/.localpython/bin/python

A ‘py2.7.5/’ directory will be created containing pip, easy_install, python (2.7.5)

Now install Numpy 1.7.1 and Pandas 0.11.0 for this python distribution (2.7.5):

py2.7.5/bin/pip install numpy==1.7.1

py2.7.5/bin/pip install pandas==0.11.0 isn’t able to install pytz dependency and
py2.7.5/bin/easy_install pandas==0.11.0 has ‘503: Backend is unhealthy’ issue, so
we have to manually get the pandas-0.11.0.tar.gz’s link and use that to install.

py2.7.5/bin/easy_install<br />

Activate virtual env and test installation:

source py2.7.5/bin/activate
>>import numpy as np
>>import pandas as pd

Installing Python 2.7.5 on Ubuntu 12.04 using PyEnv


Installation steps:

cd ~
git clone git:// .pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv" >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH" >> ~/.bashrc
$ echo 'eval "$(pyenv init -)" >> ~/.bashrc
sudo apt-get install libreadline-dev [installed using ubuntu software center]
sudo apt-get install libbz2-dev

pyenv install 2.7.5

pyenv rehash

Set python version for all terminals:

$pyenv global 2.7.5

$python --version

Some Python apps installation on Ubuntu

1. Installing pyzipcode-0.4 in Ubuntu 12.04

sudo apt-get install libsqlite3-dev
tar zxvf pyzipcode-04.tar.gz
cd pyzipcode-0.4
sudo python install

2. IDLE Linux Installation

If you are using Debian / Ubuntu Linxu, type the following apt-get command to install idle IDE:

$ sudo apt-get install idle

Installing Skype, FlareGet, Java, Skype on Ubuntu 12.04

1. Installing Skype on Ubuntu 12.04 LTS 32-Bit

sudo add-apt-repository "deb $(lsb_release -sc) partner"
sudo apt-get update
sudo apt-get -f install
sudo apt-get install skype

2. Installing flash plugin on ubuntu

sudo apt-get install flashplugin-installer

3. Installing Java Runtime Environment on Ubuntu 12.04

sudo apt-get install openjdk-7-jre

4. Installing Avro on Ubuntu 12.04 LTS

Click here :

5. Installing flareget on Ubuntu with firefox integration

1. Download flareget from

2. untar and dpkg -i flarget _1.5-12_i386.deb
3. Install flashgot plugin from addon section of firefox
4. add flareget as the default download manager (if not already selected)

How to get Netextender (VPN) working in Ubuntu 12.10 x64

1) go to

2) log in with Username: demo Password: password

3) click on NetExtender icon, this will download a tar.gz with the client

4) sudo ln -s /lib/x86_64-linux-gnu/ /usr/lib/

5) sudo ln -s /lib/x86_64-linux-gnu/ /usr/lib/

6) un-tar the client, make install script executable (chmod +x install ) and launch install (./install)

You’re done.
Make sure you have JRE installed before running netExtenderGui.

Connect with :

sudo netExtender -u user -p password -d domain server

(and see man netExtender)

Virtual Box Configurations for Windows XP Guest OS, Ubuntu 12.04 LTS Host OS.

– File sharing with the VirtualBox Guest OS (Windows Guest, Ubuntu Host)

1. Create shared folder /home/<user name>/shared
2. From Virtual Box settings include the folder from the shared folder option
3. Download VBoxGuestAddition.iso [It has to be the same version as the VirtualBox app] Dowload from :
4. Insert the iso as a virtual CD from Virtual Box settings storage section
5. Access the CD from Windows guest OS.
6. Install Guest addition in Windows
7. Reboot
8. Access the shared folder from My Network Places

– Enable USB detection in Virtual Box OS

1. Download extension pack of the same version of the Virtual Box Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack
double-click it to run by VB and install.
2. Add your user to vboxusers group and log out and log in.
# usermod -a -G <group-name> <user-name>
3. From settings add usb filter by selecting the appropriate usb

Ubuntu : Useful Commands

1. Set commands at terminal startup on ubuntu

export PATH=$PATH:/home/me/play

to your ~/.bashrc.

restart terminal (ctrl+alt+T)

2. Installing Wine 1.6 on Ubuntu 12.04 LTS

0. sudo apt-get build-dep wine
1. Download wine_1.6.tar.bz2
2. tar jxvf wine_1.6.tar.bz2
3. cd wine_1.6/tools/
4. ./wineinstall
5. type 'yes' for sudo root permission
To run .exe files -
$wine <file-name>.exe

3. Creating startup USB from Ubuntu

usb-creator-gtk -i ubuntu-12.10-desktop-i386.iso

4. Brightness problem in Ubuntu 12.04 64-bit

xrandr --output LVDS1 --brightness 0.5

5. Determine destination location of apt-get install <package>
You can run the command dpkg -L package to list all the files in the package. For example dpkg -L ubuntu-minimal will only list a couple of small files related to packaging, as it is only an empty meta-package that depends on other packages.

dpkg -L tomcat7

is probably what you want.

6. set what application to use to open a file based upon it’s extension on Ubuntu.

You can use mimeopen to set what application to use to open a file based upon it’s extension.

Run mimeopen followed by the file extension you want to change. For example, if I wanted to open .py (python) files in Geany instead of Gedit I would run:

mimeopen .py

Which returns (on my system, this will depend slightly based on what software you have installed on your computer):

Please choose a default application for files of type text/x-python

1) Geany (geany)
2) notepad (wine-extension-txt)
3) gedit (gedit)
4) LibreOffice 4.0 Writer (libreoffice4.0-writer)
5) Other...

use application #

Inputting 1 and pressing Enter will open a blank .py file in Geany and set all further .py files to open in that editor.

If I put in 5 and press Enter I get the prompt:

use command:

In which case I can use a program’s command to open whatever file type I am currently changing.

So I could have done:

mimeopen .py

Used 5 and put geany as the command to get the same result:

You might notice that if you run mimeopen .py again it will open a new .py file in Geany (or whatever app you chose) instead of asking you what application to use. In that case you need to use the -a handle, like this:

mimeopen -a .py

7. How to check if open ports for remote system(ubuntu)

[user@lappie ~]$ nmap host

Starting Nmap 5.21 ( <a href=""></a> ) at 2010-10-07 11:25 CEST
Nmap scan report for host (ip.adr.tld)
Host is up (0.0052s latency).
rDNS record for ip.adr.tld : host.domain.tld
Not shown: 995 closed ports
22/tcp open ssh
80/tcp open http
111/tcp open rpcbind
3000/tcp open ppp
5666/tcp open nrpe

Nmap done: 1 IP address (1 host up) scanned in 0.18 seconds

8. Installing flareget on Ubuntu with firefox integration

1. Download flareget from

2. untar and dpkg -i flarget _1.5-12_i386.deb
3. Install flashgot plugin from addon section of firefox
4. add flareget as the default download manager (if not already selected)

9. How to create and extract zip, tar, tar.gz and tar.bz2 files in Linux

To compress a directory with zip do the following:

# zip -r directory_to_compress

Here’s how you extract a zip archive:

# unzip


tar -cvf archive_name.tar directory_to_compress

And to extract the archive:

# tar -xvf archive_name.tar.gz
# tar -xvf archive_name.tar -C /tmp/extract_here/


To compress a directory use the following syntax:

# tar -zcvf archive_name.tar.gz directory_to_compress

To decompress an archive use the following syntax:

# tar -zxvf archive_name.tar.gz
# tar -zxvf archive_name.tar.gz -C /tmp/extract_here/


Here’s how you compress a directory using tar.bz2:

# tar -jcvf archive_name.tar.bz2 directory_to_compress

To extract the files to a different directory use:

# tar -jxvf archive_name.tar.bz2 -C /tmp/extract_here/

10. Resume a large scp transfer

If you need to resume an scp transfer, try with rsync:

rsync --partial --progress --rsh=ssh user@host:remote_file local_file

11. copy directory tree:

mkdir -p /copy/this/directory/tree

12. change ownership of subdirectories and files:

chown -hR username directory/

Git Tips: How to merge your branch with master

1. create branch (git checkout -b <branch name> )work on your branch. push it to your branch (git push origin <branch name>)
2. git pull origin master
3. resolve conflicts by checking the list of conflict files. The differences are showed like this –
<<<< HEAD
your code
others code
4. commit changes to your branch
5. git checkout master (change to master branch locally)
6. git merge <your-branch> (merge with master locally)
7. git add . | git commit -m "merging master with <your-branch>| git push origin master