Updated script from SequenceIQ Ambari
curl -Lo .amb https://gist.githubusercontent.com/dacamo76/31a0227c13cd0eb50cee/raw/6498457aa85d8d75d201187482c52297cbc25b9e/docker-ambari && . .amb && amb-deploy-cluster
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(); | |
} |
[ | |
{ | |
"teamID": { | |
"type": "nominal", | |
"role": "id" | |
} | |
}, | |
{ | |
"size": { | |
"type": "integer" |
Updated script from SequenceIQ Ambari
curl -Lo .amb https://gist.githubusercontent.com/dacamo76/31a0227c13cd0eb50cee/raw/6498457aa85d8d75d201187482c52297cbc25b9e/docker-ambari && . .amb && amb-deploy-cluster
(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))) |
#!/usr/bin/env bash | |
prefix=~/opt | |
function compile { | |
make clean | |
make prefix=${prefix} | |
make prefix=${prefix} install | |
} |
To install scikit-learn easily run the following command.
curl https://gist.githubusercontent.com/dacamo76/4780765/raw/c3779996d8f6b13caaaa48d33aa1585684c7f8e6/scikit-learn-install.sh | sh
Please look over the shell file being run to make sure no evil is done to your machine.
source :rubygems | |
gem 'webmachine' | |
gem 'unicorn' |
#!/usr/bin/env python | |
import boto | |
import os | |
import sys | |
bucket_name = str(sys.argv[1]) | |
dirname = str(sys.argv[2]) | |
def files(keys): |