First we need to create a certificate. The llvm provided a way to do
that, but I found this
way to work slightly better for me. Just substitute
lldb_codesign
for the certificate name, instead of gdb-cert
.
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
SELECT SUM(CASE WHEN nb_classify(sepal_length, | |
sepal_width, | |
petal_length, | |
petal_width) = class THEN 1 ELSE 0 END) AS nb_correct, | |
SUM(CASE WHEN knn_classify(sepal_length, | |
sepal_width, | |
petal_length, | |
petal_width) = class THEN 1 ELSE 0 END) AS knn_correct, | |
COUNT(*) AS total | |
FROM iris; |
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
CREATE TABLE iris ( | |
sepal_length FLOAT NOT NULL, | |
sepal_width FLOAT NOT NULL, | |
petal_length FLOAT NOT NULL, | |
petal_width FLOAT NOT NULL, | |
class VARCHAR(20) NOT NULL | |
); |
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
public String classify(double sepal_length, Double sepal_width, double petal_length, Double petal_width) { | |
if (knnc == null) { | |
throw new RuntimeException("Please run the IrisKNNClassifier procedure first to train the model."); | |
} | |
// Assemble the attributes together. | |
DenseInstance dataRow = new DenseInstance(attributeCount); | |
dataRow.put(0, sepal_length); | |
dataRow.put(1, sepal_width); | |
dataRow.put(2, petal_length); | |
dataRow.put(3, petal_width); |
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
public class IrisKNNClassifier extends VoltProcedure { | |
// The query to extract the data from a VoltDB table. | |
public final SQLStmt selectData = | |
new SQLStmt("SELECT sepal_length, sepal_width, petal_length, petal_width, class FROM iris;"); | |
// Number of attributes. | |
private static final int attributeCount = 4; | |
private static Classifier knnc; | |
// The train method (Java stored procedure). | |
public long run() { |
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
scp yzhang@linux04.cs.uh.edu:~/packages/scidb-15.7.0.9267.tgz ./ | |
tar -xzf scidb-15.7.0.9267.tgz | |
mv scidb-15.7.0.9267/ scidbtrunk | |
sudo apt-get update | |
sudo apt-get -y install subversion expect openssh-server openssh-client | |
# The following environment variables should go into ~/.bashrc | |
export SCIDB_VER="15.7" | |
export SCIDB_SOURCE_PATH="/home/scidb/scidbtrunk" |
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
sudo apt-get install -y lib64z1-dev autoconf automake libtool libssl-dev findbugs | |
findbugs: http://findbugs.sourceforge.net/downloads.html | |
I found this may be useful: https://frankfzw.wordpress.com/2015/01/22/install-hadoop-2-6-0-on-ubuntu-server-14-04/ | |
http://www.bogotobogo.com/Hadoop/BigData_hadoop_Install_on_ubuntu_single_node_cluster.php | |
apt-get update | |
apt-get install default-jdk | |
addgroup hadoop |
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
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null |