Educate Yourself
2009
my web space
Enable the localhost interface:
/sbin/ifconfig lo up
apt-get remove --purge gitk gitosis git-gui git-core
apt-get install mercurial
I am sick of mkdir dir_name; cd dir_name;
The solution (put this function in “.bashrc” or whatever shell config file you use):
_mkcd () { mkdir -p $1 cd $1 } # usage: _mkcd /tmp/dir_1/dir_2 # pwd will show: /tmp/dir_1/dir_2
Why Assembla free plan:
P.S. If you are like me - spitting on GIT on a daily basis - Mercurial is included in the other plans.
>>>from nltk.corpus import wordnet as wn >>>wn.synsets('Christmas')[0].lemma_names ['Christmas', 'Christmastide', 'Christmastime', 'Yule', 'Yuletide', 'Noel']
a sample BASH function (usually resides in $HOMES/.bashrc)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1;; *.tar.gz) tar xzf $1;; *.bz2) bunzip2 $1;; *.rar) rar x $1;; *.gz) gunzip $1;; *.tar) tar xf $1;; *.tbz2) tar xjf $1;; *.tgz) tar xzf $1;; *.zip) unzip $1;; *.Z) uncompress $1;; *) echo "'$1' cannot be extracted via extract()";; esac else echo "'$1' is not a valid file" fi } |
import re greeting = "Merry Christmas" greeting_list = map(chr, [ord(i) - len(greeting) - 1 for i in greeting]) greeting_list = filter(lambda x: re.match('[a-z]|[A-Z]', x), greeting_list) # greeting_list is set(['c', 'b', 'd', 'i', 'Q', 'U', 'Y', 'X']) # the 1st 3 elements are not clear to me: c,b,d # 'i' means 'I', 'Q' means 'question', 'U' means 'you', 'Y' means 'why', 'X' means 'Christmas' # which makes the compound: 'I question you - why Christmas?'
Right?
Comment