Skip to content

Instantly share code, notes, and snippets.

View demoray's full-sized avatar

Brian Caswell demoray

View GitHub Profile
@demoray
demoray / atlantia-rapier-after-covid19.md
Last active March 18, 2021 01:15
Reopening Rapier Combat in Atlantia

Restarting Rapier Combat in Atlantia after COVID-19

Kingdom Phases

Until Phase 2, you need to pick a local branch for participation and stick to it. Once you have chosen a branch and travel is allowed between branches, you can't travel to a higher phase branch than your chosen branch.

As of 3/13, Black Diamond, Caer Mear, Isenfir are closed. All other regions are "Phase 0"

phase 0:

  • limit of 10 or fewer. outdoors only. choose a branch and stick with it. no traveling outside the branch to other official activities. nobody 17 under allowed.
@demoray
demoray / genesis_public_key
Created February 28, 2018 00:09
genesis_key.txt
041fabb6f8674d672de13c08bb9561922dc52414e58db05a7c9c97ada7a20f526fbfdf0b93283e5b7deab29f2eb8d4c48a3caef711b80708e2400abad57ae140b5
@demoray
demoray / example.c
Created August 24, 2017 20:41
Jansson varargs wrapper
#include <stdlib.h>
#include <jansson.h>
size_t json_printf(json_t *obj, const char *format, ...) {
va_list ap;
size_t count = 0;
char *name;
va_start(ap, format);
for (count = 0; *format != '\0'; ++format) {
@demoray
demoray / pizza_schedule.py
Created May 14, 2016 04:20
constraint solving cooking schedule
#!/usr/bin/python
import z3
import itertools
class Schedule(object):
def __init__(self):
self.s = z3.Solver()
self.tasks = {}
@demoray
demoray / mytasks.py
Last active September 2, 2018 07:13
A custom complete method for luigi tasks that will re-run the task if any prerequisite task is newer
class MyTask(luigi.Task):
def complete(self):
def _get_last(outputs):
last = 0.0
for item in outputs:
if not item.exists():
continue
current = os.path.getmtime(item.path)
if current > last:
last = current
@demoray
demoray / serial_tasks.py
Created February 17, 2016 18:12
A method for a luigi task to run a set of Luigi tasks and their prerequisites serially
#!/usr/bin/env python
import luigi
import types
class MyTasks(luigi.Task):
@staticmethod
def run_tasks(tasks):
def _get(subtasks):
subtasks = luigi.task.flatten(subtasks)