Skip to content

Instantly share code, notes, and snippets.

View game-of-chairs.clj
(ns day-eleven
[ysera.test :refer [is is-not is= deftest]]
[ysera.debug :refer [printreturn printlet]]))
(defn get-seat
{:test (fn []
(is= (get-seat [".#"
"L."] [1 0]) "#")
(is= (get-seat [".#"
View swap.ts
swap(swapFunction: (state: T, any[]): T, ...args: any[]): T {
this.state = swapFunction.apply(null, [this.state, ...args]);
return this.state;
View onChange.ts
onChange(listener: (state: T) => void) {
autorun(() => listener(this.state));
from datetime import timedelta, date
import subprocess
import json
import pandas
def run(command, current_date, end_date):
transactions = []
fifteen_days = timedelta(days=15)
agentbellnorm /
Last active Jul 30, 2018
Calculate business hours between two datetime instances. Non office hours and configured holidays are excluded.
from datetime import datetime, timedelta
import numpy
def hour_diff(a, b):
delta = a - b
day_hours = delta.days * 24
second_hours = delta.seconds / 3600
return day_hours + second_hours
View onename
Verifying that +morganbentell is my blockchain ID.