teleren/devto huggingface dataset:
ML.NET, Azure Function, Power Apps – Pro-code | No-code | Low-code
Tags: powerfuldevs, machinelearning, azurefunctions, dotnet
Published: 2022-09-12 03:29:59


![Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ztlaepjzuszs49cowwg.png)
In this weekend after my birthday, I want to share this small proof of concept, in which I wanted to integrate some of my passions ML. NET, Azure Function and Power Apps.

As a first step I have created a model from ML.NET with Model Builder selecting "Select Value prediction Scenario", I leave you the link of a publication where I will explain step by step. ([ML.NET & Model Builder and (Bonus Track) ASP.NET App to consume the model. Enjoy it! 🤟 - DEV Community 👩 💻👨 💻](https://dev.to/ppiova/mlnet-model-builder-and-bonus-track-aspnet-app-to-consume-the-model-enjoy-it-flp) )

The next goal was to be able to make inferences and predictions to the model from the cloud, for that use Azure Function. I share the link of my GitHub repository ([ppiova/STEMsalariesAzureFunctions](https://github.com/ppiova/STEMsalariesAzureFunctions/tree/main/STEMsalariesFunction))
All of you must do is publish Azure Functions to Azure. (If you wish in the comments, in a next post I make a step like doing it).

![Azure Function](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/499868rpd9lvkrk6i295.png)

So far, I already have my Machine Learning model, in addition the function is published in Azure as an API, using Postman I can test and make predictions with my model.

![PostMan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lp7vdcsv4xxht1d92ay7.png)

And now to be able to call this API published in Azure Function I have created a [Custom Connector](https://docs.microsoft.com/en-us/training/modules/get-started-custom-connector/) that I will then add in the application created with Power Apps.

I share the Github link ([ppiova/PowerAppsSTEMSalaries](https://github.com/ppiova/PowerAppsSTEMSalaries)) where you will find the json file to create the Custom Connector, an xlsx file to import it in the creation of the SharePoint list where you will save the predictions made and finally our strawberry of the dessert, haha, the application developed in Power Apps.

![Power Apps STEM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48kgcghwi5rxht29exli.png)

That's all folks, if you have questions about how to carry out this process, you write to me through my social networks, or in the comments.

![YouTubeChannel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xuczfp3s0hjjnlhpj7qf.png)

Soon in addition to publishing posts I will start a new personal project in sharing content from my YouTube channel. I leave the link [Pablito Piova - YouTube](https://www.youtube.com/channel/UCRqittEn8NT15dSInE6sSNg), Subscribe!  😊
AWS DynamoDB Cheat Sheet
Tags: 30daysofaws, day04, certifieddeveloperassociate, dynamodb
Published: 2022-09-12 03:27:23

![](https://upload.wikimedia.org/wikipedia/commons/f/fd/DynamoDB.png)

- Global tables are useful for having multiple copies of tables in different region.
- All DynamoDB tables are encrypted at rest using an AWS owned CMK by default.
- A primary key can either be a sinale-attribute partition key or a composite partition-sort key.
- Both partition and sort keys attributes must be defined as type string, number, or binary.
- Global secondary index:
  - Different partition key and sort key from base table
  - Only eventually consistent
  - Can be created after table is created
  - Using a random prefix for the GSI partition key enables to have high cardinality for the partition key
- Local secondary index
  - Same partition key, different sort key from base table
  - Eventual and strongly consistent
  - Should be created when creating a table
- Calculate RCU (read capacity unit) & WCU (write capacity unit):
    - 1 RCU = 2 eventual consistent read of 4 KB, 1 strongly consistent read of 4 KB
    - 1 WCU = 1 write per second for data for an item as large as 1 KB.
- Queries or scan on GSI consume [RCU](https://aws.amazon.com/dynamodb/pricing/provisioned/) on index **not** on table
- Storing session state could be on elastic cache or dynamodb
- Best practices when using **Scan** in dynamodb - **Use parallel scan** 
  - to control the amount of data returned per request use the **Limit parameter**. This can help prevent situations where one worker consumes all the provisioned throuahput at the expense of all other workers
  - DynamoDB does not support item locking, and conditional writes are perfect for implementing optimistic concurrency.

![](https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2018/09/10/dynamodb-partition-key-1.gif)


> - [Practice notes](https://romankurnovskii.com/en/docs/aws-certified-developer-associate/dynamodb/)
> - [Questions](https://dev.to/romankurnovskii/aws-ec2-top-
questions-certified-developer-exam-27oo)
Open Source Development Release 0.1
Tags: javascript, github, git, npm
Published: 2022-09-12 03:22:42

> 

It's been a while since the last time I started coding so it took me a while to get accustomed to using JavaScript again.

The purpose of this release is to add a version, help and input flag for the command line.

I used [Commander](https://docs.npmjs.com/cli/v6/commands) to allow for custom flags, thankfully it already has a "version" flag in it that I can simply use. Using the "package.json" I can display the current version of my file.

I started implementing the main objective of the program which is to allow the user to convert .txt file into an HTML5. It was fairly difficult to do considering I haven't coded for a few months, but I managed to get back to it after a few hours and finished implementing all the necessary structure. 

There are Optional Features of which I must implement at least two of them.

I already finished adding the first implementation which is to implement the title of the .txt to the "title" tag, and to turn it into the most important heading in the body.

I realized that having all the codes into one file can make it cluttered, so I decided to create a secondary js file and insert all the repeated functions there.

I found a partner later on that reviewed my code and found around 7 issues. I managed to fixed them so hopefully the amount of problems lessens.

> How to Use

The program's purpose is to allow the user to convert any .txt file to a formatted HTML5.

**Flags**

The program consists of four flags


| Name  | Command | Description | Example | 
|---|---|---|---|
| Help  | --help, -H | Allows the user to view list of other commands and how they work  | [node server.js --help]  |
| Version  | --version, -V | Display current version of the program | [node server.js --version] |
| Input |  --input, -I | Convert the a .txt file to an HTML5 formatted file  |  [node server.js --input [filePath] |
| Output | --output, -O  | Change the directory of where the html file is going to be send to.  | [node server.js --output [directoryName]  |


Example of Input 

The command line
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a115faz2j1b00872ko7j.png)
The default "dist" directory that contains all the html files of this instance
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtafrqadc51zcmbm9wjc.png)
The Contents of the HTML5 files
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbyljqdrfkzq8l85k44n.png)
<hr>
Contact Information
Email: (mrleonardo@myseneca.ca)
Link to the repository: [Ririio-ssg](https://github.com/Ririio/ririio-ssg)
Pagination with Okta Workflows
Tags: workflows, oktaworkflows
Published: 2022-09-12 02:09:29

When working with large result sets, its impractical to try and process them in one single block. Pagination turns big archives of data into smaller, more digestible pieces. Clicking through an archive of pictures, or turning the page of a book, are examples of pagination. How is this important in API structure?

When we use a GET API request to request information from a server via API endpoint, there could be thousands of entries in the returned JSON file. The API response sending us thousands of entries at once is a drain of resources and a waste of our time, both in sending the request as well as processing the results. We want to search through a database a little bit at a time, and paging helps us query databases efficiently. In Okta Workflows it also helps in processing the results faster as we can spin off a new instance of a Helper flow to process each page of results.

But how would you structure a flow to take advantage of pagination? This blog entry provides one way to do just that.

See the fill article here: [pagination-with-okta-workflows](https://iamse.blog/2022/09/07/pagination-with-okta-workflows/)
Creating Active Record Custom Validations
Published: 2022-09-12 02:57:40

In order to have an efficient back end server, you need to make sure only valid data is stored into the database. The way we do this in rails is using validations.

Writing our validations is quite simple. Here’s a built in rails validation that checks if the name is present.
```
class User < ApplicationRecord
  validates :name, presence: true
end
```
This line of code validates the name checking if the User that instance has a name before entering it into the database. An advantage of using the built in Active Record validations is that it can create errors for you.
```
irb> u = User.create
=> #<User id: nil, name: nil>
irb> u.errors.objects.first.full_message
=> "Name can't be blank"

irb> u.save
=> false

irb> u.save!
ActiveRecord::RecordInvalid: Validation failed: Name can't be blank

irb> User.create!
ActiveRecord::RecordInvalid: Validation failed: Name can't be blank
```
There’s many useful pre-definded active record validations and can be found on the Ruby on Rails guides. If you wanted your validation to be something unique and specific you can create your own. To start you'd write validate with a symbol of a method's name.

```
validate :is_over_eightteen
```

Then you can write the method returning a custom error message.

```
def is_over_eightteen
  if age <= 18
    errors.add(:age, "Sorry User is too Young!")
  end
end
```
Hierarchical Clustering
Published: 2022-09-12 02:13:39

Hierarchical Clustering
It is a clustering technique that divides that data set into several clusters, where the user doesn’t specify the number of clusters to be generated before training the model. This type of clustering technique is also known as connectivity-based methods. In this method, simple partitioning of the data set will not be done, whereas it provides us with the hierarchy of the clusters that merge after a certain distance. After the hierarchical clustering is done on the dataset, the result will be a tree-based representation of data points, divided into clusters. This is how hierarchical clustering looks like after training is done.
Laravel CRUD with Ajax
Tags: javascript, laravel9
Published: 2022-09-12 01:52:19

## What is Ajax?
Asynchronous JavaScript and XMLHTTP, atau disingkat AJaX, adalah suatu teknik pemrograman berbasis web untuk menciptakan aplikasi web interaktif. Tujuannya adalah untuk memindahkan sebagian besar interaksi pada komputer web surfer, melakukan pertukaran data dengan server di belakang layar, sehingga halaman web tidak harus dibaca ulang secara keseluruhan setiap kali seorang pengguna melakukan perubahan. [Wikipedia](https://id.wikipedia.org/wiki/AJAX)

## Membuat Project Laravel 9
Pada artikel ini kita akan menggunakan laravel versi 9 yang terbaru. Kita bisa akses website Laravel pada link [laravel.com](https://laravel.com/)

## Bahan Yang Harus Di Siapkan

1. Composer 
2. Xampp

Bahan pertama sebelum kita membuat project Laravel adalah kita harus menginstall Composer terlebih dahulu, karena kita akan menggunakan Composer untuk membuat project Laravel-nya.

Jika teman-teman belum memilikinya, maka silahkan lakukan installasi sesuai dengan sistem operasi yang dimiliki.

1. Installasi di Windows : https://getcomposer.org/doc/00-intro.md#installation-windows
2. Installasi di Linux / MacOS : https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos

Untuk memastikan apakah Composer sudah berhasil diinstall, maka silahkan jalankan perintah berikut ini di dalam terminal/CMD.

`composer -v`
Jika berhasil, maka teman-teman akan mendapatkan hasil seperti berikut ini.

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

## Membuat Project
Setelah berhasil mengintall **Composer**, saat nya kita menginstall **Laravel**-nya.

Silahkan siapkan folder untuk tempat project yang akan kita buat, lalu teman-teman dapat klik kanan lalu pilih **git bash here**.


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

Kemudian akan ketikan perintah:
Declaração resumida e específica
Tags: css, value, property, beginners
Published: 2022-09-12 01:16:43

Há quatro formas de estilizar a propriedade de seletores que admite valores diferenciados. Exemplo:

```
1 - padding: 20px;
2 - padding: 20px 18px;
3 - padding: 20px 18px 28px;
4 - padding: 20px 18px 28px 10px;
```

A primeira coisa a ser considerada é subscrição do último estilo em relação aos anteriores quando aplicado no seletor. No exemplo acima, significa que a linha 4 substituirá as linhas 1 a 3. Isso ocorre porque é lido de cima para baixo. É uma característica do CSS.

## Declarações

Outras qualidades do CSS são a de classificar e abreviar valores. A propriedade `padding` define a distância entre o conteúdo e as bordas. 
Atribuído um único valor, como na linha 1, serão aplicadas de forma resumida para todos os lados.

Na linha 2, iniciamos a forma específica. Aqui temos um espelhamento. O valor 20px definirá as bordas no topo e base e 18px à esquerda e direita;

Na última linha, cada borda receberá o valor determinado, iniciando pelo topo, direita, base e esquerda. Ou seja, basta seguir a direção do relógio.

### Exceção 

A exceção ocorre na terceira linha do exemplo. Três valores são especificados para `padding`, sendo 20px para o topo, 18px para a direita e esquerda e 28px para a base. Portanto, o segundo valor configura as margens direita e esquerda.
Storing your data in a Plotly Dash data dashboard
Tags: datascience, plotly, dash, visualization
Published: 2022-09-12 00:59:25

[`Plotly Dash`](https://dash.plotly.com/introduction) is a great framework for developing interactive data dashboards using Python, R, and Javascript. It works alongside [`Plotly`](https://plotly.com) to bring your beautiful visualizations to the masses.

One problem that is oftentimes encountered when developing `Dash` apps is being able to pass data around your app. Luckily, this is easy to do for small datasets using the [`dcc.Store`](https://dash.plotly.com/dash-core-components/store) component. `dcc.Store` stores your data as a `JSON` object inside a user's browser. 

The most common library for working with data in a data scientist's tool kit is `pandas`, so how can we store a `pandas DataFrame` in our dash app? It's easy, but there are some things to keep in mind.

1) 'special' data types aren't going to be `JSON` serializable. You need to convert your `TimeDelta`s and `DateTime` data types to a `str` or `float`.
2) You will lose your `index` information in the data conversation, so be sure to `pd.DataFrame.reset_index()` before you store your `DataFrame`

### Create the data store in your app
`dcc.Store` can be placed anywhere in your app's layout.
```python
from dash import dcc
def layout():
   return html.Div(
      [
      dcc.Store(id="current-data"),
      dcc.Graph(id="graph")
      ]
   )   
```

### Store a `Pandas DataFrame` using `dcc.Store`
Now to store the dataframe, you can use the `pd.DataFrame.to_json()` method, after resetting its index.
```python
@callback(
    output=[Output("current-data", "data")],
)
def store_current_data():
    # Some loading from file/remote and data processing
    return [data.reset_index().to_json(orient="split")]
```

### Access a `Pandas DataFrame` stored in `dcc.Store`
Now we can `pd.read_json()` to retrieve the `DataFrame` from the store in a different callback! Return a `Plotly Figure` to a `dcc.Graph` output to plot your data.
```python
@callback(
    inputs=[Input("current-data", "data")],
    output=[Output("graph", "figure")]
)
def retrieve_current_data_and_plot(data):
    df = pd.read_json(orient="split")
    # You can `set_index` here to get your original index back.
    # Create plotly figure here to display our data!
    fig = ...
    return [fig]
```

`dcc.Store` is a great way to centralize data processing and allow data to be accessed across your app.
Astro Is Tricking Us Into Using Vue and Svelte Templating Style
Published: 2022-09-12 00:20:16

I studied the LSAT for 2 years and brought my score up from a 120 to a 165. 165 is pretty good you can get into decent schools with that if your grades are ok. My strategy was taken from someone who got into a good school who advised to 'study in many different ways'. 

Astro is helping us learn web fundamentals by study in many different ways. You can swap components from different frameworks and get a feel for how they all work. I'm starting to enjoy using the templating style of Svelte and Vue because it's so easy and straightforward (with the javascript and style in the same file as the markup). I am being tricked into using these coding styles and I don't even resent it. In fact I'm glad to be here.
How to Merge Two Sorted Arrays
Tags: dsa, sorting, java
Published: 2022-09-12 00:17:24

## Problem
You are given two sorted arrays A and B of lengths m and n, the task is to merge the two sorted arrays in such a way that the merged array is also sorted.

## Example
**Input**
A[] = {3, 9, 10, 18, 23}
B[] = {5, 12, 15, 20, 21, 25}

**Output**
Merged[] = {3, 5, 9, 10, 12, 15, 18, 20, 21, 23, 25}

**Explanation**
The merged array is of the size of n + m and contains both the elements of array A and array B in sorted order

**Input:**
A[] = { 5, 8, 9}
B[] = {4, 7, 8}

**Output:**
Merged[] = {4, 5, 7, 8, 8, 9}

**Explanation**
The merged array is of the size of n + m and contains both the elements of array A and array B in sorted order

## Index

1. Brute Force Approach
2. Insertion Sort Approach
3. Efficient Approach — Using Merge Sort

## Brute Force Approach
The idea is to create a new array C[] of length m+n and put all the elements from A[] and B[] in it and then sort them using Arrays.sort().

![Merged Array](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xhd9hu9xz941k2wv3oo.png)

## Algorithm
1. Create an array C of n+m size to store the merged array
2. Put the values of both A and B arrays using a for loop
3. Sort the C array using Array..sort().

![Simple merging of two sorted arrays](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trcih0dnfny145n3g4r8.png)

## Pseudo Code
```
Int[] solve(int[] A, int[] B, int n, int m) {
Create a new array C of n+m size
while(i<n) {
C[k++] = A[i++];
}
while(j<m) {
C[k++] = B[j++];
}
Sort C;
return C
}
```

## Output
Array after merging - 1 2 3 4 5 6 7 8

**Time Complexity** — O((m+n) log(m+n))
We have sorted an array of size m+n using Arrays.sort(), and the time complexity of this operation is O(n log n) which in this case becomes O((m+n )log(m+n))

**Space Complexity** — O(m+n)
We have created a new array C of size n+m which will store the merged sorted array.

[Continue Reading…](https://tekolio.com/how-to-merge-two-sorted-arrays/)
Hello World
Tags: opensource
Published: 2022-09-12 00:00:01

Hello World, my name is Tymur Levtsun. I am 19 year old from Ukraine who is currently studying at Seneca College in Computer Programming and Analysis program. I am taking the OSD course to get a better understanding of the open-source community and systemise my knowledge about the open-source that I already have. 

The overall objective for this course is to expand my knowledge about the open-source world and to contribute to some big or medium-sized projects. Since I have most of experience working with typescript/javscript I hope to contribute to projects that you these languages. 

This week I have chosen a repo called [jsoncrack.com](https://github.com/AykutSarac/jsoncrack.com), which is a nice open-source tool that generates graphical diagrams from JSON objects in a very pretty and understandable way. I liked it, because I had to work with JSON a lot and sometimes it is big pain to get an idea of the structure of some big JSON object, if it is in just simple text form. This tool would help in such cases a lot.
Inputs, outputs, and outcomes
Tags: inputs, outputs, outcomes, observability
Published: 2022-09-14 08:16:55

---
title: Inputs, outputs, and outcomes
published: true
date: 2022-09-12 00:00:00 UTC
tags: inputs,outputs,outcomes,observability
canonical_url: https://jhall.io/archive/2022/09/12/inputs-outputs-and-outcomes/
---

How do you measure the effectiveness of your team or project?

Broadly speaking, there are three categories of things we can measure with regard to a human endeavour (and non-human endeavours as well): Inputs, outputs, and outcomes.

The trouble is that the easiest ones to measure (inputs and outputs) are the least interesting or valuable.

Examples of inputs:

- Hours worked
- Money spent
- Meetings attended
- Raw materials consumed

With the strange exception of the first, it’s usually pretty widely accepted that measuring inputs is of very low value, because it’s so far removed from the business goals. We can spend millions of dollars, or invest countless person years into a project, but if the project never works, it’s all waste.

Examples of outputs:

- Lines of code produced
- Features created
- Bugs fixed
- Server up time
- Units shipped
- Reports generated

Measuring outputs is pretty universally better than measuring inputs. All else equal, if person A produces 5 units in 8 hours, and person B produces 10 units, the greater number of units is probably better.

Of course, many, if not most or all, of these have their own drawbacks. Measuring lines of code is a famously bad measure of effectiveness, because it’s so easily gamed. Truth be told, practically all of these can be gamed.

So that leaves us with measuring outcomes. Outcomes are the actual business goals achieved.

How do you measure the outcomes of the work your team or project produces?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._