teleren/devto huggingface dataset:
Data preparation for Data Frame Analysis with Transforms
Tags: machinelearning, elasticsearch, beginners
Published: 2021-08-02 14:36:58

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Trained Models for Supervised Learning](https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n) |

When you are using Data Frames (multi-variate analysis), Transforms can be useful in the data preparation step.

It converts existing Elasticsearch indexes into summary indexes, allowing you to define a pivot, which is a set of features that transform the index into a different, more digestible format, providing opportunities for new insights and analysis.

In fact, it performs search aggregations on the source index and indexes the results on the destination index. Therefore, a transformation never takes less time or uses less resources than the aggregation and indexing processes.

You can decide whether you want the transform to run once or continuously.

In this example we have 3 documents from a source index that stores reviews, with these fields: user-id, vendor and review.

```
Source Index (reviews)
{
...
user-id: 123,
vendor: "abc",
review: 4
},
{
...
user-id: 123,
vendor: "def",
review: 3
},
{
...
user-id: 123,
vendor: "ghi",
review: 5
}
```

With Transforms we can have a Destination Index grouped by user-id, for example, with the number of reviews per user (3 reviews in this case), and a simple average of the reviews (4+3+5)/4. 

```
Destination Index (reviews-result)
{
...
user-id: 123,
num_reviews(sum): 3,
avg_review: 4
}
```

And it could be updated if running continuously, which means we could use the data we need in the way we need it, e.g., sum, max, cardinality, etc.

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Trained Models for Supervised Learning](https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n) |

>*This post is part of a series that covers [Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl), aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.*
Trained Models for Supervised Learning
Tags: machinelearning, elasticsearch, beginners
Published: 2021-08-02 14:36:46

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Inference for Supervised Learning](https://dev.to/priscilla_parodi/inference-for-supervised-learning-66k) |

When you use a data frame analytics job to perform classification or regression analysis, it creates a **machine learning model** that is trained and tested against a labelled data set. When you are satisfied with your **trained model**, you can use it to make predictions against new data.

To see your available models: Kibana>Machine Learning>Data Frame Analytics>Models

Alternatively, you can use APIs like [get trained models](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/get-trained-models.html#ml-get-trained-models-request).

The following example gets information for all the trained models:

`GET _ml/trained_models/`

Models trained in Elasticsearch are [portable](https://www.elastic.co/guide/en/machine-learning/current/ml-trained-models.html#export-import) and can be transferred between clusters.

It is also possible to import a model to your Elasticsearch cluster even if the model is not trained by Elastic Data Frame analytics. [**Eland**](https://eland.readthedocs.io/en/v7.13.0b1/) supports [importing models](https://www.elastic.co/guide/en/elasticsearch/client/eland/current/machine-learning.html) directly through its APIs.

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Inference for Supervised Learning](https://dev.to/priscilla_parodi/inference-for-supervised-learning-66k) |

>*This post is part of a series that covers [Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl), aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.*
Inference for Supervised Learning
Tags: machinelearning, elasticsearch, beginners
Published: 2021-08-02 14:36:36

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Elastic Data Frame - Classification Analysis HandsOn](https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-handson-4ilb) |

Inference is a machine learning feature that enables you to use supervised data frame analytics model – [Regression](https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2) and [Classification](https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f) or a model deployed for [Natural Language Processing](https://dev.to/elastic/natural-language-processing-15fj) – against incoming data.

Let's assume that you have an index with historical data and a classification model that is trained on this data and that you are receiving new data, with inference you can perform the classification against the new data with the same input fields that you've trained the model on, and get a prediction.

All you need to do is create an ingest pipeline with a configurable inference processor:

Kibana>Management>Stack Management>Ingest>Ingest Node Pipelines. Click on Create Pipeline.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2j49goab7611p3076apd.png)

And add your inference processor:

Add a processor

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qfpue21foo01wez9vzo8.png)

`Processor = Inference`>Add

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n8met85o8t5caz2x1hzs.png)

And add the target field (optional) `ml.inference.<results_field_name>` and the ID of your [trained model](https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8hs5l31fz5u4mo6j43k.png)

Note: After the [Elastic Data Frame - Classification Analysis HandsOn](https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-handson-4ilb)(prerequisite) we have an example using the [inference processor](https://dev.to/priscilla_parodi/elastic-data-frame-inference-processor-handson-3392).

**But now, let's proceed with the [Classification Analysis HandsOn](https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-handson-4ilb).**

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Elastic Data Frame - Classification Analysis HandsOn](https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-handson-4ilb) |

>*This post is part of a series that covers [Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl), aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.*
Resources
Published: 2021-08-02 14:34:09

| [Menu](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl) | [Next Post: Introduction to Artificial Intelligence and Data Analytics](https://dev.to/priscilla_parodi/introduction-to-artificial-intelligence-and-data-analytics-47b5) |

* [Machine Learning documentation](https://www.elastic.co/guide/en/machine-learning/current/index.html)

* [Machine Learning Anomaly Detection APIs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/ml-apis.html#ml-apis)

* [Machine Learning Data Frame APIs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/ml-df-analytics-apis.html)

* [Inference processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/inference-processor.html)

* [Machine Learning Anomaly Detection examples](https://www.elastic.co/guide/en/machine-learning/current/anomaly-examples.html)

* [Machine Learning Data Frame examples](https://www.elastic.co/guide/en/machine-learning/current/dfanalytics-examples.html)

* [Bring Jupiter Notebook Visualizations to Kibana Dashboards](https://github.com/walterra/jupyter2kibana)

* [Elastic Eland (Python Elasticsearch client for exploring and analyzing data in Elasticsearch)](https://github.com/walterra/jupyter2kibana)

* [Inference Processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-processor.html)

* [Elastic Transforms](https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html)

>*This post is part of a series that covers [Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch, Kibana, Logstash and Beats) Machine Learning solution](https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl), aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.*
#12) What is Currying in JS❓
Tags: javascript, webdev, beginners, career
Published: 2021-08-02 13:59:13

##`🔰Currying`
✅It is a advanced technique of working with functions.
✅It is used in other languages also.
✅It is basically to transform a function with _n_ arguments, to _n_ functions of one or less arguments.

```
f(a, b, c) into f(a)(b)(c)
```
💠For better understanding, here's an example👇
✅First create a helper function _curryFun(n)_ that performs curring for two arguments.
✅curryFun(n) does the curring transformation.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ks89ar8yx3c1q2b5r28o.png)

💠As you can see, the implementation is straightforward
✅It has just two wrappers.

✅The result of curryFun(n) is a wrapper function(x).
✅When it is called like multiply(10), the argument is saved in the Lexical Environment, and a new wrapper is returned function(y).

✅Then this wrapper is called with (2) as an argument, and it passes the call to the original sum.

⚠So if anyone want to know about more advance currying implementation such as __.curry_, just comment it, I'll help you out or anyone can also do!!!
__________________________________________________________________
Vue native beginer
Published: 2021-08-02 14:33:02

## [Vue js](https://vue-native.io/docs/installation.html)
## Implement guile
    # Vue native cli
    npm install --global vue-native-cli
    # For Expo users
    npm install --global expo-cli
    vue-native init <projectName>
    $ cd <projectName>
    $ npm start
    $ npm run android/ios

### The composition API
- Ref
- Reactive
- Computed Values
- Watch 
- WatchEffect
- Props
- Lifecycle Hooks

***
#### reactive vs ref
    - reactive() only takes objects, NOT JS primitives (String, Boolean, Number, BigInt, Symbol, null, undefined).
    - ref() is calling reactive() behind the scenes.
    - Since reactive() works for objects and ref() calls reactive(), objects work for both.
    - BUT, ref() has a .value property for reassigning, reactive() does not have this and therefore CANNOT be reassigned.

*reference* [reactive with ref](https://stackoverflow.com/questions/61452458/ref-vs-reactive-in-vue-3).

#### **Lifecycle Hooks**
[vue 3 lifecycle hooks](https://v3.vuejs.org/guide/composition-api-lifecycle-hooks.html#lifecycle-hooks)

| Options API | Hook inside *setup* |
|---          |---|
|beforeCreate	| Not needed*       |
|created	    | Not needed*       |
|beforeMount	| onBeforeMount|
|mounted	    | onMounted|
|beforeUpdate	| onBeforeUpdate|
|updated	    | onUpdated|
|beforeUnmount	| onBeforeUnmount|
|unmounted	    | onUnmounted|
|errorCaptured	| onErrorCaptured|
|renderTracked	| onRenderTracked|
|renderTriggered| 	onRenderTriggered|
|activated	    | onActivated|
|deactivated    |   |
The MAS Explorer and Why I Built It
Tags: react, javascript, nginx, docker
Published: 2021-08-02 14:11:44

![The MAS Explorer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezdhxke0tuz2863yidax.png)

## Why Did I Build the MAS Explorer?

During my first few weeks at SAS, I was given a task: build an end-user SAS Viya demo for a financial services company. My team wanted the demo to interact with a simple machine learning model that was published to the Micro Analytics Service (MAS) and return a result determining whether a customer would or would not receive a specific car loan. 

In order to find the correct API endpoints to send requests to, I found myself searching through endless JSON files, each being thousands of lines long. JSON files are made to be readable, but nobody wants to be surfing through them for hours on end to find just the right endpoint. It was at this point that I realized this was an area that could use improvement. 

## What is the MAS Explorer?

The MAS Explorer is a graphical user interface to navigate the numerous endpoints provided by the SAS Micro Analytics Service REST API. Rather than surfing through JSON files in a web browser, console window, or Postman, the MAS explorer allows a developer to graphically search through the various API endpoints and generate a complete cURL command to call the chosen endpoint. A developer can simply login, click through the multiple endpoints, and get a cURL request drafted automatically, all right from the interface.

## How do you use it?

Visit the [GitHub repo](https://github.com/benwoodman/MAS-Explorer) for more information on installation. The MAS explorer is contained in a single Docker image for installation on any local machine or server. 

## Screenshots

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcxx5futfaelqhgjrfsj.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ki00dqi4xzu61mfcph13.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jn3942ix6sttrf5ucg9n.png)
DATA TYPES IN C 
Published: 2021-08-02 14:10:21

Each variable in C has an related data type. Each data type requires diverse sums of memory and has a few particular operations which can be performed over it. Let us briefly portray them one by one:

Following are the examples of some very common data types used in C:
1.char: This is the most basic data type in C because it stores a single character and requires a single byte of memory in almost all compilers.
2.int: An int variable is used to store an integer.
3.float: It is used to store decimal numbers with single precision.
4.double: It is used to store decimal numbers (numbers with floating point value) with double precision.

Diverse data type too have diverse ranges up to which they can store numbers. These ranges may change from compiler to compiler.
Empleos en Data y Analytics LATAM — Julio 2021 - III
Published: 2021-08-02 13:59:55

Te compartimos las ofertas laborales del mes para áreas de Data, Analytics y Cloud 👨‍💻👩‍💻

✅ [Data Engineer - Delosi (Perú)](https://www.linkedin.com/jobs/view/2657950240/?alternateChannel=search&refId=CSMaXA02zDaIgkvppu%2BTkQ%3D%3D&trackingId=GHFwLdhtzeT6xgqRB3aUVw%3D%3D&trk=d_flagship3_search_srp_jobs)
✅ [Data Engineer - Intuitive (México)](https://www.linkedin.com/jobs/view/2650979756/?alternateChannel=search&refId=CSMaXA02zDaIgkvppu%2BTkQ%3D%3D&trackingId=zQ%2BeCWqMrpsWWHO%2FChAgFA%3D%3D&trk=d_flagship3_search_srp_jobs)
✅ [Data Engineer - Andela (Argentina)](https://www.linkedin.com/jobs/view/2453010954/?alternateChannel=search&refId=CSMaXA02zDaIgkvppu%2BTkQ%3D%3D&trackingId=%2BCiw2rq7Vfdk1EXrV0wMxQ%3D%3D&trk=d_flagship3_search_srp_jobs)
✅ [Data Scientist - Microsoft (Costa Rica)](https://www.linkedin.com/jobs/view/2650945959/?alternateChannel=search&refId=CSMaXA02zDaIgkvppu%2BTkQ%3D%3D&trackingId=yvONdOoC33c70djvGwoy7w%3D%3D&trk=d_flagship3_search_srp_jobs)

Aprende, aplica y crece en proyectos de Data y Analytics en Cloud.

Visita nuestra página:
👉🌐 datahack.la
How to use Luos with Arduino? Step 1 - Setup the IDE
Tags: arduino, opensource, embedded, luos
Published: 2021-08-02 13:55:58

🎥 Here is a "quick and dirty" video **tutorial** showing how to set up the **Arduino** IDE to use Luos with your Arduino and Genuino boards. 🎓 Luos is an **open-source** project for **embedded systems** 

➔ https://youtu.be/Y-rUEB65EWw
Sonarqube Installation
Tags: codequality, codereview
Published: 2021-08-02 13:30:47

SonarQube Installation:

What is SonarQube?
Ans: SonarQube is an open source platform for continuous inspection of code quality & security. Automatic code review with static analysis to detect bug, code smell, security vulnerability around 20+ languages.It also offers reports of duplicate code, coding standard, unit test, code coverage, code complexity, comments, bugs, security vulnerability.



Server Installation using docker: 
Default server 9000 port
Can be installed by docker , manual ubuntu installation
Ubuntu Installation (https://developerinsider.co/install-sonarqube-on-ubuntu/)
 
Docker command:
 docker pull sonarqube
 docker run -d -p 9000:9000 sonarqube

Integration with your code:
- Create Project from sonarqube server interface
- Choose project-key and display name
- Copy the token from the server.

Changes build.gradle- 

plugins {
id "org.sonarqube" version "3.0"
}
Gradle Command for Single Module App:

./gradlew sonarqube \
-Dsonar.projectKey=<project-key> \
-Dsonar.host.url=<sonar-server-url> \
-Dsonar.login=<token>
Gradle Command for Multi module App:

./gradlew :<module-name>:sonarqube \
-Dsonar.projectKey=<project-key>\
-Dsonar.host.url=<sonar-server-url> \
-Dsonar.login=<token>

After running command you will find all vulnerability at sonarqube server dashboard.
Closures & Angular
Tags: javascript, angular, firstpost, typescript
Published: 2021-08-02 13:20:48

During the interview, most of the people are able to answer when asked about Closures and their general examples. But when asked about the same if they have used or seen it anywhere in their angular application most of them failed to provide an example. So I thought to document a basic example of closure in Angular.
Reiterating the definition of Closure as per MDN. [Closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures).
### Closures
> A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.

Now breaking up the definition for better understanding.
A closure gives you access to an outer function’s scope from an inner function.
So basically after execution of the outer function, the inner function can remember the scope (e.g. if there are any variables in the outer function the inner function can access them).
So, in Angular, we usually subscribe to any API call inside the ngOnInit function. Something like the below example.

```javascript
ngOnInit() {
    this.api.get('users?page=1').subscribe(res => {
      this.users = res;
      console.log('data response', this.users);
    }, error => {
      console.log(error);
    });
  }
```

Here the **subscribe** and **error** functions are acting as inner functions and the ngOnInit is acting as an outer function. And we can access any variables or methods of the component using **this** keyword. This means it remembers the scope of the outer function.

PS: This is my first blog, apologies if I have made any mistakes. Hope you have liked this one.
How to add Dev posts to the subdomain of a personal website with Stackbit
Tags: stackbit, netlify, host, dns
Published: 2021-08-02 13:08:30

## Introduction

One of the advantages of having a blog (or in this case [dev.to](https://dev.to/) posts) as part of your existing website is that it will help you to gain organic traffic via search engines.

If you have a personal site (mysite.com) you can create a subdomain (dev-blog.mysite.com) and have that subdomain display any posts you have already created on dev.to. Additionally, it will automatically update with any new posts you create through dev.to.

In this post, I will discuss one way of how you can achieve this.


## Generating a blog site with Stackbit

This [post](https://dev.to/connecting-with-stackbit) will take you through how to generate a blog site with Stackbit.

With it, you can customise the name of your stack (this will become the name of the repository added to your Github account). If you wish to customise this new site, you can do so by checking out the newly generated repository locally and via code changes, make styling and functional adjustments as appropriate.

You will be able to view the live site, hosted on [Netflify](https://www.netlify.com/), e.g. dev-blog-0a000.netlify.app


## Hosting

Your personal site can be hosted on various platforms. You will need to set up a subdomain. I will instruct you using Netlify as an example.

Navigate to your team overview's page, where you will find a new site's entry for your new repository. Click on it, then set up a custom domain. Here you can add the custom domain e.g. dev-blog.mysite.com to match your DNS records. You may need to navigate to your DNS settings to achieve this.

If you were to now look at your DNS settings, you should have a record that looks something like this:
```
Name: dev-blog.mysite.com
TTL: 3600 seconds
Type: CNAME
Value: dev-blog-0a000.netlify.app
```

Time to try out your new subdomain!
How to add custom events to your low-code app in DronaHQ
Tags: nocode, lowcode, dronahq, eventhandlers
Published: 2021-08-02 13:03:49

Link: https://www.youtube.com/watch?v=zykvGI1-lRk

Custom Events in DronaHQ are just like event handlers or event listeners, they allow you to trigger certain actions when an event takes place like someone enters a value or selects a value, clicks on a button, or presses enter key. Configure powerful actions like querying your database, sending emails, logic branching, notifications, and much more!

Learn how to make the most of this function by seeing it live in action, and apply the same to your apps to equip it with more power!
Cheatsheet of emmets
Tags: css, webdev, beginners, codenewbie
Published: 2021-08-02 12:54:09

##Boilerplate##
```html
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Document /title>
/head>
<body>

</body>
</html>
```
##basic elements##

>####1) section####
```html
<section> </section>
```

>####2) .example####
```html
<div class="example"> </div>
```
> ####3) section#intro####
```html
<section id="intro"> </section>
```

>####4) p>lorem10####
```html
<p>Lorem ipsum dolor sit amet
consectetur adipisicing elit. Neque,
facere? </p>
```

>####5) section#intro>.container####
```html
<section id="intro">
 <div class="container">
 </div>
</section>
```
>####6) p{your custom text} ####
```html
<p>your custom text </p>
```

>####7) link:css ####
```html
<link rel="stylesheet" href="style.css">
```
>####8) script:src ####
```html
<script src=""> </script>
```
>####9) h3+p+p ####
```html
<h3> </h3>
<p> </p>
<p> </p>
```

>####10) ul>li*3^p*3 ####
```html
<ul>
 <li> </li>
 <li> </li>
 <li> </li>
</ul>
<p> </p>
<p> </p>
<p> </p>

```
>####11) ul>li*4 ####
```html
<ul>
 <li> </li>
 <li> </li>
 <li> </li>
 <li> </li>
</ul>
```

>####12) h3+(ul>li*3)+h3 ####
```html
<h3> </h3>
<ul>
 <li> </li>
 <li> </li>
 <li> </li>
</ul>
<h3> </h3>

```
>####13) li.list-item-$*3 ####
```html
<li class="list-item-1"> </li>
<li class="list-item-2"> </li>
<li class="list-item-3"> </li>

```