Skip to content

Instantly share code, notes, and snippets.

View dominijk's full-sized avatar

Dominic Humphrey dominijk

View GitHub Profile
@dominijk
dominijk / brew-install-script.sh
Created October 4, 2023 13:34 — forked from CliffordAnderson/brew-install-script.sh
Brew script for installing packages and applications on OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap homebrew/cask
@dominijk
dominijk / dev-setup.sh
Created October 4, 2023 13:33 — forked from lmarti17/dev-setup.sh
A shell script to install all apps / packages I usually use for working as an Interactive developer (not tested for now though)
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@dominijk
dominijk / ral_standard.csv
Created April 5, 2023 08:09 — forked from lunohodov/ral_classic.csv
RAL Standard Color Table (CSV)
RAL RGB HEX German English French Spanish Italian Nederlands
RAL 1000 190-189-127 #BEBD7F Grünbeige Green beige Beige vert Beige verdoso Beige verdastro Groenbeige
RAL 1001 194-176-120 #C2B078 Beige Beige Beige Beige Beige Beige
RAL 1002 198-166-100 #C6A664 Sandgelb Sand yellow Jaune sable Amarillo arena Giallo sabbia Zandgeel
RAL 1003 229-190-001 #E5BE01 Signalgelb Signal yellow Jaune de sécurité Amarillo señales Giallo segnale Signaalgeel
RAL 1004 205-164-052 #CDA434 Goldgelb Golden yellow Jaune or Amarillo oro Giallo oro Goudgeel
RAL 1005 169-131-007 #A98307 Honiggelb Honey yellow Jaune miel Amarillo miel Giallo miele Honinggeel
RAL 1006 228-160-016 #E4A010 Maisgelb Maize yellow Jaune maïs Amarillo maiz Giallo polenta Maisgeel
RAL 1007 220-156-000 #DC9D00 Narzissengelb Daffodil yellow Jaune narcisse Amarillo narciso Giallo narciso Narcissengeel
RAL 1011 138-102-066 #8A6642 Braunbeige Brown beige Beige brun Beige pardo Beige marrone Bruinbeige
@dominijk
dominijk / xml_split.py
Created June 1, 2021 07:05 — forked from scnctech/xml_split.py
I took this gist https://gist.github.com/benallard/8042835 and modified it a little so it worked for my needs. (mainly encoding issues and bigger file chunks)
#!/usr/bin/env python
#based off this gist https://gist.github.com/benallard/8042835
#modified it a little so it worked for my needs. (mainly encoding issues and bigger file chunks)
import os
import xml.parsers.expat
from xml.sax.saxutils import escape
from optparse import OptionParser
from math import log10
@dominijk
dominijk / la_ecodes.csv
Created November 1, 2020 12:24 — forked from drkane/la_ecodes.csv
CSV list of official UK ONS geography administrative codes mapped to DCLG "ecodes" for England
LAcode geog_LA Ecode
E06000001 Hartlepool E0701
E06000002 Middlesbrough E0702
E06000003 Redcar and Cleveland E0703
E06000004 Stockton-on-Tees E0704
E06000005 Darlington E1301
E06000006 Halton E0601
E06000007 Warrington E0602
E06000008 Blackburn with Darwen E2301
E06000009 Blackpool E2302
@dominijk
dominijk / la_ecodes.csv
Created November 1, 2020 12:24 — forked from drkane/la_ecodes.csv
CSV list of official UK ONS geography administrative codes mapped to DCLG "ecodes" for England
E06000001 Hartlepool E0701
E06000002 Middlesbrough E0702
E06000003 Redcar and Cleveland E0703
E06000004 Stockton-on-Tees E0704
E06000005 Darlington E1301
E06000006 Halton E0601
E06000007 Warrington E0602
E06000008 Blackburn with Darwen E2301
E06000009 Blackpool E2302

Getting Started With Superset: Airbnb’s data exploration platform

Update Python and PIP versions on EC2 (Amazon AMI)

At the time of writing, Python v3.6 and PIP v19.0.3 were available on AWS EC2.

sudo yum update -y
sudo yum install python36 -y
@dominijk
dominijk / hosting-on-github.md
Created February 1, 2018 18:04 — forked from TylerFisher/hosting-on-github.md
Basic steps for hosting on Github

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
  6. Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a mess
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
# fixed version of http://altons.github.io/python/2012/12/01/converting-northing-and-easting-to-latitude-and-longitude/
# - filenames
# - data type (pyproj transform doesn't like pandas series)
import os
import pandas as pd
import pyproj
import re
listfiles = os.listdir("codepo/Data/CSV")
pieces = []