Skip to content

Instantly share code, notes, and snippets.

MAX_DISTANCE = sqrt(25000.0 ** 2 + 25000.0 ** 2)
def score_mine_commodity_label(predicted, actual):
"""
Score the predictions for commodity label against the actual values
Parameters:
predicted, actual - predicted and actual deposit info
"""
# Handle zero deposit case
@hughsando
hughsando / Traits.hx
Created August 2, 2017 05:56
Type Traits
typedef MapApi<K,V> = {
public function set(key:K,value:V) : Void;
public function get(key:K) : Null<V>;
};
@:generic
extern abstract Checker<Typedef, Instance:Typedef> (Dynamic)
{
static var instance:Instance;
inline public function new() { this = null; }
class IScheduleClient
{
public function getNextWake():Float;
public function onPoll():Void;
}
class Scheduler
{