Skip to content

Instantly share code, notes, and snippets.

View jamiecook's full-sized avatar

Jamie Cook jamiecook

View GitHub Profile
[
{
"id": 22307,
"name": "Train Station - Geebung",
"market": "Brisbane",
"geoloc": "0103000020E6100000010000000500000026A94C318721634065FED137695E3BC0B81FF0C0802163404D4BAC8C465E3BC05A65A6B47E216340E5D2F885575E3BC0F7729F1C8521634066A032FE7D5E3BC026A94C318721634065FED137695E3BC0"
},
{
"id": 22308,
"name": "Train Station - Windsor (Qld)",
This file has been truncated, but you can view the full file.
[
{
"id": 138312,
"location_id": 19592,
"latitude": -27.4661,
"longitude": 153.025998,
"format": "Bus/Rail - Platform/Concourse",
"percent_board": 100,
"percent_alight": 100,
"section": "Concourse",
airport - input (has some sign data)
assignment - output
chunked_contacts - output
config - input (constant)
contacts - output
db_passwords.yaml - input - probably delete this when we're on the internet
depots - input (constant)
links - input (constant) - this is the road network
lts_reports - output
od_matrices - input (constant)
@jamiecook
jamiecook / (Spac)emacs cheat sheet.md
Last active June 5, 2017 03:23 — forked from ajmcmiddlin/(Spac)emacs cheat sheet.md
Stuff ajmccluskey needs to remember about (Spac)emacs

General

  • Space f e d: Open Spacemacs config

  • Space f e R: Reload Spacemacs config (after editing)

  • Space Space: Search for command

  • (Ctrl H) k: find action for binding

  • Space b b: Open files

  • Space p f: Find file in project

Tunnelblick console log

*Tunnelblick: OS X 10.12.3; Tunnelblick 3.7.0 (build 4790); prior version 3.6.10 (build 4760); Admin user

Console Log:

2017-05-01 19:49:57 Tunnelblick[699] Keychain item retrieved successfully for service = '[email protected]_ssl_vpn_config (1)' account = 'username'
2017-05-01 19:49:57 Tunnelblick[699] Keychain item retrieved successfully for service = '[email protected]_ssl_vpn_config (1)' account = 'password'
@jamiecook
jamiecook / plot_optus_speed.py
Last active April 9, 2017 12:41
upload the last 3 odd days of speed data to plotly
import pandas as pd
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
import scipy
from scipy import signal
N = 1000

For everyone who wants your little svn coloured logos back after updating to windows 10 (I don't know how you wouldn't want them!) you can do the following to upgrade your version of TortoiseSVN.

  1. Open the command line (as admin) and update your chocolately version

    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"

  2. Upgrade TortoiseSVN

    chocolatey upgrade tortoisesvn

module Selekt
grammar SQL
rule sql_query
space? select_statement (space order_by_clause)? (space limit_clause)? space?
end
rule select_statement
select_clause
module OtMonkeyPatches
module OtQueryPatches
module InstanceMethods
end
module ClassMethods
# Allows for a shorter syntax on queries:
# OtQuery.execute("SELECT name from '..\cube'") { |row|
# p row
# }
list_of_files = IO.readlines(ARGV[0])
def process_file(file, from, to)
layer_name = File.basename(file).gsub(/.tab/i, '')
cmd = "d:/bdk/bedrock/resources/gdal/ogrinfo \"#{file}\""
cmd += "-sql \"ALTER TABLE #{layer_name} RENAME COLUMN #{from} TO #{to}"
`#{cmd}`
end
list_of_files.each { |file|