tl;dr
Add the role disabled_monitoring to your node. Run chef-client on the node.
| license: mit |
| def symmetrical_difference(arr1, arr2) | |
| arr = [] | |
| arr2.length.times do |index| | |
| arr << arr2[index] if arr1.include?(arr2[index]) && !arr.include?(arr2[index]) | |
| arr << arr1[index] if arr2.include?(arr1[index]) && !arr.include?(arr1[index]) | |
| end | |
| arr | |
| end |
| # maximum pairwise product | |
| # find the maximum product of two distinct numbers in a sequence of | |
| # non-negative integers | |
| # input: sequence of non-negative integers | |
| # output: maximum value that can be obtained by multiplying two different | |
| # elements from the sequence | |
| import random | |
| def maximum_pairwise_product(a): |
| def multiples?(first_number, second_number, limit) | |
| i = 1 | |
| multiples = [] | |
| while i < limit | |
| multiples << i if i % first_number == 0 || i % second_number == 0 | |
| i += 1 | |
| end | |
| # p "multiples of: #{number} - up to: #{limit}" | |
| multiples | |
| end |