teleren/devto huggingface dataset:
Semantic annotation
Published: 2024-06-27 19:29:30

Semantic annotation is the process of attaching metadata to specific elements within a text or dataset to provide additional information about the meaning and context of those elements. This often involves linking words or phrases to concepts, entities, or categories that they represent, enabling more advanced data analysis and retrieval. Semantic annotation is commonly used in various fields, including:

1. **Natural Language Processing (NLP)**: To enhance the understanding of text by machines, facilitating tasks like named entity recognition, sentiment analysis, and machine translation.

2. **Information Retrieval**: To improve search engine results by linking terms to their meanings, allowing for more accurate and contextually relevant results.

3. **Data Integration**: To unify and standardize data from different sources by mapping different terms to a common set of concepts or entities.

4. **Knowledge Management**: To enrich documents with additional context, making it easier for users to find and understand relevant information.

In practice, semantic annotation can involve the use of ontologies or controlled vocabularies to ensure consistency and accuracy in the annotations.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/itoeisilhr29hsdpunf0.jpeg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kn28jo46sm7u9q86zul.jpeg)
Is mitt dead? 🥊
Tags: typescript
Published: 2024-06-19 02:36:31

Mitt was first released 7 years ago. Today, it has open issues going back to 2021, issues waiting to be triaged, open PRs completely ignored, and no commits since mid 2023. Are the issues not worth doing? Is the library just avoiding exceeding it's 200 byte "microscopic" constraint? Maybe the author is busy with new projects and is waiting on new contributors? It's hard to say, but it makes me wonder if it's just dead.

## What is a meaningful aim for a project like this?

Mitt is clearly still successful. It's easily one of the most popular Typescript event emitter libraries coming up on ~7M  downloads on npm. Having an audience makes it easy to assume it's good as is, but would it be even more popular if it were more actively maintained? Or would feature bloat kill it entirely? Does keeping that 200 byte zip size actually matter?

Here's the past 5 years of downloads according to npm.
![Growth on npm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdt381heddfqixb2pwui.png)

Despite a flat-lined commit history.
![Decline of commits](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/630pdpzby4bcdea18oza.png)

## When does it make sense to stop?

Is it normal for projects to just stop? With the pace of change, especially as it relates to Typescript, if you're not changing it must mean you're dying. Is an event emitter just so simple that it can actually be "done"?

## Taking it personally

In our case we needed a `once` function. It's clear that mitt is **not** interested in adding this feature any time soon. The implication was that this is a problem for users to solve, though we couldn't get the types to pass. So we built our own

## Kitbag Events

https://events.kitbag.dev/

- Type safe events and payload
- Api includes `on`, `off`, `once`, `emit`, and `clear`
- Support global Handlers
- Supports broadcast channel

![Kitbag Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xuban9zqqxmwno4vygfx.png)

Kitbag Events is a fresh take on an old concept. Like Mitt it's tiny with zero dependencies, though not trying to be "microscopic". My bet is that developers would prefer a modern library that's actively maintained, even it it comes with some extra bytes. Come check it out, drop a star ⭐️, and let us know if this was a good bet.

Happy engineering!
deploy an website using RDS in terraform
Published: 2024-06-27 19:07:56

Step 1: Set Up Terraform Configuration
Create a new directory for your Terraform project and navigate into it:

bash
mkdir terraform-rds-example
cd terraform-rds-example

Create a main.tf file where you will define your Terraform configuration:

hcl
provider "aws" {
  region = "us-east-1"  # Adjust the region as per your preference
}

resource "aws_db_instance" "example_rds" {
  identifier            = "example-db"
  allocated_storage     = 20
  storage_type          = "gp2"
  engine                = "mysql"
  engine_version        = "5.7"
  instance_class        = "db.t2.micro"
  name                  = "exampledb"
  username              = "admin"
  password              = "yourpassword"  # Replace with a secure password
  parameter_group_name  = "default.mysql5.7"
  
  tags = {
    Name = "example-db"
  }
}

Step 2: Initialize and Apply Terraform Configuration
Initialize Terraform in your project directory to download the AWS provider plugin:

bash
terraform init

Validate and apply the Terraform configuration to create the resources:
terraform validate
terraform apply

Terraform will show you the execution plan. Review it and type yes to apply the changes. It will provision the RDS instance defined in main.tf.

Step 3: Deploy Your Website
After Terraform successfully creates the RDS instance, you can proceed to deploy your website. This typically involves setting up your web application on an EC2 instance or using a serverless approach like AWS Lambda or ECS, depending on your application architecture.

Step 4: Configure Your Website to Use RDS
Update your website's configuration to connect to the RDS instance. Use the endpoint and credentials specified in your Terraform configuration (aws_db_instance.example_rds.endpoint, aws_db_instance.example_rds.username, aws_db_instance.example_rds.password).

Step 5: Destroy Resources (Optional)
If you want to tear down the resources created by Terraform (e.g., after testing), you can run:

bash
terraform destroy

Conclusion
Using Terraform to deploy a website with AWS RDS provides a scalable and repeatable approach to managing your infrastructure. Make sure to customize the configuration (main.tf) according to your specific requirements, such as adjusting instance sizes, storage, and other parameters based on your workload and performance needs.
Not allow user click to back to before page through button of navigator with React
Tags: react, web3, router, javascript
Published: 2024-06-27 19:05:12

```
import { useNavigate } from 'react-router-dom'

const navigate = useNavigate()

navigate('/sign-in', { replace: true })

```

Using replace true, the browser not allow back to back page after to navigate to sign-in route, how the example.
lá số tử vi
Published: 2024-06-06 03:19:04

Tử Vi, hay Tử Vi Đẩu Số, là một bộ môn huyền học được dùng với các công năng chính như: luận đoán về tính cách, hoàn cảnh, dự đoán về các " vận hạn" trong cuộc đời của một người đồng thời nghiên cứu tương tác của một người với các sự kiện, nhân sự.... Chung quy với mục đích chính là để biết vận mệnh con người.

Lấy lá số tử vi để làm gì ?
Xem lá số tử vi trọn đời có bình giải chi tiết sẽ giúp cho quý bạn mệnh biết về tương lai, vận hạn theo các năm. Khi lấy lá số tử vi theo giờ sinh và ngày tháng năm sinh thì quý bạn cần khám phá phần luận giải lá số để nắm bắt vận mệnh của chính mình. Lá số tử vi trọn đời mang yếu tố tham khảo giúp quý bản mệnh tránh việc không nên, tăng cường việc tốt từ đó có một cuộc sống suôn sẻ và nhiều may mắn.

Lá số tử vi trọn đời thể hiện điều gì ?
Trên mỗi lá số tử vi sẽ thể hiện các phương diện cuộc sống của quý bản mệnh theo từng năm tuổi cụ thể như: công danh, sự nghiệp, gia đạo, tình duyên, tiền tài, sức khỏe, anh chị em, quan hệ xã hội...
Để tra cứu và lấy lá số tử vi trọn đời trực tuyến miễn phí quý bạn cần cung cấp đầy đủ và chính xác nhất về họ tên, giờ sinh, ngày sinh, tháng sinh, năm sinh và giới tính.
Ngoài ra: cách xem lá số tử vi có thể thay đổi theo các năm. Vì vậy để luận đoán và có cái nhìn chính xác nhất về tương lai và vận mệnh của mình trong năm Kỷ Hợi 2019 cũng như trong năm Canh Tý 2020. Quý bạn nên lấy lá số tử vi 2019 và cách lập lá số tử vi để tham khảo chi tiết tử vi năm 2020 của mình, cũng như phân tích và khám phá lá số tử vi trọn đời của các năm khác.
Xem thêm tại: https://tuvi.vn/lap-la-so-tu-vi
Deep Learning for Multi-Label Learning: A Comprehensive Survey
Tags: machinelearning, ai, beginners, datascience
Published: 2024-06-27 18:57:01

*This is a Plain English Papers summary of a research paper called [Deep Learning for Multi-Label Learning: A Comprehensive Survey](https://aimodels.fyi/papers/arxiv/deep-learning-multi-label-learning-comprehensive-survey). If you like these kinds of analysis, you should subscribe to the [AImodels.fyi newsletter](https://aimodels.substack.com) or follow me on [Twitter](https://twitter.com/mikeyoung44).*



**If you enjoyed this summary, consider subscribing to the [AImodels.fyi newsletter](https://aimodels.substack.com) or following me on [Twitter](https://twitter.com/mikeyoung44) for more AI and machine learning content.**
How To Install,Create,Modify,Destroy EC2 Instance In Teeraform
Published: 2024-06-27 18:56:50

Installing Terraform

First things first, let's get Terraform installed on your machine:

 1. Download Terraform: Visit the Terraform downloads page and download the appropriate package for your operating system.

 2. Install Terraform: After downloading, follow the installation instructions for your OS. For most systems, this involves placing the Terraform binary in your PATH.

 3. Verify Installation: Open a terminal or command prompt and type terraform --version to ensure Terraform is installed correctly.

Building Infrastructure

Now that Terraform is installed, let's create your first infrastructure:

 1. Initialize a Working Directory: Create a new directory and navigate into it. Run terraform init to initialize Terraform in this directory. This step downloads any necessary plugins for providers defined in your configuration.

 2. Write Infrastructure Code: Create a .tf file (e.g., main.tf) and define your infrastructure resources using Terraform's declarative language. For example, to create an AWS EC2 instance:

hcl
provider "aws" {
  region = "us-west-2"
}

resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
}

 3. Apply Configuration: Run terraform apply to apply your configuration. Terraform will plan the changes and prompt you to confirm before making any infrastructure modifications.

Managing Variables
Variables in Terraform allow you to parameterize your configurations:

 1. Declare Variables: Define variables in a .tf file or use a variables.tf file:

hcl
variable "instance_type" {
  description = "Type of instance to create"
  default     = "t2.micro"
}

 2. Use Variables: Reference variables in your configuration files using ${var.variable_name} syntax:

hcl
resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = var.instance_type
}

Outputs

Outputs in Terraform allow you to extract and display information about your infrastructure:

 1. Define Outputs: Declare outputs in your configuration:

hcl
output "instance_ip" {
  value = aws_instance.example.public_ip
}

 2. Display Outputs: After applying your configuration, view outputs with terraform output:

makefile
instance_ip = 203.0.113.10

Changing and Destroying Infrastructure

Updating and destroying infrastructure in Terraform is straightforward:

 1. Modify Configuration: Make changes to your .tf files (e.g., update instance type).

 2. Apply Changes: Run terraform apply again to apply the changes.

 3. Destroy Infrastructure: When you're finished, run terraform destroy to tear down all resources created by your configuration.

**Conclusion**

Congratulations! You've learned the basics of installing, building, modifying, and destroying infrastructure using Terraform. Remember to version control your configurations and always review Terraform's execution plan before applying changes to production environments. With these skills, you're ready to automate and manage your infrastructure efficiently. Happy Terraforming!
How To Install,Create,Modify,Destroy EC2 Instance In Teeraform
Published: 2024-06-27 18:56:44

Installing Terraform

First things first, let's get Terraform installed on your machine:

 1. Download Terraform: Visit the Terraform downloads page and download the appropriate package for your operating system.

 2. Install Terraform: After downloading, follow the installation instructions for your OS. For most systems, this involves placing the Terraform binary in your PATH.

 3. Verify Installation: Open a terminal or command prompt and type terraform --version to ensure Terraform is installed correctly.

Building Infrastructure

Now that Terraform is installed, let's create your first infrastructure:

 1. Initialize a Working Directory: Create a new directory and navigate into it. Run terraform init to initialize Terraform in this directory. This step downloads any necessary plugins for providers defined in your configuration.

 2. Write Infrastructure Code: Create a .tf file (e.g., main.tf) and define your infrastructure resources using Terraform's declarative language. For example, to create an AWS EC2 instance:

hcl
provider "aws" {
  region = "us-west-2"
}

resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
}

 3. Apply Configuration: Run terraform apply to apply your configuration. Terraform will plan the changes and prompt you to confirm before making any infrastructure modifications.

Managing Variables
V
ariables in Terraform allow you to parameterize your configurations:

 1. Declare Variables: Define variables in a .tf file or use a variables.tf file:

hcl
variable "instance_type" {
  description = "Type of instance to create"
  default     = "t2.micro"
}

 2. Use Variables: Reference variables in your configuration files using ${var.variable_name} syntax:

hcl
resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = var.instance_type
}

Outputs

Outputs in Terraform allow you to extract and display information about your infrastructure:

 1. Define Outputs: Declare outputs in your configuration:

hcl
output "instance_ip" {
  value = aws_instance.example.public_ip
}

 2. Display Outputs: After applying your configuration, view outputs with terraform output:

makefile
instance_ip = 203.0.113.10

Changing and Destroying Infrastructure

Updating and destroying infrastructure in Terraform is straightforward:

 1. Modify Configuration: Make changes to your .tf files (e.g., update instance type).

 2. Apply Changes: Run terraform apply again to apply the changes.

 3. Destroy Infrastructure: When you're finished, run terraform destroy to tear down all resources created by your configuration.

**Conclusion**

Congratulations! You've learned the basics of installing, building, modifying, and destroying infrastructure using Terraform. Remember to version control your configurations and always review Terraform's execution plan before applying changes to production environments. With these skills, you're ready to automate and manage your infrastructure efficiently. Happy Terraforming!
A Fullstack Journey
Tags: webdev, fullstack, discuss
Published: 2024-06-27 18:51:16

Follow me in this journey, bringing back a project of mine back to life. This project is a simple blog dedicated to my favorite types of music (mainly heavy metal).
I'm developing this whole project with the purpose of improving my knowledge as a Fullstack Developer.

The first time I started this project was around 2013 and in 2014 I launched the official website; two years later I was forced to abandon the project because of college and my job.

After 10-year hiatus I'm bringing it back by using new and updated tools and technologies I've learning through the years and taking the time to improve myself and document the experience.

My idea is write reviews for albums and concerts and also show information about artists and bands. I'll be exploring these and other tools and libraries that can help me create something unique and very personal.

This first part is explaining what I'm planning on doing, and the posts on forward are going to be about how I'm doing each step:

1. A dashboard using Laravel
2. An API service using Lumen
3. A website using ReactJS

I'll be sharing my experience in each step and how did some things so I can receive recommendations and help of how to improve the code.

In conclusion, welcome and thank you for following.

Let's get to it.
Creating an EC2 instance with SSH access using Terraform:
Published: 2024-06-27 18:48:07

**Introduction :**
               *.Terraform is an open-source infrastructure as code (IaC) tool that allows you to define and provision data center infrastructure using a high-level configuration language. One of the most common use cases for Terraform is managing cloud resources, such as creating and managing Amazon Web Services (AWS) EC2 instances.


**Steps to Create an EC2 Instance with SSH Access:**


1) **Setup Terraform Configuration**: Write a Terraform configuration file (main.tf) that specifies the desired infrastructure, including the EC2 instance, security groups, and SSH key pair.
2) **Initialize Terraform**: Run terraform init to initialize the working directory containing the Terraform configuration files. This will download the necessary provider plugins.
3) **Plan Infrastructure Changes**: Run terraform plan to create an execution plan. This command shows the changes that will be made to your infrastructure.
4) **Apply Configuration**: Run terraform apply to apply the changes and create the EC2 instance. Terraform will prompt you to confirm before making any changes.
5) **Access EC2 Instance**: Once the instance is created, use the public IP address output by Terraform to SSH into the instance and verify the setup.
 
**Conclusion:**
                    By following these steps, you can efficiently deploy EC2 instances and manage your AWS infrastructure with greater confidence and control. As you continue to explore and use Terraform, you will find it an invaluable asset in your DevOps toolkit, helping you to achieve more with less effort.
Creating an EC2 instance with SSH access using Terraform:
Published: 2024-06-27 18:47:59

**Introduction :**
               *.Terraform is an open-source infrastructure as code (IaC) tool that allows you to define and provision data center infrastructure using a high-level configuration language. One of the most common use cases for Terraform is managing cloud resources, such as creating and managing Amazon Web Services (AWS) EC2 instances.


**Steps to Create an EC2 Instance with SSH Access:**


1) **Setup Terraform Configuration**: Write a Terraform configuration file (main.tf) that specifies the desired infrastructure, including the EC2 instance, security groups, and SSH key pair.
2) **Initialize Terraform**: Run terraform init to initialize the working directory containing the Terraform configuration files. This will download the necessary provider plugins.
3) **Plan Infrastructure Changes**: Run terraform plan to create an execution plan. This command shows the changes that will be made to your infrastructure.
4) **Apply Configuration**: Run terraform apply to apply the changes and create the EC2 instance. Terraform will prompt you to confirm before making any changes.
5) **Access EC2 Instance**: Once the instance is created, use the public IP address output by Terraform to SSH into the instance and verify the setup.
 
**Conclusion:**
                    By following these steps, you can efficiently deploy EC2 instances and manage your AWS infrastructure with greater confidence and control. As you continue to explore and use Terraform, you will find it an invaluable asset in your DevOps toolkit, helping you to achieve more with less effort.
React and Vue: Most Used Front end Framework
Published: 2024-06-27 18:46:32

React and Vue are both popular tools for creating JavaScript web applications. More and more companies are getting used to how they can improve both performance and time savings while improving the overall development experience. However many other companies and devs still struggle with choosing the right framework.

**React:**

![react image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ttwxb0rjp7h6qvly51rv.jpeg)

What Is React? React, not really a framework but a library for building user interfaces. It was developed by Jordan Walke, a formal employee of Facebook and has gained immense popularity.

React is used in the creation of single-page apps and mobile apps through its flexibility and usage of components which isolates pieces of code and makes the components reusable on different parts of the web app.

React uses the virtual DOM to interact with the DOM to improves performance and stability.

**Key Features:**
1. Component architecture.
2. DOM manipulation.
3. Component state management.

**Vue:**

![Vue image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xo1to5hqyx35i27alefj.jpeg)

What Is Vue? Vue is a progressive frontend framework for building user interfaces. It was created in 2014 by Evan You and has garnered immense support and maintained by an active community of developers.

Considering that Vue is an open-source project that got a good start and is still maintaining its dominance as being one of the most accessible frameworks out there, Vue has become more and more associated with many other big names that had to implement web development into their business.

**Key Features:**
1. Lightweight and flexible.
2. Component-based architecture.
3. Powerful two-way data binding system.
4. Simple API.
5. Small bundle size (around 20KB).

**Which one is better? React or Vue
I think you should use:**

**Vue If:**
- _You want a lightweight, easy-to-learn framework._
- _Your project requires a small bundle size._
- _You prefer a component-based approach._

**React If:**
- _You need a robust library with a large community._
- _Your project involves complex state management._
- _You’re comfortable with a more extensive ecosystem._

**In Conclusion:**
Remember that both frameworks (Vue and React) have their strengths, so consider your project requirements and personal preferences when making a choice. With Vue, it's smaller, faster, templates are convenient, a simplified syntax, etc. Meanwhile, React offers more flexibility for bigger, more complex apps. You'll be able to test it better, and it's more suitable for mobile app development. leave a comment below if you have any questions. and also [HNG-internship](https://hng.tech/internship) is a place where you would be able to learn and get your hands dirty on real world application using any or both of the framework i just talked about, with [HNG-internship](https://hng.tech/premium), be sure to have a career in tech industry. 

Thanks for reading.
Create a React Tooltip component using Popover API
Tags: html, react, javascript
Published: 2024-06-27 18:39:31

Since April 2024, Popover API works major browsers on their [latest versions](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API#browser_compatibility). This API allows developers to display popover content on top of other page content.

## Code

For this small snippet, I've used JS Popover API (`HTMLElement.showPopover` & `HTMLElement.hidePopover`) and [Floating UI](https://floating-ui.com/) for Tooltip positioning. Check it out: 

{% codepen https://codepen.io/hnrq_/pen/bGyJOMK %}