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
############################# | |
## unsigned long | |
############################# | |
DELETE unsigned_long_test | |
PUT unsigned_long_test | |
{ | |
"mappings": { | |
"properties": { | |
"my_counter": { |
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
# Show the scoreboard in the contributor app | |
DELETE scoreboard | |
PUT scoreboard/_bulk?refresh | |
{"index":{}} | |
{ "score" : 1, "@timestamp" : "2021-02-28", "email":"peter@example.org", "name" : "Peter Parker"} | |
{"index":{}} | |
{ "score" : 4, "@timestamp" : "2021-02-01", "email":"peter@example.org", "name" : "Peter MiddleName Parker"} | |
{"index":{}} |
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
#!/bin/bash | |
# retrieve URL | |
url="https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Daten/Impfquotenmonitoring.xlsx?__blob=publicationFile" | |
wget -o /dev/null $url -O out.xlsx | |
# convert to csv | |
# run 'pip3 install xlsx2csv' (or maybe pip depending on your python installation) | |
xlsx2csv -a out.xlsx out.csv |
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
# date_range datatype | |
PUT range_index | |
{ | |
"mappings": { | |
"properties": { | |
"time_frame": { "type": "date_range" } | |
} | |
} | |
} |
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
################################### | |
## Introduction to Elasticsearch ## | |
################################### | |
######################### | |
## If you do not want to run Elasticsearch yourself | |
## Test a free 14 day trial at | |
## https://www.elastic.co/cloud/ | |
######################### |
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
DELETE back_in_stock_notifications | |
DELETE test | |
PUT test/_bulk?refresh | |
{ "index" : { "_id" : "1"}} | |
{ "id": "1", "title" : "T-Shirt", "size" : "XL", "color": "red", "stock" : 0 } | |
{ "index" : { "_id" : 2}} | |
{ "id": "2", "title" : "T-Shirt", "size" : "XL", "color": "green", "stock" : 1 } | |
{ "index" : { "_id" : 3}} | |
{ "id": "3", "title" : "T-Shirt", "size" : "XL", "color": "yellow", "stock" : 2 } |
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
crystal eval 'port = 8080 ; require "http/server"; server = HTTP::Server.new do |ctx| req = ctx.request; req.to_io STDOUT ; STDOUT.print "\n\n" if req.body end ; server.listen 8080' |
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
POST _ingest/pipeline/_simulate?filter_path=**.predicted_value | |
{ | |
"pipeline": { | |
"processors": [ | |
{ | |
"inference": { | |
"model_id": "lang_ident_model_1", | |
"inference_config": { "classification": {}}, | |
"field_mappings": {} | |
} |
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
package de.spinscale.cluster; | |
import io.undertow.Undertow; | |
import io.undertow.server.handlers.PathTemplateHandler; | |
import io.undertow.util.HttpString; | |
import io.undertow.util.PathTemplateMatch; | |
import org.jgroups.JChannel; | |
import org.jgroups.raft.RaftHandle; | |
import org.jgroups.raft.blocks.ReplicatedStateMachine; |
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
# curl -s http://stream.meetup.com/2/rsvps | ./bin/logstash -f logstash-meetup.conf | |
input { | |
stdin { | |
codec => json_lines | |
} | |
} | |
# the lonlat array is needed for the map widget in kibana to work | |
# so we have to work a bit around the supplied data | |
filter { |