Friday, 5 February 2021

Dual boot system directly booting into windows

 I suddenly booted my system into windows after ages and after restarting I was not able to see the grub loader option, so I was not able to select UBUNTU my favorite choice of operating system. It was directly login into windows os

But Thankfully I could resolve it using the following.

  1.  Search for advanced start up option.
  2. Click on restart now in next menu.
  3. In the following menu click on trouble shoot.
  4. Click on advance option.
  5. Restart the computer.
  6. System will now boot into BIOS. 
  7. Go to Boot order section using arrow keys
  8. Change the order by enter and drag
  9. press f10 to accept the changes.
  10. then escape.

 

This can also be done by pressing f10 while booting and directly go to BIOS. choose the boot order preference.

Friday, 22 May 2020

Recepie- Aam Chatani

So finally I prepared Mithfakiya, a sweet mango pickle made in my home.

Mango :100 GMs
Jaggery:150 gm
Methi: 1 tea spoon
Saunf: 2 tsp
Rai:3 tsp
Aajwaien:1/2 tsp
Mangail:1tsp
Mitch, salt.
 Cut mango in small pieces, add jaggery and very little water and boil it on low flame till mango pieces changes the colour .Roast methi and saunf separately , add rest of the masala and grind it. Now add the masala , salt and Mirch . Tasty Mithfakiya is ready to serve .


Tuesday, 10 December 2019

How to add citation style in Microsoft Office using wine

I am an amid ubuntu lover, so I am reluctant to switch to any other OS till I can manage. This time I needed microsoft office for a better documentation. I have already shared in my previous posts how to use it on UBUNTU. This time I wanted to add IEEE citation style, so I simply followed the following steps on my machine.

  • Download IEEE citation style
  • Unzip and copy the XSL file in the following path
    • /home/surabhi/.PlayOnLinux/wineprefix/Office2007/drive_c/Program Files/Microsoft Office/Office12/Bibliography/Style
  • You are done :)

Wednesday, 4 April 2018

Enable dictionary in Texmaker

I started using latex very recently, to write a research paper. While working on latex using TexMaker I felt the need for spellchecker, so I tried the following steps for the same.


1. Get the dictionary file en_US.oxt from Open Office
2. Rename the file to en_US.zip.
3. Unzip it.
4.  Give path of en_US.dic to ,  Texmaker >Options > Configure Texmaker > Editor > Spelling dictionary to select en_US.dic as your preferred spelling dictionary.



















References

  1. http://www.swisswuff.ch/wordpress/?p=166
  2. https://extensions.openoffice.org/en/project/en_US-dict

Sunday, 7 May 2017

Add new citation styles to Microsoft Office installed on Ubuntu via Play on Linux

I wanted add some more citation style on MS office, installed on UBUNTU via Play on Linux. I followed the following steps


  1. I downloaded the more citation sources  from http://bibword.codeplex.com/
  2. I searched for PlayOnLinux's virtual drives on my Ubuntu system
  3. Then I copied the unzipped style to PlayOnLinux's virtual drives/Office2007/drive_c/Program Files/Microsoft Office/Office12/Bibliography/Style

Now I can see many more citations.



Wednesday, 26 October 2016

Restore the missing date Unity panel -UBUNTU

After reaching to office when I started the system in morning, time and date was not getting displayed.
The following command solved the problem for me.

  • Restart unity
    • sudo killall unity-panel-service

Resolve pg_dump version mismatch

I was getting an error of "pg_dump: server version: 9.4.7; pg_dump version: 9.3.9 ubuntu" while taking backup from server to my machine. I rectified the error using the following steps

  1. Check the version of psql and pg_dump
    1. pg_dump --version
    2. psql --version
  2. Install postgresql version 9.4
    1. cd /etc/apt/sources.list.d/
    2.  sudo vi pgdg.list
      1. Add the following line
        1. deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
    3.   wget --quiet -O - \ https://www.postgresql.org/media/keys/ACCC4CF8.asc |  sudo apt-key add -
    4.   sudo apt-get install postgresql-9.4
    5.  sudo apt-get install pgadmin3
    6. sudo /etc/init.d/postgresql restart
  3.  sudo rm /usr/bin/pg_dump
  4. sudo ln -s /usr/lib/postgresql/9.4/bin/pg_dump /usr/bin/pg_dump

References

1-http://stackoverflow.com/questions/23793774/psql-and-pg-dump-version-mismatch

Friday, 12 August 2016

Solution for Arrow keys to function properly in sqlplus on Ubuntu

The arrow keys were not functioning properly in Sqlplus in Ubuntu terminal. I installed rlwrap and it worked for me by

rlwrap sqlplus

Monday, 1 August 2016

Solution to PostgreSQL not starting

I installed postgresql9.5 on ubuntu 16.04, using "apt-get install" everything was running fine, until I installed MySQL.
PostgreSQL was not starting, in-spite of making all the required changes n pg_hba.conf and postgresql.cof files.

Finally I found the following solution :

1-sudo mkdir -p /usr/local/pgsql/data
2-s-udo chown -R postgres:postgres /usr/local/pgsql/

(Login as postgresql user)


3-sudo -u postgres -i
4-cd /usr/lib/postgresql/9.5/bin
5-./initdb -D /usr/local/pgsql/data
6-./postgres -D /usr/local/pgsql/data/ (Keep it running)


Thanks to https://ubuntuforums.org/showthread.php?t=869080

Tuesday, 2 February 2016

Resolve the connection problem of MongoDB

I was trying to connect to mongoDB and was getting the following error :


MongoDB shell version: 2.6.11
connecting to: test
2016-02-03T10:23:22.010+0530 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-02-03T10:23:22.011+0530 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed

I resoved the above issue by issuing the following command in MongoDB


  • sudo rm /var/lib/mongodb/mongod.lock
  • sudo service mongod restart


Tuesday, 26 January 2016

Covert Space delimited file to Tab delimited file

Unix has its own wonders, one of it quick help came to me, while I wanted to convert a text file in which values are separated by single space to a tab separated values. I used the following commands to convert

 sed 's/ /\t/g' filename.txt > filename.new.txt.


Friday, 25 December 2015

Simple steps to convert video file format

I copied few videos fromDVD to pen drive and wanted to play that on my TV, but sooner I realised it can not be played on my Android TV, so I had to convert those files into MP4 format.
I used VLC player and followed the following simple steps






Friday, 31 July 2015

Run a User Recommendation on Mahout

For a beginner like me, the following steps were useful for running user recommendation algorithm of Mahout.

1- I downloaded the file from http://grouplens.org/datasets/movielens/,  the directory contains many files the one which I thought will be useful for me was ratings.data of size 568.3 MB, contianing the fields userId, movieId, rating, timestamp. Mahout's recommenders expect interactions between users and items as input. Every line of the file has the format userID,itemID,value. Here userID and itemID refer to a particular user and a particular item, and value denotes the strength of the interaction (e.g. the rating given to a movie).

(Perform the following steps after login as hduser (user for hadoop cluster))

2- I removed the last field of time stamp from the file (as it was not required for the current recommendation) using the following command and saved it in .csv file
cut --complement -f 4 -d, ratings.data >ratings.csv (To remove 4th column- timestamp from the file)

3- Now I created directory in hadoop file system to store the ratings file using the following command
hadoop fs -mkdir /mahout_data/

4-Now I copied the downloaded file of movie recommendation to hdfs using the following command

hadoop fs -put /home/hduser/mydata/ml-latest/ratings.csv /mahout_data/

5- go to the mahout directory cd /usr/local/mahout/bin/ and issue the following command to run :( The output file should be unique and JAVA_HOME should be properly set)

./mahout recommenditembased -s SIMILARITY_LOGLIKELIHOOD -i hdfs://localhost:9000/mahout_data/ratings.csv -o hdfs://localhost:9000/ratings_test/ --numRecommendations 25

-i hdfs://localhost:9000/mahout_data/ratings.csv - Denotes the input file

-o hdfs://localhost:9000/ratings_test/  -denotes the output file .

recommenditembased - Means we are creating itembased recommendation not user based recommendation, there is a difference between itembased and user based recommendation, a user based recommendation finds similar users , and see what they like, item based recommendation  see what the user likes and find similar items, Mahout's item-based recommendation algorithm takes as input customer preferences by item and generates an output recommending similar items with a score indicating whether a customer will "like" the recommended item.

Choosing a similarity measure for use in a production environment is something that requires careful testing, evaluation and research. For our example purposes, here I used  Mahout similarity classname called SIMILARITY_LOGLIKELIHOOD.

6- It will run for a couple of minutes you can see your output from web interface as well





7- You can check the output file it will contain two columns: the userID and an array of itemIDs and scores.


References :

http://mahout.apache.org/users/recommender/intro-itembased-hadoop.html
http://grouplens.org/datasets/movielens/
http://info.mapr.com/rs/mapr/images/PracticalMachineLearning.pdf

Mahout Installation

I wanted to try Data mining on big data, so I tried installing Mahout for that, here are the steps which I followed for successful installation of Mahout.

Prerequisite to install Mahout is - JDK, Maven and Hadoop cluster.


  • sudo apt-get install maven
  • Download the latest distribution of mahout from the site http://www.apache.org/dyn/closer.cgi/lucene/mahout/
  • unzip and copy this to the desired location
          cp -R /home/surabhi/Documents/Documents/egap/Mahout/mahout/ /usr/local/
  • issue ls to check the packages inside it











  • cd /usr/local/mahout/distribution
  • sudo mvn install (Install maven 3.0.1 or above for Mahout .20 distribution else it will throw some error)
  • Your installation is complete if you see the following screen














Tuesday, 7 July 2015

Resolve the installation problem of "rmongodb"

Being a new user of R as well as MongoDB, I wanted to make a mongoDB database connection with R but had to struggle before I could successfully establish the connection.
The version of R what I was using was 3.0.1, being old version whenever I was trying to install install.packages("rmongodb"), I was getting some error. Ultimately I had to upgrade the version of R using the following step and then I was able to install rmongodb package.
  • sudo gedit /etc/apt/sources.list
  • add the following line as I am using the version 14.04.2 (use the command lsb_release -c to see the name)
    • deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu trusty/
  •  gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
  • sudo apt-get update
  • sudo apt-get upgrade
Now new version is installed, within R I isuued the command sessionInfo(), which shows the R version 3.2.1 (2015-06-18).

Now use the following command to install mongodb package and connect to MongoDB
  • install.packages("rmongodb")
  • library(rmongodb)
  • To connect to local mongoD
    • mongo <- mongo.create()

Will keep on posting as I proceed towards using R, Shiny and MongoDB.

Thursday, 21 May 2015

Resolve the connection problem in mongoDB


I was trying to set up admin password in mongoDB by using admin database, but something went wrong and I started getting  error " couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145exception: connect failed".
After giving some trials I rectified using the following commands :

Step 1: Remove lock file.
sudo rm /var/lib/mongodb/mongod.lock

Step 2: Repair mongodb.
sudo mongod --repair

Step 3: start mongodb.
sudo start mongodb
or
sudo service mongodb start

Step 4: Check status of mongodb.
sudo status mongodb
or  
sudo service mongodb status

Step 5: Start mongo console.
mongo


Reference : http://stackoverflow.com/questions/12831939/couldnt-connect-to-server-127-0-0-127017/17793856#17793856

Tuesday, 10 March 2015

Install Microsoft Office on UBUNTU

I was trying to install Microsoft office 2K7 on my ubuntu 14.10, last time I installed on Ubuntu 12, simply by using wine windows program loader, but this time I was getting some error "newer windows needed". So I had no other option but to try something else .

I installed using playonlinux




  1. sudo apt-get install playonlinux
  2. sudo apt-get install winbind
  3. start playonlinux
  4. You will see the following screen





















    • Click on Install 

    • Choose Micro soft office version which you want to install


































    • Choose the location/ correct path



















    • Enter the licence key the installation will start 






















    Thursday, 25 December 2014

    Heap size problem in weka

    I was trying to load 51 MB of data on weka, while trying to load data I was getting heap size error, I did the simple trick by changing the MEMORY="456m" in the file /usr/bin/weka which was 256 M previously.

    Now it works!!