I hereby claim:
- I am rjeli on github.
- I am rjeli (https://keybase.io/rjeli) on keybase.
- I have a public key ASAcHZq4pvBCkWtaLl7lzqxAF1Uz7Hgr3flGCQswvhDefAo
To claim this, I am signing this object:
profit :: [Int] -> Int | |
profit xs = f (head xs) 0 (tail xs) | |
where | |
f minVal maxDiff [] = maxDiff | |
f minVal maxDiff (x:xs) = f (min minVal x) (max maxDiff (x - minVal)) xs | |
-- O(n) time, O(1) memory |
// Set<Document> added | |
// Featurizer f | |
// sc::parallelize : List<T> -> JavaRDD<T> | |
Stream<Tuple2<Integer,Vector>> featurizedStream = added.stream() | |
.map(d -> new Tuple2(d.getId(), f.vector(d))); | |
JavaRDD<Tuple2<Integer,Vector>> featurized = | |
sc.parallelize(featurizedStream.collect(Collectors.toList())); |
package com.eli.testproject; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class Test { | |
public static void main(String[] args) { | |
List<Integer> nums = new ArrayList<>(); |
private class CountingLogger<T> implements Function<T, T> { | |
private int every; | |
private int count; | |
private Function<Integer,String> message; | |
public CountingLogger(int every, Function<Integer,String> message) { | |
this.every = every; | |
this.message = message; | |
this.count = 0; |
inputs = [ | |
'1 + 1', | |
'2 * 2', | |
'1 + 2 * 3', | |
'( 1 + 2 ) * 3' | |
] | |
def pemdas(s): | |
ops = { op: p for p, l in enumerate(['+-', '*/']) for op in l } | |
ostk = [] |
I hereby claim:
To claim this, I am signing this object:
KeypointNet https://keypointnet.github.io
R2P2 http://www.cs.cmu.edu/~nrhineha/R2P2.html
Fast and Furious http://openaccess.thecvf.com/content_cvpr_2018/papers/Luo_Fast_and_Furious_CVPR_2018_paper.pdf
Variational Discriminator Bottleneck https://xbpeng.github.io/projects/VDB/index.html
SfMLearner https://people.eecs.berkeley.edu/~tinghuiz/projects/SfMLearner/
// g++ -std=c++11 main.cpp -lpthread -o main && ./main | |
#include <iostream> | |
#include <thread> | |
#include <atomic> | |
#include <chrono> | |
class BackgroundTask { | |
public: | |
BackgroundTask() : done_(false), | |
worker_(&BackgroundTask::worker_main, this) {} |
#!/usr/bin/env python3 | |
import time | |
import evdev | |
from evdev import ecodes | |
SCROLL_FRAC = 0.1 | |
if __name__ == '__main__': | |
devs = [evdev.InputDevice(path) for path in evdev.list_devices()] | |
dev = None |
#!/usr/bin/env python3 | |
import z3 | |
import itertools | |
SIZE = 7 | |
top = [2, 7, 4, 3, 6, 4, 5] | |
side = [6, 5, 2, 5, 6, 1, 6] | |
blacks = [ | |
(0, 6), (1, 6), (2, 6), |