Skip to content

Instantly share code, notes, and snippets.

View amaunz's full-sized avatar

Andreas Maunz amaunz

View GitHub Profile
@amaunz
amaunz / TUM Clustering: Instantiation and Querying
Created July 28, 2011 14:43
TUM Clustering: Instantiation and Querying
require 'rubygems'
require 'opentox-ruby'
# Parameters
dataset_uri = "http://x61s.fdm.uni-freiburg.de/dataset/682"
threshold = 0.8
threshold_query = 0.5
cluster_service_uri = "http://opentox-dev.informatik.tu-muenchen.de:8080/OpenTox/algorithm/StructuralClustering"
query_compound = OpenTox::Compound.from_smiles("O1COc2cc(ccc12)C")
@amaunz
amaunz / xls2csv.sh
Created July 2, 2012 12:35
Convert XLS to CSV
# Generate a csv from xls using ruby with a HERE document
# uses ruby's 'roo' gem
# Creates output for every sheet separately
# Usage: xls2csv </path/to/xlsfile.xls>
xls2csv () {
if [ ! -f $1 ]; then
echo "File '$1' not found."
exit 1
fi