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
NVIDIA drivers: | |
<xy>net@train-k80:~/kaggle$ cat /proc/driver/nvidia/version | |
NVRM version: NVIDIA UNIX x86_64 Kernel Module 346.59 Tue Mar 31 14:10:31 PDT 2015 | |
GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) | |
Theano: | |
<xy>net@train-k80:~/kaggle$ python -c 'import theano; print theano.__version__' | |
Using gpu device 0: Tesla K80 | |
0.7.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
alignedTypes good | |
asyncAPI good | |
bandwidthTest good | |
batchCUBLAS good | |
binomialOptions good | |
binomialOptions_nvrtc good | |
BlackScholes good | |
BlackScholes_nvrtc good | |
boxFilterNPP good | |
cdpAdvancedQuicksort good |
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
https://www.youtube.com/watch?v=GquJWqNvEPw | |
Why does the 3rd world need longer to catch up? | |
- widespread internet use | |
- great democratisation of education taking place in the 3rd world (MOOC) | |
- 35$ notebook, down to 10$ within 2 years | |
- 3d printing of clothing | |
- educational system must change -> prices of higher education are way too high. industry must be transformed and equalised. | |
- cultures must adept as well |
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 fs = require('fs'); | |
const head = ([x, ...t]) => x; | |
const tail = ([x, ...t]) => t; | |
const compose = (f, ...rest) => (x) => | |
rest.length === 1 | |
? head(rest)(f(x)) | |
: compose(head(rest), ...tail(rest))(f(x)); |
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 IO extends Monad { | |
constructor(fn) { | |
super(); | |
this.__value = fn; | |
} | |
static of(fn) { | |
const io = new IO(() => fn); | |
Object.freeze(io); | |
return io; |
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
/* | |
* examples - code for matchC is below | |
* to test: copy&paste into http://ramdajs.com/repl | |
*/ | |
function main() { | |
// its all good if all output lines have true in first tuple ;-) | |
const m1 = matchC('Hello') | |
.when('string', a => [true, a.toUpperCase()]) | |
.when('number', a => [false, a]) |
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
//take((e, a) => e+a*a, when(isEven, xs), when(isOdd, ys)) | |
//take((e, a) => e+a*a, [when(isEven, xs), ys]) | |
const R = require('ramda'); | |
// not lazy | |
const flatxprod = (x, y) => R.map(R.flatten, R.xprod(x, y)); | |
function * nprod(...args) { | |
function * rec(accum, xs) { |
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 tailRec = (f) => (a) => { | |
let v = f(a) | |
while (!v.done) { | |
v = f(v.value) | |
} | |
return v.value | |
} | |
const done = (v) => ({ value: v, done: true }) | |
const next = (v) => ({ value: v, done: false }) |
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
/* | |
* According to the applicative functor laws, any applicative functor F must satisfy the composition law: | |
* | |
* pure (.) <*> F (+ 2) <*> F (* 2) | |
* === | |
* F (+ 2) <*> (F (* 2) <*> F 3) | |
* | |
* Let's see how we can show this with two Applicative Functors. Data.Task from folktale and Fluture. | |
* Data.Task implements the pre v1.0 spec of fantasy-land, while Fluture is up to date. | |
* |
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 Task = require('data.task'); | |
const { Reader, Maybe } = require('ramda-fantasy'); | |
const ReaderTask = Reader.T(Task); | |
const R = require('ramda'); | |
const express = require('express'); | |
const app = express(); | |
const MOCK_DB = { | |
5 : { |
OlderNewer