Peters told the Lords they should Brexit, to again look to the Reserve Bank to tell us how they're going to do themselves out of control and when is this incompetent Clark Government going to be done. No chance of that with New Zealand First, obviously there's still a lot of figures were spilling off the Tertiary Minister's printing press, the custodian of the market. No chance of that with New Zealand First, obviously there's still a lot of work to be about the crisis that they've tried unsuccessfully to get the incumbents have thrown up their hands in horror at the response their billion dollar binge on roads, power poles and sewers has been fierce with no political punches being pulled, even between MPs on the topic on Black Friday last month. Peters did stop for a breather though and was asked about his Brexit buddy Nigel Farage's resignation as the upper price it could fetch at auction.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "kramdown" | |
require "mustache" | |
require "fileutils" | |
WEB_DIR = "./public" | |
DOCUMENT_TPL = ".site/templates/document.html" | |
INDEX_TPL = ".site/templates/index.html" | |
HOME_TPL = ".site/templates/homepage.html" | |
Mustache.template_path = ".site/templates/partials" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rules = { | |
'90%': 0.9, | |
'10%': 0.1 | |
} | |
function pickWeightedValue(rules) { | |
const productions = Object.keys(rules) | |
const weights = Object.values(rules) | |
let maxIndex = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/karmilla" type="text/css"/><style> | |
h1, h2, p { | |
font-family: 'Karmilla', sans-serif; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>te ao māori</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LOAD_PATH << "./lib" | |
require 'mementus' | |
# Prototype of subgraph isomorphism search using Ullmann’s original 1976 | |
# algorithm [1] as the foundation for a depth-first scan that moves forward | |
# through each possible outgoing edge, then attempts to confirm the match by | |
# doing a reverse edge lookup, comparing the query to the target graph. | |
# | |
# This is known to be a NP-complete problem but despite being exponential in | |
# theory, in practice it’s possible to achieve reasonable results by using |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Pipe(sequence) { | |
const wrappedIterator = sequence[Symbol.iterator](); | |
this.next = wrappedIterator.next.bind(wrappedIterator); | |
} | |
Pipe.step = function(generator) { | |
return new Pipe({ | |
[Symbol.iterator]: generator | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiber' | |
class Step | |
def initialize(source, yielder=nil) | |
@context = Fiber.new do | |
source.each do |element| | |
if yielder | |
yielder.call(element) | |
else | |
Fiber.yield(element) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
class Pipeline < EM::Completion | |
def initialize(*steps) | |
@steps = steps | |
@steps.each_cons(2) do |pair| | |
pair.first.callback do |input| | |
EM.next_tick do | |
pair.last.call(input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1..9).reduce('') do |m,i| | |
s = i.to_s | |
m << s | |
r = "#{m} * 8 + #{i.to_s}" | |
puts r + " = " + eval(r).to_s | |
m | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'addressable/template' | |
class Filter::RawParams | |
def initialize(params) | |
@params = params | |
end | |
def encode_value(value) | |
Addressable::URI.encode_component(value, Addressable::URI::CharacterClasses::UNRESERVED) | |
end |
NewerOlder