Skip to content

Instantly share code, notes, and snippets.

>> (A*P)'*(A*P)
ans =
1.8889 1.1881 1.4033 1.9244 1.5923 1.8274
1.1881 1.2118 1.5635 1.8397 1.3853 1.1210
1.4033 1.5635 2.2357 2.4439 1.8408 1.3483
1.9244 1.8397 2.4439 3.5828 2.0221 2.1862
1.5923 1.3853 1.8408 2.0221 2.0355 1.4963
1.8274 1.1210 1.3483 2.1862 1.4963 1.9846
@stephentu
stephentu / stacktrace.txt
Created January 6, 2016 00:05
stacktrace.txt
sltu@c77:/scratch/stephentu/keystone(master)$ OMP_NUM_THREADS=1 KEYSTONE_MEM=200g time ./bin/run-pipeline.sh pipelines.images.cifar.RandomP
atchCifarFeaturizer --trainLocation ./cifar_train.bin --testLocation ./cifar_test.bin --numFilters 1024 --trainOutfile /mnt/sda/stephentu/c
ifar_train_featurized_augmented --testOutfile /mnt/sda/stephentu/cifar_test_featurized_augmented
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/scratch/stephentu/keystone/target/scala-2.10/keystoneml-assembly-0.3.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/scratch/stephentu/spark-1.3.1-bin-cdh4/lib/spark-assembly-1.3.1-hadoop2.0.0-mr1-cdh4.2.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
convolver.resWidth 27 convolver.resHeight 27
stephentu@peavey:~$ mkdir tester
stephentu@peavey:~$ cd tester
stephentu@peavey:~/tester$ git init
Initialized empty Git repository in /Users/stephentu/tester/.git/
stephentu@peavey:~/tester(master)$ touch foo.c
stephentu@peavey:~/tester(master)$ git add foo.c
stephentu@peavey:~/tester(master)$ git commit -m 'first commit'
[master (root-commit) 3e51a35] first commit
0 files changed
create mode 100644 foo.c
import numpy as np
import itertools as it
def normalize(x):
return x / np.sum(x)
def normalizerow(x):
return (x.T / np.sum(x, axis=1)).T
def normalizecol(x):
import java.net.URI;
import java.net.URISyntaxException;
import org.java_websocket.WebSocketImpl;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
public class TestWS {
val d = DateFormat.getDateInstance(DateFormat.SHORT).parse("11/20/1988")
val c = Calendar.getInstance
c.setTime(d)
c.add(Calendar.MONTH, 5)
val d1 = c.getTime()
d1.toString()
res8: java.lang.String = Thu Apr 20 00:00:00 PDT 1989
/*
PC Emulator
Copyright (c) 2011 Fabrice Bellard
Redistribution or commercial use is prohibited without the author's
permission.
*/
"use strict";
var aa;
diff --git a/src/jpdr/server/support/DatastoreEnvironment.java b/src/jpdr/server/support/DatastoreEnvironment.java
index 425fa30..7bb4ddb 100644
--- a/src/jpdr/server/support/DatastoreEnvironment.java
+++ b/src/jpdr/server/support/DatastoreEnvironment.java
@@ -16,8 +16,9 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
-import java.nio.file.FileAlreadyExistsException;
-import java.nio.file.Path;
#include "algebra3.h"
#include <iostream>
#include <cmath>
using namespace std;
static inline bool refract(const vec3& N, const vec3& I, const double n1, const double n2, vec3& result) {
double n = n1 / n2;
double cosI = -(N * I);
double sinT2 = n * n * ( 1.0 - cosI * cosI );
ENTITY book_lines
{
int book_line_id,
string line,
int source,
int linenum,
int created_at,
int updated_at
PRIMARY(linenum, source)
}