Mar 26, 2015

Git and Github

Git/Github is a helpful documentation technique when u are changing a file frequently, mostly in the programming language code and you may need to toggle and compare between the various edits. Also, it really helps when multiple users are working on the same file and we want to trace the update by various users.

First thing first,

One needs to get a account in www.github.com. You need to get a username and password for a registered email id. After having the github account we need to install git in our computer.

For linux, we install it as:

sudo apt-get update
sudo apt-get install git

Then we need to setup Git:

git config --global user.name "our_username"
git config --global user.email  "our_emailid"

we can see our configuration later as

git config --list

Having set up the git, we need to have a folder where we will work or say assign a git work-space folder. For that:
First create a folder and change directory to that folder
$ mkdir ~/git/userfolder_name       
$ cd ~/git/userfolder_name

We may create a sample file
~/git/userfolder_name $ touch file_name

Next convert it to the workspace environment
~/git/userfolder_name $ git init

To add the files in the folder to the git repository, we use
~/git/userfolder_name $ git add .

Whenever we make a change to our repository we need to make a commit message
~/git/userfolder_name $git commit -m "My_commit" -a
~/git/userfolder_name $git commit -m "My_commit" file_name


Upto now, we have worked with out local server.
~/git/userfolder_name $git remote add origin ssh://git@github.com:user_name/repository_name.git
~/git/userfolder_name $git remote -v

Mar 13, 2015

GNU Octave

GNU octave is a high level language for numerical computation. It is pretty much similar to Matlab, but it is free. From the version 3.8 onward, the octave supports GUI as well.

To install Octave in Linux Environment, do following in terminal:

$ sudo add-apt-repository ppa:octave/stable
$ sudo apt-get update
$ sudo apt install octave

or 

$ sudo apt-get install octave

(I used the 2nd one, so not sure about the first one, but it should work)

After installing octave, you can find the octave in search bar or under menu-> Science & Engineering-> GNU Octave or, from terminal as:

$ octave

Following octave command prompt will appear:


We can start Octave in GUI mode by forcing the GUI mode by following command:
At terminal:

$ octave --force-gui

Then, GUI appears as follow:



The programming construct are pretty much similar. Code are likely to be compatible with matlab. It has plot functions and array pretty similar with matlab. 

Here is a sample of octave script - test.m

#! bin/octave -qf
clear;
clc;

N=[2,4,5,6,7,4,3,6]
lengthN = length(N);
sum=0.0;
for i = N
  sum += i;
  endfor
meanN=sum/lengthN;
printf("The mean  = %f \n", meanN);
printf("The median  = %f \n", median(N));
printf("The variance = %f \n", var(N));
printf("The standard deviation = %f \n", std(N));

bar(N)
axis([0,10,0,10]);
title("The traffic load");
xlabel("Time Slot");
ylabel("Number of customer")
grid on;

Enjoy!



Feb 27, 2015

Powerful awk

Awk is really a powerful script language. We can perform a large tasks within a few line of codes. Just for example:

Consider we have a sample spreadsheet with the information as below:

test_awk.csv

Consider we want to find how many different records are in the 3rd column, we can use the following command in the terminal or bash:

           awk '{print $3}' test_awk.csv | sort -n | uniq -c

Output:

       1 x121REB000
     12 x121REB227
      6 x131REB198
      4 x131REB205
     20 x131REB221
      4 x131REB254
      3 x131REB294
      1 x131REB317
      5 x131REB392


And, consider we want to find number of TRUE and number of FALSE, for each uniuqe record in the column 3, we can run following commands:

          awk '{print $3, /TRUE/, /FALSE/}' test_awk.csv | sort -n | uniq -c

Output:

 Count   Code         T  F 
      1  x121REB000 0 1
     11 x121REB227 0 1
      1  x121REB227 1 0
      1  x131REB198 0 1
      4  x131REB198 1 0
      1  x131REB198 1 1
      3  x131REB205 0 1
      1  x131REB205 1 0
     17 x131REB221 0 1
      3  x131REB221 1 0
      2  x131REB254 0 1
      1  x131REB254 1 0
      1  x131REB254 1 1
      2  x131REB294 0 1
      1  x131REB294 1 0
      1  x131REB317 0 1
      4  x131REB392 0 1
      1  x131REB392 1 0

Lastly, for each record in column no. 3,  to find the unique record in field number 2, we can use the command:

          awk '{print $3, $2}' test_awk.csv | sort -n | uniq

Output:

Code-3 Code-2
x121REB000 5921
x121REB227 5724
x121REB227 9087
x131REB198 1443
x131REB198 1841
x131REB198 2339
x131REB198 5261
x131REB198 7284
x131REB198 9758
x131REB205 1446
x131REB205 1958
x131REB205 2285
x131REB205 5999
x131REB221 3866
x131REB221 6171
x131REB221 9616
x131REB221 9898
x131REB254 4732
x131REB254 6078
x131REB254 7679
x131REB254 9112
x131REB294 1025
x131REB294 3369
x131REB294 6006
x131REB317 6452
x131REB392 4045
x131REB392 4898



Feb 21, 2015

Cant hear their Mother

Reference: International Mother Language Day, Feb21.  

Mother is the first teacher of every child. Children start to learn, hearing their mother and exchange words in mother-language. But those who are born with inborn hearing impairment are deprived of this. They learn with the help of sign language.

Below, a girl puts up her thumb, index finger and pinkie finger, while keeping her ring finger and your middle finger down to express word 'Love'. They need our love.


Feb 16, 2015

Lets keep it simple

I imagine it would be better if we all think that "I am a human being first". Only after that we may be a Christian, Buddhist, Muslim, Hindu or, Chinese, Latvian, American or whatsoever. You may be richer than I am or you may have less, but my friend! when we die all of us will take the same amount of money with us. 

Lets make a better and peaceful world to live in. 

We need Love and Peace because we deserve it. 

Feb 9, 2015

Install Oracle Java for Netbeans

I was trying to install Netbeans in Ubuntu 14.0.4. But default Java for this version of Linux is OpenJDK7, which was not compatible with the netbeans. So I had to install the Oracle Jave so that the installation of Netbeans can be continued.

Here is the process to install Oracle Java:

Linux Terminal:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
 
After that, Netbeans will install in Ubuntu.
 
Process to install Netbeans in Ubuntu can be seen in this Site of Netbeans.  

Feb 5, 2015

Budapest Trip - Night Heaven

Budapest is simply awesome. At night it looks like heaven on Earth. The parliament building, Buda Castle, Castle Hill, Parliament and the Basilica of St. Stepen are the beautifully illuminated at night. Millenary Monument and the zechenyi Bath are the attractions at the some eastern part of the Budapest city. There are a lot of natural hot baths in this classical city. 


The official currency of Hungary is Hungarian Forint (HUF) and 1 HUF nearly equals 0.0033 euros. You need the currency to buy the tickets from machines. The transportation map for the Budapest can be downloaded from this site




Feb 4, 2015

Prague Tour

We reached Prague, the capital city of Czech Republic, on Jan 28, 2015. We had planned to stay there for 2 days. Our bus took to the Florenc Bus Station in the morning. Just at the bus station there is a friendly tourist information center from where you can get the tourist map and a money exchange (official with 0% commission). The currency of Prague is Czech Crown (czk) with 1 czk equals 0.036 euro. From the same place, you can get the metro that connect you with each corners of the city. Prague has  a excellent metro lines. You can get further information on the metro from its website. They also have night tram so that you can easily get to the bus station even though you have a night departure bus.

On the first day we visited the west sides of the river Vltava. The main attraction on this side of river are the St. Vitus Cathedral, Prague Castle and St. Nicholas Church. Tram 20 is ideal to visit the important spots on this side of river. From the top of the hill, one can get beautiful view of Prague old town with a lot of beautiful classical houses.
St. Vitus Cathedral
Charles bridge is the very beautiful bridge over the Vltava river with many statues. Walking along the bridge is a pleasant time to have in Prague.

On next day we visited the east side of the river, which is basically the old town. In the main square of the Prague old town, one can see many beautiful churches and houses. The astronomical clock is a wonderful piece of art and science at the main square. The Narodni museum of Prague is a massive beautiful architectural structure which is currently under maintenance.
Prague Old Town Square
We stayed at Mosaic House Hostel which is really good and friendly.

Jan 26, 2015

Global Inequality

We all feel the world we live in are not fair enough. A child is born free but soon after its birth, society tries to manipulate it in different way. One thing we have to understand is that the border of the country and religious demarcation are all man made. Beside that every child are also being handcuffed by the mysterious world of money.

Money is not that simple as it seems to be. There are some ugly truths behind the money. The inequality behind the poorer and the richer is increasing day by day. The trend is not the result of some random phenomenon.

As a student of Science, I dont have much idea about the economics, world politics etc but however I am pretty much sure that some thing is wrong. 

Please watch a video I found on the web and it seems to be provoking.   


तिमीलाई देख्दा

कती राम्रा आँखा तिम्रा म्रिगनयन जस्ता
त्यसमै नाच्ने रहर जाग्छ एकान्तमा बस्दा
मन मेरो फुङ उड्छ तिमीलाई देख्दा
मन्द मुस्कान आईहाल्छ नजर हाम्रो जुध्दा ।
खुशीले मन रम्ने गर्छ तिमी साथमा हुँदा
सारा होश हराइ दिन्छ कोमल हातले छुदा
यौवन मेरो रसाइ दिन्छ तिम्रो आवाज सुन्दा
तिम्रै तस्बिर सामु आउछ हरेक पाईला चाल्दा ।
जिन्दगि भर तस्बीरमा कति बस्छौ?
सपनाका सहरमा कति नाच्छौ ?
आफ्ना आँखा खोलेर रमाउन सक्छौ
मौन रहि आँशु झार्दै कति हस्छौ ?

- Rupendra Maharjan

Jan 22, 2015

How Economic Machine Works

I found this very illutstrative video on how the world's economy runs.
Hope you learn somethings. Worth Watching.


Jan 21, 2015

Travelling in European City as a Student

If you are in Europe, you would definitely like to travel as much European cities as possible. The Schengen agreement makes it easier to go from one country to another without the need of Visa. The use of the same currency (euro) eases for financial transaction abroad. The large network of the international airline services, train and bus services makes it convenient to go from one place to another. The properly managed transportation, navigation, online booking and payments assist to make a well prepared plan.

Travelling in Europe
Travelling in Europe
Here are some of the suggestions for making a trip:

Earlier the better:

If you are planning to fly to the destination; the earlier you book, more likelier than you can get some special offers to save money. Besides, earlier you book, cheaper will be plane fare. You can always seek for some airlines which offer some low price flights, but their airport stations are likely to be a bit far from the city when you are planning to go, and they may not have regular flights. Some of such airlines are wizzair, ryann, airbaltic etc. But still they can be planned accordingly.

Make extensive use of digital maps

Pins the points
Pin the sites on the map
Use of digital maps (google maps, nokia maps etc) are really essential for the navigation and make  sure you are at the right place at the right time. Always confirm the location of bus stations, hostel/hotel exact meet point etc well before the trip so as to remove the ambiguity. Make sure to make them in the map as well for 'on the go' - use.

On bus:

If you are travelling by bus on international route, make sure that they wont stop it in the middle or make some break. So grabs some food and water to eat during the journey. It is advised to charge your mobile to full while inside the bus. Also put a small headphone in your pocket so that you can watch movies, listen to songs.

Find recommended places:

I generally use the Tripomatic and Tripadvisor to find the main attractions in the destined city. Once the sites to be visited is listed out, you can be assure where you it is advisable to select the hostel near our sites. There are a lot of sites that can find good booking places, make sure you check its user rating as well.

Make sure you are connected:

It is likely that you can get the roaming facilities with your mobile abroad, but please make sure you get connected during the trips. Simply googling, and posting on facebook, instagram may be indispensable on your tour. Downloading a language pack in the google-translate app is something you would want to do to make your life simple on the new place.

Finally,

Check the weather forecast as well.

Happy Travelling and Have fun !



Jan 20, 2015

माया मेरो झुटो होईन

माया मेरो झुटो होईन, मेरो खल्ती हेर्न सक्छौ
तस्बिर तिम्रो बोकी हिड्छु, मेरो गल्ती हुँदै होईन

थोरै टाढा भएकोथे, तिमीले अर्कै रोजी हाल्यौ
आँखा मेरो रसाएका, रोएको चाँही हुँदै होईन

वाचा मैले निभाकै छु, मेरो मनलाई हेर्न सक्छौ
सारा जीवन तिम्रै लागि, कसैलाई हुँदै होईन

बिन्ती मेरो तिमीलाई, फर्की एक हेरी देउ
तिम्रो सिउदो रगांउन, रोकेको चाँही हुँदै होईन

- Rupendra Maharjan

तिम्रो हासों अनि साथ

हासी मात्र देउ तिमी हासो सँगइ बिलाइदिन्छु
मुस्कानका सम्झनामा पुरै जीवन बिताइदिन्छु,

साथ मात्रा दिन्छु भन्नु सारा संसार भुलाइदिन्छु
दुनियाँलाई भुलाएर आँफै भित्र रमाइदिन्छु

- रुपेन्द्र महर्जन

आज मलाई केही कुरा भुलाउनुछ

आज मलाई केही कुरा भुलाउनुछ
गहभरी आँसु राख्दै रमाउनुछ
बिराएको गन्तब्यलाई फेरी नजर दिदै
आफ्नै हातले आँफैलाई डोर्‍याउनुछ

याद आउने क्षण सबै हटाउनुछ
नयाँ नयाँ कोपिलालाई चुडाउनुछ
सुन्दर ती भविष्यलाई कोर्नै पनि नदिई
आफ्नो भाग्य आफ्नै हातले मेटाउनुछ

- Rupendra Maharjan

मेरो सम्झना

मेरो सम्झनामा तिमी कतै हराइ पो दियौ कि,

मेरो मायामा भुलेर कतै पागल बनि घुम्यौ कि,

मेरो साथ पाउन तिमीले कतै सपना बुनि बस्यौ कि,

मेरो आखामा रमाउन कतै कतै संसार भुली बस्यौ कि  |

- Rupendra Maharjan

सम्झनाका कोसेली

सम्झनाका कोसेलीमा तिम्रो मुहार खोज्दाखोज्दै
रित्तिएका आँखाबाट अश्रुधारा झार्दै बसे,

अतीतका ती पललाई सम्झी तिमी आउने आसैआसमा
जितेका ती सारा संसार तिम्रै लागि हार्दै बसे,

पिल्सिएका मनलाई ठाम्न यताउती भौतारिदै
बहाना नै अनेक बनाइ दु:खलाई टार्दै बसे,

पीडित जीवन थकित मुस्कान भारी जीवन बिसाउन
नशाका ती प्यालासंगै मृत्‍युराज पुकार्दै बसे |

-Rupendra Maharjan 

Jan 15, 2015

Top Places to see in Nepal

Nepal is a country located in lap of Himalayas between China and India. Nepal is popular for tourist for the religious, cultural and natural heritages. Birthplace of Lord Gautam Buddha and Land of Everest (8848m, the highest peak in the world), Nepal is also well known for its ancient architecture, arts and craft. Nepal, the home to the 8 highest peaks among top 10 peaks, is the heaven for those who want to trek.

Anyone travelling to Nepal or living here are recommended to visit following 10 places.

1. Kathmandu Valley


Kathmandu is the capital city of Nepal. The Kathmandu Valley includes two cities Lalitpur and Bhaktapur in addition to Kathmandu. Kathmandu Valley is rich for the arts and sculpture. Within the Kathmandu Valley there are 7 UNESCO World Heritage making it the place with the highest density of UNESCO World Heritage.
The must see places in Kathmandu valley are enlisted here:
Places to see in Kathmandu Valley

2. Everest Peak/ Base Camp


Mount Everest (8848m) is the highest peak in the world making it the most magnificent creation of the mother Earth. Scaling Everest is a once in a life experience but it is not risky and require intensive skills and practice. View the Everest from its base camp (5364 m, ) is one of the must-do-before-die for everyone.

3. Lumbini


Lumbini is the birthplace of the Siddhartha Gautam, the founder of the Buddhism and also called the Light of Asia. He was born in the scared garden of Lumbini around 563 BC. The Lumbini these days consists of a large number of Stupas, Monasteries, gardens making it one of the most renowned Buddhist pilgrimage site.

Top Places in Kathmandu Valley

Kathmandu is the capital city of Nepal. By Kathmandu Valley, it means a valley in which Kathmandu is located and within this valley, two cities Lalitpur and Bhaktapur are also situated.

I recommend these places to see in Kathmandu Valley if you are spending some days or weeks here.

1. Swayambhunath
swayambhu-stupa

2. Basantapur Durbar Square
basantapur

3. Bhaktapur Durbar Square
bhaktapur

4. Patan Durbar Square
Lalitpur

5. Baudhha Nath
Bauddha

6. Pashupati Nath
pashupati

7. Changu Narayan
changu narayan

8. Nagarkot
nagarkot

9. Seto Gumba (White Monastery)
seto-ghumba

10. Kopan Monastery
kapan

The following map shows the location of these places.

Jan 9, 2015

In seek of the Peak

This week, there was a event on facebook called 'Himalaju - NEPĀLAS piedzīvojumu un bilžu vakaru' which literally means 'The Himalayas - Nepal adventure and night pictures' which dated 7th Jan (2015) at 19:00 to 21:00 at Skolas iela 15, Riga. As the description of the event (which was in the local language) says that it was an invitation to the Nepal Adventure Picture Evening with some insight into local cultural contexts. At the end of the 2014, two guys Laumas and Mara had been to two popular trekking routes Annapurna and Langtang in Nepal. They wanted to share the great pictures and experiences and had intense desire to go back again. So they wanted to go back not alone but with some new friends.

Cover Picture of the 'Facebook Event'
Sound Cools!

I thought it was a kind of photographic exhibition that we usually have in my home country; so I went with a brother of mine, who took a camera so that we can take some pictures of exhibition. 

Jan 3, 2015

Some Good Nepali Songs

Hey guys, if you like to listen/watch some good Nepalese songs, I would recommend you to try these songs. These are some of my all time favorite songs and hope you like them as well.

1. Priya Timi Aayau - Deepak Bajracharya
1974 AD

2. Adhyaro Ma - Deepak Bajracharya

3. Samjhi Baschhu - 1974 AD

4. Hidda Hiddai - 1974 AD

5. Maya - Uglyz

6. Timi Bhanne - Albatross

7. Maya Mero Maya - Full Circle

8. Sathi - YamaBuddha

9. Antim Maya - Aastha

10. Timilai Ma - Nabin K. Bhattrai

Please feel to share your favorite songs as well. 

Jan 2, 2015

Trip to Berlin and Warsaw

If you are planning to go to Berlin or Warsaw, I recommend you to use the 'tripomatic' app or its website to get the information about the sightseeing and attractions. It will give you a map with the location of the places you want to visit,so that u can decide your route.

In Berlin, you may take the bus S100, it will take you to all the main sites. I suggest to see the Reichstag, Charlottenberg Palace, Berlin Cathedral and Potsdam. The one day trip ticket in Germany costs 6.67 euros. The ticket can be bought from any train stations. In bus you will need to show the ticket to the bus driver. To visit potsdam, you will need ABC ticket, else AB ticket is enough. In ticket, A,B and C refers to the geographic division of the berlin.

And for the Warsaw, i recommend tram number 10 to visit main sites. The one day trip ticket costs around 6-7 PLN.  I highly recommend the Lazienki Park, Wilanow Palace and the warsaw uprising museum. Make sure you change your euro with Pln or zloty.