Tuesday, November 20, 2012

Adding python to the path environment variable

In the windows command line, typing "python" should start the program. By default this doesn't work. You can change the windows path for python as explained in showmedo.

In Windows 7, to add a path to the path environment variable go to :
Control Panel\System and Security\System, then advanced system settings and environment variable, then add ";C:\Python27\Scripts;C:\Python27\" to the path variable.

Saturday, September 29, 2012

Ipython notebook

I tested Ipython notebook today, it's nice to be able to test little pieces of python code in the browser.Using Ipython for interactive work.

Read Excel from Python

from xlrd import open_workbook
wb = open_workbook('my_file.xls')
for s in wb.sheets():
    print 'Sheet:',s.name, "has",
    print s.nrows, "rows and", s.ncols, "columns"
    print "cell(1,1) contains: ", s.cell(1,1).value   

    for row in range(s.nrows):
        values = []
        for col in range(s.ncols):
            values.append(s.cell(row,col).value)
        print ',' ,values
    print


From the python Excel tutorial here: http://www.python-excel.org/

Tuesday, July 24, 2012

Why is the Google ribbon always displayed in a foreign language?

My Google ribbon is always in Finnish even though I'm in France. See screenshot below:


I don't know how the line of links at the top of a Google search page is called: "search | Images | Maps | play | youtube |news etc...". I call it the "Google ribbon".

Logging into my Google account fixes this (I see everything according to my language setting). But I'd like to be able to search in an English interface also when I'm not logged-in.

The company I work for is Finnish. The desktop computer I use comes from Finland but I have set my locale settings in Windows to Irish, so that I have the English language and the Euro by default. I work in France and my IP address is French.
  • Why is the ribbon always displayed in Finnish?

Friday, March 30, 2012

Delete empty cells in Excel

Good trick on this blog: press F5 and click special, then blanks then ok. It'll select all empty cells, you can delete them with a right click.

Sunday, March 11, 2012

OpenERP databases + export and import to forms

OpenERP uses PostgreeSQL to host databases.
  • Databases can be created from the client interface. 
  • They can also be deleted "drop" database
  • Backed-up and imported. It appears some data was lost after a database backup and retrieval (I have to test that again).
Import into forms
"You just first try export the data from export wizard and import compatible field needs to be true in export wizard.
The generated wizard output csv will give you better idea regarding fields and format."

OpenERP install and config

For a very long time I have been wanting to test OpenERP for basic invoicing and inventory management for a small business.

OpenERP installation on Ubuntu Linux
Gave me the basic instruction to:
  • Configure postgreeSQL (in the file
    /etc/postgresql/8.4/main/pg_hba.conf) 
  •  Create a database user called "openerp"
  •  Configure OpenERP server (in the file
    /etc/openerp-server.conf )
I now started the OpenERP client and can see  "no database found, you must create one!"
I then started the client and clicked on FIle/Databases/New Database

 There is a detailed tutorial of the installation on this blog written in May 2010.

....
I'm now trying to import a list of products

Tuesday, February 14, 2012

Twitter account creation

I shouted "It's a tweet" to people I met in the Street last week. Because I saw the application UK Snow, I  decided to registered to Twitter. First had to choose a user name:

Sunday, February 12, 2012

Installing Cormas Agent based modelling on Ubuntu Linux + Wine

Cormas is an agent based modeling tool developed by CIRAD. I downloaded both cormas zipped folder and the version of visual works which they ship on the cormas website. I unzipped them in a folder used by wine as"C:" drive: /home/username/.wine/drive_c/Paul/vw7.6nc/Cormas Then I followed the Cormas instructions mentioned in the presentation here.

From this Ubuntu Forum, I know you can get a dos prompt in wine by typing
wine cmd
I went to the directory
cd C:\Paul\vw7.6nc\bin\win
 and started the Visual Work executable vwnt.exe calling the file visualnc.im:
vwnt.exe C:\Paul\vw7.6nc\cormas\visualnc.im
And Visual Work worked!

But I didn't manage to load the cormas parcel (as explained in the presentation mentioned above). I needed to change Visual Works home directory by going in the file menu, "set VisualWorks home"  screen-shot below:

I still couldn't load it from the menu "System/Load parcels named" but I could load it from the menu "System/parcel manager", then load file:

 
It seems to work well. The Cormas parcel loads and I can see a Cormas option in Visual Works' tool menu:


The instructions tell me to save the cormas image (file/save image as). the version of Cormas I installed is from 2008 "VERSION : cormas2008 v. lundi 31 mars 2008 - 18:09:10." Now It should be ready to run a model.

I wonder if Visual Works 7.6 can run directly on Linux, without using wine.


I downloaded the game of live model from the cormas web page. And unzipped it in the forlder /Cormas/Models, then opened if from the menu file/load from ST. And after following the presentation tutorial this is what I got:

Tuesday, January 24, 2012

The Web should be read-write

Tim Berners Lee in Read-Write Linked Data
I hope I do not have to motive here the fact that the Web in general should be read-write. That has been done in many places, from 'Weaving the Web', to the Read-Write Web blog. (I actually realize that in 20 year of writing these articles, I haven't written a separate page on that topic! ) Let me summarize here by saying the WWW was originally developed with the goal to be a collaborative space in which people could collectively design, discuss, share and manage things. Being able to impart one's knowledge, or put down a new design or correct or annotate existing work, is I think a key functionality of the Web. Even better, can it be a place we we are creative jointly ("intercreativeâ„¢") .

This applies to data as much as to documents. To take just one example, shared calendar systems are one example of shared data systems which, while they are silos within the domain of calendaring, they have a classic burning need for multi-person collaboration and the need to be able to create and modify as well as read. In fact, collaboratively figuring out people's intersecting calendars is a classic challenge task. The goal is to make an infrastructure which will make it easy to write powerful collaborative applications. Also, I like the maxim that wherever you have access to information which you have the authority to correct or extend, there should be an easy way for you to do so at that place. This clearly applies as much to data as to documents.

Monday, January 23, 2012

Concept mapping versus topic maps and mind mapping

Concept mapping versus topic maps and mind mapping
Concept maps are rather similar to topic maps (in that both allow to connect concepts or topics via graphs), while both can be contrasted with the similar idea of mind mapping, which is often restricted to radial hierarchies and tree structures. Among the various schema and techniques for visualizing ideas, processes, organizations, concept mapping, as developed by Joseph Novak is unique in philosophical basis, which "makes concepts, and propositions composed of concepts, the central elements in the structure of knowledge and construction of meaning."[5] Another contrast between Concept mapping and Mind mapping is the speed and spontaneity when a Mind map is created. A Mind map reflects what you think about a single topic, which can focus group brainstorming. A Concept map can be a map, a system view, of a real (abstract) system or set of concepts. Concept maps are more free form, as multiple hubs and clusters can be created, unlike mind maps which fix on a single conceptual center.

Monday, January 02, 2012

Research events and food for thought