- Immutable
- Extensible
- Cover all of PostgreSQL's functionaliy
- Transpile SQL to Quirrel
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
import 'package:benchmark_harness/benchmark_harness.dart'; | |
import 'dart:math'; | |
void main() { | |
var keyFn = (n) { | |
var sum = n % 9; | |
if (sum == 0 && n > 0) sum = 9; | |
return sum; | |
}, | |
compFn = (n1, n2) => keyFn(n1).compareTo(keyFn(n2)); |
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 parseFloor = (str) => { | |
const floorCharFns = { | |
'(': n => n + 1, | |
')': n => n - 1 | |
}; | |
let floor = 0; | |
let error; | |
let firstBasementPos; | |
for (let i = 0; i < str.length; i++) { | |
const char = str[i]; |
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 calcPaper = (l, w, h) => { | |
const sides = [l * w, w * h, h * l]; | |
return Math.min(...sides) + sides.reduce((n, v) => n + 2 * v, 0); | |
}; | |
const calcRibbon = (...dimensions) => { | |
const max = Math.max(...dimensions); | |
return 2 * dimensions.filter(n => n !== max).reduce((n, v) => n + v, 0) + | |
dimensions.reduce((n, v) => n * v, 1); | |
} |
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 parseSantaRoute = (str, roboMode = false) => { | |
const charFns = { | |
'^': (x, y) => [x , y + 1], | |
'v': (x, y) => [x , y - 1], | |
'>': (x, y) => [x + 1, y ], | |
'<': (x, y) => [x - 1, y ] | |
}; | |
let error; | |
let position = [0, 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
import MD5 from 'crypto-js/md5'; | |
const findNumberForPrefixedMD5 = (str, prefix = '00000') => { | |
let i = 0; | |
let hash; | |
do { | |
i += 1; | |
hash = MD5(str + i).toString(); | |
} while (!hash.startsWith(prefix)); | |
return i; |
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
class User extends Record { | |
static fields = { | |
name: 'string', | |
email: ['string', ['lowercase', 'trim']], | |
posts: [Post] | |
}; | |
} |
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
""" | |
Implement the SpaceApi (<https://github.com/SpaceApi/SpaceApi>) | |
for Chaos Darmstadt (<https://www.chaos-darmstadt.de/>). | |
""" | |
import falcon | |
import os | |
import json | |
import time |
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
''' | |
Implement the SpaceApi (<https://github.com/SpaceApi/SpaceApi>) | |
for Chaos Darmstadt (<https://www.chaos-darmstadt.de/>). | |
''' | |
import os | |
import json | |
import time | |
from flask import Flask, Response, request | |
from jsonschema import validate |
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 239 | |
2 141 | |
3 118 | |
4 85 | |
5 3575 | |
6 46 | |
7 34 | |
8 37 | |
9 37 | |
10 1280 |
OlderNewer