- euclidean distance
- pearson correlation coefficient
- wighted mean
- tanimoto coeficient
- conditional probability
- gini impurity
- entropy
- gaussian function
- variance
- dot products
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
# ansible-playbook -i 'localhost,' --connection=local -K ./whoami.yml | |
- name: Show return value of command | |
hosts: all | |
gather_facts: true | |
become: false | |
tasks: | |
- name: "capture output of id command" | |
command: id -un | |
register: login | |
- debug: msg= "Logged in as user {{ login.stdout }}" |
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
# http://bit.ly/2xf8pEv | |
def meditate(cushion, meditation = 'kinhin', *room_itens, time: , posture: 'kekkafuza', **periods, &block) | |
puts "=====================================" | |
puts "We are praticing #{meditation}, for #{time} minutes, in the #{posture} posture (ouch, my knees!)." | |
puts "Room item: #{room_itens}" | |
puts "Periods: #{periods}" | |
puts "=====================================" | |
block.call | |
end |
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
'use strict'; | |
console.log('Loading function'); | |
exports.handler = (event, context, callback) => { callback(null, event); }; |
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
#!/usr/bin/env ruby | |
# http://ruby-doc.org/stdlib-2.0.0/libdoc/English/rdoc/English.html | |
require 'English' | |
require 'rubocop' | |
ADDED_OR_MODIFIED = /^\s*(A|AM|M)\s*/ | |
GIT_COMMAND = "git status --porcelain".freeze | |
modified_files = `#{GIT_COMMAND}`.split(/\n/) |
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
/// ANSI C | |
int morse() { | |
int o = 10; | |
return --o-o--; | |
} |
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
SELECT country.continent, floor(avg(city.population)) | |
FROM country country | |
INNER JOIN city city ON city.countrycode = country.code | |
GROUP BY country.continent |
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
require 'savon' # savon 2.11 | |
WEB_MOTORS_WSDL = 'http://www.webmotors.com.br/integracaoRevendedor/wsEstoqueRevendedorWebMotors.asmx' | |
client = Savon.client do | |
wsdl WEB_MOTORS_WSDL | |
end | |
client.operations | |
# => [:autenticar] |
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 |