Skip to content

skywalker

Things I like in Python

skywalker is a Python module which contains some of the things I like in python. I was tired of copying the same snippets over and over, so I put them in a module to be imported from everywhere. skywalker is compatible with both python 2 and 3, and deals with all sort of things like plotting, timing, checkpointing, etc. etc.

Installation

pip install skywalker

Tools

These are some of the things you can do with skywalker (beside using a lightsaber, of course). A list of all functions and tools is available in the documentation.

  • checkpoint: Smart checkpointing of function outputs to h5 files.
  • dontprint: Deep output suppression.
  • plot: Handle matplotlib options, including saving to file.
  • processify: Spawn a new process everytime that function is executed.
  • singleton: Define that class as a singleton (one instance at any time can exist)
  • timer: Print execution time of a function/class.

Cite me

If you want to cite this code: DOI