This file contains hidden or 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
| PUT programs | |
| { | |
| "mappings": { | |
| "properties": { | |
| "visit_times" : { | |
| "type" : "date", | |
| "null_value" : "0" | |
| } | |
| } | |
| } |
This file contains hidden or 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
| GET kibana_sample_data_ecommerce/_search | |
| { | |
| "size": 0, | |
| "aggs": { | |
| "user": { | |
| "composite": { | |
| "sources": [ | |
| { | |
| "user": { | |
| "terms": { |
This file contains hidden or 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
| from typing import List | |
| def add_if_exists(d: dict, k: str, v) -> dict: | |
| """ | |
| :param v: | |
| :param k: | |
| :type d: object | |
| """ | |
| if v is not None: |
This file contains hidden or 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
| "processors": [ | |
| { | |
| { | |
| "drop": { | |
| "if" : "ctx.lat == 0.0" | |
| } | |
| } | |
| }, | |
| { | |
| "set": { |
This file contains hidden or 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
| { | |
| "listings-ash" : { | |
| "aliases" : { }, | |
| "mappings" : { | |
| "_meta" : { | |
| "created_by" : "ml-file-data-visualizer" | |
| }, | |
| "properties" : { | |
| "@timestamp" : { | |
| "type" : "date" |
This file contains hidden or 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
| import java.util.AbstractMap; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.regex.Pattern; | |
| /** | |
| * This class contains the parsing logic for implementing the DRAIN algorithm. |
This file contains hidden or 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
| import xgboost as xgb | |
| from sklearn import datasets | |
| from sklearn.metrics import mean_squared_error | |
| import m2cgen as m2c | |
| diabetes = datasets.load_diabetes() # load data | |
| from sklearn.model_selection import train_test_split | |
| X_train, X_test, y_train, y_test = train_test_split(diabetes.data, diabetes.target, test_size=0.2, random_state=0) | |
| print(diabetes.feature_names) |
This file contains hidden or 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
| PUT _scripts/linear_regression_inference | |
| { | |
| "script": { | |
| "lang": "painless", | |
| "source": """ | |
| double total = params.intercept; | |
| for (int i = 0; i < params.coefs.length; ++i) { | |
| total += params.coefs.get(i) * doc[params['x'+i]].value; | |
| } | |
| return total; |
This file contains hidden or 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
| PUT test-bool/ | |
| { | |
| "mappings" : { | |
| "_doc" : { | |
| "properties" : { | |
| "my-field" : { | |
| "type" : "boolean" | |
| }, "my-terms": { | |
| "type" : "keyword" | |
| } |
This file contains hidden or 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
| f=load(FILENAME.mat) | |
| C = [f.X, f.y] | |
| csvwrite(FILENAME.csv, C) |