Skip to content

Instantly share code, notes, and snippets.

View pwalsh's full-sized avatar
🤘

Paul Walsh pwalsh

🤘
View GitHub Profile
@pwalsh
pwalsh / pyo on Mac OS X
Last active April 24, 2016 05:23
A short gist explaining how to compile pyo - the powerful Audio/DSP library for Python, on Mac OS X. The instructions are specifically for installing pyo with a brewed Python install - not with Mac OS X system Python.
# using brew installed Python
brew install portaudio portmidi libsndfile liblo jack
brew link portaudio portmidi libsndfile liblo
cd ~/Sites/tmp
svn checkout http://pyo.googlecode.com/svn/trunk/ pyo-read-only
@pwalsh
pwalsh / mac-osx-development-environment.rst
Last active February 4, 2020 18:38
A development environment configuration on Mac OS X using Homebrew for package management. The configuration supports web app development in Python and Node. Additionally, there are some dependencies for audio synthesis projects in Python and Clojure.

Mac OS X development environment

Homebrew [ http://brew.sh/ ]

It all begins with Homebrew. This setup uses Homebrew for almost everything, including things your Mac ships with, like Python.

Managing everything in Homebrew lets us use the most up-to-date packages available, and means we are not subject to any customizations, however small, Apple makes to their packaged software.

@pwalsh
pwalsh / install-python-pyo-on-raspberry-pi.md
Last active September 4, 2023 20:48
Install Python PYO on Raspberry Pi (Raspian Debian Wheezy)

How to install Python PYO on Raspberry Pi (Raspian Debian Wheezy)

An old version of PYO is installable via apt-get on Raspian. But, we want the latest, don't we...

Dependencies

sudo apt-get install python-dev libjack-jackd2-dev libportmidi-dev portaudio19-dev liblo-dev libsndfile-dev python-dev python-tk python-imaging-tk python-wxgtk2.8
@pwalsh
pwalsh / wtforms-field-macro-bootstrap3.html
Last active September 5, 2022 17:44 — forked from alienhaxor/_formhelpers.py
A macro for rending WTForm fields in Jinja2 templates with Bootstrap 3 styling.
{% macro render_field(field) -%}
{% set with_label = kwargs.pop('with_label', False) %}
{% set placeholder = kwargs.pop('placeholder', field.label.text) %}
{% set class_ = kwargs.pop('class_', '') %}
{% if field.flags.required %}
{% set class_ = class_ + ' required' %}
{% endif %}
@pwalsh
pwalsh / appengine-service-accounts-on-devserver.md
Last active May 17, 2022 18:07
Google App Engine Service Accounts that work in local development: A guide for the lost and weary

It is easy to get service accounts working with App Engine's app_devserver.py - once you know how.

On the way there, you might have pulled out all your hair following one documentation dead end after another, trying to piece together the right information.

Here are the steps you need to take, in exact order, to get this working. Once you follow these steps, you'll be able to use service accounts in local development, so that you can interact with Google APIs (e.g.: Spreadsheet, Calendar) in a way that is consistent with the deployment environment on App Engine.

In order to follow the instructions, you'll be better off using the latest UI for Google Cloud projects. Older interfaces (such as the dedicated App Engine dashboard) have things in different places, under different names, etc. It is a world of pain there.

Also note that I've tested this on several 1.9.x releases of App Engine; I can't confirm the behaviour of earlier releases.

@pwalsh
pwalsh / jack.conf
Last active November 20, 2022 14:45
Raspberry Pi Headless Setup
; Supervisor configuration to manage a jack server
[program:jackd]
command=/usr/bin/jackd -r -t2000 -ddummy -r44100 -p1024
user=pi
redirect_stderr=true
autostart=true
autorestart=true
@pwalsh
pwalsh / uk-gov-spend-publishing-data-fields.md
Last active August 29, 2015 14:16
A table of the data fields for spend publishing in the UK government.

This table is taken from this public document.

Column Field name What is required Reason for inclusion Additional information Inclusion status
1 Department family Name of department or parent department. To identify spend to each deaprtment area. Consistent naming conventions must be used. Departments need to issue naming conventions. Mandatory inclusion
2 Entity Name of individual entity To identify spend of individual bodies within the departmental family Where a core department is completing the return, the entry in the department “family field” should be repeated here. Consistent naming conventions must be used. Mandatory inclusion
3 Date The payment date as recorded in department's purchase or general ledger. To identify the date that the
@pwalsh
pwalsh / datasets_with_missing_resources.csv
Created January 12, 2016 10:01
Missing data on DataHub.io
title url created
EU Budget https://datahub.io/dataset/eu-budget 2009-04-10 18:27:52.860908
EU - Financial Transparency System https://datahub.io/dataset/eu-fts 2009-04-21 01:40:13.634086
Country and Regional Analyses (CRA) - UK Government Finances https://datahub.io/dataset/ukgov-finances-cra 2009-12-18 18:36:41.139595
Country and Regional Analyses (CRA) - UK Government Finances https://datahub.io/dataset/ukgov-finance-cra 2010-02-10 19:35:33.612496
South Africa Development Co-operation Information System https://datahub.io/dataset/south-africa-development-cooperation-system 2010-03-11 18:10:04.119287
Israel State Budget 2009-2010 https://datahub.io/dataset/israel-state-budget 2010-07-29 09:11:01.520248
AGROVOC https://datahub.io/dataset/agrovoc-skos 2010-09-07 08:57:40.040957
IATI Registry https://datahub.io/dataset/iati-registry 2011-04-25 08:23:25.841919
Aquiosquedais https://datahub.io/dataset/aquiosquedais 2011-06-05 22:25:14.005077