Sunday 2 April 2017

Generating Permutation in Python

This is the best way to generate permutations in python.

from itertools import permutations

j="1234"
for i in permutations(j):
    print "".join(i)


Saturday 1 April 2017

Ditch Ubuntu Software Centre

Most noobies to Linux love Ubuntu Software. It one of the best things of Ubuntu, a preinstalled GUI package manager.

The Other thing that most guys love is the Software Updater it is extremely fast and efficient when compared to its Windows Counter Part.

Experts

However experts should not be using Ubuntu Software. One of the biggest and main reason is the fact that it is buggy and it hangs even on modern hardware.
It is extremely slow compared to its terminal alternative. I have used GUI package managers on various Arch Distros, they are far more efficient then Ubuntu's Software Centre.

Secondly it has a tendency to acquire a lock and then never release. Software center was taught by canonical lock n key, however turns out it learned from its distant friend Windows lock n hang. 

Usually when it decides to play this game of lock n hang. You need to use ps -aux | grep apt. To find out the process and kill it with kill -9 pid. Finally you need to ensure that the database is not corrupt by use sudo dpkg --configure -a. Failure to do so can have disastrous consequences. So why not ditch it all together ?