Search This Blog


Wednesday, March 11, 2015

Sunday, January 18, 2015

Rendering large datasets with matplotlib

This post provides a great solution for a common problem. Like the author, I always go for vector graphics for publications and posters. The problem is that some times these images are build using large datasets, which means large number of vector elements in the final image. This, in turn, makes browsing such document slow and painful (I've sure have stopped reading some articles due to unresponisveness). To overcome such problem, matplotlib offers a neat trick. Is possible to rasterize only selected elements in your figure, while keeping the rest vectorized. Read the post for more info.

Friday, December 26, 2014

Transforming Code into Beautiful, Idiomatic Python

Some of these idioms are fairly well known (at least I've seen them a lot). But several others were new to me.

Monday, November 24, 2014

D3 inspiration

Of course the main entry point for inspiration is D3.js website and Mike Bostock's examples page. Another great resource is Jason Davie's website.

Sunday, November 16, 2014

Proxy via SSH in OS X

Let's say you need to access a URL with your, but that URL is only accessible from inside a network. If your are working remotely, this will allow you to access the URL using an SSH dynamic port forwarding.
  1. First, you need connect to your network via ssh, using dynamic port forwarding. For example
    ssh -D <PORT> [usernname@]host
  2. With the SSH connection in place, go to your mac's network settings (in System Preferences). Click on Advanced ... and select the Proxies tab. Check the SOCKS proxy protocol and in its configuration set localhost as your SOCKS Proxy Server and <PORT> as the SOCKS Proxy Server Port.
  3. That's it. Now you can browse de web normally, but remote resources will assume you are inside your work's network.

Wednesday, November 12, 2014

Thursday, October 30, 2014

Installing Numba in OS X 10.10

$ brew install llvm33 --rtti
$ git clone
$ cd llvmpy
$ LLVM_CONFIG_PATH=/usr/local/lib/llvm-3.3/bin/llvm-config python install
$ python -c "import llvm; llvm.test()"
$ pip install numba