I hereby claim:
- I am johnstcn on github.
- I am cianjohnston (https://keybase.io/cianjohnston) on keybase.
- I have a public key ASDp1RugXYlzG-JhqP7WCi5z3MeOeIGApgo6KEdM31CRKgo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import csv | |
import argparse | |
import sys | |
from collections import defaultdict | |
helptext = """Merge multiple CSV files using a commonly named column. | |
CSV files must have column headings, but do not need to be sorted. |
#!/usr/bin/env python | |
import argparse | |
import re | |
import grequests | |
def chunks(l, n): | |
"""Yield successive n-sized chunks from l.""" | |
for i in range(0, len(l), n): |
#!/usr/bin/env python | |
import argparse | |
import json | |
import re | |
import sys | |
import GeoIP | |
from collections import Counter |
#!/usr/bin/env python | |
# Author: Cian Johnston <johnstcn@gmail.com> | |
import argparse | |
import itertools | |
def distance(s1, s2): | |
out = abs(len(s1) - len(s2)) | |
for c1, c2 in zip(s1, s2): |
#!/usr/bin/env python | |
import fileinput | |
notes = [' '] + ('A Bb B C C# D Eb E F F# G G#'.split() * 2) | |
chars = ' abcdefghijklmnopqrstuvwy' | |
mapping = dict(zip(chars, notes)) | |
def normalize(c): | |
return c.lower() |
I hereby claim:
To claim this, I am signing this object:
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/ubuntu2004" | |
config.vm.provision "shell" do |shell| | |
shell.privileged = false | |
shell.path = "provision.sh" | |
end | |
end |
/* | |
* Foundry VTT Macro for Starfinder RPG -- Mass Perception Check | |
*/ | |
// Gets list of selected tokens, or if no tokens are selected then the user's character. | |
function getTargetActors() { | |
const character = game.user.character; | |
const controlled = canvas.tokens.controlled; | |
let actors = []; |
/* | |
* Foundry VTT Macro for Starfinder RPG -- Mass Ability, Save, or Skill Roll | |
*/ | |
let targetActors = getTargetActors().filter(a => a != null); | |
function checkForActors(){ | |
if (targetActors.length == 0) | |
throw new Error('You must designate at least one token as the roll target'); | |
} | |
checkForActors(); |
// This is lifted directly from https://github.com/gorilla/websocket/blob/master/examples/echo/server.go | |
// without the build:ignore directives | |
// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package main | |
import ( |