Skip to content

Instantly share code, notes, and snippets.

View philipdexter's full-sized avatar

Philip Dexter philipdexter

View GitHub Profile
Compiling smallvec v1.2.0
Compiling quick-error v1.2.3
Compiling termcolor v1.1.0
Compiling dtoa v0.4.5
error[E0658]: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)
--> /home/philip/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:35:1
|
35 | pub extern crate alloc;
| ^^^^^^^^^^^^^^^^^^^^^^^
[WARN] Running against a source checkout. In order to get our runtime dependencies we'll have to invoke Maven. Depending on the state of your system, this may take ~30-45 seconds
[DEBUG] Running 'mvn -pl com.yahoo.ycsb:consul-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
/usr/lib/jvm/java-1.8-openjdk/bin/java -Xmx5g -cp /ycsb/consul/conf:/ycsb/consul/target/consul-binding-0.15.0.jar:/root/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.4/HdrHistogram-2.1.4.jar:/root/.m2/repository/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar:/root/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.4/jackson-databind-2.9.4.jar:/root/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/root/.m2/repository/com/squareup/retrofit2/conve
[WARN] Running against a source checkout. In order to get our runtime dependencies we'll have to invoke Maven. Depending on the state of your system, this may take ~30-45 seconds
[DEBUG] Running 'mvn -pl com.yahoo.ycsb:consul-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
/usr/lib/jvm/java-1.8-openjdk/bin/java -Xmx5g -cp /ycsb/consul/conf:/ycsb/consul/target/consul-binding-0.15.0.jar:/root/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.4/HdrHistogram-2.1.4.jar:/root/.m2/repository/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar:/root/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.4/jackson-databind-2.9.4.jar:/root/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/root/.m2/repository/com/squareup/retrofit2/conve
xs = [1,2,3]
ys = ["hi", "there", "pal"]
def z():
return zip(xs, ys)
for x, ys in z():
print(x, ys)
for x, ys in z():
import file
import regex
# hi yeah this
# does ...
#
# this other thing
# and here's a [link](http://fsf.org)
let doit = func(a, b) -> a + b
from itertools import takewhile, tee
def qs_aux(a):
try:
p = next(a)
except Exception as e:
pass
else:
a1, a2 = tee(a)
lt = filter(lambda x: x <= p, a1)
import numpy as np
from itertools import takewhile
def gen_sort(a):
while not a == []:
y = min(a)
a.remove(y)
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEglhcet3QcfWqcdBsH71UZ4WFj03Hq+LhPRUTxAkMRCSkKp3BheWxvYWTFAvR7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTIwOTYxNzFlYjc3NDFjN2Q2YTljNzQxYjA3ZWY1NTE5ZTE2MTYzZDM3MWVhZjhiODRmNDU0NGYxMDI0MzExMDkyOTBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwOTYxNzFlYjc3NDFjN2Q2YTljNzQxYjA3ZWY1NTE5ZTE2MTYzZDM3MWVhZjhiODRmNDU0NGYxMDI0MzExMDkyOTBhIiwidWlkIjoiMjJjZjIwYzQ0YjA3NWQ0YWE1M2I4MjY2OGYzNTczMTkiLCJ1c2VybmFtZSI6InBoaWxpcGRleHRlciJ9LCJzZXJ2aWNlIjp7Im5hbWUiOiJnaXRodWIiLCJ1c2VybmFtZSI6InBoaWxpcGRleHRlciJ9LCJ0eXBlIjoid2ViX3NlcnZpY2VfYmluZGluZyIsInZlcnNpb24iOjF9LCJjbGllbnQiOnsibmFtZSI6ImtleWJhc2UuaW8gZ28gY2xpZW50IiwidmVyc2lvbiI6IjEuMC4xNyJ9LCJjdGltZSI6MTQ3MTUwODM3MSwiZXhwaXJlX2luIjo1MDQ1NzYwMDAsIm1lcmtsZV9yb290Ijp7ImN0aW1lIjoxNDcxNTA4MzQ5LCJoYXNoIjoiNjgyYmZlYTk2Y2Y3ZjliMmMxMThhN2QxMmQxYzdiMjgzMmUxNmFmZmFhOTg3ZDc0NDZmODcxOGYyN2E0MDUyZjA0NzNmOGYwMjI2YzgyMzlkYjEzMWExZDI1YzgwOThhMmY3OTMyNTQ5N2ZkZjRmMjYzMWM4OGE0NzFiZGE1Y2UiLCJzZXFubyI6NTg3MDU1fSwicHJldiI6IjVlYzc5NjkzYmJjODRjYmQwMzI2MmUzMzM1
package lab04;
import static org.junit.Assert.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import org.junit.Test;
import org.junit.Before;
from functools import partial
# fix f = f (fix f)
def fix(f):
yield partial(f, fix(f))
# anonymous recursion
# i want to write the function like this:
# fact = fix(lambda f, n: 1 if n == 0 else n * f(n - 1))
# but since python sucks it has to be written like this: