Lazyweb: printing

I don’t own a printer, nor do I want to. On the rare occasions when I need something on paper, I pop into a net cafe, or cajole a friend into printing it for me. This gets a bit pricy/cheeky when it involves more than a few pages. Also, it takes far too much time and faff.

Somewhere, there must exist a company that will accept documents by email, print them, and post me the results. But I’ve not been able to find any. The print shops I can find are geared either towards making glossy full-colour brochures, or to printing lots of copies of the same document.

Does this kind of print-and-post service exist? Where?

Resolver One

I’m in the frustrating position of having spent a fair chunk of last year doing cool stuff with Resolver One, a python-based spreadsheet app. Frustrating, because the manufacturers have started handing out prizes for interesting resolver-based projects — and I’m in no position to talk about, let alone open-source, most of what I’ve been doing.

Instead, I’ll just repeat that I

love

Resolver — it’s good enough to impress me despite being closed-source, and Windows-only*, and mainly aimed at financial number-crunchers in the City.

The main appeal for me is having python tightly integrated into a spreadsheet. Lambdas and list comprehensions are a natural fit for spreadsheets, to the extent that it’s painful trying to re-learn how to do things in Excel or OpenOffice. Here’s a simple example for adding up wages:





1


=SUM([row[‘


Salary


‘]


for


row


in


<Employees>.ContentRows


if


row[‘


job


‘] == ‘


Postman


‘)



But, since the expression in every cell can be an arbitrarily-complex python expression, you can do much more intricate calculations in the same idiom. Plus Reslver is built on IronPython, which gives you the ability to use .NET libraries as well as python ones. And you can export your spreadsheet as a python class, letting you plug it into any other application you fancy. And, and…

Anyway, that’s the end of enthusiasm. Back to grumbling about politics shortly, no doubt.

* I’m still a dedicated Ubuntu/Debian user. But Amazon, flexiscale or GoGrid will rent you a Windows server for ~10c/hr, so I’ve only been marginally inconvenienced by Resolver being Windows-only.

pycallgraph

[perhaps of faint interest to python programmers, certainly not to anybody else]

I’ve just found pycallgraph, which makes it easy to visualize the structure of function calls within python code.



This is immensely useful for debugging, and for getting a feel for the structure of a program. It’s something you could theoretically already do with epydoc and a profiler, but that’s always seemed like a lot of work for little return.

With pycallgraph, it takes a couple of lines:



1




import


pycallgraph



2


pycallgraph.start_trace()



3




#…code to be graphed goes here





4


pycallgraph.make_dot_graph(‘


test.png


‘)



5

That’s still a lot of typing, though, when I really only want it for a quick picture of whatever is currently baffling me. pycallgraph have missed an opportunity to rewrite it as a decorator:



1




import


pycallgraph



2





3




def




callgraph


(filename = ‘


/tmp/callgraph.png


‘):



4




def




argwrapper


(func):



5




def




callwrapper


(*args, **kwargs):



6




if


callwrapper.already_called:



7




return


func(*args, **kwargs)



8


callwrapper.already_called = True



9


pycallgraph.start_trace(reset = False)



10


result = func(*args, **kwargs)



11


pycallgraph.stop_trace()



12


pycallgraph.make_dot_graph(filename)



13




return


result



14


callwrapper.already_called = False



15




return


callwrapper



16




return


argwrapper

This lets me generate a call-graph of any function, by popping a one-line decorator onto it:



1




@




callgraph


(‘


/tmp/callgraph.png


‘)



2




def




myfunc


():



3




#code here

The other advantage here is that I generally only want to generate the graph once, when the function is first called. Hence the use of afunction attribute, already_called, as a flag to short-circuit past the call-graph on subsequent runs.

Protected:

This content is password protected. To view it please enter your password below:


Protected:

This content is password protected. To view it please enter your password below:


Protected:

This content is password protected. To view it please enter your password below:


Protected:

This content is password protected. To view it please enter your password below:


Trivia

If we are wired to like salt, and salt gets added to most processed food to improve the taste – why does salt-water taste so unpleasant?

Or is it just sea-water that tastes foul? Would water with slightly less salt, or with less other gunk, taste nicer? Should I experiment?

Opening up a tax haven

Panama is still one of the biggest and most important tax havens. As well as its absurd tax regime, its corporate disclosure regime means it is very difficult to get information about Panamanian companies.

Or rather, it was. Panama recently put online their company registry. You can now retrieve the names of the current directors of every Panamanian company, as well as all the company’s filings themselves (minutes of company meetings, details of shareholdings, ownership, certificates of incorporation etc. etc.).

Nice, but you can only search by the name of the company. If you want to find somebody who is dodging tax or doing something else dubious, you really need to search by director’s name.


This tool

fixes that problem. I’ve scraped all 600,000 company records, going back 30 years, and indexed by directors.

Now you can, for instance, look up recently-arrested arms dealer Monzer al-Kassar, and you find a couple of companies. Looking through the records, you find the company’s current treasurer is Hans-Ulrich Ming, chairman of Swiss firm Pax Anlage. Previous directors include Enrico Ravano, president of Contship, the Italian company that controls the Calabrian port of Gioia Tauro. A Feb 2008 report for the Italian parliament accused Ravano of complicity in cocaine smuggling by the Calabrian mafia through Gioia Tauro – the report cited Italian estimates that 80% of all Europe’s cocaine is smuggled through Gioia Tauro. Ravano’s connection to al Kassar could help to stand up accusations (which al Kassar has always denied) that al Kassar was involved in drug trafficking as well as weapons trafficking; and helps to undermine Ravano’s recent denials that he’s had anything to do with any trafficking of any sort. [This set of connections was in fact found manually, by Global Witness, and was part of the inspiration to build the search]

Or take Nadhmi Auchi: Iraqi-British billionnaire, companion of Saddam Hussein in the ’50s, convicted of fraud in France (but appealing). I’ve not yet looked through the records of companies held by him and his friends – but there are plenty of records there, doubtless including some interesting connections.

And there are plenty more interesting names to look up. Most satisfyingly, it’s already proving useful in figuring out the activities of various currently-active arms dealers…

Want the raw data?

Here

is a database dump.