To 9/11 victims: You country is as Responsible as Saudi Arabia

The US Senate and House of Representatives recently approved a bill allowing the victims of 9/11 to sue Saudi Arabia for being backing the terrorists who were responsible for 9/11.

At the surface this might seems a noble cause, however, they forget that their own country is as responsible as Saudi Arabia. They seem to forget that their successive governments have long supported directorships in the Middle East and Islamic World. Dictatorship regeimes in countries like Egypt, Saudi Arabia, Jordan, and Pakistan have long enjoyed the support of the USA which has condoned the oppressions of such regimes. Such oppressions resulted in the rebellion of certain individuals like Osama Bin Laden who ended up establishing an Al Qaeda The victims of 9/11 also seems to forget that their own country has funded Al Qaeda and helped in establishing it during the Afghanistan war against the Soviet Union.

It is a bit ironic that the victims of country whose government is responsible the biggest atrocities in the 21st centenary. The USA government repeatedly lied to make the case for invading Iraq in 2003 which has results in the destruction of Iraq. Not only this, but they let the country to be taken extremist groups like Al Qaeda and later on Daesh.

Somehow the Americans think that they have the moral high ground when it comes to the war on terror. Yet, their government is stained with the blood of innocent victims who died because of the wars that of the USA in the Middle East.

If you really want to seek justice, you should then start at your own backyard and sue your own government.

Opening Up a port on RedHat

By default RedHat comes with strict configuration for protecting you from hackers. If you want to open up certain ports for network traffic you will need to use iptables command.  Here is how you might open tcp port 3030 for network traffic

$ sudo iptables -I INPUT -p tcp -m tcp --dport 3030 -j ACCEPT
$ sudo service iptables save # saves rules to /etc/sysconfig/iptables

Alternatively you can use  firewall tui tool

$ sudo system-config-firewall-tui

Replacing URIs with labels in RDF object fields using sparql

Here is how it is done with an example from Linked Movie Database

prefix movie: <>
prefix rdfs: <>

select ?s ?p ?o
       <> ?p ?o1 .
       optional {?o1 rdfs:label ?o.}
       BIND (<> as ?s)
       <> ?p ?o .
       optional {?o rdfs:label ?label.}
       BIND (<> as ?s)
order by ?p
limit 25

Females in DBPedia

Here is a simple SPARQL query to list all females in DBPedia

SELECT ?property ?hasValue ?isValueOf
  { <> ?property ?hasValue }
       ?isValueOf ?property <> .
       ?isValueOf <> ?gender .
       FILTER regex(?gender, "female", "i")

Algorithms, Part I — Social Network Connectivity (With Union-Find)

Nice blog post about “Social network connectivity” problem that appears in Coursera Algorithms I (

Data Nest

Q: Given a social network containing N members and a log file containing M timestamps at which times pairs of members formed friendships, design an algorithm to determine the earliest time at which all members are connected (i.e., every member is a friend of a friend of a friend … of a friend). Assume that the log file is sorted by timestamp and that friendship is an equivalence relation. The running time of your algorithm should be MlogN or better and use extra space proportional to N.

(Java Code on github at the bottom of the post. )

My thoughts and solutions:

When solving dynamic connectivity problems (like whether there is a path between two nodes but we don’t care what the exact path is), we can try using the Union-Find algorithm. And this is a typical application of union-find in social network.

This question asks if we can determine the earliest time at which all…

View original post 391 more words


growth of the network seems to show that connectivity is its 
own reward, and is more valuable than any individual application 
such as mail or the World-Wide Web. [1]


It is about conditional independence

I have been contemplating the reason why learning the weights of ER inference rules separately or jointly, essentially leads to the same weights given the same ground data (evidence and ground truth) as shown in the slides today. To understand the reason behind this I had to dig back to my notes when I was still learning about Markov Networks back in February 2014. While stratification might play a part in this, the actual reason is that the query predicates in my rules are independent from each other given the evidence predicates in the ground Markov Networks. As you recall the ER inference rules has the following form:

Evid1(X) ^ Evid2(X) ^ Evid3(X) => QUERY1(X)

Evid1(X) ^ !Evid2(X) ^ Evid4(X) => QUERY2(X)

Given a domain of values for X, in the ground Markov Network paths from nodes of QUERY1(X) are always conditionally independent from nodes of QUERY2(X) given the nodes of Evid(X), Evid2(X), Evid3(X), and Evid4(X). As a result of this, the ground atoms of QUERY1 and QUERY2 never appear together in the same potential function in the factorized probability density function. Thus the optimization process always optimizes the weights for such rules independently from each other. And as a consequence of this weights are always the same whether they learned together or individually.