With their usual small fanfare, github have added the ability to automatically generate an RSS feed of your recent posts to the gem plugins they have available. To use it, add the lines:
The vtkLogoWidget class exists to allow logo insertion in standard VTK render instances, but what about in ParaView? It turns out you can still use it fine. Run the following script in the ParaView python shell, or even make it a macro!
Lets write a simple script to display some text in a standard vtk window:
The pygmentize tool can automagically syntax mark up an awful lot of languages, but sometimes you need to paste the text into a windowed application. Fortunately on Mac OS X there’s a convenient way of doing this making its way round the interweb. It makes use of rich text format (rtf) and the command line tool pbcopy which copies stdout to the mac pasteboard. The full command is
Sometimes we want to write a snippet which acts only if a variable doesn’t existThis one is fairly straightforward to do using the globals function:
Regular expressions are a powerful tool for text processing. Apparently. For some reason I just can’t ever get my head round them, and thus, given my preferred method for learning things, I can can never remember any of the syntax for them. So I’m going to try and do something about it by making notes on useful things which can be done with them.
The module mpi4py makes it fairly trivial to make MPI calls within python scripts, by allowing first class python objects to be passed. As an example of a near do nothing script, consider the following:
Some notes on a few slightly quirky features of python that I (and everyone) ought to take note of.
Yesterday we dealt with some git commands which allow it to be used as originally intended. Today we’ll move on to some powerful, but dangerous commands which (almost) literally allow developers to rewrite history.
Yesterday we dealt with methods for SVN users to try to pretend they aren’t being forced to use git. Today we’ll move on to some recipes to take advantage of the strengths of git.