Skip to content

Instantly share code, notes, and snippets.

Daniel Alberto Cañas dacamo76

Block or report user

Report or block dacamo76

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
AttributeRepresentation rep = new JSONAttributeRepresentation(Reader jsonReader);
List<Attributes> attributes = rep.newAttributeList();
Map<Attribute, String> roles = new HashMap<Attribute, String>();
Attribute id = attributes.get(0);
roles.put(id, Attributes.ID_NAME);
final class JSONAttributeRepresentation implements AttributeRepresentation {
private final List<Attribute> attributes;
public JSONAttributeRepresentation(Reader JSONReader) {
// Read in json however you want
// Get name, type, and role for each
// for each create attribute with the name and type
// Attribute att = AttributeFactory.createAttribute(name, type)
// atributes.add(att);
interface AttributeRepresentation {
List<Attribute> newAttributeList();
dacamo76 / attributes.json
Last active Oct 28, 2019
RapidMiner Attributes snippet
View attributes.json
"teamID": {
"type": "nominal",
"role": "id"
"size": {
"type": "integer"
dacamo76 /
Last active Aug 29, 2015
SequenceIQ Ambari Docker

Updated script from SequenceIQ Ambari

curl -Lo .amb && . .amb && amb-deploy-cluster
dacamo76 / merge.clj
Last active Aug 29, 2015
merge sort in Clojure
View merge.clj
(ns sort.merge)
(defn combine
"Combines sorted collections c1 and c2"
[c1 c2]
(loop [a c1 b c2 sorted []]
(if (some empty? [a b])
(concat sorted a b)
(if (<= (first a) (first b))
(recur (rest a) b (conj sorted (first a)))
dacamo76 /
Created Dec 13, 2013
Updates Git. Always stay on master branch. Install Git from source. Clone git/git repository from GitHub. Install Git from cloned repo. Remove old version of Git.
#!/usr/bin/env bash
function compile {
make clean
make prefix=${prefix}
make prefix=${prefix} install
dacamo76 /
Last active Sep 26, 2017
Installing scikit-learn on Amazon Linux AMI on EC2

To install scikit-learn easily run the following command.

curl | sh

Please look over the shell file being run to make sure no evil is done to your machine.

dacamo76 / Gemfile
Last active Dec 12, 2015 — forked from wjlroe/Gemfile
Example running webmachine-ruby on Heroku
View Gemfile
source :rubygems
gem 'webmachine'
gem 'unicorn'
dacamo76 /
Created Dec 7, 2012
Get keys recursively from S3
#!/usr/bin/env python
import boto
import os
import sys
bucket_name = str(sys.argv[1])
dirname = str(sys.argv[2])
def files(keys):
You can’t perform that action at this time.