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
@dacamo76
dacamo76 / README.md
Last active Aug 29, 2015
SequenceIQ Ambari Docker
View README.md

Updated script from SequenceIQ Ambari

curl -Lo .amb https://gist.githubusercontent.com/dacamo76/31a0227c13cd0eb50cee/raw/6498457aa85d8d75d201187482c52297cbc25b9e/docker-ambari && . .amb && amb-deploy-cluster
@dacamo76
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
dacamo76 / git-update.sh
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.
View git-update.sh
#!/usr/bin/env bash
prefix=~/opt
function compile {
make clean
make prefix=${prefix}
make prefix=${prefix} install
}
@dacamo76
dacamo76 / README.md
Last active Sep 26, 2017
Installing scikit-learn on Amazon Linux AMI on EC2
View README.md

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.

@dacamo76
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
dacamo76 / s3get.py
Created Dec 7, 2012
Get keys recursively from S3
View s3get.py
#!/usr/bin/env python
import boto
import os
import sys
bucket_name = str(sys.argv[1])
dirname = str(sys.argv[2])
def files(keys):
@dacamo76
dacamo76 / ant-simulator-modules.lisp
Created Mar 27, 2012
Jess wiki ant simulator using modules
View ant-simulator-modules.lisp
;; Module Ant Simulator
;; Modified slightly by Daniel Alberto Cañas
;; Based on Salient Ant Simulator
;; by Jason Morris
;; found at http://www.jessrules.com/jesswiki/view?SalientAntSimulator
(clear)
;; An ant's priorities in order of importance
;; Threat (Enemy attacking)
@dacamo76
dacamo76 / free
Created Oct 28, 2011
mongodb output
View free
$ free -ltm
total used free shared buffers cached
Mem: 7935 7879 56 0 20 7021
Low: 7935 7879 56
High: 0 0 0
-/+ buffers/cache: 837 7097
Swap: 8126 0 8126
Total: 16062 7879 8182
@dacamo76
dacamo76 / iostat
Created Oct 28, 2011
mongodb output
View iostat
connected to: 127.0.0.1
insert query update delete getmore command flushes mapped vsize res faults locked % idx miss % qr|qw ar|aw netIn netOut conn time
11 64 0 0 8 189 0 13.9g 28.1g 190m 101 10.7 0 0|0 1|0 58k 105k 4 12:03:51
10 64 0 0 4 195 0 13.9g 28.1g 202m 86 5 0 0|0 1|0 58k 230k 4 12:03:52
13 78 0 0 4 234 0 13.9g 28.1g 205m 93 9.1 0 0|0 1|0 71k 119k 4 12:03:53
6 38 0 0 4 114 0 13.9g 28.1g 208m 112 4.2 0 0|0 1|0 34k 62k 4 12:03:54
10 66 0 0 4 188 0 13.9g 28.1g 210m 98 8.6 0 0|0 0|0 57k 87k 4 12:03:55
9 51 0 0 4 161 0 13.9g 28.1g 212m 98 10.2 0
@dacamo76
dacamo76 / DataRowFactory2.java
Last active Jul 8, 2017
Working example how to create an ExampleSet in RapidMiner 5.1
View DataRowFactory2.java
package com.dacamo76.librapidminer;
import com.rapidminer.example.Attribute;
import com.rapidminer.example.table.DataRow;
import com.rapidminer.example.table.DataRowFactory;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Iterables.toArray;
public abstract class DataRowFactory2 {
You can’t perform that action at this time.