I hereby claim:
- I am jasper-lyons on github.
- I am ioverthoughtthis (https://keybase.io/ioverthoughtthis) on keybase.
- I have a public key ASCZkHjo_13mJTFUaYGRLPVbSZtc6L8fGlKojMiNStCl_Ao
To claim this, I am signing this object:
data = (-10...10).map { |n| [n, n * 5] } | |
weight = 0 | |
30.times do | |
input, expected = data.sample # [[input, expected]] | |
output = weight * input | |
weight = weight - (expected - output) | |
puts([input, expected, output].inspect) | |
end |
storage <- list() | |
numbers <- c(4, 1, 15, 12, 0, 9, 9, 5, 5, 8, 7, 3, 14, 5, 12, 3) | |
count <- 0 | |
while (!(list(numbers) %in% storage)) { | |
storage <- append(storage, list(numbers)) | |
largest <- max(numbers) | |
largestIndex <- which.max(numbers) | |
numbers[largestIndex] = 0 | |
index <- largestIndex |
I hereby claim:
To claim this, I am signing this object:
local function describe(name, descriptor) | |
local errors = {} | |
local successes = {} | |
function it(spec_line, spec) | |
local status = xpcall(spec, function (err) | |
table.insert(errors, string.format("\t%s\n\t\t%s\n", spec_line, err)) | |
end) | |
if status then |
require 'net/http' | |
require 'uri' | |
require 'openssl' | |
require 'json' | |
require 'time' | |
class Http | |
def initialize(headers = {}, params = {}) | |
@headers = headers | |
@params = params |
require 'mail' | |
Mail.defaults do | |
delivery_method :smtp, { | |
address: 'smtp.live.com', | |
port: 587, | |
user_name: '<your email>', | |
password: '<your password>', | |
authentication: :login, | |
enable_starttls_auto: true |
<html> | |
<head> | |
<script> | |
// fn - a function | |
// arg - anything | |
// | |
// Saves us having to pass the same variable into the function over | |
// and over again. | |
function curry(fn, arg) { | |
return function () { |
I hereby claim:
To claim this, I am signing this object:
==> default: [2019-06-05T15:42:27+00:00] DEBUG: Re-raising exception: Chef::Exceptions::FileNotFound - template[/var/solr/cores/production/core.properties] (primero::solr line 65) had an error: Chef::Exceptions::FileNotFound: Cookbook 'primero' (0.1.0) does not contain a file at any of these locations: | |
==> default: templates/ubuntu-16.04/solr/core.properties.erb | |
==> default: templates/ubuntu/solr/core.properties.erb | |
==> default: templates/default/solr/core.properties.erb | |
==> default: | |
==> default: This cookbook _does_ contain: ['/tmp/vagrant-chef/eb442c9d9bbf02f71a986e63524b8810/cookbooks/primero/templates/default/aliases.erb','/tmp/vagrant-chef/eb442c9d9bbf02f71a986e63524b8810/cookbooks/primero/templates/default/couchdb/couch_config.yml.erb','/tmp/vagrant-chef/eb442c9d9bbf02f71a986e63524b8810/cookbooks/primero/templates/default/couchdb/vm.args.erb','/tmp/vagrant-chef/eb442c9d9bbf02f71a986e63524b8810/cookbooks/primero/templates/default/couchdb/local.ini.erb','/tmp/vagrant-chef/eb442c9d9bbf02f71a986e63524 |
-- This is just me working through this blog post: | |
-- https://www.wingolog.org/archives/2018/05/16/lightweight-concurrency-in-lua | |
-- | |
-- My goal was just to explore how one can make concurrency in lua more expressive without | |
-- compiling your own c extensions. Eventually I want to explore using such a system to build | |
-- a concurrent socket server but I suspect that will need c. Can't escape the blocking. | |
local Tasks = { | |
queue = {} | |
} |