Copyright (c) 2012-2018 RAILNOVA - All rights reserved
This exercise was originally written by Jeremie Stilmant.
2018 update by Titouan Christophe
| def distance [D] (p1: [D]f32) (p2: [D]f32): f32 = | |
| map2 (-) p1 p2 | |
| |> map (\x -> x*x) | |
| |> reduce (+) 0f32 | |
| |> (** 0.5) | |
| def nearest [D][N] (data_points: [N][D]f32) (query_point: [D]f32): f32 = | |
| map (distance query_point) data_points | |
| |> reduce f32.min f32.inf |
| #include <avro.h> | |
| #define OUTFILE "out.avro" | |
| #define OUTCODEC "null" | |
| #define SCHEMA \ | |
| "{\"type\":\"record\","\ | |
| " \"name\":\"Person\","\ | |
| " \"fields\":["\ | |
| " {\"name\": \"ID\", \"type\": \"long\"},"\ |
| /* Compile with: | |
| * gcc -std=c99 -Wall -Wextra -Werror $(pkg-config --cflags avro-c) -o test-avro test-avro.c $(pkg-config --libs avro-c) | |
| */ | |
| #include <avro.h> | |
| #define OUTFILE "out.avro" | |
| #define OUTCODEC "null" | |
| #define SCHEMA \ |
| output/build/buildroot-config/conf --help | |
| output/build/buildroot-config/conf: unrecognized option '--help' | |
| Usage: output/build/buildroot-config/conf [-s] [option] <kconfig-file> | |
| [option] is _one_ of the following: | |
| --listnewconfig List new options | |
| --oldaskconfig Start a new configuration using a line-oriented program | |
| --oldconfig Update a configuration using a provided .config as base | |
| --syncconfig Similar to oldconfig but generates configuration in | |
| include/{generated/,config/} | |
| --olddefconfig Same as oldconfig but sets new symbols to their default value |
| /dts-v1/; | |
| /memreserve/ 0x00000000081e4000 0x0000000000019000; | |
| / { | |
| serial-number = "526e84fcaa8e34b9"; | |
| compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399"; | |
| interrupt-parent = <0x1>; | |
| #address-cells = <0x2>; | |
| #size-cells = <0x2>; | |
| model = "Firefly roc-rk3399-pc"; |
| ################################################################################ | |
| # | |
| # gcc-arm-none-eabi | |
| # | |
| ################################################################################ | |
| config BR2_PACKAGE_HOST_GCC_ARM_NONE_EABI_SUPPORTS | |
| bool | |
| default y | |
| depends on BR2_HOSTARCH = "x86_64" |
| from buildbot.util import httpclientservice | |
| from buildbot.process.properties import Interpolate, Properties | |
| from buildbot.reporters.http import HttpStatusPushBase | |
| from buildbot.process.results import (CANCELLED, EXCEPTION, FAILURE, RETRY, | |
| SKIPPED, SUCCESS, WARNINGS) | |
| from twisted.internet import defer | |
| from urllib.parse import urlparse | |
| def format_timedelta(td): |
| fun convk1(kern: [x]f32, input: [x]f32): f32 = | |
| reduceComm (+) 0f32 (map (*) kern input) | |
| -- Futhark from a few weeks ago | |
| fun conv1d(kern: [m]f32, input: [n]f32): []f32 = | |
| map (fn i => convk1(kern, input[i:i+m])) | |
| (iota (1 + n - m)) | |
| -- Futhark ca9f992 | |
| fun conv1d(kern: [m]f32, input: [n]f32): []f32 = |