teleren/devto huggingface dataset:
Polynomial Regression
Published: 2024-04-23 23:16:08

Polinomal regresyon, veri noktaları arasındaki ilişkiyi yaklaşıklayan bir regresyon yöntemidir. Bu yöntem, doğrusal olmayan ilişkileri modellemek için kullanılır. Polinomal regresyon, veri noktalarını bir polinom fonksiyonu ile uygun bir şekilde yaklaşıklayarak tahminler yapar.

Örneğin, bir veri setinde x ve y değerleri arasındaki ilişkiyi inceleyelim. Eğer bu ilişki doğrusal değilse, yani veri noktaları bir düz çizgi üzerinde değil de daha karmaşık bir eğri üzerinde dağılıyorsa, polinomal regresyon kullanılabilir.


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



Polinomal regresyon için bir Python kod örneği aşağıda yer almaktadır. Bu örnek, veri seti üzerinde ikinci dereceden bir polinomal regresyon modeli kurmayı ve bu modeli eğitmeyi göstermektedir:

```python
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
import operator

# Örnek veri seti oluşturuluyor
np.random.seed(0)
x = 2 - 3 * np.random.normal(0, 1, 20)
y = x - 2 * (x ** 2) + np.random.normal(-3, 3, 20)

# Verileri görselleştirme
plt.scatter(x, y, s=10)
plt.show()

# Verileri dönüştürme
x = x[:, np.newaxis]
y = y[:, np.newaxis]

# Polinom derecesini belirleme
polynomial_features = PolynomialFeatures(degree=2)
x_poly = polynomial_features.fit_transform(x)

# Polinom regresyon modelini eğitme
model = LinearRegression()
model.fit(x_poly, y)
y_poly_pred = model.predict(x_poly)

# Polinom regresyon sonuçlarını görselleştirme
plt.scatter(x, y, s=10)
# Sıralı veriler üzerinde tahmin çizgisi çizme
sort_axis = operator.itemgetter(0)
sorted_zip = sorted(zip(x,y_poly_pred), key=sort_axis)
x, y_poly_pred = zip(*sorted_zip)
plt.plot(x, y_poly_pred, color='m')
plt.show()

# Modelin performansını değerlendirme
from sklearn.metrics import mean_squared_error, r2_score
rmse = np.sqrt(mean_squared_error(y,y_poly_pred))
r2 = r2_score(y,y_poly_pred)
print(f"RMSE: {rmse}")
print(f"R2 Score: {r2}")
```

Bu kod, rastgele oluşturulan bir veri seti üzerinde ikinci dereceden bir polinom kullanarak regresyon modeli kurar ve bu modelin performansını RMSE ve R2 skoru ile değerlendirir. Görselleştirme için matplotlib kütüphanesi kullanılır.

Bu örneği kendi veri setinizle denemek isterseniz, `x` ve `y` değişkenlerini kendi verilerinizle değiştirmeniz yeterlidir.
Flutter e seu incrível poder de animação
Tags: flutter, animation, pubdev
Published: 2024-04-23 22:33:30

Ninguém pode negar que as animações no Flutter são de tirar o folêgo.


Pode ser que as vezes tira alguns cabêlos,
ou deixe-os brancos, mas a verdade é
animações no Flutter é awesome.
É tudo de bom.

O Skia, e agora o impeller,
tem se tornado o santo graal dos 
renderizadores gráficos.

O melhor de tudo é que o Time do Flutter
não se cansa de querer fazer o melhor
e além da vasta documentação sobre animação,
e a lib do framework eles tiveram 
outra sacada.



Sim, eles lançaram um package no
pub.dev que facilita ainda mais
e vida de quem quer animar 
e esta sem tempo para criar
se utilizando exclusivamente do flutter.

O camando é fácil uma vez que você já
tenha o Flutter na sua máquina e um projeto
criado, estando agora na raiz do projeto
rode no terminal:
flutter pub add animations

ou no pubspec.yaml, abaixo de dependencies
cole 'animations':

# pubspec.yaml file
dependencies:
  animations: ^2.0.11

---


Prefira usar no terminal para pegar a última versão.
Você pode ver mais sobre esse pacote aqui:
pub.dev/packages/animations

---

Esse pacote pode tirar o medo de você 
conseguie fazer animações profissionais
além de deixar seu app, com pouco código
com uma animação bacana.

Como tudo em software: use com moderação.

--- Por hoje é isso.

💪 Forte abraço.
👨‍💻 Devs &&
👩‍💻 Divas 

🤖 Keep Coding

----hex

4F 73 20 71 75 65 20 63 6F 6E 66 69 61 6D 20 6E 6F 20 53 45 4E 48 4F 52 20 73 65 72 E3 6F 20 63 6F 6D 6F 20 6F 20 6D 6F 6E 74 65 20 64 65 20 53 69 E3 6F 2C 20 71 75 65 20 6E E3 6F 20 73 65 20 61 62 61 6C 61 2C 20 6D 61 73 20 70 65 72 6D 61 6E 65 63 65 20 70 61 72 61 20 73 65 6D 70 72 65
New Relic AI monitoring, the industry’s first APM for AI, is here!
Tags: devops, ai, monitoring
Published: 2024-04-23 22:28:52

Hi, devs! 

Want to know how you can streamline troubleshooting and optimize for performance, quality, and cost all in one? 

New Relic AI monitoring provides engineers and developers unprecedented visibility across your AI stack, making it easier to troubleshoot and optimize your AI applications for performance and more!

Key features and benefits include: 
Quick and easy setup via existing APM agents
Visibility across the entire AI app stack
Deep trace insights  with end-user feedback for every response
Compare performance and costs across models in production
Enhanced data privacy and security

➡️ [Get started now](https://newrelic.com/blog/nerdlog/ai-monitoring-ga?utm_source=devto&utm_medium=community&utm_campaign=global-fy25-q1-ai-monitoring-ga)



-Sam
Day 950 : Against the Wall
Tags: hiphop, code, coding, lifelongdev
Published: 2024-04-23 22:21:03

_liner notes_:
- Professional : Had a couple of meetings. One where I got to demo the current status of what I've been working on. They like it so far. Going to do some demos in front of others next week when I have it basically finished. The community channel wasn't as active. Took advantage of that extra time to work on my project. Made pretty good progress. Just a couple of more features and I should be good.

- Personal : Last night, I spent some time to work out an issue I was running into with the project at work. I was able to figure it out after throwing a bunch of stuff against the wall. I also went through some tracks for the radio show. Also did some research into a drawing app that's available across a bunch of different platforms. Think I may get back into drawing since the laptops and foldable phone have touch screens. I've had some anime drawing books on my wishlist for a while and some credits that will expire soon. Maybe it's time to start back again. Looked into my next side project. Wanted to see if there were any domain names that jumped out at me. It's going to involve some translation. Previously, I was using other AI translation APIs, but where I'm planning on hosting this application also has a solution. Think I'll give that a try.

![The picture shows a waterfall in a tropical rainforest. The waterfall is cascading down a steep cliff, and the water is crashing into a pool below. The rainforest is dense and lush, with a variety of plants and animals. The picture is taken from a low angle, and the waterfall is towering over the viewer. The waterfall is surrounded by a lush green jungle with bright, vibrant green vegetation. The sky is overcast, and there is a light mist in the air. The location of the waterfall is in Vibhooti Falls, India.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xp5pk7ub8m0hu3dnqa5p.jpg)

So while booking for my upcoming trip, I noticed that I can transfer points I get from staying at hotels to airline miles. So I'll be spending some time doing that. Hoping I can get an upgrade on the way back from Japan. Going to go through some tracks for the radio show. Looking to start up a starter project and add authentication and a database to it. I need to think about how I want the data structured. Going to have dinner.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 27f4x4E8xTg %}
DevLog #16 - Velocity charts
Tags: agile
Published: 2024-04-23 22:11:30

Velocity charts indicate completed tasks along with the sprints. Typically, Y axis shows completed tasks that are measured by story points, hours or tasks and X axis shows sprints. This represents a graphical view of the amount of work that the team has completed within the past sprints. 

In our project, we used these charts to identify our team performance and get the decisions to change our way of working (Mob programming to pair programming). We could identify that if we work as mob programmers, we could not complete our sprint backlogs and then we discussed and changed it to pair programming methods based on the result of velocity charts. In my opinion, if we could not meet our expected velocity in our project with the pair programming, we could identify it with velocity charts and then we can get a decision based on that.

Finally I can reflect that if we work in a scrum team, to maintain constant velocity of work along with all the sprints, we have to generate and check these charts at the end of every sprint and need to analyze them with the team members. After that we need to identify the factors that cause the velocity reductions before taking the decisions.
Your Name Is Not Administrator
Tags: devjournal
Published: 2024-04-23 21:15:01


![Screenshot of me attempting to run a program from  command prompt as administrator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owmntjfk0k6pxkru04pz.png)

If you've worked with command prompt before, you know that when you run it as administrator, you can use it to point to a specific file and open it. In this case, I was testing out my memory by opening Chrome through command prompt. 

When I typed and tabbed everything through, it asked for my password and 


![Screenshot showing my password is incorrect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjomavbiztszq3ut1fc3.png)


.... password is incorrect.

After few times, I was wondering if I was crazy! I even reset my password for the account and saw that it was STILL incorrect. 

Frustrated, I asked my friend Nick (practically the god of IT in my eyes) and as soon as the message, *it hit me* :

Makeda, you are the administrator, but your username... it's not administrator. 

Sigh.
Node.js 16: End of Support Looms Large - Time to Upgrade!
Tags: node, eol, aws, azure
Published: 2024-04-23 20:53:18

Node.js, the ever-evolving JavaScript runtime environment, is approaching a significant milestone. Node.js version 16 reached its end of life (EOL) on September 11th, 2023. This means that official support, including security patches and bug fixes, will cease after this date.

For developers and businesses relying on Node.js 16, this news necessitates a proactive approach. [My new blog](https://cloudpedia.ai/blog/nodejs-16-end-of-support-upgrade-now/)  explains what you need to know about the upcoming deprecation and the importance of upgrading to a supported version.
How to create a lan server using Node.js and Fastify.js
Tags: fastify, node, http, webdev
Published: 2024-04-23 20:40:29

Hello everyone!

In this article I am going to show you how to run a local lan server using Node.js with the help of Fastify framework.

Fastify.js is an alternative to Express.js framework, they define themselves as a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Hapi and Express and as far as we know, it is one of the fastest web frameworks in town.

Let's dive in right to the code.

First step is we create a very basic Fastify server:

```ts
// server.ts
import Fastify from 'fastify'
const fastify = Fastify({
  logger: true
})

fastify.get('/', async function handler (request, reply) {
    return 'Hello World!'
})

const start = async () => {
    try {
      await fastify.listen({ port: 3000 })
    } catch (err) {
      fastify.log.error(err);
      process.exit(1);
    }
};

start();
```
The code is self explanatory for those who used to create http servers with Express.js. 

Run the server using Node.js:
```
ts-node server.ts
```
This will run the server that will be listening at http://127.0.0.1:3000, that means the code works great but unfortunately it only listens to requests from our local machine.

In order to make the server be able to listen to all network interfaces on port 3000 we need to add this `host: '0.0.0.0'` to our config so the final code will be like this:

```ts
// server.ts
import Fastify from 'fastify'
const fastify = Fastify({
  logger: true
})

fastify.get('/', async function handler (request, reply) {
    return 'Hello World!'
})

const start = async () => {
    try {
      await fastify.listen({ port: 3000, host: '0.0.0.0' })
    } catch (err) {
      fastify.log.error(err);
      process.exit(1);
    }
};

start();
```
This will logs out `Server listening at http://0.0.0.0:3000`, but in order to try to connect to the server from another machine you wouldn't use `0.0.0.0:3000` which is not correct for accessing it from a web browser. The IP address `0.0.0.0` is actually a special address used in server configurations to listen on all network interfaces, but it is not usable to access the server from a client like a browser.

To access your server, you need to use the actual IP address of the machine on which the server is running. You can find it in your machine network configuration.

Because I am using Windows, I can help you with how to find the IP address by following these steps:

1. Open CMD.
2. Type `ipconfig` and press `Enter`.
3. Look for the "IPv4 Address" under your network connection. This is your machine's IP address on the LAN.

For example in my case my local IP address was: `192.168.1.8` so you access the server with: `192.168.1.8:3000`

I hope you find this article somehow useful. Happy coding!
Criação do Ambiente Azure e Deploy (para noobs, assim como eu xD)
Published: 2024-04-23 20:29:21


- **Passo 1**

- Vamos começar criando um grupo de recursos para a nossa aplicação. 
- Em seguida, criaremos um banco de dados Azure para MySQL e o vincularemos ao grupo de recursos.

- **Passo 2**

- Agora, criaremos registros de container e os vincularemos ao grupo de recursos. Um para o backend e outro para o frontend.

***Tutorial para Subir Imagem do Projeto***

- Primeiro, crie um Dockerfile na raiz do seu projeto com as configurações necessárias das necessidades da linguagem e projeto. 
- Em seguida, crie um arquivo deploy.bat com as seguintes configurações:

```
docker login (URL do registro de container) -u (nome do registro de container) -p (senha de admin do registro de container)
docker build -t (nome da imagem) .
docker tag (nome usado para criar a imagem) (URL do registro de container)/(nome da imagem)
docker push (URL do registro de container)/(nome da imagem)
```
- **Exemplo**
```
docker login urlregistrocontainer.azurecr.io -u registrocontainer -p abc1234DEFG
docker build -t projeto.
docker tag projeto urlregistrocontainer.azurecr.io/projeto
docker push urlregistrocontainer.azurecr.io/projeto
```
- **Passo 3**

- Agora, criaremos um Aplicativo de Container, um para o backend e outro para o frontend.

***Tutorial para Criação***

- Ao criar, escolha usar a imagem docker de um registro de container e selecione a desejada.
- Pode usar 1vCPU e 2GiB de RAM como padrão.
- Após a criação do contêiner do aplicativo, vá para o menu "ESCALA" e edite o padrão de réplicas (Utilize MIN: 1 - Caso deixe como 0 o container irá desligar automaticamente após 5 minutos).

***Deploy***

- Use o arquivo deploy.bat para atualizar a imagem do registro de container com a imagem da build atual.
- Vá para o aplicativo de container do projeto, pare e inicie novamente (frontend e backend).
Why MERN stack?
Published: 2024-04-05 09:52:29

When starting a new project, choosing the right technologies is crucial. With so many options available, it's easy to feel overwhelmed. To simplify this decision-making process, one approach is to observe what technology stack other successful companies have used for similar projects.

Our project required key functionalities such as allowing users to contribute to books, comment on contributions, and store all information in a database. Considering these needs, we looked at well-known projects like Pinterest, Facebook, and Instagram, which share similar features. Interestingly, these giants rely on the MERN stack at their core.

The MERN stack consists of:

1. MongoDB: A NoSQL database known for its flexibility and scalability in handling large volumes of data through its document-oriented data model.
   
2. Express.js: A web application framework for Node.js, offering a robust set of features for building web and mobile applications. It simplifies routing, middleware creation, and handling HTTP requests.

3. React.js: A JavaScript library designed for creating dynamic and interactive user interfaces using a component-based approach, ideal for web applications.
   
4. Node.js: A JavaScript runtime built on Chrome's V8 engine, enabling server-side execution of JavaScript code. It facilitates fast and scalable backend development for web applications.

One significant advantage of the MERN stack is its unified use of JavaScript across all layers, making it seamless to transition between them. This simplifies the development process, especially when building a full-stack application simultaneously. Additionally, the emphasis on scalability and efficient data handling, combined with React's interactivity, enables seamless integration of information.

In summary, the MERN stack emerged as the optimal choice for our project due to its comprehensive toolset, scalability, and the ease of JavaScript usage across the entire stack, facilitating efficient development and seamless integration of features.
Bot posting on twitter using Plang
Tags: plang, automation, webdev, beginners
Published: 2024-04-23 20:14:16

> This article is about the Plang programming language, intent based programming language written in natural language. For more info checkout [plang.is](https://plang.is)

Here a simple one for you

```plang
Start
- read post.txt, into %post%
- open  in browser, use default profile
- wait 3 sec
- write innerHtml = '%post%' into .public-DraftStyleDefault-block > span
- click on div[data-testid="tweetButtonInline"]
```
It starts by reading the content from the post.txt file into the %post% variable. Then, it opens twitter.com, waits for it to load, inputs the content into the tweet box, and clicks the tweet button.

Clean and simple.

**Make sure to check out the [Plang repository](https://github.com/PLangHQ) and our website at [plang.is](https://plang.is/).**
Ddos protection
Published: 2024-04-23 19:54:20

在当今数字化时代，服务器扮演着连接世界的桥梁，而香港作为亚太地区的科技中心，拥有先进的网络基础设施和优越的地理位置，成为众多企业和个人选择的服务器托管地之一。本文将探讨香港服务器的特点、DDoS攻击防范、服务器租用等话题，以及香港作为海外服务器托管地的优势。

香港服务器的特点
高效性：香港服务器采用先进的硬件设施和优化的网络架构，提供高速稳定的数据传输和处理能力，确保用户业务的顺畅运行。
地理优势：位于亚太地区的香港，与中国大陆、东南亚等地区连接紧密，具有较低的网络延迟和良好的国际网络通信质量。
海外连接：香港服务器提供海外连接，使得跨境业务和国际用户访问更加便捷快速，为企业拓展海外市场提供了便利条件。
**_[ddos protection](https://www.varidata.com/anti-ddos-service)_**
DDoS防护：香港服务器配备强大的DDoS攻击防护系统，能够及时识别和应对各类网络攻击，保障服务器和用户数据的安全性。
专业支持：香港的服务器托管服务提供商拥有专业的技术团队和全天候的技术支持，为用户提供及时有效的技术支持和服务保障。
DDoS攻击防范
DDoS攻击是网络安全领域的一大挑战，针对此类攻击，香港服务器采取了多层次的防护措施：

流量清洗：服务器提供商配备了流量清洗设备，能够对大流量的攻击数据进行过滤和清洗，确保正常用户的访问不受影响。
攻击监测：通过实时监测网络流量和行为分析，及时发现并应对潜在的DDoS攻击行为，提高网络安全防护能力。
IP黑白名单：设置IP黑白名单，限制异常流量和恶意IP的访问，有效减轻DDoS攻击带来的影响。
容灾备份：建立容灾备份机制，保证在遭受DDoS攻击时能够迅速切换到备用服务器，确保业务的连续性和稳定性。
服务器租用与專屬伺服器
企业和个人在选择服务器时，可以根据自身需求考虑租用共享服务器或專屬伺服器：

服务器租用：租用共享服务器成本较低，适合个人网站、小型企业等需求较小的用户群体，提供稳定的基础服务。
專屬伺服器：專屬伺服器提供独享的硬件资源和更高级的性能配置，适合大型企业、高流量网站等对性能和安全要求较高的用户群体。
台湾服务器与香港服务器比较
虽然台湾服务器和香港服务器都位于亚太地区，但在一些方面存在差异：

网络连接：香港服务器的网络连接更加国际化，面向全球用户提供服务，而台湾服务器更专注于台湾地区和周边地区的网络连接。
地理位置：香港地理位置优越，与中国大陆、东南亚等地连接更紧密，而台湾服务器更接近东亚地区。
法律法规：由于香港和台湾具有不同的法律体系和政策环境，企业在选择服务器托管地时需要考虑相关法律法规的差异。
香港高防服务器与大带宽服务器
对于对网络安全和高带宽要求较高的用户，可以选择香港高防服务器或大带宽服务器：

香港高防服务器：专注于提供优秀的DDoS攻击防护能力，保障用户服务器和数据的安全。
大带宽服务器：提供高速大带宽的网络连接，适合需要处理大量数据传输和高访问流量的用户，如视频直播、大型网站等。
结语
香港服务器作为亚太地区的网络枢纽，以其高效性、安全性和国际化特点吸引着众多用户的关注与选择。在面对网络安全挑战和业务发展需求时，选择适合自身需求的服务器托管服务提供商至关重要，期望本文能为用户在香港服务器领域的了解和选择提供一些参考和指导。
Local-first for FlutterFlow
Tags: flutter, flutterflow, localfirst, database
Published: 2024-04-23 19:25:46

Local-first / offline-first is an application architecture where data is stored "close to the user", in a database on their client device, and synced with a backend database in real-time.

Some features of local-first:

📡 Real-time data streaming

⚡ Instantly reactive UI

💾 Simplified state management

🚫 Always available, offline-first functionality

This video guide provides step-by-step instructions for configuring PowerSync with your FlutterFlow project that has Supabase integration enabled:


{% embed https://www.youtube.com/watch?v=eUcBCyPfVok %}
My AWS Resume Challenge and the troubles I faced.
Tags: aws, html, database, api
Published: 2024-04-23 18:57:39

Introduction:

When I first heard about the AWS challenge in my capstone class, I was excited. I thought to myself that it shouldn't be that hard. But as I started working on it, I quickly realized it was going to be tougher than I expected.

Understanding the Challenge:

At first, I thought the challenge was simple: make a resume through AWS and its various services. But it turned out to be way more complicated than that.

The Challenges I Faced:

I felt confused going into AWS as it has a lot of stuff to learn, and some of it was really tough for me to understand. I spent hours trying to wrap my head around how all these services would come together, but it felt like I was hitting a wall.

Troubles with the resume creation: Making a resume that showed my AWS skills was tricky. I think I did a decent job but now what I had hoped. i have never worked with html or java before. I messed around with java a few times and came down to just created a blue  

Running Out of Time: Between classes, homework, and other commitments, I barely had much time to work on the AWS challenge. I kept telling myself I would get to it later, but "later" never seemed to come.

Trying to Get Better:

Even though it was tough, I didn't want to give up. I'll keep trying, even when it felt like I wasn't making any progress. I watched tutorials, read through forums, hoping that something would click.

The Journey Continues:

I wish I could say that I've finished the AWS challenge and everything turned out great. But the truth is, I'm still working on it. I haven't given up, though. Even though it's been hard, I've learned a lot along the way. I've learned about perseverance, about not giving up when things get tough. And I know that eventually, I'll figure it out.

Conclusion:

The AWS challenge has been a real struggle for me, but I'm not letting it beat me. Even when things get tough, I know I just have to keep going. I will continue to go through this challenge even after I'm done with capstone class. This challenge has shown me a lot of things about AWS and its services. I can't wait to continue forth in my AWS journey.