Convert an excel column into a comma separated list

10 Aug

Type the formula into the second column first cell as =A1 ( imagining A has all the data you need)

Type the formula into the second column second cell as =B1&”,”&A2

Drag till the end.


R Tips

6 Nov

Convert a Factor Column in Data Frame to numeric

//seq(27,5179,23) columns to be converted to numeric

Dummy[, seq(27,5179,23)] <- sapply(Dummy[, seq(27,5179,23)], as.numeric)

Dummy[, seq(27,5179,23)] <- sapply(Dummy[, seq(27,5179,23)], as.numeric)

Dummy[, seq(27,5179,23)] <- sapply(Dummy[, seq(27,5179,23)], as.numeric)

Open MPI Installation

8 Apr
  • Download Open MPI tar file from HERE
  • unzip it
  • Navigate to the unzipped directory, and type the following
  • ./configure –prefix=/usr/local/openmpi
    make install

  • It will take a while. No need to panic !!!
  • Setting up Environment Variables

  • Add the following environment variable to your ~/.bashrc (if you are using bash) or ~/.tcshrc (if you are using tcsh), where /usr/local is the installation directory:
  • bash:
    export MPI_DIR=/usr/local/openmpi
  • tcsh:
    setenv MPI_DIR /usr/local/openmpi
  • Adding OpenMPI to your Path

    You will also need to add OpenMPI to your path. To view your PATH, type the following:
    echo $PATH
    This will probably look something like PATH=/usr/bin:/bin:/usr/local/bin, which is a list of ‘:’ separated directories of where commands can be executed from without typing the full path. To add OpenMPI to your path add the following to your ~/.bashrc or ~/.tcshrc file (where /usr/local/openmpi is the path where your MPI implementation was installed):
    export PATH=/usr/local/openmpi/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
    export PATH=/usr/local/openmpi/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH

    Hadoop Stand alone Installation

    18 Sep


    3) Downloaded hadoop stable release from Apache mirror sites


    change the line export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    to point to version 1.6.0 of Java. On Ubuntu, the equivalent line is:
    export JAVA_HOME=/usr/lib/jvm/java-6-sun

    30 Jan

    Locations of visitors to this page


    7 May

    Installing the Eucalyptus Node Service on a running Ubuntu system consists of doing the following on one or more systems:

    1. Install Ubuntu 9.10 Server
    2. Update to the most current state in the Ubuntu archive:
      sudo apt-get update
      sudo apt-get dist-upgrade
    3. Install the eucalyptus-nc package
      sudo apt-get install eucalyptus-nc
    4. Configure the system’s primary ethernet interface as a bridge. The node controller will attach virtual network interfaces to this bridge for VM that is started before it to enable network connectivity.
      • Note: Remember the name of your node’s bridge device (we assume the name of your bridge device is “br0” for the rest of this document).
      • For details on configuring a bridge, see:
      • The following script should configure your bridge correctly in most setups:
        sudo sed -i "s/^iface $interface inet \(.*\)$/iface $interface inet manual\n\nauto br0\niface $bridge inet \1/" /etc/network/interfaces
        sudo tee -a /etc/network/interfaces <<EOF
                bridge_ports $interface
                bridge_fd 9
                bridge_hello 2
                bridge_maxage 12
                bridge_stp off
        sudo /etc/init.d/networking restart
    5. Configure /etc/eucalyptus/eucalyptus.conf with the name of the bridge, and restart the node controller:
      sudo sed -i "s/^VNET_BRIDGE=.*$/VNET_BRIDGE=$bridge/" /etc/eucalyptus/eucalyptus.conf
      sudo /etc/init.d/eucalyptus-nc restart
      • Note that there are several ways to configure a node to have a bridge as its primary interface, depending on the configuration of your machine. We show an example set of steps here but you will need to take care to ensure that this example configuration does not conflict with your local configuration if you wish to use it.
    6. Finally, you need to install the Cloud Controller’s eucalyptus user’s public ssh key into the Node Controller’s eucalyptus user’s authorized_keys file. The easiest way to do this:
      • On the Node Controller, temporarily set a password for the eucalyptus user:
        sudo passwd eucalyptus
      • Then, on the Cloud Controller:
        sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/ eucalyptus@<IP_OF_NODE>
      • You can now remove the password of the eucalyptus account on the Node:
      sudo passwd -d eucalyptus
    • Run the ubuntu-vm-builder command:
      ubuntu-vm-builder xen karmic \
      --addpkg vim \
      --addpkg openssh-server \
      --rootsize 1024

      This will create a 1GB image based on Karmic Koala, adding the vim and openssh-server packages.
    • Bundle, upload, and register the resulting root.img file to Eucalyptus:
      euca-bundle-image -i ubuntu-xen/root.img
      euca-upload-bundle -b ubuntu -m /tmp/root.img.manifest.xml
      euca-register ubuntu/root.img.manifest.xml

    How to restart init.d scrips manually

    7 May

    To restart apache2

    sudo /etc/int.d/apache2 restart

    sudo /etc/init.d/ssh restart

    sudo  /etc/init.d/mysql restart