Scott Kirkwood's Personal Blog
Programming, Brazil
Linux: Getting more excited about Linux
Get link
Facebook
Twitter
Pinterest
Email
Other Apps
I've been looking around and found some nice screenshots of peoples desktops using Gnome. Very nice. Looks like gDesklets is popular, which is cool since it's written in Python.
If you don't use unison to keep folders synchronized you really should, it's great. It's like a two way rsync program. Problem is I end up synchronizing a bunchy of folders in different locations for different projects and I prefer to start unison at the command-line. What I want is bash completion for unison. It's not that difficult to setup. I just created a file in /etc/bash_completion.d called "unison" and it looks like this: _unison() { local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" opts=$(python -c 'import glob,os,os.path;x = glob.glob(os.path.expanduser("~/.unison/*.prf")); print " ".join([os.path.split(y)[-1][:-4] for y in x])') COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 } complete -F _unison unison-gtk The python part is all one line and it goes to my ~/.unison folder, lists all the *.prf files and then just gets
Mark Byer's site has some more Sudoku solvers here's a short one in Python that's only 178 bytes long: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+m+a[i+1:])for m in'%d'%5**18] from sys import*;r(argv[1]) On the site is also shown a longer Perl version at 185 bytes: use integer;sub R{for$i(grep!$A[$_],@x=0..80){%t=map{$_/27-$i/27|$_%9/3-$i%9/3&&amp;amp;$_ /9-$i/9&&($_-$i)%9?0:$A[$_]=>1}@x;R($A[$i]=$_)for grep!$t{$_},1..9;return$A[$i]=0} die@A}@A=split//,<>;R I think the Python version is slightly easier to understand, although they are both quite cryptic. I'm not sure why I find these programs fascinating. I think it reminds me that any program can be written in such a way that it's cryptic, even in Python. In addition, the code is small enough that you should be able to figure out how it works, and may learn something the process. Related is
I can state that Google Earth for linux works great. I installed it on my Ubuntu ( Dapper Drake ) desktop and had no problems. If you don't run the install program as root it will install it in your home folder. As a bonus I noticed that the satelite images of our farm is greatly improved. Now I can see the tennis court and the two swimming pools. Before I couldn't even see the river. Coordinates: long: -44.297743, lat: -19.958745 I believe that google earth is benefitting from the effort they made to bring Picasa to Linux (which I haven't tried yet) - update: I'm wrong, it's a native port . Basically, Google (and CodeWeavers ) have beefed up Wine so that it supports everything required for Picasa and Google Earth. This is good news for the Linux community since a better Wine means more windows programs that can run under Linux. For photo managment I use F-Spot and I'm quite hapy with it so I don't see myself moving to Picasa just yet. Also,
Comments