Skip to content

Instantly share code, notes, and snippets.

Paul Meinshausen PMeinshausen

Block or report user

Report or block PMeinshausen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active Oct 8, 2019
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/
View migrate_postgresql_database.md

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@jasonlally
jasonlally / meta_data_socrata_api.py
Last active Dec 18, 2015
Loops through all the city data catalogs using Socrata and dumps them to a structured JSON document that can be read by a D3 tree map.
View meta_data_socrata_api.py
#Connects to the Socrata search API and loads data describing the tabular datasets in the catalog for use by D3 tree map
#This version connects to a list of existing Socrata instances and loops through the ones categorized as city
#Use: python dataportalapi.py > portaldata.json
import requests, json, math, re
def check_categories(d,category):
for i in range(len(d)):
if d[i]['name'] == category: return i
return -1
You can’t perform that action at this time.