Skip to content

Instantly share code, notes, and snippets.

@d6y
d6y / instance-list.txt
Last active November 30, 2018 12:29
CGP irace tuning
## This is an example of specifying instances with a file.
# Each line is an instance relative to trainInstancesDir
# (see scenario.txt.tmpl) and an optional sequence of instance-specific
# parameters that will be passed to target-runnerx when invoked on that
# instance.
# Empty lines and comments are ignored.
experiments/atari.jl --id frostbite
@d6y
d6y / output.txt
Created November 16, 2018 19:24
CGP julia 0.7 test run
CGP.jl (julia_v0.7 *)$ julia --project=. run_tests.jl
[ Info: Chromosome tests
CGPChromo
┌ Warning: `rand(dims::Dims)` is deprecated, use `rand(Float64, dims)` instead.
│ caller = macro expansion at chromosome.jl:14 [inlined]
└ @ Core ~/Developer/evolution/cga/forked/CGP.jl/test/chromosome.jl:14
┌ Warning: `a::Number + b::AbstractArray` is deprecated, use `a .+ b` instead.
│ caller = + at operators.jl:502 [inlined]
└ @ Core ./operators.jl:502
PCGPChromo
@d6y
d6y / results.md
Last active November 5, 2018 13:56
Results of running (modified) CGP.jl

Results of running CGP.jl

Code: https://github.com/d6y/CGP.jl (forked version primary to correct gene representation)

Enviroment:

  • ALE 0.51
  • Julia 0.6.4

Parameters:

  • Output 0.6
@d6y
d6y / gist:a7c88bdec85a73f18b3b176953afaa32
Created July 30, 2018 09:06
checkout and compile mapping playground
tmp$ git clone [email protected]:d6y/aws-gateway-mapping-playground.git
Cloning into 'aws-gateway-mapping-playground'...
remote: Counting objects: 22, done.
remote: Total 22 (delta 0), reused 0 (delta 0), pack-reused 22
Receiving objects: 100% (22/22), 8.71 KiB | 4.36 MiB/s, done.
Resolving deltas: 100% (1/1), done.
tmp$ cd aws-gateway-mapping-playground/
aws-gateway-mapping-playground (master)$ sbt
[info] Updated file /Users/richard/Developer/tmp/aws-gateway-mapping-playground/project/build.properties: set sbt.version to 1.1.6
[info] Loading settings from idea.sbt,sbt-updates.sbt,sonatype.sbt ...
@d6y
d6y / wrong.txt
Created June 25, 2018 10:23
filterQuery.map(_.name).update("new")
-------- QUERY 2 (WRONG):
DEBUG slick.compiler.QueryCompiler - Source:
| Bind
| from s2: Filter s3
| from s3: TableExpansion
| table s4: Table a
| columns: TypeMapping
| 0: ProductNode
| 1: Path s4.id : Int'
@d6y
d6y / correct.txt
Created June 25, 2018 10:06
filterQuery.length.result
-------- QUERY 1 (CORRECT):
DEBUG slick.compiler.QueryCompiler - Source:
| Apply Function count(*)
| 0: Filter s2
| from s2: TableExpansion
| table s3: Table a
| columns: TypeMapping
| 0: ProductNode
| 1: Path s3.id : Int'
'use strict';
const admin = require('firebase-admin');
admin.initializeApp();
const functions = require('firebase-functions'); // Cloud Functions for Firebase library
const DialogflowApp = require('actions-on-google').DialogflowApp; // Google Assistant helper library
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
console.log('Dialogflow Request headers: ' + JSON.stringify(request.headers));
console.log('Dialogflow Request body: ' + JSON.stringify(request.body));
if (request.body.queryResult) {
@d6y
d6y / noodle.scala
Last active March 16, 2018 17:43
Assuming you're stuck using Future somewhere, well...
package example
import scala.language.higherKinds
import cats.MonadError
import cats.syntax.functor._
// Both Try and Future are backed by Exceptions
// We can trade Future for Try in tests to avoid concurrency and execution context etc
@d6y
d6y / equals.scala
Last active November 24, 2017 19:06
Equality
/*
By default, there are equality tests in Scala that return false which you'd really like
to be a compile-time error.
For example:
scala> "Hello" == 42
res0: Boolean = false
scala> Some(1) == 1
@d6y
d6y / moremonads.hs
Created July 20, 2017 06:36
Code from Functional Brighton 18 July 2017
import Data.Monoid
import Data.Ratio
import Control.Monad.Writer
import Control.Monad.Reader
import Control.Monad.State
-- Maybe is for values with an added context of failure
fruit :: Maybe String
fruit = Just "Apple"