teleren/devto huggingface dataset:
PM2 and it's Features
Tags: javascript, webdev, beginners, programming
Published: 2022-10-10 15:44:51

**PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.**

**PM2 also offers a simple and easy-to-use monitoring feature, which makes it easy to get information about your applications' health.**


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

**PM2 is constantly being updated and now supports over 30 different languages, making it a truly multi-language platform.**

**Some of the features that make PM2 stand out are:**

1. **Application Pre-loading**

PM2 can pre-load applications, which means that your applications are started before they are actually needed. This is especially useful for web applications, where you can start the application server before the first user request arrives.

This way, the user doesn't have to wait for the application to start, and the application can immediately start serving requests.

2. **Auto-scaling**

PM2 can automatically scale applications based on the load. This is especially useful for web applications, where the number of requests can vary greatly over time.

With auto-scaling, PM2 can automatically add or remove application instances based on the load, so that the application always has the capacity to serve all incoming requests.

3. **Load-balancing**

PM2 comes with a built-in load balancer, which can distribute requests to different application instances. This is especially useful for web applications, where you can have multiple application servers running behind the load balancer.

The load balancer will automatically distribute requests to the different application servers, so that each server only has to handle a fraction of the total load.

4. **Monitoring**

PM2 comes with a simple and easy-to-use monitoring feature, which makes it easy to get information about your applications' health.

The monitoring feature shows information about the CPU and memory usage of each application, as well as the number of requests that each application is handling.

This information can be used to identify performance bottlenecks and optimize the applications.

5. **Multi-language support**

PM2 supports over 30 different languages, making it a truly multi-language platform.

This means that you can use PM2 to manage applications written in any language, not just Node.js.

6. **Clustering**

PM2 comes with built-in support for clustering, which allows you to run multiple application instances on a single server.

Clustering is especially useful for web applications, where you can have multiple application servers running behind the load balancer.

With clustering, each application server can handle its own part of the load, which can improve the performance of the overall system.

**Graceful shutdown**
Use Nginx as Loadbalancer with this code
Tags: nginx, javascript, webdev, python
Published: 2022-10-10 15:38:37


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

_Nginx is a web server that is often used for load balancing. Load balancing is a process of distributing workloads across multiple computers or servers. This helps to ensure that no single computer or server is overloaded and that the workload is distributed evenly. Nginx can be used to load balance between different servers, or even between different parts of the same server. For example, if you have a website that is hosted on two different servers, you can use Nginx to load balance between those two servers. This ensures that both servers are used equally and that the website is always available._

_Nginx is a very popular web server because it is very efficient and can handle a lot of traffic. It is also very versatile and can be used for a variety of purposes. One of the most popular uses for Nginx is as a load balancer. Load balancing is a process of distributing workloads across multiple computers or servers. This helps to ensure that no single computer or server is overloaded and that the workload is distributed evenly. Nginx can be used to load balance between different servers, or even between different parts of the same server. For example, if you have a website that is hosted on two different servers, you can use Nginx to load balance between those two servers. This ensures that both servers are used equally and that the website is always available._

_Nginx is a very popular web server because it is very efficient and can handle a lot of traffic. It is also very versatile and can be used for a variety of purposes. One of the most popular uses for Nginx is as a load balancer. Load balancing is a process of distributing workloads across multiple computers or servers. This helps to ensure that no single computer or server is overloaded and that the workload is distributed evenly. Nginx can be used to load balance between different servers, or even between different parts of the same server. For example, if you have a website that is hosted on two different servers, you can use Nginx to load balance between those two servers. This ensures that both servers are used equally and that the website is always available._
Synodus - Your Strategic Technology Partner
Tags: ai, analytics, javascript
Published: 2022-10-10 15:36:18

[Synodus](https://synodus.com/) is an IT consulting and software development services provider. Started as a small tech lab, we became a premium tech provider and have supported organizations and enterprises across the world to improve performance and gain new competitive edge over competitors.

- IT Consulting

- Software Development

- Web Development

- Mobile App Development

- AI & Data Analytics
🔴 Live Q&A session on Discord Tomorrow
Tags: opensource, microservices, luos, help
Published: 2022-10-10 15:25:44

🔴 Live Q&A session on Discord TOMORROW at 6:00 PM CEST with Nicolas Rabault. 

💬 Comment on this post with your question now and we’ll answer it live!

⏩ [To participate](https://discord.gg/DUNWRFQSdP?event=1026867797004927027) 

Save the date, it will be a small friendly event to ask all the questions you want about Luos: upcoming features, vision, best use cases, pros and cons.
Tailwind CSS List Style Marker Example
Tags: css, tailwindcss, webdev, tutorial
Published: 2022-10-10 15:19:32

In this section we will see list style marker in tailwind css. We will see tailwind list bullet color, number list color, custom list style color with Tailwind CSS.
[view](https://larainfo.com/blogs/tailwind-css-list-style-marker-example)

### Example 1
tailwind css list bullet color using tailwind marker class.
```html
<ul class="pl-5 space-y-3 text-gray-600 list-disc marker:text-blue-600">
  <li>Tailwind CSS list style with marker class 1</li>
  <li>Tailwind CSS list style with marker class 2</li>
  <li>Tailwind CSS list style with marker class 3</li>
</ul>
```

![tailwind bullet list style marrker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w822d6rlwcgwww21uqei.png)

### Example 2
tailwind css list style number color using tailwind marker class.
```html
<ul class="pl-5 space-y-3 text-gray-600 list-decimal marker:text-purple-600">
  <li>Tailwind CSS list style with marker class 1</li>
  <li>Tailwind CSS list style with marker class 2</li>
  <li>Tailwind CSS list style with marker class 3</li>
</ul>
```

![tailwind css list style number marker color](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67pmtpmfmvne6o9m57uc.png)

### Example 3
tailwind css list style custom color using tailwind marker.

```html
<ul class="pl-5 space-y-3 text-gray-600 list-disc marker:text-[#ff0000]">
  <li>Tailwind CSS list style with marker custom color </li>
  <li>Tailwind CSS list style with marker custom color </li>
  <li>Tailwind CSS list style with marker custom color </li>
</ul>
```

![tailwind custom bullet list color](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5wy7ayfoy83plx20nho9.png)
Benefit of using Docker for Deployment
Tags: webdev, docker, devops, javascript
Published: 2022-10-10 15:07:17

_**Docker is a powerful tool that enables developers to create, deploy, and run applications in containers. Containers are isolated from one another and allow for consistent development and deployment environments**._


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

_Docker has many benefits, including:_

1. _Docker containers are portable and can be run on any platform that supports Docker._

2. _Docker containers are lightweight and have a small footprint._

3. _Docker containers are isolated from each other, which makes for consistent development and deployment environments._

4. _Docker containers can be run on a variety of infrastructure, including public clouds, private clouds, and on-premises._

5. _Docker containers are easy to deploy and scale._

6. _Docker containers have a number of security features, including isolation, user namespaces, and seccomp profiles._

7. _Docker containers can be used to run multiple applications on a single host._

8. _Docker containers can be used to create microservices-based applications._

9. _Docker containers can be used to create portable development and testing environments._

10. _Docker containers can be used to improve application performance_
How to help Ukraine in the war as a programmer?
Tags: ukraine, python, opensource, community
Published: 2022-10-10 14:58:28

What do you do when war pushes at the door of your home? This question has followed me day after day. As you know, the war in Ukraine is brutal and has been going on for a long time. It scares me that one day it could happen to me as well. I live in Poland, where a potential confrontation is possible and increasingly certain.

I have been trying to help my family, friends and citizens prepare everyone for defense. I looked for a solution in information technology. One evening I found an interesting article about a young man who followed plane Elon Musk. For me, this is the key.

I thought I could monitor all the richest pols. The question was, how would I collect airplane numbers? After a brief reserch, I realized that it didn't make sense. I decided that I would only track private (expensive) planes heading west, which would help determine only the richest Poles.

As we well know, the billionaires will be the first to flee, and the ordinary and poor people will have to fight for the whole country. I thought it was necessary to create software for this!

I created a tool to help the people of the Eastern Bloc. The bot analyzes the data obtained from http://opensky-network.org in the Eastern Bloc countries (due to the conflict in Ukraine and the potential risk of war elsewhere). Based on the data obtained, an analysis is performed.
The tool focuses on private planes to catch the planes of the richest citizens. When a certain number of people leave their country for safer countries, it signals a potential threat and a Twitter post is automatically created.

I managed to write a second ever program in python quite efficiently, and open-source an Github. There's still a lot of work to be done, so if you're interested in helping Europeans before the war, you're welcome. Let's really improve the world, not prey on emotions to expand capital (as most startups do).


Repository
```
https://github.com/mariuszmalek/war-detection
```
Know about User Acceptance Testing
Published: 2022-10-10 14:41:12

The primary purpose of User Acceptance Testing (UAT) is just to determine whether the system developed can meet up the needs of the user in the end. This is one such process without which no system in the market can be put to use in the business. After the development of the software, this is the last resort where the developed system has to justify its working and make sure that it is worth considering. Many people might also know UAT as end-user acceptance testing, as this is the test done at the end of the development process.

The UAT process will help determine the system and ensure that all the users’ needs will be satisfied in the end. This testing procedure serves as the opportunity for the client to know more about the system. With time many people have realized its importance and want to make the best use of it.

The main idea behind using UAT is to ensure that all the app functions are properly working. Even this testing procedure will provide the best and the most genuine feedback and the end. This way, the developer gets a fair chance to make the changes in the system for the best services.

**The UAT is something that is providing with some great perks. Let’s have a look at them.**

**Helps in gaining confidence –** Once the system has undergone the UAT process, this will surely help the person achieve the trust of those who want to use it. Most users will know that the system is put to a lot of tests before it is brought up in the market, and there will be no scope for any malfunction.

**Provides realistic testing scenarios –** Many people might find it difficult to handle new systems. But if the person has a system that has undergone the UAT. It will provide a realistic approach to the tests. From its working to almost everything is provided in its analysis. This test can be conducted in different stages of software development for better results.

**Very simple to use –** The main reason for the popularity of UAT is that it is very easy to use. Once the person gets to know how software can be put to the test, just with a few clicks on the system, you can easily get all the information about the software and all its strengths and weaknesses.

**Provides the best system quality –** UAT is conducted for different systems to make sure that all the systems brought up in the market are very high in quality. The use of the UAT will make sure to provide the best approach to knowing all the qualities of the system. Even UAT delivers a better quality of system.
So, the use of [UAT & test automation tools](https://www.opkey.com/blog/streamline-and-accelerate-user-acceptance-testing-uat-with-automation) has become quite common among people to use. If you want something like this for your business, visit the Opkey platform and customize the test according to your business requirement.

Originally published at https://allnewsmagazine.com on August 30, 2022.
Video: Deploy models with Hugging Face Inference Endpoints
Tags: transformers, aws, computervision, deeplearning
Published: 2022-10-11 17:39:22

---
title: Video: Deploy models with Hugging Face Inference Endpoints
published: true
date: 2022-10-10 14:32:21 UTC
tags: transformers,aws,computervision,deeplearning
canonical_url: https://julsimon.medium.com/video-deploy-models-with-hugging-face-inference-endpoints-3a7f6537ac0e
---

In this video, I show you how to deploy Transformer models straight from the [Hugging Face hub](https://huggingface.co) to managed infrastructure on AWS, in just a few clicks.

Starting from a model that I already trained for image classification, I first deploy an endpoint protected by Hugging Face token authentication. Then, I deploy a second endpoint in a private subnet, and I show you how to access it securely from your AWS account thanks to AWS PrivateLink.

{% youtube ZQPm2-uR9zA %}

- Model: [https://huggingface.co/juliensimon/autotrain-food101-1471154053](https://huggingface.co/juliensimon/autotrain-food101-1471154053)
- Inference Endpoints: [https://huggingface.co/inference-endpoints](https://huggingface.co/inference-endpoints)
- Inference Endpoints documentation: [https://huggingface.co/docs/inference-endpoints/index](https://huggingface.co/docs/inference-endpoints/index)
- AWS PrivateLink documentation: [https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html](https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html)
Paracetamol.js💊| #189: Explica este código JavaScript
Tags: javascript, webdev, spanish, beginners
Published: 2022-10-10 14:30:45

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

**¿Cuál es la manera correcta de llamar a un getter?**

```js
class Dog {
  #peso;
  constructor({ color, tamanio, peso=10, cola=true}){
    this.color = color;
    this.tamanio = tamanio;
    this.#peso = peso;
    this.cola = cola;
  }

  get getIsCola(){
    return this.cola ? "Si tiene cola" : "No tiene cola"
  }
}

const boby = new Dog({
  color: "cafe",
  tamanio: "grande"
});

console.log(boby.getIsCola); //A
console.log(boby.getIsCola()); //B
```

A. `A`
B. `B`
C. `Ninguna de las anteriores`

Respuesta en el primer comentario.

---
The Hacker’s Tribute Vol. 96: Call a friend from your PC and don’t lose your identity in the process
Tags: programming, cyberspace, news, security
Published: 2022-10-10 14:22:10

The new issue of **Hacker's Tribute** is here! 

What is so similar between surfing cyberspace and driving a car in the physical one? The number of commodities and dangers that lie ahead.  

This week in [The Hacker's Tribute Vol. 96](https://softwarehut.com/blog/tech/the-hackers-tribute-vol-96), Dan 'the Man' Kowalski will draw your attention to the latest **tech and coding news** - Intel's new app **Unison** launching this year, **identity theft** in the programming world and the worrying **deepfake** business. We have one more topic for you, but you'll have to read the whole issue to find out. Have a great day!
Still using Sublime...
Published: 2022-10-10 14:21:43

Ever wondered why you get bored while coding. The problem could be with the code editor you decided to use. Some people argue that sublime is text is fast while an editor such VSCode is fast enough. 

Any day anytime I would pick VSCode as my text editor. The editor has powerful developing tools and you can customize every feature to your liking and install any number of third-party extensions, supports macOS, Linux, and Windows, support for hundreds of languages and has robust and extensible architecture.
Make API Call in Python
Tags: python
Published: 2022-10-10 14:15:19

I wrote this quick tutorial to learn how to make API calls in Python after transitioning to it from JavaScript.

I thought [making API calls in Python](https://www.youtube.com/watch?v=izhHyIyxdwY) would be difficult. But I was wrong. It's actually straightforward (like many things in Python.)

To make an API call in Python follow these steps:

1. Import `requests` package
2. Use `requests.get(URL)` method with the API url
3. Convert result to JSON object with `.json()` method on returned object.
4. Access JSON properties as Python dictionary (Using [""] brackets)

Here is a code example:

```
import requests

url = "http://api.weatherapi.com/v1/current.json?key=47a53ef1aeff4b29ba811204220210&q=London&aqi=no"

# Make API Call
response = requests.get(url)

# Convert result object to JSON dictionary
json = response.json()

# Get json.current.temp_f property from the JSON response
temperature = json["current"]["temp_f"]

# Print temperature from returned JSON object
print(temperature)
```

This tutorial is also available on YouTube:

{% embed https://www.youtube.com/watch?v=izhHyIyxdwY %}
01-Go Install
Tags: go, install
Published: 2022-10-10 14:09:21

1. Go download.
ในที่นี้จะอ้างอิงการติดตั้ง Go ในเวอร์ชั่น 1.19.2 โดยทำการดาวน์โหลดไฟล์จากผู้พัฒนาตามลิงค์ต่อไปนี้
[Go for Linux](https://go.dev/dl/go1.19.2.linux-amd64.tar.gz)
หากต้องการอ่านรายละเอียดเพิ่มเติมจากเว็บไซต์ผู้พัฒนาสามารถเข้าไปอ่านได้ที่นี่เลย [https://go.dev](https://go.dev)

2. Go install.
2.1 ลบ Go ที่ติดตั้งไว้ก่อนหน้าออก
หากไม่แน่ใจว่าเคยติดตั้งมาก่อนแล้วไม่หรือสามารถตรวจสอบมี directory  "/usr/local/go" นี้อยู่หรือไม่เนื่องจากการติดตั้ง Go ทับของเดิมที่มีอยู่แล้วจะทำให้ Go พังและการติดตั้งไม่สำเร็จ เพื่อความมั่นใจว่าการติดตั้งจะสำเร็จควรลบ Go ที่ติดตั้งอยู่ออกไปก่อนโดยใช้คำสั่งดังนี้

```
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz
```

2.2 กำหนด PATH ใน Go
กำหนด PATH /usr/local/go/bin เข้าไปในตัวแปรระบบโดยการก็อปปี้ คำสั่งข้างล่างนี้ไปวางไว้ในไฟล์ $HOME/.bashrc หรือ $HOME/.profile หรือ /etc/profile เพียงที่ใดที่หนึ่งเท่านั้น

```
export PATH=$PATH:/usr/local/go/bin
```

หากคุณนำไปวางไว้ในไฟล์ $HOME/.bashrc คุณสามารถใช้คำสั่ง source $HOME/.bashrc แล้วทดสอบ Go ได้ทันที หากยังไม่ได้อาจต้อง reboot หรือ login เข้าระบบใหม่อีกครั้งก่อนถึงจะใช้งาน Go ได้

2.3 ยืนยันการติดตั้งสำเร็จ
คุณสามารถตรวจสอบว่าสามารถใช้งาน Go ได้หรือยังด้วยการใช้คำสั่ง

```
go version
```

ตัวอย่างผลลัพธ์จากการใช้คำสั่ง go version

```
go version go1.19 linux/amd64
```

## Go to code.
ได้เวลาเขียน Go กันแล้ว :)
How to use Prisma with express, postgress, and Graphql?
Tags: graphql, express, prisma, postgres
Published: 2022-10-10 14:04:28


Welcome friends to this new blog. In this blog, you will learn how to set up APIs with the help of an express server. You will learn how to integrate graphql in the express server.

GitHub link — [https://github.com/nextdev1111/prisma-postgres-graphql-express](https://github.com/nextdev1111/prisma-postgres-graphql-express)

Youtube Video in Hindi
{% embed https://youtu.be/AhNPzf8fHX4 %}

### 📒Notes

 1. I will be using [**pnpm ](https://pnpm.io/)**for this project but the tutorial will show you how to do it with **npm.**

 2. We will be using **typescript **for this project.

### Step1: 📦 Setup

Make a folder by whichever name you want **but you need to consider npm naming restrictions.**

Then run this command

    npm init -y

Make another folder named **src**. Make a file named **index.ts **in the src folder.

    [root folder]

    --- src
    --- --- index.ts

### To install dependencies and setup typescript

This will install dependencies 👇

    npm i @graphql-tools/schema @prisma/client dotenv express graphql express-graphql

This will install dev dependencies 👇

    npm i -D [@types/dotenv](http://twitter.com/types/dotenv) [@types/express](http://twitter.com/types/express) [@types/node](http://twitter.com/types/node) prisma ts-node typescript
{% gist https://gist.github.com/nextdev1111/f3072c1b18f84dbe1d1f78c2598d3180.js %}


Then type 👇 to create a **tsconfig **file.

`npm install -g typescript
tsc --init
`
### Step2: 🗃️ Prisma Setup with postgress database

Type this command in your terminal

    npm prisma init

Prisma will set up two things in your root folder.

 1. Prisma folder

 2. .env file

In the prisma folder, you can find schema.prisma file.
{% gist https://gist.github.com/nextdev1111/a62ac56f49d630634be2a6f6e20b6c8a.js %}
Let’s add a database now.

go to [https://railway.app/](https://railway.app/)

Click on start new project 

You can set up a PostgreSQL database. If you find any problem, you can also watch the youtube video.

![](https://cdn-images-1.medium.com/max/5120/1*wman-o5A8gY5apasHoeYiw.png)

![](https://cdn-images-1.medium.com/max/5120/1*ibCjSmzVRYCvYgxHK6t7DA.png)

Then, you should copy the postgresql database connection key 

Then go to .env your project’s root folder.

Then change the connection string in your .env file.

 → Remember to also include the password in the connection string.

Then type 

    prisma db push

⚠️Errors

If you face any errors, you should check the **connection string.**

### Step3: ✨Express Server

This is the basic express server
{% gist https://gist.github.com/nextdev1111/cba7ea80d1064f861eea39f510f74eec.js %}
If you want to add an entry to your database.

You can also use prisma studio

    npm prisma studio

### Step4: 💪Grahpql Integration
{% gist https://gist.github.com/nextdev1111/c2e844de2c331607ecf0adf60ddbabea.js %}
You can use graphiql on this path

    [http://localhost:3000/graphql](http://localhost:3000/graphql)

If you want to ask any questions, feel free to ask 👇
[**Join the Next Dev Discord Server!**](https://discord.gg/hN4Wc5VR4M)