teleren/devto huggingface dataset:
Biometrics & Cyber Security
Tags: biometrics, cybersecurity, typingbiometrics, keystrokedynamics
Published: 2022-05-02 10:35:04

Biometrics are body measurements and calculations related to human characteristics. Biometric authentication is used in computer science as a form of identification and access control. It is also used to identify individuals in groups that are under surveillance.

Computer security, cybersecurity, or information technology security is the protection of computer systems and networks from information disclosure, theft of or damage to their hardware, software, or electronic data, as well as from the disruption or misdirection of the services they provide.

**1) Typing Biometrics**

[Biometric authentication](https://typing.ai) has been around since the early days of computing, but the advent of typing biometrics has changed everything. This technology uses advanced algorithms to analyze your unique handwriting patterns and then authenticate them against a database of known samples. Because this method relies solely on your unique writing style, it eliminates any possibility of fraud.

**2) Face Recognition**

Face recognition is a relatively new form of biometric identification that works similarly to typing AI biometrics. However, instead of using your unique handwriting to verify your identity, facial recognition compares your face against a database of images. This makes it much harder to fake than typing biometrics because your face can’t be easily replicated.

**3) Voice Recognition**

Voice recognition is similar to typing biometics in that it analyzes your voice to identify who you are. But unlike [keystroke dynamics](https://typing.ai), voice recognition doesn't rely on your handwriting. Instead, it uses sophisticated software to compare your speech pattern against a database of known voices.

**Typing AI Biometrics** is providing enterprise grade security using a unique Artificial Intelligence and Machine Learning algorithm.
The Ultimate guide to iOS unit testing with best practices — Part 1
Tags: ios, testing, guide, programming
Published: 2022-05-02 10:27:02

This is an ongoing series on writing Unit tests with best practices where we develop a TODO app with Effective tests.

{% embed https://youtu.be/G3USanuw2VQ %}.

We will develop a TODO app with list screen in this part using:

- SwiftUI with UIPilot navigation
- MVVM architecture
- Swinject for dependency injection

We will have basic todo app ready at the end of this part.

The full application source code is available on [github](https://github.com/canopas/ios-todo-app-with-unit-testing)

For implementation or step by step guide, navigate to [blog.canopas.com](https://blog.canopas.com/the-ultimate-guide-to-ios-unit-testing-with-best-practices-part-1-c3a484b8dc8d)
Implementing K-Means Clustering from scratch in Python
Tags: machinelearning, ai, datascience, python
Published: 2022-05-02 10:21:23

**_Disclaimer! I am a student learning Datascience, Machine Learning. What I write here might have mistakes, do point them out in comments or reach out directly to me at my [linkedin](https://www.linkedin.com/in/ali-mansoor-0140a81bb/) account._**

## What is K-Means Clustering?
> k-means clustering is a method of vector quantization, originally from signal processing, that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or cluster centroid), serving as a prototype of the cluster. This results in a partitioning of the data space into Voronoi cells. - Wikipedia

If you did not understand this wikipedia definition like me, let me explain it in simpler terms.
In K-means clustering we divide n number of observations into k groups/clusters in such a way that the observations similar to each other are linked in one group.

![K-Means Convergence](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mk1853guk7qe0d61tmo.gif)
Image Credits: [Wikipedia](https://en.wikipedia.org/wiki/K-means_clustering)

## Steps for K-Means Clustering
1. Decide the value of k, which is the number of groups to divide your observations into.
2. Select k random points C (aka centroids) for each cluster within your observations.
3. Calculate absolute difference of each point from all centroids.
`|X-C|`
4. Put the observation in the cluster which has the closest centroid. 
5. Calculate new centroid for each cluster by taking average of all observations in that cluster.
6. Repeat step 3-5 until the centroids stop changing.
7. You have successfully organized n observations in k clusters.

I have also [written the python code](https://github.com/TheAli711/datascience/tree/main/k-means-clustering) from scratch to implement k-means clustering for n-clusters, it currently works for 2-4 clusters(limited color values) but sometimes goes into infinite loop. if given n values of colors, it can work for n clusters

Github: https://github.com/TheAli711/datascience/tree/main/k-means-clustering

See you guys in the next article :)
The big debate!?
Tags: discuss, html, css, webdev
Published: 2022-05-02 09:53:08

**I see and hear this a lot, HTML and CSS are not considered ”real” languages.**

I understand this is because they only determine the structure of a website and don’t give a set of instructions per say like other languages. When you google this however there are many different articles each giving their own opinion on the subject. Is this all actually a matter of opinion or is there a straight up fact to say yes or no? 

I’ve seen many memes about this over time and arguments on social media but never gave it a real thought, it was only when I stumbled across someone posting their CV/portfolio website online that said they know HTML and CSS and someone told them not to, this made me question why? Why can’t someone proudly say they know HMTL and CSS, it’s a skill you learn as a developer, maybe even the first you learn in fact. 

They may be basic but you still have to know how to write them correctly, for one reason accessibility and yes correct structure of your website. CSS is also another kettle of fish, there’s so much to learn about CSS! I know there’s frameworks out there that do a lot of this for you but if you’re writing vanilla you need to know your stuff. 

What’s your thoughts? 👀🤔
Loading styles and static files in Django
Tags: python, django, tutorial, beginners
Published: 2022-05-02 09:51:59


I like you am a newbie when it comes to Django. Yes I am slightly in love with the Framework and slightly excited about what it can do and how powerful it can be moving forward. But the project I'm working on I needed to be able to load a custom stylesheet in and overwrite some bootstrap bits, now there are plenty of little tutorials out there but they all seem to be for older versions of the framework. So I thought I'd quickly lay out how its being done in the current version:

Create a static folder in the main folder of your project. The one where the manage.py folder is. Inside there add a CSS folder and your style.css stylesheet. Should look like this

- manage.py
- myapp
- static
 - css
 - *style.css
- templates

So now head over to your base.html and add this to the top of the page

```html
{% load static %}
```

And then in the <head> portion add a link to our css

```html
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
```

And finally in our settings.py file add 

```python
# Static file route
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static'),
]
```

![css loaded](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78ypm24d5bh6ozquifkp.jpg)

And thats it! We should be all cooking on gas and have the styles loading in, also if you want JS or any other static file to load you can add it all to the static folder, super clean and super easy!
CloudFix’s AWS Data Transfer Costs in the AWS Metropolis Infographics
Tags: aws, cloudfix, datatransfercosts
Published: 2022-05-02 09:51:54

As a part of my Cloud Cost Wizard role for ESW Capital’ CloudFix, we have prepared the AWS Data Transfer Costs infographics below.

We have chosen the topic of AWS Data Transfer Costs since

1. the topic is considered too complex for most AWS clients and
2. most people are unaware of some nuances how they could dramatically reduce their Data Transfer Costs.

Feel free to share the Infographics with CloudFix being attributed as the author. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3lv2j4cw2tf8qmrgk5r.png)
"But it works on my machine"?
Tags: programming, python, android, node
Published: 2022-05-02 09:39:28

We all have heard this at least once in our software development experience. Developers set up a preferred environment on their laptop/desktop or the team’s shared development workspace. And though we try to replicate the setup manually, we often end up with configuration and environment issues.

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

## Works on every machine!

At [Neverinstall](https://neverinstall.com/), we host developer tools on a cloud machine; this allows the user to share the entire instance and replicate it with consistency.

**How does this help developers?**

- Zero setup time for dev environments
- Eliminates manual configuration of dev environments
- Pre-configured and pre-installed environments with support for several programming languages help developers focus on coding.

Have you encountered these issues? Let’s discuss.
The Ultimate guide to iOS unit testing with best practices — Part 2
Tags: ios, testing, guide, practices
Published: 2022-05-02 09:28:47


This is an ongoing series on writing Unit tests with best practices where we develop a TODO app with Effective tests.

This article covers implementation of Add task screen with unit tests. We will also see how we can navigate back and forth very easily with [UIPilot](https://blog.canopas.com/swiftui-complex-navigation-made-easier-with-uipilot-5b33279f3476) and how to write tests for navigation.

This post is divided into **6 small steps** to make explanation easier.

1. Make UIPilot available in [ViewModel](https://blog.canopas.com/introduction-to-unit-testing-viewmodels-with-kotlin-coroutine-367630e95831)
2. Add button on [list screen](https://blog.canopas.com/jetpack-compose-with-dagger-hilt-mvvm-and-navcontroller-b6048bb85073)
3. Implement Add Task screen UI
4. Implement Add Task ViewModel
5. Write tests for Add Task ViewModel
6. Refresh list screen after task is added

Feel free to **jump/skip** steps you are already familiar with.

Check out the source code on [Github](https://github.com/canopas/ios-todo-app-with-unit-testing).

Check out full article to write [iOS unit test with best practices](https://blog.canopas.com/the-ultimate-guide-to-ios-unit-testing-with-best-practices-part-2-f2eacbf3d8d4).
⚛️ React Intersection Observer 👀 Hook 🪝.
Tags: hook, react, intersection, observer
Published: 2022-05-02 09:25:37

As **MDN** says the **Intersection Observer API** provides a way to asynchronously observe 
changes in the intersection of a target element with an ancestor element or with a top-level document's.

It seems complicated but in React you can achieve intersection using a simple hook
the only thing to keep in mind is that you need to pass a _'target element'_ to the observer 
using useRef()

```
const targetMiddle = React.useRef();
const targetTop = React.useRef();

```
```
<h3 ref={targetTop}>TOP</h3>
<h3 ref={targetMiddle}>Middle</h3>

```
### Hook
The hook is very simple 
you need to export a function that accept the target element as argument
By default the _threshold_ is set to 0 but you can play around with the options based on your needs
set the state using _isIntersecting _entry property

```
export function useObserver(ref) {

    const [isIntersecting, setIsIntersecting] = React.useState(false);

     // OPTIONS
     const options = {
        // root: target.current,
        rootMargin: '0px',
        threshold: 0.5, // A threshold of 1.0 means that when 100% of the target is visible within the element specified by the root option, the callback is invoked.
    };
    // Observer
    const observer = new IntersectionObserver(([entry]) => setIsIntersecting(entry.isIntersecting),options);
    
	// Use Effect
    React.useEffect(() => {

        observer.observe(ref.current)
        // DISCONNECT 
        return () => observer.disconnect()
     
    }, []);
    // Return
    return isIntersecting
  };
  
 ```

inside useEffect you can call the _disconnect _ method to stop it from observing the target element
and finally return the state that can be true or false,
and based on this value you can change the vDom, for example by showing or hiding a video 
when the target element is visible, the limit is your imagination!

In this video guide you can see a super simple implementation, good observation 👀 ...

[Video Guide](https://youtu.be/5Z3jzMWhGHQ)
🆗 👋
Educator Ease - Create app and website for Online Teaching
Published: 2022-05-02 09:16:21

The benefits of online learning are felt globally: Teachers work from home; students have access to educational opportunities they wouldn't have otherwise and see the world differently. Online learning is a booming industry with millions enrolling annually. 

At [Educator Ease](https://educatorease.in/), We provide the technology and services used to better understand learning outcomes, drive down the cost of teaching and the cost to learn and empower quality across the education system from professional development through research, assessment and textbook publishing.  

We provide our clients with a professional and affordable service, working closely with the client's budgets. Our services include websites, mobile applications and software development. If you are interested in any of the themes that appear in our portfolio, please feel free to contact us at any time.
Color code
Tags: software, architecture
Published: 2022-05-02 08:41:49

Standard programming languages are generic. While that is the purpose of such language, it leads to many ways of understanding and doing the same thing.

The idea is to establish specific guides that should lead to uniquely designed code, hopefully, a better one, leaving less space for a different interpretation.

> Why 'color'?

We need a new term for the code categorization. Common terms, 'type' or 'kind,' are already used in a different context. And it's fun!

Let's begin.

## Content

+ [🟦 DATA](https://github.com/igr/color-code/blob/main/doc/10-data.md)
+ [🟪 BUILDER](https://github.com/igr/color-code/blob/main/doc/11-builder.md)
+ [🟥 STATE](https://github.com/igr/color-code/blob/main/doc/12-state.md)
+ [🟨 FUNCTION](https://github.com/igr/color-code/blob/main/doc/13-function.md)
+ [🟧 ACTION](https://github.com/igr/color-code/blob/main/doc/14-action.md)
+ [Binding](https://github.com/igr/color-code/blob/main/doc/15-binding.md)
+ [⬛️ CONTEXT](https://github.com/igr/color-code/blob/main/doc/16-context.md)
+ [Misc topics](https://github.com/igr/color-code/blob/main/doc/17-misc.md)
+ [🍭 Color wheel](https://github.com/igr/color-code/blob/main/doc/20-color-wheel.md)

### Examples

+ Calculator - using Ctx
+ ToDo App - simple app with two layers
+ [Restaurants](https://github.com/igr/color-code/blob/main/doc/32-example-restaurants.md) - real-world web app with Ktor & Exposed.

## Primary colors

```
🟦 == calm, unchanged, stable
🟨 == pure, light, combined
🟥 == contagious, changes other colors
```

Finally:

> ⚡️ Pro Tip: don't take this too serious.
Which String methods you wish JavaScript API had?
Tags: javascript, discuss, watercooler, programming
Published: 2022-05-02 08:41:46

<small>Cover image credits: tutsmake.com</small>
Those sort of functions/methods you usually copy-paste from a project to another in a `utils.js` file 😂 

i.e. we have toLowerCase, toUpperCase but not **capitalize** or **toCamelCase** or **toPascalCase**

<img src="https://c.tenor.com/PlXROjIs2BcAAAAd/javascript-undefined-is-not-a-function.gif" alt="undefined is not a function meme" />

Share your string utils!
Data Droppable Websites
Tags: website, business, dotnet, businessintelligence
Published: 2022-05-02 08:26:11

# Introducing the Web Data Platform 
Focussed more on data being made available to the website, and the website handling loading content into respective components. This reduces maintenance within the Content Management System.

You can view more videos here ![Info Rhino's Youtube channel](https://www.youtube.com/channel/UCmdo47aTnBdYMCDgi2pZIVg)

### Open to collaboration and suggestions to grow this approach

## Data Ready
Reports are automatically generated from data presented to the website. Dashboards are built-in.

## Card Content
Navigable cards with content which users access on a single page.

## Fits many business verticals

## The cover image is from the excellent Piranha CMS - the CMS behind our website. Although we are aiming to decouple our technology from this to a certain extent in future versions.
Have you tried piping in Javascript?
Tags: javascript, tutorial, pipe, piping
Published: 2022-05-02 08:09:01

Have you ever caught yourself doing something like this?

Problem: To get the class where all students' name contains the letter 'J':

```js
const studentsByClass = {
  class_1: ['john', 'mark', 'josh'],
  class_2: ['jeash', 'jack', 'jean']
}

const result = Object.fromEntries(Object.entries(studentsByClass)
  .filter(([className, students]) => {
    return students.every(studentName => studentName.includes('j'))
  }))
```

It's pretty long right? Pretty hard to read as well.

Recently, I've found a way to make this readable. I've found this article from `freecodecamp.org` about `pipe` function.

It goes like this:
```js
const pipe = (...fns) => (x) => fns.reduce((v, f) => f(v), x);

const toEntries = val => Object.entries(val)

const filterClass = entries => {
  return entries.filter(([className, students]) => {
    return students.every(studentName => studentName.includes('j'))
  })
}

const fromEntries = entries => Object.fromEntries(val)

pipe(
  toEntries,
  filterClass,
  fromEntries,
)(studentsByClass);
```

This has really helped me with the long lines of code. But I am not yet comfortable with the functional javascript. So I made my own version:

```js
const pipe = (initial, fns) => fns.reduce((v, f) => f(v), initial)
```

How to use it:

```js
const pipe = (initial, fns) => fns.reduce((v, f) => f(v), initial)

const toEntries = val => Object.entries(val)

const filterClass = entries => {
  return entries.filter(([className, students]) => {
    return students.every(studentName => studentName.includes('j'))
  })
}

const fromEntries = entries => Object.fromEntries(val)

pipe(studentsByClass, [
  toEntries,
  filterClass,
  fromEntries,
]);
```

But, I usually do it like this to avoid cluttered codebase.

```js
const pipe = (initial, fns) => fns.reduce((v, f) => f(v), initial)

const filterClass = entries => {
  return entries.filter(([className, students]) => {
    return students.every(studentName => studentName.includes('j'))
  })
}

pipe(studentsByClass, [
  val => Object.entries(val),
  val => filterClass(val),
  val => Object.fromEntries(val)
]);
```

Sources/Reads
[freecodecamp](https://www.freecodecamp.org/news/pipe-and-compose-in-javascript-5b04004ac937/)
[github](https://github.com/tc39/proposal-pipeline-operator)
A Quick 10-Second Programming Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-05-02 08:00:10

---
title: "A Quick 10-Second Programming Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258febded7.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why couldn’t the user update a file on a shared server?

___A:___ They didn’t have the write permissions
 -->
Switch Linux Workspace through CLI
Tags: linux
Published: 2022-05-02 07:55:01

I'm working on a script that will set up my development environment in a single click. To separate numerous windows, I usually use workspaces.

So, for a lazy person like myself, going between workspaces and opening windows is a hassle.

```
wmctrl -s N
```
Here N is the number of workspace counting from zero 0

This command saves a lot of time to initate my dev enviornment.

You can also use `xdotool set_desktop N` command as well.
.NET Web API - CRUD Operations 🚀
Tags: dotnet, webdev, programming, csharp
Published: 2022-05-02 07:34:16

{% youtube 3NWT9k-6xGg %}


[![Subscribe to Sameer Saini Youtube channel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0lq3y8extdkpnjfkfjz.png)](https://bit.ly/2FAgXzS)

Do you want to learn how to create REST APIs with ASP.NET Core?

In the above video tutorial, we will create a .NET 6 Web API from scratch step by step.

We will use the latest version of ASP.NET i.e. .NET 6 and will use Visual Studio to create our Web API.

We will start by installing an In-Memory database package that is offered to us by Entity Framework.

We can use this database to perform CRUD operations on this REST API.

CRUD stands for Create, Read, Update and Delete.

We will create our domain models and then create a DBContext.

We will then inject this DbContext in the services of this web API application.

We will also create a new controller in our solution which acts as an API endpoint.

In this API endpoint, we will build controller methods like GET, POST, PUT and DELETE to perform CRUD operations on our In-Memory database.

Once this is all done and working, we will install EF Core packages from nuget to run migrations using Entity framework core and create a SQL Server database.

Then we will modify the service injection slightly to now use SQL Server instead of the In-Memory database.

I hope you like the video.

Please show your support by hitting that like button 👍 and subscribing to the channel.
Day 0: Brainstorming!
Tags: appwritehack, hackaton, angular, brainstorm
Published: 2022-05-02 07:32:42

Maybe I'm a little bit too late but I want to partecipate at the Hackaton! 🙂

The day 0 was brainstorming, find a good idea, start to write the DB and the webpages!

I'll hope to complete the project! I have a very low freetime but it's ok! 🙂