24 August 2011

Installing Kinect on Windows 7 64-bit (Microsoft Kinect SDK)

System Requirements
* Windows 7 (x86 or x64)
* Dual Core or Faster
* 2 GB Ram
* Windows 7 compatible graphics card that supports Directx 9.0
* Kinect Sensor
* Microsoft Visual Studio 2010 Express or Other Visual Studio 2010 edition
* .Net Framework 4.0
*  For C++ Skeletal Viewer samples: Microsoft DirectX® SDK - June 2010 or later version
    Runtime for Microsoft DirectX® 9 
* For Speech sample (x86 only):
     Microsoft Speech Platform Runtime, version 10.2 (x86 edition)
     Microsoft Speech Platform - Software Development Kit, version 10.2 (x86 edition)
     Kinect for Windows Runtime Language Pack, version 0.9
     (acoustic model from Microsoft Speech Platform for the Kinect for Windows SDK Beta)



Installation
To install this beta SDK:
  1. Make sure the Kinect device is not plugged in to the USB port on your computer.
     
  2. Remove any other drivers for the Kinect device, including earlier versions of the Microsoft Kinect drivers.
     
  3. Close Visual Studio.
    Note: You must close Visual Studio before installing the SDK and then restart it after installation to pick up the MSRKINECTSDK environment variables that the SDK requires.
     
  4. From the download location for the beta SDK package, double-click the link for your system: 32-bit or 64-bit.
To load the Microsoft Kinect drivers:
  1. Make sure the Kinect device is plugged into an external power source.
     
  2. After installing the beta SDK, plug your Kinect device into the PC's USB port.
     
  3. All the drivers, including audio, will load seamlessly.
If the driver is installed correctly:
  1. You should see a blinking green LED on the Kinect sensor.
     
  2. The Kinect sensor should appear in Device Manager as the following nodes under “Microsoft Kinect”:
    • Microsoft Kinect Audio Array Control
    • Microsoft Kinect Camera
    • Microsoft Kinect Device
  3. The Kinect sensor's microphone array should appear under Sound, Video and Game Controllers in Device Manager as : Kinect USB Audio     

Useful Pages 

29 June 2011

Installing PyDev plugin for Eclipse IDE


PyDev is a Python IDE for Eclipse, which may be used in Python, Jython and IronPython development.
It comes with many goodies such as:
  • Django integration
  • Code completion
  • Code completion with auto import
  • Syntax highlighting
  • Code analysis
  • Go to definition
  • Refactoring
  • Mark occurrences
  • Debugger
  • Remote debugger
  • Tokens browser
  • Interactive console
  • Unittest integration
  • Code coverage
  • and many others
To install the plugin into already installed Eclipse IDE -
1. Start the Eclipse IDE, you will see a welcome screen like this -


2. Go to Help -> Install new Software
    This will look like this -


3. Type the following url resource into the text box so that it will download the required plugins from there and install something like this. It will look something like this after typing everything -


4. Click "Next" and "OK" to continue installing PyDev.
5. Select "I accept the terms of the license agreement", then click "Finish". The installer will begin to download the plug-in.
6. A following window will appear after download is complete. Check the box and click on OK.




7. When the installation is complete, you will be asked if you want to restart Eclipse. Select "Yes". You may see a Subclipse Usage  dialog, just uncheck the box and continue.

26 June 2011

Installing PVM on Ubuntu 10.10 64 bit


PVM is a software system that allows you to combine a number of computers which are connected over a network into a Parallel Virtual Machine. This machine can consist of computers with different architectures, running different flavors of the Unix/Linux operating systems, and can still be treated as if it were a single parallel machine.

The simpler way to install PVM is
1. Go to the synaptic package manager and install pvm, libpvm3, xpvm.
2. Or type in terminal $sudo apt-get install pvm

Check if the PVM libraries in /usr/lib/pvm3  or in /usr/local/lib/pvm3 and include files in /usr/include directory.

Configuring PVM to work on different machines -
1. Find out which computers are available. You can use any computer on which you have an account,    and on which PVM is installed.

2. Edit or create the file .rhosts in your home directory. This file must have an entry for every computer you want to use. The entry is in the form of the name of the computer and your login name on that machine:
 ucs.orst.edu  kowallih
dogby.physics.edu hans

If your login name is the same on all machines, then you can leave the field with the login name blank, but it doesn’t hurt to put it in.

3. Set the environment variables in the .bashrc file.
export PVM_ROOT="/usr/lib/pvm3"
export PVM_ARCH=`$PVM_ROOT/lib/pvmgetarch`
export XPVM_ROOT=/usr/bin/xpvm
export PVM_RSH=`which ssh`

4. Create directories for your executables:
    $mkdir $HOME/pvm3/bin/PVM ARCH
where PVM ARCH is the PVM code for the architecture. Although this step is not necessary for PVM to work, it will make your life much easier if you are going to use PVM on computers with different architectures. You can find the code for each computer’s via the PVM function pvmgetarch.

The PVM console
The PVM console is the interface between the parallel virtual machine and the user. You use it to start and stop processes, to display information about the state of the virtual machine, and most importantly, to start and stop PVM on local and remote machines.

Step 1: Starting PVM Log into one of the computers you want to include in
PVM and enter:
pvm>

Step 2: Adding hosts This is done from the PVM prompt:
pvm> add <hostname>
where hostname is the name of the computer you want to add. This will start PVM
on the specified hosts and, if successful, will produce a message such as:
1 successful
HOST DTID
banana 140000
You can continue to add additional hosts as desired.

Step 3: Checking your configuration You display the configuration of your
parallel virtual machine from the PVM prompt:
pvm> conf
This will give you information about the hosts configured, their PVM identification
number and their architecture.

Step 4: Deleting hosts Sometimes it is necessary to remove hosts from the virtual
machine to test or debug a program:
pvm> delete <hostname>

Step 5: Leaving the console If you are done with setting up your virtual machine,
and if you don’t need any of the other functions of the console, you close the
console but keep PVM running:
pvm> quit

Step 6: Stopping PVM To stop PVM after your parallel program has finished,
enter the PVM console, and then from the PVM prompt:
> pvm From Unix shell
pvm> halt From PVM prompt
This stops PVM on all the machines and kills all programs running under PVM.
This is the best and easiest way to stop PVM.

A simple hello.c code to check the library.

#include <stdio.h>
#include <pvm3.h>

int main()
{
  int mytid;

  mytid = pvm_mytid();
  printf("My TID is %d\n", mytid);
  pvm_exit();
  return 0;
}

Compiling the code - 
$gcc hello.c -o hello -lpvm3
A simple master program master.c

#include <stdio.h>
#include <stdlib.h>
#include <pvm3.h>

int main()
{
  int myTID;
  int x = 12;
  int children[10];
  int res;

  myTID = pvm_mytid();
  printf("Master: TID is %d\n", myTID);

  res = pvm_spawn("slave", NULL, PvmTaskDefault, "", 1, children);
  if (res<1) {
    printf("Master: pvm_spawn error\n");
    pvm_exit();
    exit(1);
  }

  pvm_initsend(PvmDataDefault);
  pvm_pkint(&x, 1, 1);

  pvm_send(children[0], 1);

  pvm_recv(-1, -1);
  pvm_upkint(&x, 1, 1);

  printf("Master has received x=%d\n", x);

  pvm_exit();

  return 0;
}

A simple client program slave.c

#include <stdio.h>
#include <pvm3.h>

int main()
{
  int myTID, masterTID;
  int x = 12;

  myTID = pvm_mytid();
  printf("Slave: TID is %d\n", myTID);

  pvm_recv(-1, -1);
  pvm_upkint(&x, 1, 1);
  printf("Slave has received x=%d\n", x);

  sleep(3);
  x = x + 5;

  pvm_initsend(PvmDataDefault);
  pvm_pkint(&x, 1, 1);

  pvm_send(pvm_parent(), 1);

  pvm_exit();

  return 0;
}

Compiling the above code - 
$gcc -o master master.c -lpvm3
$gcc -o slave slave.c -lpvm3
Now copy the slave binary to the standard pvm folder so that master may know where to get the binary to spawn it.





25 June 2011

Installing CUDA 4.0 on Windows 7 64bit

Download and Install  -
1. Install CUDA developer driver.
    You can get cuda developer driver for notebooks from here.
    You can get cuda developer driver general from here.
    Double click “devdriver_3.2_winvista-win7_32_263.06_general” to install.
2. Install CUDA Toolkit. You can download cuda toolkit from here.
    Double click “cudatoolkit_3.2.16_win_32” to install.
3. Install CUDA Sdk from here.
    Double click “gpucomputingsdk_3.2.16_win_32” to install.
4. Install Visual Studio 2008 from Microsoft.

      All CUDA downloads can be done directly from its site.

After installation of all these drivers and SDKs, run the examples in the CUDA SDK to make sure everything works. If they work, you have successfully installed the correct CUDA driver.

Visual Studio Settings
Copy all files in -
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\extras\visual_studio_integration\rules
to directory -
C:\Program Files\Microsoft Visual Studio 9.0\VC\VCProjectDefaults

Now start Visual Studio 2008 and go to -
Tools -> Option -> Project and Solution -> VC++ Directory
1. To the Executable files drop down add -
    C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\bin
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin

2. To the Include files drop down add -
    C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\inc
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include

3. To the Library files drop down add -
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include
    C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\lib\x64


Now your visual studio environment is ready to build cuda projects.

24 May 2011

Setting up Xerces XML parsing library in ubuntu

The Apache project's Xerces-C libraries support the DOM approach to XML parsing. The entire XML file is imported into memory and the data is held as nodes in a data tree which can be traversed for information.

The Xerces-C C++ parser home page: http://xml.apache.org/xerces-c/

1. Go to your working directory.
2. Download the compressed file from here. 
3. Unpack the downloaded file: tar -xzf xerces-c-3.0.1.tar.gz
4. Go to unpacked directory: cd xerces-c-3.0.1
5. ./configure --prefix=/opt
6. Build: make
7. Install: sudo make install     

This will install development files such as include header files and libraries in "/opt" so compiler flags and linker flags are required:
  • Compiler flags: -I/opt/include
  • Linker flags: -L/opt/lib -lxerces-c 
 Compiling a sample program named parser.cpp - 
g++ -g -Wall -pedantic -I/opt/include -L/opt/lib -lxerces-c parser.cpp -DMAIN_TEST -o parser 

Get the complete program from - 
http://www.yolinux.com/TUTORIALS/XML-Xerces-C.html 

Useful Links - 
1. http://xerces.apache.org/xerces-c/
2. http://xerces.apache.org/xerces-c/api-2.html
3. http://www.yolinux.com/TUTORIALS/XML-Xerces-C.html
4. http://en.wikipedia.org/wiki/Xerces
5. http://www.artima.com/cppsource/xml_data_binding.html
 

23 May 2011

Installation instructions for GALib on Ubuntu

Download the current version of GALib from here.

Extract it in your home folder and go to that folder from terminal.

Edit the file 'makevars'. This file contains the compiler flags that are unique for each cpu/os/compiler, as well as the destination directory for doing 'make install'.

To build the library and the non-graphic examples:
% make
To install GAlib on your system:
% make install

20 May 2011

Setting up GAUL(Genetic Algorithm Utility Library) on Ubuntu

Instructions for installation from source code -

1. Download GAUL library from here. There are some example programs available
    on the same site. You can download them for testing and using different            
    functionalities of GAUL.

2. If you want to enable the S-Lang and OpenMPI functionality of GAUL, then
    install the openmpi library first and slang library. SLang can be downloaded
    from here.

    For compiling slang, extract the compressed file in your home folder and type
    these commands  -
    $ cd slang-2.1.4
    $ ./configure
    $ make
    $ sudo make install

3. Now extract the GAUL compressed files into your home folder and go into that
    folder and type the following commands -
    $ cd gaul-devel-0.1850-0
   
    In its simplest form, compilation is achieved by typing:
$ ./configure && make
  
    Or, if you don't have S-Lang installed - type:
$./configure --enable-slang=no && make


    Two additional configuration options that you may find useful are:
$ ./configure --enable-efence=yes # Link with the electric fence malloc debugger.
$ ./configure --enable-mpi=yes    # Link with the MPI message passing libraries 
for parallel code
 
4. Finally type -
$ sudo make install
 
5. Now open the .bashrc file from you home directory and add the following line to it.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
6. For compiling any program with gaul libraries, use the following linkers - 
-lgaul -lgaul_util -lm 
Eg: - gcc test_utils.c -lgaul -lgaul_util -lm 

18 May 2011

Installing Open RAVE on Ubuntu

Install from the package manager

Type these commands in the terminal -  
sudo add-apt-repository ppa:openrave/release
sudo apt-get update
sudo apt-get install openrave

Compile From Sources

Get latest stable source code (constantly updated):
svn co https://openrave.svn.sourceforge.net/svnroot/openrave/tags/latest_stable openrave
 
Visit OpenRAVE

Open MPI on Ubuntu

A. Install OpenMPI

$ sudo apt-get install libopenmpi-dev openmpi-bin openmpi-doc
$ sudo apt-get install ssh
 

B. Configure SSH

$ ssh-keygen -t dsa
$ cd ~/.ssh
$ cat id_dsa.pub >> authorized_keys

C. MPI Program Example

Filename: MPI_Hello.c

#include <stdio.h>
#include <mpi.h>

int main(int argc, char** argv) 
{
    int myrank, nprocs;

    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
    MPI_Comm_rank(MPI_COMM_WORLD, &myrank);

    printf("Hello from processor %d of %d\n", myrank, nprocs);

    MPI_Finalize();
    return 0;
}

D. Compilation

$ mpicc MPI_Hello.c -o MPI_Hello

E. Execution

$ mpiexec -n 5 MPI_Hello


F. Integrated Development Environment

We will use Geany as an IDE to make compilation process easier and faster. To compile MPI program with Geany, follow these steps:
  1. Install Geany.
    $ sudo apt-get install geany
     
  2. Download MPI tags file and copy to ~/.config/geany/tags/
    $ wget http://auriza.site40.net/docs/paralel/openmpi.c.tags
    $ cp openmpi.c.tags ~/.config/geany/tags/
     
  3. Start Geany, and write MPI program example above.                                             
  4. Compilation setting: Build - Set Includes and Arguments.
    Compile: mpicc -Wall "%f" -o "%e"                                                                  Execute: mpiexec -n 5 "%e"
   5.To compile program: click Compile
   6. To execute program: click Execute.


 

17 May 2011

Installing ROS (Diamondback) on Ubuntu


If you need to install from source, please see source (download-and-compile) installation instructions.
Contents
  1. Ubuntu install of Diamondback
    1. Installation
      1. Configure your Ubuntu repositories
      2. Setup your sources.list
      3. Set up your keys
      4. Installation
      5. Environment setup
    2. Tutorials

Installation



Configure your Ubuntu repositories


Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

Setup your sources.list


Setup your computer to accept software from ROS.org.
  • Ubuntu 10.04 (Lucid)
    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'
      
      
    Ubuntu 10.10 (Maverick)
    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu maverick main" > /etc/apt/sources.list.d/ros-latest.list'

Set up your keys


  • wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Installation


Make sure you have re-indexed the ROS.org server:
  • sudo apt-get update
There are many different libraries and tools in ROS. We provided four default configurations to get you started. You can also install ROS stacks individually.
  • Desktop-Full Install: (Recommended): ROS, rx, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
    • sudo apt-get install ros-diamondback-desktop-full

    Desktop Install: ROS, rx, rviz, and robot-generic libraries
    • sudo apt-get install ros-diamondback-desktop

    ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
    • sudo apt-get install ros-diamondback-ros-base

    Individual Stack: You can also install a specific ROS stack (replace underscores with dashes of the stack name):
    • sudo apt-get install ros-diamondback-STACK
      e.g.
      sudo apt-get install ros-diamondback-slam-gmapping

Environment setup


It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

echo "source /opt/ros/diamondback/setup.bash" >> ~/.bashrc
. ~/.bashrc

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

If you just want to change the environment of your current shell, you can type:
source /opt/ros/diamondback/setup.bash

Now if you are setting ROS for localhost then add these two lines to bashrc file.
export ROS_MASTER_URI=http://localhost:11311 
export ROS_HOSTNAME=localhost

15 May 2011

Setting up Rhodes on Ubuntu 10.04

You guys must be having ubuntu 10.04 and above
installed. This command will help you to install rhomobile packages

type the following commands
$sudo apt-get install openjdk-6-jdk;
$sudo apt-get install ruby;
$sudo apt-get install rails;
$sudo apt-get install rubygems1.8;
$sudo gem install rails -V;
$sudo gem install templater -V;
$sudo gem install rhodes -V;

after these just locate where rhodes-2.*.*  is there ......
it will be in /var/lib/gems/1.8/gems/

now type this command....
$export PATH=$PATH:"/var/lib/gems/1.8/gems/rhodes-2.2.6/bin"

download android sdk and ndk from here:

SDK:   http://developer.android.com/sdk/index.html
NDK:   http://developer.android.com/sdk/ndk/index.html

now extract both in your home folder and type (basically go to tools
folder)....
 $cd android-sdk-linux_86
$cd tools
$./android      (execute the emulator see if there are any
errors.....)

now type this command:
$rhodes-setup

(on typing this you will have to give the jdk,android sdk and ndk
path only)

 $ JDK path: /usr/lib/jvm/java-6-openjdk/

 $ Android SDK path: /home/[pc-name]/<android_sdk_r07-linux_x86>/

<android_sdk_r07-linux_x86>  is the android-sdk folder name

 $ Android NDK path: /home/[pc-name]/<android_ndk_r5>/

<android_ndk_r5>  is the android ndk folder name

   * the remainder of the questions related to Windows and
Blackberry: (left blank)


now type :

$rhogen app store

(here store is your application name)

now type:

$cd store

and now type:

$rake -T

(gives a list of commands)

type:

$rake run:android

now grab a cup of coffee and wait for three minutes  :D

any problems with installation you can post here....

OpenCV in Android

Using OpenCV in Android. This tutorial is tested under Ubuntu 10.04 + Android SDKr07 + Android NDKr4b.



Preparing the development environment

  • Download and install Android SDK. Details can be found here
  • Download eclipse and install the ADT plugin. Details can be found here
  • Download Androdi NDK. This tool is used to cross compile OpenCV source code to Android. Currently (NDK r4) only C is fully supported, so I can only use OpenCV 1.1 under Android. The laterst version of OpenCV uses lots of STL functions. 

Create the test project

  • Create a new Android project in eclipse. For example, called testOpenCV. Name the package name as: edu.stanford.android.
  • In the root directory of the project, create a new folder called jni and extract all files in android_opencv.tar.gz to this folder.
  • Run “$NDK/ndk-build” from your project directory. It will generate libopencv.so in the libs/armeabi folder.
  • Write Java code to use OpenCV functions. I have three java files which can be downloaded here. They are a little bit long so I do not want to paste the source code here. The general idea is that I use the intent to start the camera or gallery activities to get the image and send this image to OpenCV. After OpenCV finishes extracting SURF features, it send the processed image back to JVM. The interface between JVM and OpenCV is pretty simple: setSourceImage and getSourceImage.

Run the program

  • Press the menu button to select your camera to capture an image. The down-sampled image is saved in your gallery. Press the menu button again to select it from your gallery and features are automatically extracted.
  • Notice: if you select a large image in the gallery, the program may crash due to limited memory.
  • On my DROID phone, it usually takes 4 seconds to extract features from one image.

Set up GIT on Linux

First: Download and Install GIT
At the heart of GitHub is an open source version control system (VCS) called Git*. Created by the same dudes that created Linux, Git is responsible for everything GitHub related that happens locally on your computer.
i) Download and install the latest version of Git with Synaptic.
   We suggest you install git-core, git-gui, and git-doc.
When you’ve selected git-core, git-gui, and git-doc, hit “Apply” to install them.
If you don’t have a package manager like Synaptic, or you’d rather install the necessary git components from the command line, you can alternatively run the script below:
$ sudo apt-get install git-core git-gui git-doc



Next: Set Up SSH Keys

We use SSH keys to establish a secure connection between your computer and GitHub. Setting them up is fairly easy, but does involve a number of steps.
To make sure you generate a brand new key, you need to check if one already exists. First, you need to open an app called Terminal.
i) Check for SSH keys. Have an existing key pair? You can skip to Step 4.
First, we need to check for existing ssh keys on your computer:
$ cd ~/.ssh
If it says “No such file or directory“ skip to step 3. Otherwise continue to step 2.
ii) Backup and remove existing SSH keys.
Since there is already an SSH directory you’ll want to back the old one up and remove it:  
$ lsLists all the subdirectories in the current directoryconfig id_rsa id_rsa.pub known_hosts$ mkdir key_backupmakes a subdirectory called "key_backup" in the current directory$ cp id_rsa* key_backupCopies the contents of the id_rsa directory into key_backup
$ rm id_rsa*
iii) Generate a new SSH key.
To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
$ ssh-keygen -t rsa -C "your_email@youremail.com"Creates a new ssh key using the provided emailGenerating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<press enter>
Press enter until you get this screen  - 
Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub.The key fingerprint is:01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.comThe key's randomart image is:+--[ RSA 2048]----+|     .+   +      ||       = o O .   ||        = * *    ||       o = +     ||      o S .      ||     o o =       ||      o . E      ||                 ||                 |
+-----------------+
iv) Add your SSH key to GitHub.
On the GitHub site Click “Account Settings” > Click “SSH Public Keys” > Click “Add another public key”
Open the id_rsa.pub file with a text editor (Notepad, TextEdit, or gedit will do just fine). This is your public SSH key. You may need turn on “view hidden files” to find it because the .ssh directory is hidden. It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.Now paste it into the “Key” field.
Now paste it into the “Key” field.
Hit “Add Key.”
v) Test everything out.
To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part.That’s supposed to be there.
$ ssh git@github.com
Which should give you this:
The authenticity of host 'github.com (207.97.227.239)' can't be established.RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)?
PTY allocation request failed on channel 0 Hi username! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.

Then: Set Up Your Info

i) Set your username and email.

Git tracks who makes each commit by checking the user’s name and email. In addition, we use this info to associate your commits with your GitHub account. To set these, enter the code below, replacing the name and email with your own. The name should be your actual name, not your GitHub username.
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "your_email@youremail.com"
ii) Set your GitHub token.

Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token.
On the GitHub site Click “Account Settings” > Click “Account Admin.”
At the command line run the following code, using your GitHub username and token in place of the ones show
$ git config --global github.user username
$ git config --global github.token 0123456789yourf0123456789
*Note* If you ever change your GitHub password, a new token will be created and will need to be updated.