Python uno openoffice automatization

This is a very short example I managed to do in not a very long time which does the following things: opens an openoffice draw document modifies a field exports it as ps (using print to file) Ah, and it does that from an external python program. The setup In order to run a python script you need: to set the python path to include the uno lib and start a ooffice server...

September 21, 2009 · len

Remove duplicate mails

The problem Sometimes my evolution email client does the nasty thing that it duplicates some of the mails in my folders. I can think of 2 causes of this problem. Either it loses the track of mails downloaded from pop accounts on which the messages are not deleted imediately so it fetches them again or there is a problem with the filters that it forgets to delete the message from the original folder....

January 23, 2009 · len

SOM neural networks

The SOM (self organizing maps) are some very intuitive neural networks. There are a lot of more detailed description of these networks but here is a more intuitive description. You have a number of neurons usually arranged in a 2D or 3D grid, each neuron has an associated weight vector. The input, which is a vector of the same size as the weight vector is connected to each neuron. The natural association is that each vector is a point in an n-dimensional space....

January 5, 2007 · len

xmlIndent.py

<pre class="python"><span style="color: #008000;">#!/usr/bin/python </span> <span style="color: #c00000;">import</span> <span style="color: #000000;">sys</span><span style="color: #0000c0;">,</span> <span style="color: #000000;">re</span> <span style="color: #000000;">iE</span> <span style="color: #0000c0;">=</span> <span style="color: #004080;">' '</span> <span style="color: #000000;">pStart</span> <span style="color: #0000c0;">=</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">compile</span><span style="color: #0000c0;">(</span><span style="color: #004080;">'<[a-z]+'</span><span style="color: #0000c0;">,</span><span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">IGNORECASE</span><span style="color: #0000c0;">)</span> <span style="color: #000000;">pEnd</span> <span style="color: #0000c0;">=</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">.</span><span style="color: #000000;">compile</span><span style="color: #0000c0;">(</span><span style="color: #004080;">'(/>)|(</[a-z]+)'</span><span style="color: #0000c0;">,</span> <span style="color: #000000;">re</span><span style="color: #0000c0;">....

November 23, 2006 · len

Portknocking

Port knocking sample client-server Last updated: 18-jan-2005 This update contains the following improvements: * configuration of the server is now located in a separate file Example configuration file for the server: #$Id: knockd.cfg,v 2.0 2005/01/18 11:57:19 len Exp $ #knockd configuration file [main] #the file to monitor file=/var/log/all.log #the pattern to watch for, note that you must have the #"ts", "from" and "port" groups (see python "re" module for more documentation) pattern=(?...

November 19, 2006 · len

knockd.py

<pre class="python"><span style="color: #008000;">#!/usr/local/bin/python </span> <span style="color: #008000;"># $Id: knockd.py,v 1.5 2004/02/06 22:29:38 len Exp $ </span> <span style="color: #008000;"># Latest version can be found at http://nemesisit.rdsnet.ro/len </span> <span style="color: #008000;"># Copyright (C) Marilen Corciovei <marilen.corciovei@nemesisit.ro> </span><span style="color: #008000;"># </span><span style="color: #008000;"># This program is free software; you can redistribute it and/or modify </span><span style="color: #008000;"># it under the terms of the GNU General Public License as published by </span><span style="color: #008000;"># the Free Software Foundation; either version 2 of the License, or </span><span style="color: #008000;"># (at your option) any later version....

November 19, 2006 · len

knock.py

<pre class="python"><span style="color: #008000;">#!/usr/local/bin/python </span> <span style="color: #008000;"># $Id: knock.py,v 1.2 2004/02/06 22:29:38 len Exp $ </span> <span style="color: #008000;"># Latest version can be found at http://nemesisit.rdsnet.ro/len </span> <span style="color: #008000;"># Copyright (C) Marilen Corciovei <marilen.corciovei@nemesisit.ro> </span><span style="color: #008000;"># </span><span style="color: #008000;"># This program is free software; you can redistribute it and/or modify </span><span style="color: #008000;"># it under the terms of the GNU General Public License as published by </span><span style="color: #008000;"># the Free Software Foundation; either version 2 of the License, or </span><span style="color: #008000;"># (at your option) any later version....

November 19, 2006 · len