Skip to content

Instantly share code, notes, and snippets.

View pwalsh's full-sized avatar
🤘

Paul Walsh pwalsh

🤘
View GitHub Profile
@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 / 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 / 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 / gist:cd764c058c975661715924e0315074ca
Created May 9, 2022 09:23 — forked from Miserlou/gist:11500b2345d3fe850c92
1000 Largest US Cities By Population
Largest 1000 Cities in America
2013 popuation data - Biggest US Cities By Population
rank,city,state,population,2000-2013 growth
1,New York,New York,8405837,4.8%
2,Los Angeles,California,3884307,4.8%
3,Chicago,Illinois,2718782,-6.1%
4,Houston,Texas,2195914,11.0%
5,Philadelphia,Pennsylvania,1553165,2.6%

incorrect validation

A resource descriptor with fields with format set to None validates with validate, but fails with dump_to_sql.

{'name': 'srm_services', 'path': 'res_1.csv', 'profile': 'tabular-data-resource', 'schema': {'fields': [{'name': 'id', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'source', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'name', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'payment_required', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'urls', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'description', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'details', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'status', 'type': 'string', 'format': None, 'constraints': {}}, {'name': 'payment_details', 'type': 'string', 'format': None, 'constraints': {}}], 'missingValues': ['']}}

Solution: set format to "default"

@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 / viderum-senior-developer.md
Last active January 5, 2019 20:44
Senior Developer at Viderum

Senior Developer

Overview

We are looking for Senior Developers to join our growing team. Viderum implements a range of data management solutions for government and the enterprise using open source technologies, including many that our team creates and maintains in house.

Senior Developers at Viderum have experience working with teams of developers in a leading role. They communicate regularly with technical and non-technical stakeholders about the team’s work, and therefore need excellent spoken and written English. Our Senior Developers scope and define work for other developers on their delivery teams, as well as lead on technical implementation.

Most of the work we do at Viderum is in Python, and experience designing and implementing web applications in Python is a must. As we do a lot of work with data, experience with data wrangling, data engineering, and/or data science is highly desirable, as is a strong working knowledge of SQL and other database technologies. We also do frontend development

@pwalsh
pwalsh / viderum-developer.md
Created December 27, 2018 18:31
Developer at Viderum

Developer

Overview

We are looking for Developers to join our growing team. Viderum implements a range of data management solutions for government and the enterprise using open source technologies, including many that our team creates and maintains in house.

Developers at Viderum work as part of a delivery team under technical supervision of a Senior Developer. They communicate about their work with technical and non-technical stakeholders on their team, and therefore need to be proficient in spoken and written English. Our Developers scope and define work with our Senior Developers - depending on level of experience - and are responsible for implementation of a range of data management solutions.

Most of the work we do at Viderum is in Python, and some experience implementing web applications in Python or Node.js is required. As we do a lot of work with data, experience with data wrangling, data engineering, and/or data science is desirable, as is some familiarity with SQL or other database technolog

@pwalsh
pwalsh / keybase.md
Last active October 22, 2017 06:32
Keybase proof.

Keybase proof

I hereby claim:

  • I am pwalsh on github.
  • I am pwalsh (https://keybase.io/pwalsh) on keybase.
  • I have a public key ASCzOJE9TdT0SeKkhN1zw4Jj0vGEOfOPzQGYdF8I02HrYgo

To claim this, I am signing this object: