teleren/devto huggingface dataset:
What is React's virtual DOM and How to increase its Performance (In Depth)
Tags: react, reactnative, javascript, nextjs
Published: 2023-02-11 20:14:20

React is a popular JavaScript library used for building user interfaces. It's fast, efficient, and has a large developer community. One of the key features that sets React apart from other UI libraries is its virtual DOM. In this article, we will take an in-depth look at React's virtual DOM and how it works to increase the performance of your application.

## What is a Virtual DOM?

A virtual DOM is a lightweight, in-memory representation of the actual DOM (Document Object Model). When an application updates, the virtual DOM is updated first. The virtual DOM then calculates the difference between the old and the new virtual DOM, and only updates the actual DOM with the changes. This process is known as reconciliation.

## Why Use a Virtual DOM?

The primary reason for using a virtual DOM is to increase the performance of an application. Updating the actual DOM can be slow and expensive, especially for large applications with many components. By using a virtual DOM, React can quickly update the virtual DOM, calculate the changes, and then make a single update to the actual DOM. This significantly improves the overall performance of an application.

## How Does the Virtual DOM Work?

When an application updates, the virtual DOM is updated first. React uses a process called reconciliation to determine what has changed in the virtual DOM and updates the actual DOM only with the necessary changes. This process is performed by a function called the renderer.

The renderer takes the updated virtual DOM and compares it to the previous virtual DOM. It then calculates the difference between the two and creates a list of changes that need to be made to the actual DOM.

Next, the renderer updates the actual DOM with the changes. This is done by creating a new DOM tree, which is a copy of the updated virtual DOM. The new DOM tree is then compared to the old DOM tree, and only the necessary changes are made. This process is efficient because it only updates the specific elements that have changed, rather than rewriting the entire DOM tree.

## Conclusion

React's virtual DOM is a key feature that sets it apart from other UI libraries. It provides a fast and efficient way to update the user interface without sacrificing performance. The virtual DOM works by updating a lightweight, in-memory representation of the actual DOM, and then only making the necessary changes to the actual DOM. This process is performed by the renderer, which calculates the difference between the old and new virtual DOM and updates the actual DOM only with the necessary changes. By using the virtual DOM, React can provide a fast, efficient, and highly performant user interface for your application.
My Experience at Digital Futures
Tags: cloud, beginners, aws
Published: 2023-02-11 20:13:00

My attitude towards digital futures was that it was this monolithic task that I signed up for with no hope of conquering with my very little understanding of the area that I applied to (Cloud Engineering) but due to the knowledge and method of my Tutor. I quickly grew in knowledge and understanding ranging from Python and Linux all the way to AWS ( Amazon Web Services). And was able to apply what I learnt through lab works and create virtual structures within a secluded environment. That provided scenarios which can represent real life companies and jobs which I found helpful. 

Additionally…


Digital futures have positioned themselves well within a growing demand not only for cloud engineers but for other jobs that occupy the technology sector such as Data Analysts or Programmers. And therefore providing a service to upskill and teach on these growing services, isn't only essential but provides a gateway for those looking to enter that area. Combine that with excellent tutors and a extensive but thorough experience. And you have an amazing opportunity that can set you on the path for a successful career

WHAT TO EXPEXCT…..
For those looking to begin their Digital Future Experience, what to expect is an extensive and knowledgeable course. With instructors that have extensive knowledge and great methods to help you learn the skills that you need not only for the application of what you've learnt but, from my experience, how to apply it within a workplace. Additionally they also provide you with a means of expanding your repertoire and not limit yourself to just the basics. 

CLOUD ENGINEERING…
In terms of looking to the future, the prospects as well as the avenues that Digital Future has provided for me has me looking forward to what is to come. And the possibilities that can come from this path that I am on. Not only that Cloud Engineering is an interesting area to get into, it offers a plethora of avenues that makes it an interesting area to dive into. `
Music Landing Page Website Design using Html CSS & Javascript
Tags: webdev, javascript, css, html
Published: 2023-02-11 19:55:06

Music Landing Page Website Design using Html CSS & Javascript | Step By Step In this video,

 I will show you how to create Responsive Music Landing Page Website Design

 using Html CSS & Javascript 

🔗 Essential links

 ----------------------------- 

Source Code: https://upfiles.com/TMNVlG 

HI 👋 I'm Web Monster In this channel I make videos about Complete Responsive website. You can checkout my channel 

👇 📺 My Channel : 

https://www.youtube.com/channel/UCHI9Mo7HCSlqum1UMP2APFQ 

🔔 Subscribe :

 https://www.youtube.com/channel/UCHI9Mo7HCSlqum1UMP2APFQ 

🕐 New Videos Every Week 

🔗 Essential links

 ----------------------------- 

Image : https://unsplash.com/ 

Font : https://fonts.google.com/ 

FontAwesome : https://fontawesome.com/ 



📹 Others Videos

 ----------------------------- 

Sidebar Menu in HTML CSS & JavaScript | Dark/Light Mode : 

➤ Watch: https://youtu.be/QQni50OBNpU 

Responsive Bloggar - News Magazine : 

➤ Watch: https://youtu.be/Js-J_SVZEnY

 Responsive Minimal Portfolio Website : 

➤ Watch: https://youtu.be/e1vjlzg8i3Y

 Creating a Professional Website : 

➤ Watch: https://youtu.be/aDrNj8hW_oM 

💜 Like - Follow & Subscribe Me

 -----------------------------

 Twitter : https://bit.ly/3IOBEqc 

Instagram : https://bit.ly/3GHoQyT 

Facebook : https://bit.ly/3IMfk04 

Linkedin : https://bit.ly/3INnwNY





Link The Video :

➤Watch:  https://youtu.be/HoTbTNju0eg

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dlyewjtagrzd5d8t25rt.jpg)
About Me
Tags: beginners, nomad, programming
Published: 2023-02-11 19:27:30

Hello everyone! I'm a Computer Science graduate who has found a new passion in technical writing and programming. I'm excited to share my experiences and the things I've learned along the way with you all.

As a programmer, I understand the challenges that come with the job, especially the impostor syndrome. But instead of letting it hold me back, I've decided to tackle the problem head-on through my blog. I share my personal struggles and how I've overcome them, hoping to provide support and encouragement to others in the same boat.

Blogging has also become a new hobby for me. I enjoy writing about my day-to-day experiences and the knowledge I've gained in the tech industry. Not only does it help me reflect and grow, but it also adds value to my potential audience and future hires.

If you're interested in learning more about technology, programming, or just want to connect, feel free to reach out to me. I'd love to hear from you and help in any way I can. And if you have any suggestions on how I can improve my blogging skills, or what my next topic should be, I'm all ears! Let's grow and learn together.
OSDC course 2023 Post #5
Tags: osdc, git, github
Published: 2023-02-11 19:20:37

This week I improved [my GitHub project](https://github.com/adieg/MyProject) with the great help of my course friends @silent_mobius, @dshisher.
My script now enables to normalize a numeric matrix in two different normalization types: sum-normalization and scaling to a range.

In the this week's lesson we learned additional commands on desktop git.
We learned the difference between merge and rebase and how to work on someone else's project locally.
Why you Should join Hackathons
Tags: mlhgrad, beginners
Published: 2023-02-11 19:08:36

MLH is a platform where you could join their programs and Hackathons 

They have launched the Global Hack Week 6 days ago

And its about AI/ML, and It has a lot of sessions and challenges 

There's tons of hackathons per year and you definitely should join them

## Why you should participate 
- Swags
- Prizes
- Learning new things will boost your career
- connections
All these benefits come together in a one package just by joining a Hackathon

They will add A lot to you and your knowledge

## What I learnt in AI/ML week ?

I built many projects with different categories
I learnt how to use NLP and speech to text algorithms
I explored how to clean Data 

even all of that was not part of my career but they opened a lot of doors to new Ideas 

I'm now ranked the top 7% of the total hackers, and I hope to be the 1% 

and You should definitely check their website all the time
[MLH](https://mlh.io)

and you should register for the coming hacks 
[MLH-Hack] (https://ghw.mlh.io/events/social-good-week)

# Happy Hacking
Fastest way to unleash the full power of i18next
Tags: webdev, javascript, react, tutorial
Published: 2023-02-11 18:55:19

Internationalization (i18n) and localization (l10n) are crucial for businesses that want to expand globally and reach a wider audience. To do this, you need a robust solution that can handle different languages and cultural nuances, and this is where [i18next](https://www.i18next.com) and [locize](https://locize.com) come in. These two elements have been designed to help you get the most out of your i18n efforts, and when used together, they are a powerhouse combination that can help you achieve your goals faster and more efficiently.
In this video, we'll explore the fastest way to unleash the full power of i18next.

The corresponding blog post for this video can be found here: https://locize.com/blog/i18next-migrate/
Releasing OpenAPI.security, a free tool to quickly check the security of any Swagger / OpenAPI-based API
Tags: security, api, testing, tooling
Published: 2023-02-11 18:46:43

_tl;dr we released [openapi.security](https://openapi.security), an online tool that performs a dozen of security tests on any given openapi/swagger-based API, with no signup or email required_

Our team at Escape is mainly focused on securing GraphQL APIs. For this, we developed a new approach called Feedback driven API Exploration, basically inferring the right security tests cases to run using the specification and a carefully crafted in house graph traversal algorithm. - We published a more in depth review of this algorithm [in another post](https://escape.tech/blog/feedback-driven-api-exploration/).

At Escape, we often organise internal hackathons. It's a way to learn new things, but also to experiment with our internal tools and discover new applications. This time, we wondered if our Feedback Driven Exploration could be applied to good old REST APIs as well and ended up creating OpenAPI.security.


The concept is simple: anybody can enter an OpenAPI / Swagger spec, and [openapi.security](https://openapi.security) will run a bunch of security tests on it and give back a report. It's designed to be fast and smart in the way it analyzes input specs.

Since it worked quite well we wanted to share it with the community as well. (NB It's a side project for now)
Developers 👨‍💻 Tools With Artificial Intelligence
Tags: webdev, python, productivity
Published: 2023-02-11 18:39:21

## Introduction


- AI has revolutionized the way developers work and create software applications. 

- With AI, developers can now automate processes that previously took hours of effort to complete in minutes. 

- This is thanks to artificial intelligence algorithms that are capable of learning from data and making decisions on their own without human intervention. 

- The most common use for AI in development is for automation tasks such as code refactoring or bug fixes. 

- Using automated tools, developers can quickly identify issues within a program and make changes accordingly without manually debugging each line of code themselves. 

- Additionally, machine learning algorithms allow developers to build more complex applications faster by automating certain aspects like feature extraction or natural language processing (NLP). 

- Overall, AI has been an invaluable asset for software development teams worldwide because it allows them to save time when completing tedious manual tasks while still producing quality results efficiently at scale with minimal errors or bugs present in the final product.

- As technology continues advancing further into this space, we will


###### AI Free Tools That Will Make Hours Of Effort Disappear In Minutes ⏰

🎥 {% youtube VtD7VeUcn0o%}


#### Bonus

###### Here are six AI 🦾 websites that will speed up your work 🚀

🎥 {% youtube kVgAX3b1IeE%}


### Connect with Me 😊

#### 🔗 Links

[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/mahmoud-el-kariouny-822719149/)

[![twitter](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/Mahmoud42275)
How to analyze chat sentiment using Amazon Lex and OpenAI-GPT-3 API: Deploy using Terraform and Github Actions
Tags: aws, chatgpt, gpt3, python
Published: 2023-02-11 18:33:53

ChatGPT is the most hot topic now in the tech community. Its growth in popularity in a short time has solidified its position among other similar solutions. I decided to have a go at learning the workings of the underlying API (not the exact ChatGPT API but the previous version of it). What best way to lean than use it in an usable use case.

The simplest use case I could think of using the AI to analyze the sentiment of a text. In this post I am using GPT-3 API to analyze the sentiment of a sentence. For an usable use case, the sentence is a chat typed on Amazon Lex, which can be a customer typing a feedback to an agent on the other side. Based on what the customer is typing on the chat via Lex, the GPT-3 API analyzes the sentiment and Lex responds according to the sentiment of the chat text. I am training a custom model using some sample data to tune the analysis based on my use case.  

For demo video: https://youtube.com/shorts/HTtwq-QFeQ8  

For more details on the post: https://amlanscloud.com/lexgptchat/
small-static-http 1.0.0 released
Tags: swoole, php, showdev
Published: 2023-02-11 18:02:58

small-static-http 1.0.0 is released !

small-static-http is a small http server, get reponse very fast by caching all static content in memory (response from localhost < 2ms).

Useful for fast serving single page applications.

*New in this version*
Log are not possible on :
- stdout
- file
- http log server like logstash

You can log on differents streams for :
- kernel logs
- access logs
- error logs

repository : https://framagit.org/small/small-static-http
docker : https://hub.docker.com/repository/docker/sebk69/small-static-http/general
Our Journey In The Open Source World - cache-candidate-plugin-invalidate-function
Tags: javascript, typescript, opensource, github
Published: 2023-02-11 18:00:00

Do you know we built an awesome caching library for Node at Jointly? No?! Well, check [this](https://dev.to/cadienvan/disrupting-the-node-caching-panorama-our-journey-in-the-open-source-world-cache-candidate-4gnb) out!

Today we want to present you our second plugin: A plugin providing an invalidation mechanism to the cache-candidate!

## What is this?

This is a plugin for [@jointly/cache-candidate](https://github.com/JointlyTech/cache-candidate) providing an invalidation mechanism under specific conditions.

### How To Install?

```bash
$ npm install @jointly/cache-candidate-plugin-invalidate-function
```

### How To Use It?

The library exposes a `PluginInvalidateFunction` object that can be used as a plugin for the `cacheCandidate` library.


```typescript
import { cacheCandidate } from '@jointly/cache-candidate';
import { PluginInvalidateFunction } from '@jointly/cache-candidate-plugin-invalidate-function';

async function getUsers(filters) {
  // Do something
  return users;
}

const cachedGetUsers = cacheCandidate(getUsers, {
  requestsThreshold: 1,
  plugins: [
      {
        name: PluginInvalidateFunction.name,
        hooks: PluginInvalidateFunction.hooks,
        // ...PluginInvalidateFunction would do the same
        additionalParameters: { invalidateFunction: (fnArgs) => {
          let shouldInvalidate = executeQueryToDetermineIfCacheShouldBeInvalidated();
          return shouldInvalidate;
        } } // <-- This will invalidate the cache record if the amount of filters passed to the method is greater than 1
      }
    ]
});

let users;
users = await cachedGetUsers(); // <-- This will be executed and cached.
// Here something happens so that executeQueryToDetermineIfCacheShouldBeInvalidated returns true
users = await cachedGetUsers(); // <-- This will be firstly invalidated, then executed and cached again.
```

You must pass an additional parameter `invalidateFunction` property which instructs the plugin about when to invalidate the cache record.
This property must be a synchronous function *(We have an open issue for it to go both sync and async, so it could change when this post will go live)* that receives the arguments passed to the method on which the `cacheCandidate` operates and returns a boolean value.  
If the function returns `true`, the cache record will be invalidated and the cacheCandidate will continue its normal execution.
Enable ToFU (Trust on First Use) with OpenSSH
Tags: ansible, fosslinux, linux, programmability
Published: 2023-02-11 18:00:43

---
title: Enable ToFU (Trust on First Use) with OpenSSH
published: true
date: 2023-02-11 17:58:00 UTC
tags: Ansible,FOSSLinux,Linux,Programmability
canonical_url: https://blog.engyak.co/2023/02/enable-tofu-trust-on-first-use-with.html
---

Ansible is a fantastic tool for Linux-based and NOS-based automation. Have you seen this error before?

```
"changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed."
```

When you use Ansible with SSH transport (as opposed to an API), you rely on the SSH key trust store to validate that the end-host is authentic. It's stored in `~/.ssh/known_hosts` on every user profile on a Linux machine.

Users building **new** machines will run afoul of this tool - because the machine doesn't exist yet and **should generate its own key** , it's not particularly easy to add to an orchestrator's SSH trust store.

Fortunately, the designers of OpenSSH have us covered. The following stanza can be added to either `~/.ssh/config` or to `/etc/ssh/ssh_config`, depending on how elaborate the existing configuration is:

```
Host * StrictHostKeyChecking accept-new
```

The configuration enables the [ToFU (Trust on First Use)](https://en.wikipedia.org/wiki/Trust_on_first_use) model with OpenSSH. It'll assume that the first key for a given IP address or hostname is valid, and continue to trust it without majorly compromising security by disabling trust.

ToFU is not better than a well-established Web of Trust or any hierarchical authorization (like PKI). ToFU seeks to strike a balance between administrative overhead and convenience - which is probably acceptable when building new virtual machines.

Try using ToFU to bootstrap the machine and apply more secure methods of administration after that as a solution to any security concerns - in theory, those should all be handled by _ **Ansible Inventory Groups** _ in a way that's scalable and easy.

With the [build steps covered here](https://blog.engyak.co/2023/02/deploy-vsphere-vms-with-ansible.html) and [managing an Ansible inventory file](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html) as code, the only remaining step is to join any newly built VMs to the existing inventory file in your Git repository!
Career opportunities in the field of machine learning
Tags: machinelearning, career, deeplearning, beginners
Published: 2023-02-11 17:56:17



There are many career opportunities in the field of machine learning, ranging from entry-level positions to senior roles. Here are some of the most common job titles and descriptions:

**Data Scientist:** A data scientist uses statistical and machine learning methods to analyze large and complex datasets, uncover patterns and insights and communicate findings to stakeholders. _Estimated Salary: $100,000 - $150,000 per year_, depending on experience and location.

**Machine Learning Engineer:** A machine learning engineer designs, builds, and deploys machine learning models and systems. They also collaborate with data scientists to turn prototypes into production-ready models. _Estimated Salary: $120,000 - $180,000 per year._

**Research Scientist:** A research scientist conducts cutting-edge research in machine learning and artificial intelligence, and publishes papers in academic journals. _Estimated Salary: $120,000 - $200,000 per year._

**Deep Learning Engineer:** A deep learning engineer specializes in developing deep neural networks, which are a type of machine learning model used for tasks such as image and speech recognition. _Estimated Salary: $130,000 - $180,000 per year._

**Business Intelligence Analyst:** A business intelligence analyst uses machine learning and data analytics to help organizations make better business decisions by identifying patterns in their data. _Estimated Salary: $70,000 - $120,000 per year.
_
**AI Product Manager:** An AI product manager leads the development and launch of AI-powered products, working closely with cross-functional teams of engineers, data scientists, and business stakeholders. _Estimated Salary: $120,000 - $200,000 per year.
_
**Machine Learning Analyst:** A machine learning analyst applies machine learning techniques to solve real-world problems, such as detecting fraud or improving customer experiences. _Estimated Salary: $90,000 - $140,000 per year.
_
These are just a few examples of the many career paths available in the field of machine learning. To pursue a career in this field, you will typically need a strong background in mathematics, statistics, and computer science, as well as experience with programming languages such as Python and TensorFlow. Additionally, it is important to stay up to date with the latest advancements and techniques in machine learning and AI.

Please note that these ranges are estimates and can vary widely based on factors such as location, industry, and level of experience
Objects
Published: 2023-02-11 17:50:02

Objects are made with two {}

That is their home. 

{} - this is called the object literal syntax

{
key: 'theValue' 
}

Example of a nested key
{
  key: {
    nestedKey: 'nestValue'
  } 
}

You can put a funciton in an object 

{
   functionName(parameter) {
    console.log('literally whatever')
    }
}

This is also a good syntax

const value1 = 'value1's value'
const value2 = 'value2's value'
const value3 = 'value3's value'

const values = {value1, value2, value3}

you can log out...

console.log(values.value1) -- this returns value1's value

If you wanted to throw a method into the object you would have the following syntax 

const values = {value1, value2, value3, function() {console.log('whatever you want'}}