Monday, March 01, 2010

Wikibook linuxguide

Linuxguide: "The easiest way to begin using a Linux system may be to use an already running system. For example, some systems may be available in various educational or work environments. In this case you only need to contact the appropriate administrator and obtain a user ID and password. You will only be able to explore the system to a certain extent, but the first steps can be taken without having go through the installation process. Another trouble-free way of obtaining a Linux system is to buy a computer with Linux pre-installed. The number of vendors selling such systems is constantly increasing."

Wednesday, February 24, 2010

Totem python console

Today I learned that you can script Totem Movie Player 2.28.2 with the python language. There is even a python console included as a plugin to Totem.

On the screenshot you can see a few commands in the console to play, pause and seek on a video or a sound file.

Friday, February 19, 2010

Linking to places in Excel

Much like you can link from a table of content in word to the corresponding title in the document, I wanted to link an Excel cell to another cell inside the document (for example to the cell A5). The problem is that if a new cell is inserted above the destination cell (changing it from A5 to A6 for example), the original link doesn't change the destination cell's number (it stays to A5).

So I decided to use the "name range" possibility. But as explained here, "If the cell or range already has a name you may type a new name in the name box and it will be accepted as a name for that cell or range as long as it is not a name that is currently used elsewhere. However, the first name given will still exist and will still be the one shown in the name box when you select the cell or range. In formulas etc. You will still be able to use both the new name and the old name. "
Here (in 2004) they proposed to use a VBA function, but that is actually not nessecary.

The solution is to use the "Name Manager" dialog box. From Excel help: "Use the Name Manager dialog box to work with all of the defined names and table names in the workbook. For example, you may want to find names with errors, confirm the value and reference of a name, view or edit descriptive comments, or determine the scope. You can also sort and filter the list of names, and easily add, change, or delete names from one location.

To open the Name Manager dialog box, on the Formula tab, in the Defined Names group, click Name Manager."


And the way I solved my problem was by using the "create from selection" dialog in the "defined names" area of the formula tab.

Thursday, February 18, 2010

Setup of programs I use daily

Research Software

  • LyX to write articles and structured documents including citations, Check my blog post on LyX
  • JabRef to manage a bibliography
  • LaTeX to typeset publications, exported in PDF format
  • R statistical software and the R-Studio application
    • Several packages: plyr, ggplot2, FAOSTAT, testthat
    • Knitr and R Markdown to produce work reports in html. Knitr and LaTeX to produce more elaborate reports in PDF
    • xlsx to write data frames to Excel

OS

Office Software

  • I use Firefox (renamed iceweasel on Debian) for web browsing, with the following extensions:
    • Adblock to block annoying ads
    • Delicious bookmarks to have mobile bookmarks across many browsers
    • Mindthetime to keep track of time usage. This extension is not working any more.
  • For simple image editing I use Irfanview. I crop scanned pictures or screenshots and I redimension them for web use or use in documents. Very occasionally, I use the "sharpen" function or the brightness, contrast, gamma corrections. 
  • I use Microsoft word and Excel at work. I use Google documents when writing something at home.
  • To work collaboratively I use media wiki with the extension Semantic Mediawiki
  • Based in this review, I installed spacesniffer it helps analyse disk space usage on windows. Like Disk space analyser on GNU-Linux systems. You can use filters such as this one: "*.jpg;>100kb;>2weeks" to filter only certain type of files, sizes and dates.

Command line tools on GNU-Linux

  • du to analyse disk usage. I created an alias duh for du -h.
  • grep to search inside text files
  • pdfgrep to search inside pdf documents
  • git see programming below

Thesis writting

  • Writing documents in Lyx
  • Keeping track of versions with git
  • Managing a bibliography with Jabref.

 Programming software

  • Scite to edit code
  • Git to track versions of code. See also git commands and posts tagged with git.

I want to test

 I stopped using

  • QuickWiki Quick search of definitions
  • Zotero to share search results with colleagues
  • Mendeley to insert citations in Microsoft Word and to manage a bibliography (can import bibtex files form Jabref) 

Links

Tuesday, February 16, 2010

Singularity - the opinion of Peter Norving

Interview of Peter Norving: "Do you agree with Kurzweil's forecast regarding the singularity?"
"So Ray is great and I appreciate all that he's done, I appreciate all the advances in AI that he has done in reading, in music and so on, so he's a great technologist. I think in terms of these predictions, euh, I think he's doing the best he can by saying, I wanna nail down this prediction, I'm gonna look at the data that we have, I'm gonna extrapolate from that data and come up with an answer, euh, I think the only problem is that the data is not conclusive, right. So you look at, Moore's law, yes, you can say computers are going at this particular rate, but I don't think you can necessarily say that when we pass a certain number of transistors, that corresponds to a certain number of neurons and therefore the 2 are equivalent, I think that's where the analogy breaks down."

What are your thoughts on molecular manufacturing and Bio-Engineering?
"So it's fascinating to me, euh, I'm trying to learn something about it. I'm educating myself, I gotta long way to go. I think it does tie-in because it is a mix between the physical world and the world of information. Euh, I think it is likely that in the coming century a large part of manufacturing will be done with cells or with atoms. I kind of think it'll be more done with cells than with atoms just because they're bigger, they're easy to manipulate, they've already got this 3 Giga bite computer on board, we just gotta figure out how to program it."
Peter Norving is director of research at google.

Home server

This company is selling a home server. For what it's worth! ;-)
They are based in Anger, how bizarre! And their website is in French and German.

Microsoft's open source license

Microsoft's open source license for Non-Commercial Academic Use Only: "You may create derivative works of the Software source code and distribute the modified Software solely for non-commercial academic purposes, as provided herein.. If you distribute the Software or any derivative works of the Software, you will distribute them under the same terms and conditions as in this license, and you will not grant other rights to the Software or derivative works that are different from those provided by this MSR-LA. Your license rights to the Software (or any Microsoft intellectual property associated therewith) does not include any license, right, power or authority to subject the Software or derivative works thereof in whole or in part to the terms of any license that requires as a condition of use, modification and/or distribution of software subject to such license that the software or other software combined and/or distributed with such software be (A) disclosed or distributed in source code form; (B) licensed for the purpose of making derivative works; or (C) redistributable at no charge."
Bla bla bla. :-) You're allowed to modify it but you're not allowed to licensie it under another license that would allow the distribution in source code form or distribution at no charge.

Monday, February 15, 2010

Python, Delphi and oracle

"In Greek mythology Python, serpent, was the earth-dragon of Delphi, always represented in Greek sculpture and vase-paintings as a serpent. She[1] presided at the Delphic oracle, which existed in the cult center for her mother, Gaia, Earth, Pytho being the place name that was substituted for the earlier Krisa.[2] Hellenes considered the site to be the center of the earth, represented by a stone, the omphalos or navel, which Python guarded."

From the wikipedia article Python (pythology) (nice typo! :).

In computer fields
python is a programmin language and Delphi too. Oracle is a software company and you wonder where their inspiration came from.

Thursday, January 28, 2010

US department of defence advocates Open Source

US Department of Defence: "To effectively achieve its missions, the Department of Defense must develop and update its software-based capabilities faster than ever, to anticipate new threats and respond to continuously changing requirements. The use of Open Source Software (OSS) can provide advantages in this regard." (pdf on the website of David A. Wheeler)

Basic web server on a microcontroler

Web Xweb32 Lite is a web server that runs on a microcontroler ATMEGA32. With that you can visualise variables within a webbrowser. This is even smaller than any barebone computer.

A PC in the keyboard

A PC that fits in the keyboard for 99 EUR with linux: Northteck Gecko Surboard (article on Linux Devices.com)
Xcore is the manufacturer.

Géolocalisation par wifi

Le service de géolocalisation est assuré par la technologie Wi-Fi Positioning System (WPS). Grâce au Wi-Fi intégré, les cartes Eye-Fi détectent les réseaux Wi-Fi environnants pendant que vous prenez des photos. Une fois que les photos ont été transférées, le service Eye-Fi leur associe des données géographiques.

Wednesday, January 27, 2010

Connect to a SQLite database using python

SQLite is included since python 2.5 I connected to a SQLite database created from zotero that way:

import sqlite3 as sqlite
con = sqlite.connect('zotero.sqlite')
cur = con.cursor()
cur.execute('CREATE TABLE foo (o_id INTEGER PRIMARY KEY, fruit VARCHAR(20), veges VARCHAR(30))')
con.commit()
cur.execute('INSERT INTO foo (o_id, fruit, veges) VALUES(NULL, "apple", "broccoli")')
con.commit()
print cur.lastrowid

cur.execute('SELECT * FROM foo')
print cur.fetchall()

Here is the output:
>pythonw -u "test_sqlite.py"
1
[(1, u'apple', u'broccoli')]
2

With help from DZone snippets and devshed. However devsched's information about downloading and building the sqlite library is outdated as it is now included in python.


Edit:
In a later post, I explain how to connect do an SQLite database with the R statistical software and a package called dplyr.

Visualise the history of python development

In this blog I found a link to this video of the history of python development from the release date in 1991 to the time when Gido Van Rossum was hired by google in dec. 2005.

First plot with python (x,y)

Showing a plot with pylab module from the python (x,y) package that I just installed on windows.

from pylab import *
test_list = [1,2,6,123,51,32]
plot(test_list)
title('Test plot of a list of numbers')
show()

Monday, January 25, 2010

Metaprogramming

Metaprogramming " is the writing of computer programs that write or manipulate other programs (or themselves) as their data."

Python at google, quotes

In February 2006 Greg Stein spoke about Python at google. I liked this quote: "Greg mentioned that to create code.google.com took about 100 lines of python code. But since it has so many dependencies, the build system generated a 3 megabyte makefile for it!" That gave me an idea of what a *glue* language means!

On the same blog there is another quote from Guido Van Rossum: "Guido uses print statements for 90% of his debugging and a debugger for the times when his brain stops working or he has to debug some wierd code that someone else wrote. "

Thursday, April 05, 2007

Optical mouse emitting beams of light.

This is my optical mouse at work:

Compress images in a microsoft word file

When you have a word file over 3Mb, it might help to reduce the size of the photos. The problem is often that you use a resolution too high for the print quality.
Let's double click on one of the picture you inserted in your word document, chose [compress] and click on [all pictures in document]. You can now change the resolution to a print quality. This can reduce your file size to a half or a third if you have inserted very big photos from a 7Mb digicam fro example.

Here is a screenshot from the action:




Enjoy the small file size!