teleren/devto huggingface dataset:
MAE && MSE
Published: 2024-04-10 15:48:43

Ortalama Kare Hata (MSE) ve Ortalama Mutlak Hata (MAE), regresyon modellerinin performansını değerlendirmek için kullanılan iki yaygın metriktir. İkisi arasındaki fark ve avantajları şu şekildedir:

**MSE (Ortalama Kare Hata):**

MSE, hata karelerinin ortalamasını hesaplar. Bu nedenle, büyük hataların daha fazla ağırlığı vardır ve bu tür hataların daha fazla cezalandırılmasını sağlar.
Büyük aykırı değerler (outliers) modelin performansını daha fazla etkiler. Bu, modelin aykırı değerlere daha duyarlı olduğu anlamına gelir.
Kareleme işlemi, hatalar arasındaki farkları artırarak, modelin daha hassas olmasını sağlar.
MSE, hesaplanması daha kolaydır ve türevlenebilir olduğu için optimizasyon algoritmalarıyla daha iyi çalışabilir.

**MAE (Ortalama Mutlak Hata):**

MAE, hata mutlak değerlerinin ortalamasını hesaplar. Bu, hataların büyüklüklerine bakar ve hataların mutlak değerlerine eşit ağırlık verir.
Aykırı değerlerin etkisi daha azdır, çünkü hataların kareleri alınmaz. Bu, modelin aykırı değerlere daha dirençli olduğu anlamına gelir.
MAE, hataların büyüklüklerini daha iyi yansıtır ve gerçek dünya problemlerinde daha yorumlanabilir bir ölçümdür.
MSE'ye göre daha az hassastır, çünkü kareleme işlemi kullanılmaz.

**Avantajlar:**

MSE, büyük hataları daha fazla cezalandırır, bu nedenle MSE, modelin büyük hatalara daha duyarlı olmasını sağlar.
MAE, hataların büyüklüklerini daha iyi yansıtır ve daha yorumlanabilir bir ölçümdür.

**Dezavantajlar:**

MSE, aykırı değerlere daha duyarlıdır ve bu nedenle bu tür durumlarla başa çıkmak daha zordur.
MAE, büyük hatalarla ilgili bilgi sağlamaz ve bu nedenle bazı durumlarda modelin performansını tam olarak değerlendirmekte eksiktir.
Hangi metriğin kullanılacağı, problem bağlamına, veri dağılımına ve belirlenen hedeflere bağlıdır. Örneğin, aykırı değerlerin olduğu veri setlerinde MAE kullanmak daha uygundur, ancak modelin büyük hatalara duyarlı olduğu durumlarda MSE tercih edilebilir.
Content Encoding
Tags: contentencoding, articles, medium, lakshanfernando
Published: 2024-04-10 15:40:33

🌟 Dive into the world of Content Encoding! 🚀 Ever wondered how those large files magically shrink in size before reaching your device? It's all thanks to Content-Encoding! 🎉

Check out the full article here: https://medium.com/@lakshan_fernando/content-encoding-19ed070541d8
Lesser know JavaScript array methods part -1
Tags: javascript, react, frontend, svelte
Published: 2024-04-10 15:38:29

Arrays are fundamental building blocks in programming.We are familiar with accessing any element and changing its value with tradition method i.e using index and square bracket notation

while that is a common way, JavaScript offers new & alternative method i.e array.with(). This method is used to replace the value of an element at a specific index in an array with a new value, while returning a new array with the updated elements. The method takes two arguments: the index of the element to be replaced, and the new value to be assigned to that index

```
arr.with(index,value)
```


![array.with() method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r8og1h7dyt02sf713xn9.png)

Advantages of this method over bracket notation is, by giving negative index, it is possible to traverse in reverse order of array eliminating the need for calculations like array.length - number

![array.with() method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gcz022hdg0hqq4w443w.png)

If there are empty slots in original array , then this method replaces it with undefined and return a new array 

```
const arr = [1, 2, , 4,];
console.log(arr.with(1, 8)); // [1, 8, undefined ,4]
```
✨ AI Fairytale generator
Tags: cloudflarechallenge, devchallenge, ai, javascript
Published: 2024-04-10 15:36:35


*This is a submission for the [Cloudflare AI Challenge](https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99).*

## What I Built
**A cool site where you can upload an image, select a language, let the AI do it's magic and receive a fairytale about that image, in your selected language, with 2 images!**

## Demo
[⭐ Check it out here!](https://fairytale.programordie.workers.dev/)
[![GIF](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n5emhjpqn71m0ucfv9u7.gif)](https://fairytale.programordie.workers.dev)

## My Code
💻 If you want to see my code, here it is: [https://github.com/programORdie2/fairytaleAI](https://github.com/programORdie2/fairytaleAI)

## Journey
🚀 During this journey, I explored cloudflare workers and AI models. I only used pages before, so it was a whole new experience for me!

📚 Everything was very well documented, what made it very easy to use multiple models.

🧠 I really learned a lot of this challenge, and as soon as a _text-to-speech_ model is available, I'm going to add this feature too. 🎙️


**Multiple Models and/or Triple Task Types**

I used triple task types (see the tabel) and multiple models (text generation), here is the list:

| Type                        | Name                          |
|-----------------------------|-------------------------------|
| Image-to-text               | [@cf/unum/uform-gen2-qwen-500m](https://developers.cloudflare.com/workers-ai/models/uform-gen2-qwen-500m/) |
| text generation (SFE check) | [@hf/nousresearch/hermes-2-pro-mistral-7b](https://developers.cloudflare.com/workers-ai/models/hermes-2-pro-mistral-7b/)   |
| Text generation             | [@cf/meta/llama-2-7b-chat-int8](https://developers.cloudflare.com/workers-ai/models/llama-2-7b-chat-int8/) |
| Translation                 | [@cf/meta/m2m100-1.2b](https://developers.cloudflare.com/workers-ai/models/m2m100-1.2b/)          |
| text generation (prompt generation) | [@hf/google/gemma-7b-it](https://developers.cloudflare.com/workers-ai/models/gemma-7b-it/) |
| Image generation            | [@cf/lykon/dreamshaper-8-lcm](https://developers.cloudflare.com/workers-ai/models/dreamshaper-8-lcm/)   |



**That's it, if you have any feedback or questions, please let me know in the comments!**
Car rental
Tags: renta, car, albania
Published: 2024-04-10 15:27:47


Car rental services are readily accessible throughout Albania, particularly in major urban hubs and popular tourist destinations like Tirana, Durrës, Sarandë, and Vlorë. Both local and international companies offer a diverse selection of vehicles, ranging from economical choices to SUVs and luxury options.

When contemplating renting a car in Albania, it's essential to bear in mind the following considerations:

Ensure you possess the requisite documentation, including a valid driver's license and a credit card for deposit, and potentially an International Driving Permit (IDP).
Age restrictions typically apply, with most rental firms stipulating a minimum age of 21 for drivers.
Familiarize yourself with the available insurance coverage options and consider additional protection for added peace of mind.
Be mindful of varying road conditions across the country, exercising caution, especially in rural areas.
Acquaint yourself with Albanian traffic regulations, including speed limits and road signage.
Advance booking is advisable, particularly during peak tourist seasons, to secure availability and potentially obtain preferable rates.
For comprehensive details and to explore car rental alternatives in Albania, visit [https://carrentalinalbania.com/](https://carrentalinalbania.com/).

Unleaded gasoline is the predominant fuel type utilized by rental vehicles in Albania and is readily accessible at fuel stations nationwide.
Utilize GPS or navigation applications to aid in traversing Albanian roadways, particularly if you're unfamiliar with the locale.
A multitude of international and domestic car rental agencies, including Avis, Hertz, Europcar, and Budget, operate within Albania. Before finalizing a reservation, carefully compare pricing, peruse reviews, and review rental terms. Furthermore, conduct a thorough inspection of the vehicle for any preexisting damages and document them to preempt disputes upon returning the vehicle.
🎮 Game Development: A Fascinating Journey 🕹️
Published: 2024-04-10 15:13:34



Welcome to the captivating world of game development! 🌟

In the realm where creativity meets technology, game development stands as a beacon of innovation and excitement. Crafting immersive digital experiences that transport players to fantastical realms [bons.com/ja/game/fruit-party](https://bons.com/ja/game/fruit-party) or challenge their skills in strategic battles is both an art and a science.

🖌️ The Artistry: Game development begins with a spark of imagination. Whether it's a sprawling open-world adventure [bons.com/ja/game/sugar-rush-663](https://bons.com/ja/game/sugar-rush-663), a fast-paced shooter, or a mind-bending puzzle game, every creation starts with a vision. Artists breathe life into characters, environments, and worlds, shaping them with intricate detail and vibrant color palettes.

💻 The Technology: Behind the scenes, skilled programmers weave lines of code to bring these visions to life. From game engines like Unity or Unreal Engine to custom-built frameworks, the technical backbone of game development ensures smooth gameplay, stunning visuals, and seamless interactions.

🔧 The Mechanics: Game design is the glue that binds art and technology together. Designers meticulously plan gameplay mechanics, balancing challenge and reward to keep players engaged. Whether it's mastering complex combos in a fighting game or solving perplexing puzzles in an adventure, every aspect is carefully crafted to evoke emotion and excitement.

🌐 The Community: Game development thrives in a vibrant ecosystem of creators, players, and enthusiasts. Communities gather online and offline to share knowledge, showcase their work, and celebrate the diversity of gaming culture. From indie developers pushing boundaries with innovative concepts to AAA studios delivering blockbuster experiences, the game development community is as diverse as the games themselves.

🚀 The Future: As technology advances and creative boundaries expand, the future of game development shines brighter than ever. Virtual reality, augmented reality, artificial intelligence – these are just a few of the frontiers waiting to be explored. With each new innovation, the possibilities for immersive storytelling and interactive experiences grow exponentially.

So whether you're a seasoned developer, an aspiring creator, or simply a lover of games, join us on this exhilarating journey through the ever-evolving landscape of game development. Together, let's push the boundaries of imagination and redefine what's possible in the world of interactive entertainment. 🚀🎮
Dev, o que são boas práticas?
Published: 2024-04-10 15:16:46

## Olá! Meu nome é Amanda Pereira.

Identação? Comentários? Documentação? Manual do usuário? O assunto de hoje é sobre **boas práticas**.
Afinal, qual são as práticas que irão facilitar o trabalho das pessoas que irão precisar fazer manutenção num código escrito por mim?

Depois de 7 meses de experiência, tenho a propriedade de falar que passei por situações _complicadas_ que me levaram ao seguinte questionamento: _como essa pessoa esperava que eu fosse entender esse código?_ Desde então, venho me dedicando pra que a próxima pessoa não passe por situações como essa, seguindo as seguintes práticas:
<br>

### Comentários

Antes de ingressar no mercado de trabalho, achava que comentários se tornavam desnecessários se um código fosse legível, afinal,

```
$ nome = 'amanda'
return $nome;
```
é um trecho código auto-explicativo, certo?

Aí é que vem o erro de muitos: achar que comentários devem explicar linha por linha de um código, quando na verdade, devem explicar um código no geral;

```
/*
Esse relatório possui os dados X. Um dado, quando acontece algo Y, recebe status Z.

Status A: explicação do status.
Status B: explicação do status.
Status C: explicação do status.

Relação (nome da relação): O model X possui relação Many To Many com o model Y.
*/
```

Quem precisar dar manutenção na função que possui esse trecho de comentário, certamente não terá dificuldades para entender o que aquele código faz e as regras que ele possui.
<br>

### Não repita código

Não repita uma função, crie uma genérica para ser reutilizada.

```
public function subtrairNumeros($num1, $num2){
  return $num1 - $num2;
}
public function somarNumeros($num1, $num2){
  return $num1 + $num2;
}

public function calculadora(){
  $num1 = 10; $num2 = 10;
  $soma = $this->somarNumeros($num1, $num2);
  $subtracao = $this->subtrairNumeros($num1, $num2);
}
```

### Documentação
O que é essa tal de documentação? Como é feita?

De diversas maneiras. Uma documentação pode ser feita no README do seu repositório, num documento Word, através de comentários, através de UML. É essencial criar o diagrama do seu banco de dados e das relações que existem nele, assim, o próximo dev vai saber o nome de cada especificação e encontra-las vai ficar mais fácil.

Um arquivo md também é interessante.

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

Tenha sempre em mente formas de deixar claro a ideia do seu projeto, como utilizar e onde encontrar os recursos que você criou.

### Código
Por fim, mantenha o seu código legível, se uma variável guarda uma idade, dê a ela o nome de **$idade**. Se a sua função soma números, dê a ela o nome **somarNumeros()**; Mantenha a identação adequada e não deixe seu código ultrapassar sua tela. Retorne mensagens de erro; 

E o principal: se coloque no lugar do próximo profissional que ocupará seu lugar.

---

> Onde me encontrar
### [LinkedIn](https://www.linkedin.com/in/amanda-pereira-dev/) 
### [GitHub](https://github.com/constpereiradev)
<br>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdmw1yvc4bdr9gkm8tdg.png)
GODZILLA x KONG BUT IT'S AI ✊
Tags: webdev, beginners, tutorial, learning
Published: 2024-04-10 15:12:16

**GIVE ME THE REVIEW OF GODZILLA X KONG*

I made this kong and godzilla fan trailer entirely using AI, the results were pretty good 👍

{% embed https://vimeo.com/932924032?share=copy %}

## MADE BY HAIPER, GEMINI, PIKA, RUNWAY AND CLIMPCHAMP
EarlyAdopter's Guide Umbraco v14 - Updates - typescript codegen tool.
Published: 2024-04-10 15:11:28

Most of the Early adopter posts were written against, preview releases of Umbraco and several small things have changed since then.

Where possible I have gone back into the original posts and made a note of the change. This post details a change since those early releases. 

# Codegen changes. 

> _All credit to @leekelleher for this, there has been an update to the codegen tool - [read the PR in the core umbraco project](https://github.com/umbraco/Umbraco.CMS.Backoffice/pull/1565)_


In the early releases we were using `openapi-typescript-codegen` library to generate the typescript libraries for our c# api.

this library is being deprecated in May 2024, so the core team have switched over to [Hey API's fork of this tool](https://heyapi.vercel.app/openapi-ts/get-started.html). 

there are some little changes in the commands (and some switches are being deprecated) - but in general it's a direct swap, our generate command now looks like this: 

```json
"scripts": {
  "generate": "openapi-ts 
      --input http://localhost:123/umbraco/swagger 
      --output src/api 
      --debug true
      --enums typescript 
      --lint true 
      --schemas false"
}
```
_n.b you might have to turn this back into a single line in the `package.json` file_

## code changes. 
really there are *nearly* no code changes switching to this library. 

the new library is deprecating the `postfixServices` command which in our examples we used to make our resulting classes end with 'Resource' (e.g timeResource). 

_you can still use this today, but it will be removed shortly from the new tool._

With this option removed all of the resources will now be 'services' (e.g timeService). so a rename of that will be required in any code you are upgrading to the new codegen tool.
Place Insights app using cloudflare
Tags: cloudflarechallenge, devchallenge, ai, webdev
Published: 2024-04-10 15:02:37

*This is a submission for the [Cloudflare AI Challenge](https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99).*

## What I Built
I built an simple application to look up any popular place and quickly summarize and understand the sentiment of the place using reviews data
<!-- Tell us what your app does! -->

## Demo
https://placeinsights.pages.dev/
<!-- Share a link to your deployed solution on Workers or Pages, and add a screenshot or video embed of your app here. -->

## My Code
https://github.com/problemsolver03/place-insights-cloudflare

<!-- Show us the code! Share a public link to your repo and be sure to include a README file with installation instructions. We also encourage you to add a license for your code.  --> 

## Journey
The idea was to utilize the Google Maps review data and use it as the input data to summarize the reviews and also to provide users with the  sentiment of the consolidated reviews.
This quick summarization and sentiment classification will help users quickly get an overview of the place they want to visit.

Once the idea was clear I procured a Google Maps API key to get the reviews of the place.
then I created two workers on Cloud Flare one for review summarization and the other for analyzing the sentiment of the reviews, with these workers setup. I was able to pass the review data to the workers and get the output of the models through API response, which I used in my react frontend to visualize it and later hosted the react application on Cloudflare pages.

Technologies/Libraries used
React, Serverless functions, TailwindCSS


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

<!-- Tell us about your process, the task types and models you used, what you learned, anything you are particularly proud of, what you hope to do next, etc. -->

**Multiple Models and/or Triple Task Types**

bart-large-cnn
distilbert-sst-2-int8	

<!-- Let us know if your project utilized multiple models per task and/or if your project used three or more task types. If so, you may qualify for our additional prize categories! If not, please remove this section. -->

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image or an additional tag to this post (if you want). -->

<!-- Thanks for participating! -->
Mẹo mua bán Solabin đơn giản, an toàn, giá tốt nhất
Published: 2024-04-10 15:01:37

## Hướng dẫn mua bán USDT Solabin trên sàn Muabanusdt.io

## Cách mua USDT BEP20 Solabin

**Bước 1**:

Cách 1: Truy cập vào trang chủ sàn Muabanusdt.io qua đường link https://muabanusdt.io/, sau đó nhấp vào “tôi muốn MUA” ở cột tỷ giá vừa cập nhật và chọn đồng USDT.

Cách 2: click trực tiếp vào link https://muabanusdt.io/mua/usdt/.

**Bước 2**: Điền đầy đủ thông tin vào phiếu mua mà sàn Muabanusdt.io yêu cầu bao gồm:

- Giao thức cần chọn BSC [BNB Smart Chain (BEP20)]. Bạn bắt bắt buộc chọn giao thức để nhận được USDT bạn muốn đầu tư.
- Số lượng cần mua
- Địa chỉ ví USDT BEP20 bạn đã sao chép ở bước nạp tiền
- Email: có thể để trống thông tin này, tuy nhiên, bạn nên điền để lấy hóa đơn xác nhận mua từ sàn Muabanusdt.io.

**Bước 3**: Nhấn vào nút "MUA NGAY". Sau 3-5 giây, hệ thống sẽ chuyển hướng đến hóa đơn xác nhận mua. Bạn hãy đọc kỹ hóa đơn này, đồng thời tiến hành thanh toán bằng cách chuyển tiền đến số tài khoản sàn yêu cầu, kèm nội dung ghi chú.

**Bước 4**: Sau khi chuyển khoản thành công, hệ thống sẽ khớp lệnh và chuyển USDT BEP20 đến địa chỉ ví Solabin của bạn trong thời gian 5 đến 15 phút.Nếu sau 30 phút, bạn vẫn chưa nhận được USDT, bạn hãy báo mã giao dịch để sàn hỗ trợ kiểm tra lại.

## Cách bán USDT BEP20 Solabin

**Bước 1**: Truy cập vào trang chủ sàn Muabanusdt.io qua đường link https://muabanusdt.io/, sau đó nhấp vào “tôi muốn BÁN" ở cột tỷ giá vừa cập nhật và chọn đồng USDT. Hoặc click trực tiếp vào link https://muabanusdt.io/ban/usdt/.

**Bước 2**: Điền đầy đủ thông tin vào phiếu bán mà sàn Muanusdt.io yêu cầu bao gồm:

- Giao thức cần chọn BSC [BNB Smart Chain (BEP20)]
- Số lượng cần Bán
- Thông tin ngân hàng, số tài khoản và tên chủ tài khoản.
- Email: Thông tin này có thể bỏ trống, tuy nhiên bạn nên điền để nhận hóa đơn xác nhận bán từ sàn Muabanusdt.io.

**Bước 3**: Nhấn BÁN NGAY. Sau 3-5 giây, hệ thống sẽ điều hướng đến hóa đơn xác nhận bán. Bạn hãy đọc kỹ thông tin và vào sàn Solabin chuyển USDT BEP20 đến địa chỉ ví mà sàn Muabanusdt.io yêu cầu trên hóa đơn xác nhận bán.

Sau khi bạn chuyển USDT BEP20 thành công đến địa chỉ ví của sàn Muabanusdt.io, hệ thống sẽ xác minh và chuyển tiền thanh toán đến tài khoản ngân hàng của bạn.
I’m Never Using Task.Wait() Again
Tags: dotnet, csharp
Published: 2024-04-10 15:00:40

---
title: I’m Never Using Task.Wait() Again
published: true
description: If you're still using Task.Wait to write asynchronous methods in C#, STOP! It's time to move on to the await operator for good. While you may want to use Task.Wait if you're down in the weeds of threading, in most cases, using await is going to provide better performance in your .NET applications.
tags: dotnet, csharp
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmag46p0b7bdx64dfatu.png
---

{%youtube 51d4fQqSg9M %}
"Day 59 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Maths for Data Analysis (Probability - 5)
Tags: data, datascience, dataengineering, machinelearning
Published: 2024-04-10 14:47:12

PROBABILITY - 5





BINOMIAL PROBABILITY

Bernoulli  trials :- 
A random experiment repeated n-times is said to be bernoulli trial if 

Trails are independent of each other.
Only two possible outcomes corresponding to each trial, that is success or failure.
Probability of success ( or failure ) in each trial must be the same.




Experiment	: a dice is rolled ten times.

Success : occurrence of a number divisible by “3”.

P = prob. Of success in one trial = 1 / 3
Q  = prob. Of failure in one trial = 2 / 3

Probability of exactly 4 times success =  10 C 4





Bayes Theorem.

It is a theorem in which we find the probability of an event after the event is completed / happened. 
It is derived from the conditional probaility.

Outcome is known before knowing the probability.

P( A|B ) = P( A ) x  P( B|A )  / P( B ) 

Example :- 

If a person is dead then baye will ask what is the probability of that person who died having any life-style disease.


Another example :- 

We have data of Gender and whether they survived or not and from that with the help of baye we can find out if a man enters what will be the probability that he will survive or not.





🙏 Thank you all for your time and support! 🙏
Don't forget to catch me daily for the latest updates on my programming journey! Let's continue to learn, grow, and inspire together! 💻✨
Valeria Durán Ruiz Contact Information
Published: 2024-04-10 14:45:55

X [Twitter](https://twitter.com/valerianagit) 
[Instagram](https://www.instagram.com/valeriana.swift/) 
[Linkedin](https://www.linkedin.com/in/valerianagit/)
[dev.to](https://dev.to/valerianagit)