I hereby claim:
- I am nukemberg on github.
- I am nukemberg (https://keybase.io/nukemberg) on keybase.
- I have a public key ASBTwRI1eKp5afEkzz0_rQCxL_D53ItY-6hBNKNDRExF9go
To claim this, I am signing this object:
import boto3 | |
from datetime import datetime | |
from dateutil.relativedelta import relativedelta | |
import numpy as np | |
def get_table_metrics(cloudwatch_client, table_name, start_time, end_time): | |
response = cloudwatch_client.get_metric_data( | |
MetricDataQueries=[ | |
{ | |
'Id': 'dynamoDBWCU', |
I hereby claim:
To claim this, I am signing this object:
Dynamic mapping templates have been defined for various field usage. Select the correct mapping for your field by prepending the specified prefix.
Example: a field named text_message
will by mapped as an analyzed string field, a field named ni_request_tag
will not be indexed.
The default mapping template for string fields is keyword
.
In many cases you might want to modify the prefixes to match the current naming scheme in your code. e.g. I frequently change ID_*
to *Id
to accomodate field names like requestId
. In typed languages like Java/Scala you could have the serializer emit fields with appropriate prefixes for you.
#!/usr/bin/env python3 | |
from gmusicapi.clients import Mobileclient | |
import click | |
import requests | |
import re | |
from itertools import tee, filterfalse | |
from pprint import pprint | |
from concurrent.futures import ThreadPoolExecutor |
(ns conway.core | |
(:require [clojure.set :refer [intersection]])) | |
(defn neighbours [[x y]] | |
(for [i [-1 0 1] j [-1 0 1] :when (not= i j 0)] | |
[(x + i) (y + j)])) | |
(defn alive-next-gen [board cell] | |
(let [alive-neighbours (intersection board (neighbours cell)) |
<% if @ec2_instance_id -%> | |
🍻 This is a [01;34m<%= scope.lookupvar("ec2_instance_type") %>[0m, an EC2 [01;31m<%= scope.lookupvar("virtual") %>[0;0m server managed by Puppet. | |
<% else -%> | |
🍻 This is a [01;34m <%= scope.lookupvar("manufacturer") %> <%= scope.lookupvar("productname") %>[0m server, a [01;31m <%= scope.lookupvar("virtual") %>[0;0m server managed by Puppet. | |
<% end -%> | |
[01;35mHostname...:[01;36m <%= scope.lookupvar("fqdn") %>[0m | |
[01;35mEnvironment:[05;92m <%= scope.lookupvar("environment") %>[0m | |
[01;35mRole.......:[05;92m <%= scope.lookupvar("role") %>[0m | |
<% if @ec2_security_groups -%>[01;35mSecurityGrp:[01;36m <%= scope.lookupvar("ec2_security_groups") %>[0m<% end %> |
{ | |
"template": "inventory", | |
"mappings": { | |
"host": { | |
"_source": { | |
"enabled": true, | |
"excludes" : ["network.interfaces.*.arp", "kernel.pnp_drivers", "kernel.modules"] | |
}, | |
"dynamic_templates": [ | |
{ |
{ | |
"template" : "puppet-*", | |
"mappings" : { | |
"puppet_report" : { | |
"_source": {"enabled": true}, | |
"dynamic_date_formats": ["yyyy-MM-dd HH:mm:ss.SSSSSS ZZ"], | |
"properties" : { | |
"configuration_version" : { | |
"type" : "string", | |
"index": "not_analyzed" |
BLUE="34;1m" | |
ORANGE="33m" | |
GREEN="32m" | |
RED="31m" | |
ROOT_COLOR="31;4m" | |
ENV_COLOR="$GREEN" # set from puppet or chef, should be RED for prod | |
function _colorify() { | |
echo -en "\[\e[$1\]$2\[\e[0m\]" | |
} |
unless node["lsb"]["codename"] | |
execute "apt-get-update-lsb" do | |
command "apt-get update" | |
action :nothing | |
# tip: to suppress this running every time, just use the apt cookbook | |
not_if do | |
::File.exists?('/var/lib/apt/periodic/update-success-stamp') && | |
::File.mtime('/var/lib/apt/periodic/update-success-stamp') > Time.now - 86400*2 | |
end | |
end.run_action(:run) |