Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

Sunday, March 11, 2018

NodeJS - install package - plotly.js

Installing a package using npm:


First, let us search for the existance of the package - plotly.js

:~$ npm search plotly.js 
NAME                      | DESCRIPTION          | AUTHOR          | DATE       | VERSION  | KEYWORDS                                   
plotly.js                 | The open source…     | =alexcjohnson…  | 2018-03-09 | 1.35.2   | graphing plotting data visualization plotly
:~$ 


Now, we install plotly.js using the following command:

~$ npm install plotly.js
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN saveError ENOENT: no such file or directory, open '/home/ubuntu/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/ubuntu/package.json'
npm WARN ubuntu No description
npm WARN ubuntu No repository field.
npm WARN ubuntu No README data
npm WARN ubuntu No license field.

+ plotly.js@1.35.2
added 495 packages in 70.718s
~$

After, plotly.js is installed we can check for its documentation using the explore command:

~$ npm explore plotly.js
~$

Looks like local documentation is not available. Hence, let us check its online documentation using the following command:

~$ sudo npm docs plotly.js

This command opens the online documentation in your default browser.




NodeJS - server installation - Ubuntu

Step 1: Get node setup file and rename as nodesource_step.sh

~$ wget https://deb.nodesource.com/setup_8.x -O nodesource_setup.sh
--2018-03-11 09:22:15--  https://deb.nodesource.com/setup_8.x
Resolving deb.nodesource.com (deb.nodesource.com)... 52.84.110.132, 52.84.110.18, 52.84.110.122, ...
Connecting to deb.nodesource.com (deb.nodesource.com)|52.84.110.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12546 (12K) [text/plain]
Saving to: ‘nodesource_setup.sh’

nodesource_setup.sh                  100%[===================================================================>]  12.25K  --.-KB/s    in 0s      

2018-03-11 09:22:15 (85.2 MB/s) - ‘nodesource_setup.sh’ saved [12546/12546]

Step 2: Install the PPA to your configuration using the below command:
~$ sudo bash nodesource_setup.sh
[sudo] password for ubuntu: 

## Installing the NodeSource Node.js v8.x LTS Carbon repo...


## Populating apt-get cache...

+ apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                           
Hit:3 http://in.archive.ubuntu.com/ubuntu xenial InRelease                                                  
Hit:4 http://dl.google.com/linux/chrome/deb stable Release              
Hit:5 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease      
Hit:6 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:8 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done

## Confirming "xenial" is supported...

+ wget -qO /dev/null -o /dev/null 'https://deb.nodesource.com/node_8.x/dists/xenial/Release'

## Adding the NodeSource signing key to your keyring...

+ wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js v8.x LTS Carbon repo...

+ echo 'deb https://deb.nodesource.com/node_8.x xenial main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release                                                  
Get:3 https://deb.nodesource.com/node_8.x xenial InRelease [4,646 B]                                        
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease                                           
Hit:5 http://in.archive.ubuntu.com/ubuntu xenial InRelease               
Hit:7 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:8 https://deb.nodesource.com/node_8.x xenial/main Sources [761 B]
Get:9 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages [1,003 B] 
Hit:10 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease               
Get:11 https://deb.nodesource.com/node_8.x xenial/main i386 Packages [1,005 B]
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 7,415 B in 3s (2,177 B/s)
Reading package lists... Done

## Run `apt-get install nodejs` (as root) to install Node.js v8.x LTS Carbon and npm

~$ 

Step 3: Install Node JS:

~$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm4.0 linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
  linux-image-4.10.0-28-generic linux-image-4.13.0-26-generic linux-image-extra-4.10.0-28-generic linux-image-extra-4.13.0-26-generic
  linux-signed-image-4.10.0-28-generic linux-signed-image-4.13.0-26-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 95 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 61.3 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_8.x xenial/main amd64 nodejs amd64 8.10.0-1nodesource1 [12.7 MB]
Fetched 12.7 MB in 13s (928 kB/s)                                                                                                               
Selecting previously unselected package nodejs.
(Reading database ... 316819 files and directories currently installed.)
Preparing to unpack .../nodejs_8.10.0-1nodesource1_amd64.deb ...
Unpacking nodejs (8.10.0-1nodesource1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (8.10.0-1nodesource1) ...
~$ 

Step 4: Check the Node Versions installed :
~$ nodejs -v
v8.10.0
~$ npm -v
5.6.0

Step 5: Install Build Essential:

~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
The following packages were automatically installed and are no longer required:
  libllvm4.0 linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
  linux-image-4.10.0-28-generic linux-image-4.13.0-26-generic linux-image-extra-4.10.0-28-generic linux-image-extra-4.13.0-26-generic
  linux-signed-image-4.10.0-28-generic linux-signed-image-4.13.0-26-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 95 not upgraded.
~$ 


source: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04



Thursday, February 22, 2018

NodeJS - server installation

Download the LTS version of NodeJS from the website: https://nodejs.org/en/

Step 1: Download using wget :
ubuntu@ip-172-31-58-211:~$ wget https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz
--2018-02-22 10:03:43--  https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz
Resolving nodejs.org (nodejs.org)... 104.20.22.46, 104.20.23.46, 2400:cb00:2048:1::6814:172e, ...
Connecting to nodejs.org (nodejs.org)|104.20.22.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11410120 (11M) [application/x-xz]
Saving to: node-v8.9.4-linux-x64.tar.xz

node-v8.9.4-linux-x64.tar.xz              100%[=====================================================================================>]  10.88M  45.0MB/s    in 0.2s    

2018-02-22 10:03:43 (45.0 MB/s) - node-v8.9.4-linux-x64.tar.xz saved [11410120/11410120]

ubuntu@ip-172-31-58-211:~$ which npm

Step 2: Uncompress the downloaded file
ubuntu@ip-172-31-58-211:~$ tar -xJvf node-v8.9.4-linux-x64.tar.xz 

Step 3: Perform the necessary movements of folders as shown below:
ubuntu@ip-172-31-58-211:~$ sudo mkdir /usr/lib/nodejs
ubuntu@ip-172-31-58-211:~$ sudo mv node-v8.9.4-linux-x64 /usr/lib/nodejs/
ubuntu@ip-172-31-58-211:~$ cd /usr/lib/nodejs
ubuntu@ip-172-31-58-211:/usr/lib/nodejs$ ls
node-v8.9.4-linux-x64
ubuntu@ip-172-31-58-211:/usr/lib/nodejs$ 
ubuntu@ip-172-31-58-211:/usr/lib/nodejs$ sudo mv node-v8.9.4-linux-x64 node-v8.9.4
ubuntu@ip-172-31-58-211:/usr/lib/nodejs$ ls
node-v8.9.4
ubuntu@ip-172-31-58-211:/usr/lib/nodejs$ 

Step 4: Refresh Profile:

ubuntu@ip-172-31-58-211:~$ . ~/.profile
ubuntu@ip-172-31-58-211:~$ which node
/usr/lib/nodejs/node-v8.9.4/bin/node
ubuntu@ip-172-31-58-211:~$ npm -v
5.6.0
ubuntu@ip-172-31-58-211:~$ 

Step 5: Testing our installation:

ubuntu@ip-172-31-58-211:~$ node -v
v8.9.4
ubuntu@ip-172-31-58-211:~$ 


ubuntu@ip-172-31-58-211:~$ npm version
{ npm: '5.6.0',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.4',
  openssl: '1.0.2n',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.50',
  zlib: '1.2.11' }
ubuntu@ip-172-31-58-211:~$ 


reference: https://github.com/nodejs/help/wiki/Installation

Wednesday, January 24, 2018

Python - Install matplotlib in Ubuntu using PIP

To install matplotlib in Ubuntu using PIP - execute the following command:

$ pip install matplotlib
Collecting matplotlib
  Downloading matplotlib-2.1.2-cp27-cp27mu-manylinux1_x86_64.whl (15.0MB)
    100% |████████████████████████████████| 15.0MB 81kB/s 
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib)
  Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 3.4MB/s 
Collecting backports.functools-lru-cache (from matplotlib)
  Downloading backports.functools_lru_cache-1.4-py2.py3-none-any.whl
Collecting subprocess32 (from matplotlib)
  Downloading subprocess32-3.2.7.tar.gz (54kB)
    100% |████████████████████████████████| 61kB 4.2MB/s 
Collecting pytz (from matplotlib)
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
    100% |████████████████████████████████| 512kB 1.6MB/s 
Collecting six>=1.10 (from matplotlib)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting python-dateutil>=2.1 (from matplotlib)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 2.5MB/s 
Collecting cycler>=0.10 (from matplotlib)
  Downloading cycler-0.10.0-py2.py3-none-any.whl
Collecting numpy>=1.7.1 (from matplotlib)
  Downloading numpy-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (16.9MB)
    100% |████████████████████████████████| 16.9MB 70kB/s 
Building wheels for collected packages: subprocess32
  Running setup.py bdist_wheel for subprocess32 ... done
  Stored in directory: /home/shree/.cache/pip/wheels/7d/4c/a4/ce9ceb463dae01f4b95e670abd9afc8d65a45f38012f8030cc
Successfully built subprocess32
Installing collected packages: pyparsing, backports.functools-lru-cache, subprocess32, pytz, six, python-dateutil, cycler, numpy, matplotlib
Successfully installed backports.functools-lru-cache cycler matplotlib numpy-1.14.0 pyparsing python-dateutil-2.6.1 pytz-2017.3 six-1.11.0 subprocess32
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Tuesday, January 16, 2018

Python - Install Pandas in Ubuntu using PIP

To install Pandas in Ubuntu using PIP - execute the following command:

$ sudo pip install pandas
[sudo] password for ubuntu: 
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pandas
  Downloading pandas-0.22.0-cp27-cp27mu-manylinux1_x86_64.whl (24.3MB)
    100% |████████████████████████████████| 24.3MB 51kB/s 
Collecting pytz>=2011k (from pandas)
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
    100% |████████████████████████████████| 512kB 860kB/s 
Collecting numpy>=1.9.0 (from pandas)
  Downloading numpy-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (16.9MB)
    100% |████████████████████████████████| 16.9MB 73kB/s 
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python2.7/dist-packages (from python-dateutil->pandas)
Installing collected packages: pytz, numpy, pandas
Successfully installed numpy-1.14.0 pandas-0.22.0 pytz-2017.3
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Monday, January 15, 2018

Python - Install boto3 to connect to AWS in Ubuntu

To install boto3 in Ubuntu - you need to first install PIP:
http://sashankexpresstech.blogspot.in/2018/01/python-install-pip-in-ubuntu.html

After this, execute the following command to install boto3:


~$ sudo pip install boto3
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting boto3
  Downloading boto3-1.5.14-py2.py3-none-any.whl (128kB)
    100% |████████████████████████████████| 133kB 854kB/s 
Collecting jmespath<1.0.0,>=0.7.1 (from boto3)
  Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3)
  Downloading s3transfer-0.1.12-py2.py3-none-any.whl (59kB)
    100% |████████████████████████████████| 61kB 944kB/s 
Collecting botocore<1.9.0,>=1.8.28 (from boto3)
  Downloading botocore-1.8.28-py2.py3-none-any.whl (4.0MB)
    100% |████████████████████████████████| 4.0MB 274kB/s 
Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.10->boto3)
  Downloading futures-3.2.0-py2-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.9.0,>=1.8.28->boto3)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 860kB/s 
Collecting docutils>=0.10 (from botocore<1.9.0,>=1.8.28->boto3)
  Downloading docutils-0.14-py2-none-any.whl (543kB)
    100% |████████████████████████████████| 552kB 808kB/s 
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.9.0,>=1.8.28->boto3)
  Downloading six-1.11.0-py2.py3-none-any.whl
Installing collected packages: jmespath, futures, six, python-dateutil, docutils, botocore, s3transfer, boto3
Successfully installed boto3-1.5.14 botocore-1.8.28 docutils-0.14 futures-3.2.0 jmespath-0.9.3 python-dateutil-2.6.1 s3transfer-0.1.12 six-1.11.0
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
~$ 

Python - Install pip in Ubuntu

To Install python pip in Ubuntu open the terminal and execute the following command:

~$ sudo apt-get install python-pip
[sudo] password for ubuntu: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libpython-all-dev python-all python-all-dev python-pip-whl python-wheel
The following NEW packages will be installed:
  libpython-all-dev python-all python-all-dev python-pip python-pip-whl python-wheel
0 upgraded, 6 newly installed, 0 to remove and 12 not upgraded.
Need to get 1,306 kB of archives.
After this operation, 2,084 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libpython-all-dev amd64 2.7.11-1 [992 B]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-all amd64 2.7.11-1 [978 B]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-all-dev amd64 2.7.11-1 [1,000 B]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1,110 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip all 8.1.1-2ubuntu0.4 [144 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 python-wheel all 0.29.0-1 [48.0 kB]
Fetched 1,306 kB in 2s (558 kB/s)      
Selecting previously unselected package libpython-all-dev:amd64.
(Reading database ... 190040 files and directories currently installed.)
Preparing to unpack .../libpython-all-dev_2.7.11-1_amd64.deb ...
Unpacking libpython-all-dev:amd64 (2.7.11-1) ...
Selecting previously unselected package python-all.
Preparing to unpack .../python-all_2.7.11-1_amd64.deb ...
Unpacking python-all (2.7.11-1) ...
Selecting previously unselected package python-all-dev.
Preparing to unpack .../python-all-dev_2.7.11-1_amd64.deb ...
Unpacking python-all-dev (2.7.11-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.29.0-1_all.deb ...
Unpacking python-wheel (0.29.0-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpython-all-dev:amd64 (2.7.11-1) ...
Setting up python-all (2.7.11-1) ...
Setting up python-all-dev (2.7.11-1) ...
Setting up python-pip-whl (8.1.1-2ubuntu0.4) ...
Setting up python-pip (8.1.1-2ubuntu0.4) ...
Setting up python-wheel (0.29.0-1) ...

To confirm the installation:

~$ which pip
/usr/bin/pip
~$

Monday, August 14, 2017

Julia - Language - Install Juno Text Editor

To Install Juno text editor, first install Atom text editor, created by GitHub. Download the Debian package of Atom from the link: https://atom.io/

Download Atom text editor:

$ wget https://atom-installer.github.com/v1.19.2/atom-amd64.deb
--2017-08-21 17:26:25--  https://atom-installer.github.com/v1.19.2/atom-amd64.deb
Resolving atom-installer.github.com (atom-installer.github.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to atom-installer.github.com (atom-installer.github.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83638506 (80M) [application/octet-stream]
Saving to: ‘atom-amd64.deb’

atom-amd64.deb                                     100%[================================================================================================================>]  79.76M  1.87MB/s    in 43s     

2017-08-21 17:27:10 (1.85 MB/s) - ‘atom-amd64.deb’ saved [83638506/83638506]

$

Now install using the dpkg utility of debian / ubuntu / linux mint:

$ sudo dpkg -i atom-amd64.deb 
Selecting previously unselected package atom.
(Reading database ... 174639 files and directories currently installed.)
Preparing to unpack atom-amd64.deb ...
Unpacking atom (1.19.0) ...
dpkg: dependency problems prevent configuration of atom:
 atom depends on git; however:
  Package git is not installed.

dpkg: error processing package atom (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Errors were encountered while processing:
 atom

We can see that there were some errors due to missing dependencies. Hence to resolve them, let us run:

 $ sudo apt-get install -f

This will install atom. To confirm, let us run the following commands:

$ which atom
/usr/bin/atom

$ atom --version
Atom    : 1.19.0
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0


In Atom, go to Settings (Ctrl ,, or Cmd , on OS X) and go to the "Install" panel.

Type uber-juno into the search box and hit enter. Click the install button on the package of the same name.

Atom will then set up Juno for you, installing the required Atom and Julia packages. Once the setup is done you're good to go!





Wednesday, July 12, 2017

Julia - Language - Installing RDatasets

Since RDatasets is a registered Julia Package - installation is straightforward.

$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0 (2017-06-19 13:05 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu


julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: Upgrading DataArrays: v0.5.3 => v0.6.1
INFO: Upgrading DataStructures: v0.5.3 => v0.6.0
INFO: Upgrading FileIO: v0.4.1 => v0.5.0
INFO: Upgrading StatsBase: v0.16.0 => v0.17.0

julia> Pkg.add("RDatasets")
INFO: Cloning cache of RData from https://github.com/JuliaStats/RData.jl.git
INFO: Cloning cache of RDatasets from https://github.com/johnmyleswhite/RDatasets.jl.git
INFO: Installing RData v0.1.0
INFO: Installing RDatasets v0.2.0
INFO: Package database updated

This adds RDatasets package to the current namespace. To use this package:

julia> using RDatasets
INFO: Recompiling stale cache file /home/ubuntu/.julia/lib/v0.6/FileIO.ji for module FileIO.
INFO: Recompiling stale cache file /home/ubuntu/.julia/lib/v0.6/DataStructures.ji for module DataStructures.
INFO: Recompiling stale cache file /home/ubuntu/.julia/lib/v0.6/DataFrames.ji for module DataFrames.

julia> 

To see the available R packages:

julia> RDatasets.packages()
33x2 DataFrames.DataFrame
| Row | Package        | Title                                                                     |
---------------------------------------------------------------------------------------------------------------
| 1   | "COUNT"        | "Functions, data and code for count data."                                |
| 2   | "Ecdat"        | "Data sets for econometrics"                                              |
| 3   | "HSAUR"        | "A Handbook of Statistical Analyses Using R (1st Edition)"                |
| 4   | "HistData"     | "Data sets from the history of statistics and data visualization"         |
| 5   | "ISLR"         | "Data for An Introduction to Statistical Learning with Applications in R" |
| 6   | "KMsurv"       | "Data sets from Klein and Moeschberger (1997), Survival Analysis"         |
| 7   | "MASS"         | "Support Functions and Datasets for Venables and Ripley's MASS"           |
| 8   | "SASmixed"     | "Data sets from \"SAS System for Mixed Models\""                            |
| 9   | "Zelig"        | "Everyone's Statistical Software"                                         |
| 10  | "adehabitatLT" | "Analysis of Animal Movements"                                            |
| 11  | "boot"         | "Bootstrap Functions (Originally by Angelo Canty for S)"                  |
| 12  | "car"          | "Companion to Applied Regression"                                         |
| 13  | "cluster"      | "Cluster Analysis Extended Rousseeuw et al."                              |
| 14  | "datasets"     | "The R Datasets Package"                                                  |
| 15  | "gap"          | "Genetic analysis package"                                                |
| 16  | "ggplot2"      | "An Implementation of the Grammar of Graphics"                            |
| 17  | "lattice"      | "Lattice Graphics"                                                        |
| 18  | "lme4"         | "Linear mixed-effects models using Eigen and S4"                          |
| 19  | "mgcv"         | "Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness estimation"   |
| 20  | "mlmRev"       | "Examples from Multilevel Modelling Software Review"                      |
| 21  | "nlreg"        | "Higher Order Inference for Nonlinear Heteroscedastic Models"             |
| 22  | "plm"          | "Linear Models for Panel Data"                                            |
| 23  | "plyr"         | "Tools for splitting, applying and combining data"                        |
| 24  | "pscl"         | "Political Science Computational Laboratory, Stanford University"         |
| 25  | "psych"        | "Procedures for Psychological, Psychometric, and Personality Research"    |
| 26  | "quantreg"     | "Quantile Regression"                                                     |
| 27  | "reshape2"     | "Flexibly Reshape Data: A Reboot of the Reshape Package."                 |
| 28  | "robustbase"   | "Basic Robust Statistics"                                                 |
| 29  | "rpart"        | "Recursive Partitioning and Regression Trees"                             |
| 30  | "sandwich"     | "Robust Covariance Matrix Estimators"                                     |
| 31  | "sem"          | "Structural Equation Models"                                              |
| 32  | "survival"     | "Survival Analysis"                                                       |
| 33  | "vcd"          | "Visualizing Categorical Data"                                            |

julia> 

The 14th row contains the data sets available to R. To use this dataset:

julia> iris_dataset = dataset("datasets","iris")
INFO: Precompiling module RData.
150x5 DataFrames.DataFrame
| Row | SepalLength | SepalWidth | PetalLength | PetalWidth | Species     |
-------------------------------------------------------------------------------------------
| 1   | 5.1         | 3.5        | 1.4         | 0.2        | "setosa"    |
| 2   | 4.9         | 3.0        | 1.4         | 0.2        | "setosa"    |
| 3   | 4.7         | 3.2        | 1.3         | 0.2        | "setosa"    |
| 4   | 4.6         | 3.1        | 1.5         | 0.2        | "setosa"    |
| 5   | 5.0         | 3.6        | 1.4         | 0.2        | "setosa"    |
| 6   | 5.4         | 3.9        | 1.7         | 0.4        | "setosa"    |
| 7   | 4.6         | 3.4        | 1.4         | 0.3        | "setosa"    |
| 8   | 5.0         | 3.4        | 1.5         | 0.2        | "setosa"    |
| 9   | 4.4         | 2.9        | 1.4         | 0.2        | "setosa"    |
| 10  | 4.9         | 3.1        | 1.5         | 0.1        | "setosa"    |
| 11  | 5.4         | 3.7        | 1.5         | 0.2        | "setosa"    |
| 12  | 4.8         | 3.4        | 1.6         | 0.2        | "setosa"    |
| 13  | 4.8         | 3.0        | 1.4         | 0.1        | "setosa"    |
| 14  | 4.3         | 3.0        | 1.1         | 0.1        | "setosa"    |
| 15  | 5.8         | 4.0        | 1.2         | 0.2        | "setosa"    |
| 16  | 5.7         | 4.4        | 1.5         | 0.4        | "setosa"    |
| 17  | 5.4         | 3.9        | 1.3         | 0.4        | "setosa"    |
|
| 133 | 6.4         | 2.8        | 5.6         | 2.2        | "virginica" |
| 134 | 6.3         | 2.8        | 5.1         | 1.5        | "virginica" |
| 135 | 6.1         | 2.6        | 5.6         | 1.4        | "virginica" |
| 136 | 7.7         | 3.0        | 6.1         | 2.3        | "virginica" |
| 137 | 6.3         | 3.4        | 5.6         | 2.4        | "virginica" |
| 138 | 6.4         | 3.1        | 5.5         | 1.8        | "virginica" |
| 139 | 6.0         | 3.0        | 4.8         | 1.8        | "virginica" |
| 140 | 6.9         | 3.1        | 5.4         | 2.1        | "virginica" |
| 141 | 6.7         | 3.1        | 5.6         | 2.4        | "virginica" |
| 142 | 6.9         | 3.1        | 5.1         | 2.3        | "virginica" |
| 143 | 5.8         | 2.7        | 5.1         | 1.9        | "virginica" |
| 144 | 6.8         | 3.2        | 5.9         | 2.3        | "virginica" |
| 145 | 6.7         | 3.3        | 5.7         | 2.5        | "virginica" |
| 146 | 6.7         | 3.0        | 5.2         | 2.3        | "virginica" |
| 147 | 6.3         | 2.5        | 5.0         | 1.9        | "virginica" |
| 148 | 6.5         | 3.0        | 5.2         | 2.0        | "virginica" |
| 149 | 6.2         | 3.4        | 5.4         | 2.3        | "virginica" |
| 150 | 5.9         | 3.0        | 5.1         | 1.8        | "virginica" |

julia> 

We see, dataset is a function which takes two arguments. 
  1. package name
  2. dataset name within package which we intend to load

This, we have loaded the famous iris dataset into memory. We can see that the dataset function has returned a DataFrame. This dataset contains 5 columns.
  1. SepalLength
  2. SepalWidth
  3. PetalLength
  4. PetalWidth
  5. Species

Also, the data can be easily understood. A large number of samples have been taken for every species, and the length and width of sepal and petal have been measured which can be used later to distinguish between them. 

For packages in Julia - refer: https://pkg.julialang.org/



Tuesday, July 11, 2017

Julia - Language - Install DataFrames.jl

DataFrames are recommended data structures for statistical analysis. Julia provides a package called DataFrames.jl, which has all necessary functions to work with DataFrames.

To install DataFrames.jl in julia pls follow the following steps:

$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0 (2017-06-19 13:05 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu

julia> Pkg.add("DataFrames")
INFO: Cloning cache of DataArrays from https://github.com/JuliaStats/DataArrays.jl.git
INFO: Cloning cache of DataFrames from https://github.com/JuliaStats/DataFrames.jl.git
INFO: Cloning cache of DataStructures from https://github.com/JuliaCollections/DataStructures.jl.git
INFO: Cloning cache of FileIO from https://github.com/JuliaIO/FileIO.jl.git
INFO: Cloning cache of GZip from https://github.com/JuliaIO/GZip.jl.git
INFO: Cloning cache of SortingAlgorithms from https://github.com/JuliaCollections/SortingAlgorithms.jl.git
INFO: Cloning cache of SpecialFunctions from https://github.com/JuliaMath/SpecialFunctions.jl.git
INFO: Cloning cache of StatsBase from https://github.com/JuliaStats/StatsBase.jl.git
INFO: Installing Compat v0.26.0
INFO: Installing DataArrays v0.5.3
INFO: Installing DataFrames v0.10.0
INFO: Installing DataStructures v0.5.3
INFO: Installing FileIO v0.4.1
INFO: Installing GZip v0.3.0
INFO: Installing Reexport v0.0.3
INFO: Installing SortingAlgorithms v0.1.1
INFO: Installing SpecialFunctions v0.1.1
INFO: Installing StatsBase v0.16.0
INFO: Package database updated
INFO: METADATA is out-of-date you may not have the latest version of DataFrames
INFO: Use `Pkg.update()` to get the latest versions of your packages

julia> using DataArrays
INFO: Precompiling module DataArrays.

julia> using DataFrames
INFO: Precompiling module DataFrames.

julia>



For packages in Julia - refer: https://pkg.julialang.org/

Thursday, March 9, 2017

Ubuntu - Install Application - Google Web Designer




Step 1: Download Google Web Designer from website: https://www.google.com/webdesigner

 ~/Downloads $ wget https://dl.google.com/linux/direct/google-webdesigner_current_amd64.deb
--2017-03-09 10:40:33--  https://dl.google.com/linux/direct/google-webdesigner_current_amd64.deb
Resolving dl.google.com (dl.google.com)... 216.58.197.78, 2404:6800:4007:800::200e
Connecting to dl.google.com (dl.google.com)|216.58.197.78|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31455488 (30M) [application/x-debian-package]
Saving to: 'google-webdesigner_current_amd64.deb'

100%[==============================================================================================================================>] 31,455,488  1022KB/s   in 26s    

2017-03-09 10:41:00 (1.14 MB/s) - 'google-webdesigner_current_amd64.deb' saved [31455488/31455488]

 ~/Downloads $

Step 2: Install
Google Web Designer using dpkg package manager:

$ sudo dpkg -i google-webdesigner_current_amd64.deb
Selecting previously unselected package google-webdesigner.
(Reading database ... 223100 files and directories currently installed.)
Preparing to unpack google-webdesigner_current_amd64.deb ...
Unpacking google-webdesigner (1.3.10.0-1) ...
Setting up google-webdesigner (1.3.10.0-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
 ~/Downloads $

Step 3: Check to confirm installation:

 ~/Downloads $ which google-webdesigner
/usr/bin/google-webdesigner
 ~/Downloads $