teleren/devto huggingface dataset:
Interface Typescript
Tags: typescript, tutorial, beginners, programming
Published: 2023-05-03 14:56:12

**Using Object**

```
interface IUser {
	name: string;
	age: number;
}
```
```
const userWithInterface: IUser = {
	name: "interface",
	age: 200,
};
```

Extend Interface

```
interface IExtendUser extends IUser {
	role: string;
}
```
```
const user1: IExtendUser = {
	age: 200,
	name: "Extend Interface",
	role: "Admin",
};
```

**Using Function**

```
interface IAddNumbers {
	(num1: number, num2: number): number;
}
```
```
const addNumbers: IAddNumbers = (num1, num2) => num1 + num2;
```

**Using Array**

```
interface IRollNumbers {
	[index: number]: number;
}
```
```
const rollNumbers: IRollNumbers = [1, 4, 5];
```
🌪️No es humo
Tags: inteligenciaartificial, tech, ias, ai
Published: 2023-05-03 14:43:26


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lw03dfjhv2pet9pe3d9.jpeg)

No es humo💨

Ya no veo gente cuestionándose si la Inteligencia Artificial nos va a dejar sin trabajo, no solo desarrolladores o profesionales que trabajan en temas relacionacios con tecnología, es un cuestionamiento general. Aplica para cualquier posición laboral.

La expectativa es que se haya entendido el mensaje el mensaje y para los que no, todavía están a tiempo de hacerlo.

A veces aburre leer tanto spam porque es el tema de moda y lo seguirá siendo durante los próximos años, pero negarse a esta realidad es no haber entendido el momento de la ciencia en el que estamos.

No es moda, no es vender humo. Por mi parte ya se qué me podría pasar si no aprendo a utilizar las herramientas que están para potenciar un conocimiento que se tiene de base,  menospreciar y dejarlo de lado es no ser consciente de todo el poder que tenemos a disposición para construir un futuro.

La invitación es a que lo intenten, al final nada pierden con ser curiosos y sumarse a aprender algo nuevo.
Install KVM on Linux
Published: 2023-05-02 12:50:06



## Install KVM packages

Installing all packages needed to run KVM:

```plaintext

sudo pacman -Syy
sudo pacman -S archlinux-keyring
sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat
```

Also install *ebtables*  and *iptables* packages:

```plaintext

sudo pacman -S ebtables iptables
```

## Step 2: Install libguestfs

```plaintext
sudo pacman -S libguestfs
```

## Step 3: Start KVM libvirt service

```plaintext
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service

//runing ?
systemctl status libvirtd.service
```

## Step 4: Enable normal user account to use KVM

```plaintext
sudo vim /etc/libvirt/libvirtd.conf
```

Set the UNIX domain socket group ownership to libvirt, (around line **85**)

```plaintext
unix_sock_group = "libvirt"
```

Set the UNIX socket permissions for the R/W socket (around line **102**)

```plaintext
unix_sock_rw_perms = "0770"
```

Add your user account to libvirt group.

```plaintext
sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
```

Restart libvirt daemon.

```plaintext
sudo systemctl restart libvirtd.service
```

## Step 5: Enable Nested Virtualization (Optional)

Nested Virtualization feature enables you to run Virtual Machines inside a VM. Enable Nested virtualization for `kvm_intel / kvm_amd` by enabling kernel module as shown.

```plaintext
### Intel Processor ###
sudo modprobe -r kvm_intel
sudo modprobe kvm_intel nested=1

### AMD Processor ###
sudo modprobe -r kvm_amd
sudo modprobe kvm_amd nested=1
```

To make this configuration persistent,run:

```plaintext
echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm-intel.conf
```

Confirm that Nested Virtualization is set to Yes:

```plaintext
### Intel Processor ###
$ systool -m kvm_intel -v | grep nested
    nested              = "Y"
    nested_early_check  = "N"
$ cat /sys/module/kvm_intel/parameters/nested 
Y

### AMD Processor ###
$ systool -m kvm_amd -v | grep nested
    nested              = "Y"
    nested_early_check  = "N"
$ cat /sys/module/kvm_amd/parameters/nested 
Y
```

## Step 6:

Run "Virtual Machine Manager"
How to group the values of list elements into other lists with Python
Tags: python
Published: 2023-05-03 14:34:07

In this article, I'll be showing you how to implement a python algorithm that pushes the values of list items into another list. 

I'd also be showing how to apply this algorithm in solving real-world problems.

First, let's assume you have a blog that publishes sport news. And you want to implement a functionality that tells your blog readers the teams that won and lost matches during the week.

Let's say your data structure is in this form:
    
```python
#home team name, away team name, result
Matches = [
    ['Chelsea', 'Brighton', 'home team win'],
    ['Burnley', 'Arsenal', 'away team win'],
    ['Man city', 'Sheffield', 'home team win']
]
```
And you want the result to be like this:
```python
team_win = ['Chelsea', 'Arsenal', 'Man city']
team_lost = ['Brighton', 'Burnley', 'Sheffield']
```
This is how you implement it in python:

First, create 3 variables: matches, team_win, team_lost.
```python
#home `team name`, `away team name`, `result`
matches = [
    ['Chelsea', 'Brighton', 'home team win'],
    ['Burnley', 'Arsenal', 'away team win'],
    ['Man city', 'Sheffield', 'home team win']
]
team_win = []
team_lost = []
```
Next, you'll you a `for` loop to iterate over the values of `matches` variable. 
```python
for i in matches:
```

Within the loop, If the third item (result) of the list element is `'home team win'`, append the first item(home team name) of the list element to `team_win` variable. Else, append it to the `team_lost` variable
```python
for i in matches:
    if i[2] == 'home team win':
        team_win.append(i [0])
    else:
        team_lost.append(i [0])
```
If the third item (result) of the list element is `'away team win'`, append the second item(away team name) of the list element to `team_win` variable. Else, append it to the `team_lost` variable
```python
for i in matches:
    #...
    if i[2] == 'away team win':
        team_win.append(i [1])
    else:
        team_lost.append(i [1])
```
At the end, this is how your code should be look like:
```python
#home team name, away team name, result
matches = [
    ['Chelsea', 'Brighton', 'home team win'],
    ['Burnley', 'Arsenal', 'away team win'],
    ['Man city', 'Sheffield', 'home team win']
]
team_win = []
team_lost = []

for i in matches:
    if i[2] == 'home team win':
      team_win.append(i[0])
    else:
      team_lost.append(i [0])

    if i[2] == 'away team win':
      team_win.append(i[1])
    else:
      team_lost.append(i [1])

print(team_win)
#['Chelsea', 'Arsenal', 'Man city']
print(team_lost)
#['Brighton', 'Burnley','Sheffield']
```
You can try implementing this algorithm for the following scenarios:
1) separate male and female products from a list containing product information

2) separate months where the sales is greater than 100,000 from those whose sales is lesser than 100,000

3) separate debtors from creditors

I hope you've understood how to implement this algorithm. Cheers.
Introducing Browser Flashcards
Tags: githubhack23
Published: 2023-05-03 14:25:57

## What I built 

What I built is an automatically generated flashcard repository for language learners, that lives in their browsers.

### Category Submission: 

No doubt this is gonna be a Wacky Wildcards submission, and possibly Phone Friendly since the app will adapt its layout accordingly to each screen size, even though it's not yet qualified as a PWA yet.  

### App Link

https://lingohelper.vercel.app/ 

Will change the domain name soon in accordance with the new name 

### Screenshots 

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

For your better understanding, you can check out the videos below: 

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

{% embed https://youtu.be/1Q_Q1tLpmtc %}

### Description 

Browser Flashcards (formerly Lingohelper ) is an automatic flashcard generator for language learners, designed to live right in your browser. You can input a short paragraph or a comma-separated list of words, and the app will take you to a flashcard editor where you can make edits before saving to your browser storage. The project was born out of a desire to provide an efficient vocabulary learning tool that doesn't require a subscription or registration.

No signup required, no ads, no cookies, no paywall, just flashcards. For your own benefit.

### Link to Source Code 

https://github.com/CallmeHongmaybe/browser-flashcards

### Permissive License 

The project's license is Apache 2.0 

## Background (What made you decide to build this particular app? What inspired you?) 

Aside from my day job as a dev, one of my lesser known side hustle is teaching people languages online. By studying their learning experience and preferences, I thought it might be cool if there is an app that can help them learn vocabulary efficiently without having to pay for a subscription in Quizlet and without any registration whatsoever. 

### How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?)  

I built this project using Next.js, Tailwind CSS and Dexie.js  (Which is React wrapper for IndexedDB, the kind of database that lives in browsers) 

Obviously the project is hosted on Vercel, which I'm grateful for due to the seamless hosting experience provided without charge. 

One thing I liked about this project is the amount of technical creativity I've never got to express before in any of my past personal projects, through management of mouse events and state management between different components inside the flashcard editor. 

Like when you click a star button, the flashcard's gonna turn gold. Or when you add a new card, the input fields will reset to empty and the deck will be scrolled to the position of the new card.   

I knew sometime before that GitHub Codespace is very similar to Gitpod, and I'd only need to tell Codespace which repo to host on its cloud. 

### Additional Resources/Info

The sortation and categorization of English words comes from a library/npm package called `natural`.
Building Web-Based Games and Utility Projects Using JavaScript
Tags: javascript, tutorial, node, webdev
Published: 2023-05-03 14:22:44

Do you want to learn JavaScript in a way that is engaging and hands-on? My latest course is perfect for you!


![Building Web-Based Games and Utility Projects Using JavaScript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bku6bf383vykn42qktv9.gif)

Learning a programming language can be intimidating, but this course is designed to help you learn JavaScript by creating real-world projects. You'll get to work on web-based games and utility projects using different data structures, such as arrays, linked lists, LRU cache, and graphs.

The course will start with the basics of JavaScript, such as classes, objects, variables, and DOM manipulation. You'll then build on that foundation to create interactive games and utility projects, like a memory game, a calculator, and a tic-tac-toe game.

Throughout the course, you'll receive clear step-by-step instructions for each project, as well as assessments to help monitor your progress. By the end of the course, you'll have a solid understanding of JavaScript and how to use its different data structures to create actual projects.

This course is ideal for anyone looking to enhance their skills and take their career to the next level. Whether you're interested in web development, game programming, or interactive media, this course will give you a solid foundation to grow your career in these areas.

So why wait? Join me now and enrol in this exciting new course here: https://lnkd.in/dV-crEXi
Primitives in Javascript
Tags: javascript, webdev, programming, node
Published: 2023-05-03 14:14:11

Primitives are the data that are not objects and they have no methods and properties.
All primitives are **immutable**. They reside in the call stack while execution of the program, unlike the objects that reside in memory heap.

**There are seven primitive data types in Javascript**

1. Number
2. String
3. Boolean
4. Null
5. Undefined
6. Symbol (ES2015)
7. BigInt (ES2020)

## Everything in Javascript is either primitive or object

JavaScript only has primitive types and objects.

Primitive types are boolean, null, undefined, bigint, number, string, and symbol.

What differentiates a primitive from an object is that primitives do not have any properties or methods; however, you'll note that 'foo'.toUpperCase() evaluates to 'FOO' and does not result in a TypeError. This is because when you try to access a property or method on a primitive like a string, JavaScript will implicitly wrap the primitive type using one of the wrapper classes, i.e. String, and then immediately discard the wrapper after the expression evaluates. All primitives except for null and undefined exhibit this behaviour.
LIST OF TOP 11 BEST FRONT-END FRAMEWORKS FOR WEB DEVELOPMENT
Tags: framework, react, development, developer
Published: 2023-05-03 14:08:56

Front-end frameworks are extensively used in web development by IT organizations. A front end, as its name suggests, has to do with how a website or application appears to users. A substantial portion of the web design and development process involves front-end frameworks. These frameworks determine the web apps' aesthetics, visual appeal, and UX design.

**Best Front-End Frameworks**
1. React
2. Semantic UI
3. Angular
4. JQuery
5. Vue.Js
6. Backbone.Js
7. Ember.Js
8. Svelte
9. Foundation
10. Preact
11. Bootstrap

**Why Do We Choose React As Our First Preference?**

React is a well-liked and flexible toolkit for building complex online apps. Because of its component-based architecture, it is simple to write reusable, modular code and complex, massive applications that take use of virtual DOM and quick rendering.

**What Is Web Framework?**

Web frameworks are resources that developers can use to access libraries, structures, and tools more quickly when developing web applications. Although frameworks limit some development customization, they still let programmers create the foundation for it wherever it is required.

**What Are Front-End Frameworks?**

For the development of websites and web applications, front-end frameworks provide a predetermined structure and design. It involves designing user-friendly user interfaces and skillfully displaying user data on the back end. These HTML, CSS, and JavaScript file sets have already been created. Additionally, offer pre-built elements and features that can be quickly customized and incorporated into a project, which increases the likelihood that a front-end interface will actually be developed.

All of these [front-end frameworks](https://www.bloggercage.com/best-front-end-frameworks-for-web-development/) have benefits and drawbacks, and they perform well for specific projects and development requirements. When choosing a framework, it's important to take into account factors like project complexity, team experience level, added functionalities, and support and resource availability. The final decision for the framework will be made in light of the particular requirements and goals of your project, as well as the level of competence of the development team.
Albuquerque seo
Published: 2023-05-03 13:47:19

The unmarried most compelling element that clients ought to are seeking whilst in want of an SEO optimization organisation is that if the techniques that the business enterprise uses produce outcomes. This is in terms of attracting the online visitors. After attracting the clients convince the clients to buy the goods which can be being offered at the net page. These two matters could depend on the software that the search engine marketing Company is the usage of; the techniques in play and additionally the creativity of the internet clothier t create a completely unique website for you.
**_[Albuquerque seo](https://bkdesignsolutions.com/albuquerque-seo/harness-the-power-of-albuquerque-seo-by-understanding-the-value-of-backlinks/)_**
There is technique that a search engine marketing optimization enterprise follows in achieving this end result. The first element is to analyze to your marketplace area of interest. The fact finding studies will allow the web fashion designer recognize how the marketplace section behave, what your competition are doing and the way quality to out do them even as at the identical time attractive to the online users. The 2d stage is method of an e advertising strategies as a way to reap a given set of objectives. The internet page should also be smooth to track and have quantifiers so that it will tell the actual overall performance of the website on line. One of the signs is the actual time graphing device that tells at the variety of visitors journeying the website. Well hooked up seek engine advertising companies could have the internet site get returns inside a short time frame.

The successes of an search engine marketing optimization agency rely on how great it is able to use the internet designing techniques to give you a properly functioning internet site. One of the handiest one is creations of links. One of the high-quality and best one is the link wheel creation approach. In this method, one is capable of create his very own niche on line. This is an ideal way of locking out competition and different unrelated web sites that could pose a chance to accomplishing high on-line site visitors.

The call comes approximately from the nature of the hyperlinks which can be created. The net design is carried out on net 2.0. This manner websites with related content are interlinked together to form a wheel. There are links that hyperlinks your severa web sites collectively. This approach whilst the net consumer receives to one of the sites, he receives brought to a pool of web sites that where he can discover something he desires in the subject matter of interest. This is a technique that makes the web consumer live longer. A wheel technique is a commercially informed one due to the fact one may be able to get Google indexing need to the links be created professionally to comply to Google trendy. A SEO optimization corporation can even make use of the social media optimization techniques where social media turns into goal. The enterprise will create hyperlinks with a view to enable your internet site to circulate inside the social media.
Repeated String Example in JavaScript
Tags: webdev, javascript, beginners, programming
Published: 2023-05-03 13:44:09

<code>

var string;
var repeat;


var stringRepeater = function (string, repeat) {
 
 var repeatedString = "";
 
  while (repeat > 0){
    
    repeatedString+=string;
    repeat--
    
  }
  
  return repeatedString
  
}

</code>
Giới thiệu Ford Explorer EV | Khuyến mãi giá tốt 05/2023
Tags: auto360, fordexplorer
Published: 2023-05-03 13:20:39

https://auto360.website/
Auto360 – Auto360 Website
Thiết kế Web giá tốt Auto360, dịch vụ Google Ads chuyên nghiệp.
#auto360 #website #auto360website
https://auto360.website/xe/mg-cyberster-ev-ra-mat-va-ban-tai-chau-au/
MG Cyberster EV ra mắt và bán tại Châu Âu | 04/2023 - Auto360
Giới thiệu xe MG Cyberster EV tại Auto Shanghai 2023, xe bán tại châu Âu 2024, tìm hiểu giá xe, khuyến mãi mới nhất của MG Cyberster EV.
#Auto360 #website #auto360website #mg #MGCybersterEV
https://auto360.website/xe/gioi-thieu-xe-chery-omoda-5-ev-thong-so-ky-thuat/
Giới thiệu xe Chery Omoda 5 EV | Thông số 05/2023 - Auto360
Giới thiệu xe Chery Omoda 5 EV, chạy hoàn toàn bằng điện, ưu đãi giá tốt. Giá lăn bánh và khuyến mãi mới nhất của Chery Omoda 5 EV. 05/2023
#Chery #omoda #omoda5 #cheryomoda #omoda5ev #cheryomoda5ev
https://auto360.website/xe/gioi-thieu-ford-explorer-ev/
Giới thiệu Ford Explorer EV | Khuyến mãi giá tốt 05/2023 - Auto
Giới thiệu xe Ford Explorer EV, thông số kỹ thuậ và chương trình khuyến mãi mới nhất của xe Ford Explorer EV,
#fordexporerev #giaxeexplorer #explorerev #auto360
Scikit-Learn Code Snippets for Common Machine Learning Tasks: A Comprehensive Guide for Beginners
Tags: machinelearning, python, datascience, beginners
Published: 2023-05-03 13:18:43

## Introduction
Machine learning is a subfield of artificial intelligence that has gained immense popularity over the years. It involves the use of algorithms to analyze and extract patterns from data, making it possible for machines to learn from experience and make predictions or decisions without being explicitly programmed. One of the most widely used libraries for machine learning in Python is scikit-learn. In this blog, we will cover scikit-learn code snippets for common machine learning tasks that beginners can use to get started with their projects.

**Snippets for Common Machine Learning Tasks:**

- Loading the Iris Dataset: The Iris dataset is a well-known dataset in the machine learning community. It consists of 150 samples of iris flowers, with 50 samples of each of three different species. 

```Python
from sklearn.datasets import load_iris
iris = load_iris()
X, y = iris.data, iris.target
```

- Splitting Data into Training and Testing Sets: It is important to split the data into training and testing sets to evaluate the performance of the machine learning model. The following code can be used to split the data:

```Python
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
```

- Building a Decision Tree Classifier: Decision trees are simple yet powerful models for classification. The following code can be used to build a decision tree classifier:

```Python
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(random_state=42)
clf.fit(X_train, y_train)
```

- Evaluating the Model Performance: Once the model is built, it is important to evaluate its performance. The following code can be used to calculate the accuracy of the model on the test set:

```Python
from sklearn.metrics import accuracy_score
y_pred = clf.predict(X_test)
accuracy = accuracy_score(y_test, y_pred)
print(f"Accuracy: {accuracy}")
```

## Conclusion:
Scikit-learn provides a comprehensive set of tools for machine learning in Python. In this blog, we covered scikit-learn code snippets for common machine learning tasks that beginners can use to get started with their projects. With the help of these snippets, users can load datasets, split data into training and testing sets, build machine learning models, and evaluate their performance. These code snippets provide a great starting point for anyone looking to explore the world of machine learning using Python.