ORIGINAL from https://serverfault.com/questions/110154/whats-the-default-superuser-username-password-for-postgres-after-a-new-install CAUTION The answer about changing the UNIX password for "postgres" through "$ sudo passwd postgres" is not preferred, and can even be DANGEROUS ! This is why: By default, the UNIX account "postgres" is locked, which means it cannot be logged in using a password. If you use "sudo passwd postgres", the account is immediately unlocked. Worse, if you set the password to something weak, like "postgres", then you are exposed to a great security danger. For example, there are a number of bots out there trying the username/password combo "postgres/postgres" to log into your UNIX system. What you should do is follow Chris James 's answer: sudo -u postgres psql postgres # \password postgres Enter new password: To explain it a little bit. There are usually two default ways to login to...
Here's instruction 1. Get the dmg file of python from www.python.org, then install it. 2. Get the dmg file of setuptool from pypi, then install it. 3. Follow step from http://blog.praveengollakota.com/47430655 (very thank to praveen)
have a problem with sorting dict by value!!! found something interesting on http://code.activestate.com/recipes/304440/ by Nick Coghlan let's see >>d = {'a':0,'b':1,'c':2} >>d #will get {'a':0,'c':2,'b':1} some solution from Nick >>from operator import itemgetter >>print sorted(d.items(),key=itemgetter(1)) #we get [('a':0),('b':1),('c':2)] # >>>>> a list of tuples it might be useful in the future!!!:) thank nick and activestate
Comments
Post a Comment