CookieCutter Contexts

CookieCutter Contexts

cookiecutter is an awesome command line utility created by Audrey Greenfeld, that is used to create projects from templates, especially useful if you create multiple projects with essentially the same boilerplate.

It is easy to take one of the many available templates that already exist, fork it, modify it to suit your specific needs and get reproducible, fast spin up of new projects.

Having only been using cookiecutter for a short time I was working with a new template I had created, and as I tested it with dummy projects, and tweaked it I was getting very fed up with continually entering the input context each time.

I brought out my Google-fu and was led to this question on Stack Overflow which had a similar problem to me, and was asking whether there existed a command flag that could be used to insert default context in the template at creation time, as in cookiecutter --no-input --context my-context.json <cookiecutter-template>.

Continue reading

Repovisor 0.0.1

Repovisor – Command Line Repository Management Tools

Repovisor 0.0.1

Repovisor is a tool I have written for viewing the status of multiple repositories on the command line.

It is designed for people who have multiple repositories in use at any one time, who may need to double check whether they have forgotten to push, pull or commit changes. Running the commands at the end of a days work allows you to commit your work whilst it is still reasonably fresh in your mind.

Continue reading

NeuroCoder – pydicom

NeuroCoder – pydicom

DICOM files

DICOM is a medical standard for storing image data from a large range of devices. As a Cognitive Neuroscientist, the primary data I am currently interested in is magnetic resonance imaging data. Now the raw data as received from the radiographer is in the DICOM file format.

Continue reading

Prespy – Presentation in python

Prespy – Presentation in python

Presentation®

Presentation is a Windows-based program for stimulus delivery and interfacing with hardware tailored for Neuroscientists and Psychologists. It is script based, basically abstracting away the low-level communication with display and sound card drivers, input devices and more to allow researchers to quickly implement experiments for their research.

Whilst it does its job well at making life easier for researchers to create powerful and fast experiments, because of its target market I find myself as a programmer constantly at odds with some of the design decisions.

Continue reading

pypirc – Fix Breaks Login

pypirc – Fix Breaks Login

(When an upstream bugfix breaks my login)

Getting started on the Python Package Index

Back when I was finally willing to release python code to the wild I did some reading on the web of the simplest methods of getting a project uploaded to PyPI. I found several resources, but one that I clipped and still occasionally refer to was a simple article by Peter Downs on making a project pip installable that is hosted on Github.

This was very simple to follow, so I registered with PyPI (and TestPyPI) using a password generator and created my .pypirc file. After fleshing out my project and adding the necessary components to the setup.py file I excitedly tried to register and upload my first project.

Continue reading