Skip to content

Instantly share code, notes, and snippets.

View billyc's full-sized avatar
🌵

Billy Charlton billyc

🌵
View GitHub Profile
version: 1
header:
title: Charts
config:
baseUrl: http://localhost:8000/
folder: /every-viz/dashboard
layout:
@billyc
billyc / dashboard-1.yaml
Created December 15, 2021 10:56
My Big Project
title: heey
@billyc
billyc / dashboard.yaml
Last active July 21, 2021 12:37
VW Dashboard Test 1
version: 1
config:
baseUrl: "http://localhost:8000/"
folder: "/vw/i501"
header:
title: VW Run Summary
description: "Some metrics that people find generally useful"
navigation:
@billyc
billyc / mini-file-server.py
Created May 5, 2021 10:16
Python 2/3 http file server with open CORS and Range Requests
#!/usr/bin/env python
import argparse
import os
import re
import sys
print("Mini-File-Server: serving with RANGE and CORS (open access)")
print("-----------------------------------------------------------")
print("Folder: " + os.getcwd())
@billyc
billyc / ubuntu-notes.md
Created February 8, 2019 17:24
Ubuntu setup notes

Billy's Ubuntu 18.04 setup notes

Not quite out-of-box perfection, but the important things all worked without any adjustment: wifi, screen, external HDPI monitor, webcam, sound, Fn keys.


EN/DE/TR Keyboard

I have my specially-crafted English/German/Turkish keyboard which no one else uses or would ever be interested in, even though it is perfection.

@billyc
billyc / vega-schema.json
Last active December 11, 2018 11:01
Vega trendline
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "Billy's obsessive data obsession",
"title": {"text": "Weight Data and Trendline"},
"width": 200,
"height": 400,
"config": {"axis": {"grid": false}},
"data": {
"values": [
{"date": "2018-12-06", "weight": 74.1, "trend": 74.1},
# Github API Reader: get issues
TOKEN = '123456abcdef'
repo = 'matsim-org/viz'
# -------------------------------
import json, urllib, urllib2, sys
API = 'https://api.github.com'
headers = {'Authorization' : 'token ' + TOKEN,
'Accept' : 'application/vnd.github.inertia-preview+json' }
@billyc
billyc / xkb_rules_base.lst
Last active October 26, 2018 15:36
XKB intl-billy with EN/DE/TR support -- these go in /usr/share/X11/xkb
billy us: English (billy, EN/DE/TR)
@billyc
billyc / Dockerfile
Last active January 26, 2017 01:29
UrbanSim2 Dockerfile
# PSRC UrbanSim2 Docker
FROM continuumio/miniconda
WORKDIR /udst
# Install required anaconda python packages
RUN conda install \
numpy \
pandas \
pytables \
@billyc
billyc / flu_csv_to_dbf.py
Last active October 15, 2016 00:18
Convert FLU for LUV: CSV file to DBF format
# -*- coding: utf-8 -*-
"""
luv_csv2dbf: LUV CSV to DBF converter
Converts a CSV file with a header row into a DBF file
which can be imported into the LUV generation scripts.
"""
import csv, dbf, sys
from unidecode import unidecode