Abolition of Re-registration Duty for Cars in Mauritius

This morning on Facebook, I came across someone who posted the following:

Let’s have a look on NTA’s instructions on how to sell your car.

source: nta.govmu.org [accessed: 02/05/2017]
The procedures seems fair and easy and not costly. However, the “The deed of sale should be registered at the Registrar General’s Department” part will be very expensive. Why doesn’t the NTA put the all the cost in one place? Anyways, there are no direct links from that page to know how much you have to pay to register the deed of sale.

I had to google it.

The second link is the PDF which has the informations.

2 months ago, I wanted to buy a newer car. But with these exorbitant duties, I refrained.

https://www.facebook.com/NayarJoolfoo/posts/10210709586528792

Now we ask ourselves, how many old cars are involved in fatal accidents? Every time I watch the news, I see BMW, Mercedes, etc being crushed. Where are the old cars? Why are they so hated?

 

Older cars are used exclusively by poor people. Each time a poor person buys an old car, he has to pay Rs 6,500, Rs 10,400, Rs 13,000 for >1001cc, >1251cc, 1501cc respectively.

Math question for CPE students and adults too. [300 points]

Let’s assume each time an old car is sold among the poor, Rs 10,000 goes to the government. How many poor people it takes to pay for the new Pravind Jugnauth car which is valued at Rs 23,541,673? Please leave the answer in the comments.

Why are Mauritians so concerned about Nandanee Soornack?

Mauritians are bored. They love drama. I guess that’s why the media gives them dramas to keep their minds busy after pretending to be busy in 9-6 jobs.

Mauritian Media quoting Nandanee Sournack

Current politicians are abusing power. They are buying BMWs worth more than Rs 20 million rupees each. And our attentions are diverted to some ex-government agents who allegedly abused power. I don’t care anymore! Let’s stop the current ones from blowing our money and selling our beautiful country.

When the opposing party will take power in the next election, we’d reading articles about how the current government didn’t do its job and was corrupt. WTH?

When are we going to focus on TODAY, the day which needs fixing?

Why I read magazines backwards

I ain’t no bookworm. I got very short attention span like most facebookers and tweeps.

Magazines usually start with editorials and their front featured articles. That’s too much to digest at once.

One paragraph articles or short comics at the end are very easy fast and easy to read. As I move towards the front page, the articles get a little bit longer and deeper. My mind is in a more curious and grasping mode for that effect.

And some people thought I’m a fanatic! xP

Analysing Car Market Trends using Big Data Tools in Mauritius

Who hasn’t heard of Big Data in the 21th century? Big Data in itself isn’t much of a great deal as knowing how to extract useful information from the data. It is the analytics part which is the killer feature of Big Data. It comprises of both science and art!

source: www.fudzilla.com

The first step of Big Data solutions is to gather data. There are lots of ways in which you can achieve this. Manual Data Entry can still be done but you’ll require quite an army of minions for that. But I was not “evil” enough to convince the minions to work for me. So I had to find other ways: Facebook Graph API allows you to get feeds from your wall, car groups you’re in.

{
      “message”: “Renault Scenic
Rs138,000 – Vacoas, Plaines Wilhems, Mauritius

For sale Renault Scenic Year 2005,STEPTRONIC gearbox,fully executive,1500 cc Petrol,never accidented,comes with digital dashboard,armrest,electric mirrors,alloy wheels and panoramic sunroof”,
      “updated_time”: “2017-04-16T05:57:29+0000”,
      “id”: 14851777

},

Good news is that the data is in JSON format. Bad news is that the message field contains unstructured data. We have to extract the informations we want from it. I use Collectiva Beta service (from nayarweb.com) for data processing.

Collectiva Beta

Let’s extract the Make, Model, Price, Location and Year from the data. I use grok patterns on the message field.

Make and Model: ^%{NOTSPACE:make} %{NOTSPACE:model}

Year: (y(ea)*r|an(n*e*))\s*\:*\s*(?<year;int>[0-9]+) // works with an 96, year 2003, yr : 14, anne 2000

Price & Location: (((Rs|\$|£|₹)(?<price_string>([0-9,])*))|FREE)( – %{GREEDYDATA:location_string})?

Now we can just throw data at it. Some will get properly parsed, some not. But with enough data, you can still get some pretty graphs. In the future, hopefully I get an AI do the extracting for me.

Let’s get to the pretty parts now: graphs.

Which car makes are the most sold in Mauritius?

Easy: A Bar Chart

How many models are within each make?

No need to have another graph. We just split the split bars for models. Voila!

How much do the car models depreciate in Mauritius?

Notice that it is graphing the 50th percentile which is also known as median. Means are kinda useless because a single outlier can cause the graphs to be very skewed by a lot. We can show the 10th, 50th, 90th percentile on the same graph so that you can compare whether the car you’re buying falls between the accepted market price. Let’s say you want a Volkswagen Polo

You can see the same lines above are not split into 3 lines. I don’t have much variation here because I’ve been collecting data for only 4 days. The lines are supposed to smoothen over time and the accuracy will increase.

Wanna see the Big Picture? Welcome the Pi Chart

In this graph, I aggregated the data into Make, Model, Year and Price. All in 1 graph. It’s like magic nah?

Want to get into Big Data World?

If you have big databases sitting around, like for supermarket, warehouse, manufacturing and agriculture, or you run an SME or NGO and would like to benefit from the insights of Big Data tools feel free to contact me for a quotation.

Detecting Brute Force Attacks on Linux using Graylog/Elasticsearch

I noticed one of my servers is sending more logs than the other. `sshd` was the application sending the most amount of logs in the last 24 hours.

The logs look like these:

pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.52 user=root

Failed password for root from 116.31.116.52 port 14281 ssh2

message repeated 2 times: [ Failed password for root from 116.31.116.52 port 14281 ssh2]

Received disconnect from 116.31.116.52 port 14281:11: [preauth]

Disconnected from 116.31.116.52 port 14281 [preauth]

PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.52 user=root

Since the IPs are being logged, I can know from where these are coming. Let’s generate a map.

Well well well, 5437 occurrences from China. Gotta do something. Here’s frequency of the attacks this week.

It seems to have amplified today. Looking at the logs, we can see that the were trying different passwords for the user `root`. Lemme just disable password authentication for SSH.

$ vim /etc/ssh/sshd_config

Change the line

#PasswordAuthentication yes

to

PasswordAuthentication no

$ service ssh restart

And we can see the logs are no more appearing 😉

Do you wish to analyse your server logs too? Feel free to message me on Facebook or Twitter or LinkedIn