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 BlobHelper { | |
public static Object toObject(byte[] bytes) { | |
Object object = null; | |
try { | |
object = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(bytes)).readObject(); | |
} catch (java.io.IOException ioe) { | |
} catch (java.lang.ClassNotFoundException cnfe) { | |
} | |
return object; |
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
# Useful cURL commands: | |
# Train MLR | |
curl -X POST -H Accept:text/uri-list -H "Authorization: AQIC5wM2LY4Sfcxd8hvn9mLDaUHiBSUkQnIyrKCdUlsNxKo=@AAJTSQACMDE=#" -d dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/6 -d prediction_feature=http://apps.ideaconsult.net:8080/ambit2/feature/20154 localhost:3000/algorithm/mlr | |
# PLS Filter | |
curl -X POST -H "Authorization: AQIC5wM2LY4Sfcxd8hvn9mLDaUHiBSUkQnIyrKCdUlsNxKo=@AAJTSQACMDE=#" -H Accept:text/uri-list -d dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/54 -d target=http://apps.ideaconsult.net:8080/ambit2/feature/22201 -d numComponents=2 localhost:3000/algorithm/plsFilter |
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
$ curl -X POST -H "Authorization: AQIC5wM2LY4SfcwddzcQ32/ljZvewpZSVku8ZBRJGvFUnPM=@AAJTSQACMDE=#" \ | |
--data-binary @/home/chung/Desktop/test.bib -H Content-type:text/plain -H Accept:text/uri-list localhost:3000/bibtex -v | |
* About to connect() to localhost port 3000 (#0) | |
* Trying ::1... connected | |
* Connected to localhost (::1) port 3000 (#0) | |
> POST /bibtex HTTP/1.1 | |
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 | |
> Host: localhost:3000 | |
> Authorization: AQIC5wM2LY4SfcwddzcQ32/ljZvewpZSVku8ZBRJGvFUnPM=@AAJTSQACMDE=# | |
> Content-type:text/plain |
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
$ curl -X GET -H Accept:text/uri-list localhost:3000/bibtex -v | |
* About to connect() to localhost port 3000 (#0) | |
* Trying ::1... connected | |
* Connected to localhost (::1) port 3000 (#0) | |
> GET /bibtex HTTP/1.1 | |
> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 | |
> Host: localhost:3000 | |
> Accept:text/uri-list | |
> | |
< HTTP/1.1 200 The request has succeeded |
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
#Run from within the folder JAQPOT_HOME so that the config file is found under $JAQPOT_HOME/config | |
/usr/lib/jvm/java-6-sun-1.6.0.22/jre/bin/java -jar "/home/chung/NetBeansProjects/JAQP-OT/dist/JAQP-OT.jar" |
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
/* | |
* | |
* Jaqpot - version 3 | |
* | |
* The JAQPOT-3 web services are OpenTox API-1.2 compliant web services. Jaqpot | |
* is a web application that supports model training and data preprocessing algorithms | |
* such as multiple linear regression, support vector machines, neural networks | |
* (an in-house implementation based on an efficient algorithm), an implementation | |
* of the leverage algorithm for domain of applicability estimation and various | |
* data preprocessing algorithms like PLS and data cleanup. |
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
<html> | |
<head> | |
<script language="javascript"> | |
function click(e) { | |
if (navigator.appName == 'Netscape' && e.which == 3) { | |
alert("no right click please") | |
return false; | |
} | |
else { | |
if (navigator.appName == 'Microsoft Internet Explorer' |
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
# Allow lowercase and uppercase digits and numbers and the underscore | |
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c5; | |
echo ''; | |
# Allow more symbols: | |
< /dev/urandom tr -dc _A-Z-a-z-0-9#.*$%^* | head -c10; | |
echo ''; | |
# And even more... | |
< /dev/urandom tr -dc _A-Z-a-z-0-9#.*$%^*,+=-?/ | head -c10; |
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
// Header of this file: | |
#include "dataloader.h" | |
int load_vector_data(const char* filename, zvect* vector, int* length) { | |
*length = 0; | |
*vector = (zvect) malloc(sizeof (zreal) * ALLOCATION_CHUNK); | |
if (*vector == 0) return OUT_OF_MEM; | |
int allocated_rows = ALLOCATION_CHUNK; | |
u_short i = 0; | |
FILE* fr = fopen(filename, "r"); |
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
function [L, J, NJ, D, x] = regsol(A,b) | |
%REGSOL returns the regularized Cholesky factorization of a given | |
%n-by-n symmetric and positive semi-defnite matrix A given a vector b, i.e. | |
%points out to a regularized solution of the system Ax=b. | |
% | |
%Syntax: | |
% [L, J, NJ, x, D] = regsol(A,b) | |
% | |
%Input arguments: | |
%A,b : A positive semidefinite matrix and a vector, of compatible |
OlderNewer