Sunday, January 18, 2015
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
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
Sunday, November 16, 2014
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.
First, you need connect to your network via ssh, using dynamic port forwarding. For example
ssh -D <PORT> [usernname@]host
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
localhostas your SOCKS Proxy Server and
<PORT>as the SOCKS Proxy Server Port.
That's it. Now you can browse de web normally, but remote resources will assume you are inside your work's network.
Thursday, October 30, 2014
$ brew install llvm33 --rtti $ git clone https://github.com/llvmpy/llvmpy.git $ cd llvmpy $ LLVM_CONFIG_PATH=/usr/local/lib/llvm-3.3/bin/llvm-config python setup.py install $ python -c "import llvm; llvm.test()" $ pip install numba
Wednesday, October 22, 2014
I needed a simple state machine in a project I'm working on. Doing some research I came across coroutines. This post won't even try to explain what coroutines are. Instead, it just shows a super simple example of a finite state machine using coroutine.