teleren/devto huggingface dataset:
An AI Generated Paragraph all about Geometry Dash
Tags: ai, geometrydash, gpt2, distilgpt
Published: 2023-02-24 14:16:27

**Note From TCG: This paragraph is mainly generated by AI, with some fill-in from me. I had to give some explanation on what GD is, and then _with my help_ it generated this. (Thanks to DistilGPT-2). Happy Reading!**

Geometry dash is a side-scrolling rhythm-based two-dimensional platformer that requires you to jump with the cube, fly with the ship, bounce with the ufo, wave with the wave, switch gravity with the ball and the spider, and boost with the robot. The physics, art, and gameplay make for exciting gameplay and challenging levels, but you can rise to the top of the leaderboards by completing some demon levels like the official levels Clubstep, Theory of Everything II, and Deadlocked. You can also try user-made levels at the top of the demonlist like Acheron, Slaughterhouse and more! The game is also available now on Windows, Mac, and mobile! You can get the full version for PC on Steam for $3.99, and on mobile for $1.99. The original game was developed with the COCOS2D engine. You can also use the free version on mobile, called Geometry Dash Lite. There are also three other games, including World, which  features a set of two islands with five 30-second levels each, that you must beat to unlock the next level. This is different from the main game, with 18 of the 21 levels you can play at your leasure, instead of having to unlock them by progression. To unlock the three demon levels, you have to get 10 secret coins for Clubstep, 20 secret coins for Theory of Everything II, and 30 secret coins for Deadlocked. The game was produced by RobTop Games, a Swedish developer that has released multiple games, like Boomlings, Memory Mastermind, Boomlings Matchup, and then, a few months later, Geometry Dash. In 2015, he would release Geometry Dash Meltdown, the first game of the spin-offs, in 2016 would come Geometry Dash World, and then in 2017 came Geometry Dash SubZero, a preview to the next major update, Update 2.2, which is slotted to be released this year. The game's developers said the game was his best game, and from then on has not released another game outside of the Geometry Dash series. The game is still being developed, in a sense, but this game is in constant development, being updated often.  2.2 has been considered a major release for the game. It was originally showcased in Geometry Dash SubZero, the third spin-off game 2017. It holds a very wide range of youtube channels, from creating levels, to showcasing levels (showing the entire level as if it was being played while not actually being played), and playing levels, like extreme demons (the hardest difficulty). Currently a few of the fastest growing Geometry Dash youtubers are EricVanWilderman, and the official RobTop Games Channel, who has now passed Minecraft, Nintendo, and recently Fortnite in subcribers. So we can only hope that Geometry Dash will keep growing and growing, keep entertaining, and of course, hope that 2.2 ever comes out!
Use the right CSS Units
Tags: css, html, webdev, style
Published: 2023-02-24 14:15:11

Cascading Style Sheets (CSS) is a powerful styling language used for creating visually appealing and responsive websites. One of the most important aspects of CSS is the use of units, which allow developers to define the size and position of elements on a webpage. In this article, we will explore the different types of CSS units and provide some tips on how to use them correctly.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pxzkegbfr38xxqwtegj.png)
   
####Pixel (px)
Pixel is the most commonly used unit of measurement in CSS. It represents a single dot on a screen and is used to define the exact size of an element. While pixels provide precise control over element size, they do not scale well across different devices and screen sizes.

####Percentage (%)
Percentage units are relative to the size of the parent element. For example, if you set the width of an element to 50%, it will be half the size of its parent element. This makes percentage units ideal for creating responsive designs that adapt to different screen sizes.

####em and rem
Em and rem are relative units that are based on the font size of the element. Em is relative to the font size of the parent element, while rem is relative to the font size of the root element (usually the html element). These units are useful for creating scalable designs that adapt to changes in font size.

####Viewport units (vw and vh)
Viewport units are based on the size of the browser window and are expressed as a percentage of the viewport width (vw) or viewport height (vh). These units are ideal for creating responsive designs that adjust to different screen sizes.

####Absolute units (in, cm, mm, pt, pc)
Absolute units are fixed units of measurement that are not dependent on the size of the viewport or parent element. They are commonly used for print stylesheets or in situations where precise control over element size is required.

     
###Tips for Using CSS Units Correctly:

- 
Use relative units for responsive design: Relative units like percentage, em, and rem are ideal for creating responsive designs that adapt to different screen sizes.

- 
Consider using viewport units: Viewport units (vw and vh) are a great way to create elements that are proportional to the size of the browser window.

- 
Use pixel units sparingly: While pixels provide precise control over element size, they do not scale well across different devices and screen sizes.

- 
Use absolute units for print stylesheets: Absolute units like in, cm, mm, pt, and pc are commonly used for print stylesheets or situations where precise control over element size is required.

- 
Avoid using too many different units: Using too many different units in your CSS code can make it harder to maintain and debug. Try to stick to a consistent set of units throughout your stylesheet.
What’s your wierdest AI moment?
Published: 2023-02-24 14:11:28

Mine was actually pretty cool! What happened to me was using a GPT-2 Model called DistilGPT-2. I typed in two words, “Geometry Dash” (I’m an addict to it lol, GD IS THE BEST GAME I DONT CARE WHAT YOU SAY), and it generated an extremely long Paragraph about it… and I quote… IN THE NEXT POST!!! Lol theres just not enough room in this one
Using lazy.nvim 💤 in our Neovim configuration
Tags: neovim, programming, tutorial
Published: 2023-02-24 13:38:57

## 👋 Introduction
Alright! If you've been following along, we've configured some options and keymaps.
Next, we're going to use [lazy.nvim](https://github.com/folke/lazy.nvim)! 
It has:
* 💤 Auto-magic lazy loading
* 🔒 Lock files to keep track of plugin versions
* 💪 Modular plugin structure
* 😮 ... and more!

## 🏗 HOWTO: Bootstrap.
It's quite easy to bootstrap [lazy.nvim](https://github.com/folke/lazy.nvim)
Create a new module named `lazy.lua` and SLAM this code in it.
```lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)
```

Just that!
Now quit Neovim (if you can) and, start it back again. It should automatically install lazy.nvim.

## ⁉ Question of the day!
Q. 🤨 How do I install plugins?
A. Just follow this crash course!

```lua
require("lazy").setup(plugins, opts)
```

`plugins` would be an table of plugins and, `opts` would be a table of options.
ok kthxbye/

I meant...

## Crash course vII: Install the catppuccin colorscheme.
I love [catppuccin](https://gtihub.com/catppuccin/nvim). So let's get some mocha!

Create a new directory in `lua` named `plugins`. And in `/plugins/` make a new module named `colorscheme.lua`

So, our file thing should look like:
```
~/.config/nvim/
├── init.lua
└── lua/
    ├── core/
    │   ├── init.lua
    │   └── options.lua
    └── keymaps/
        └── movement.lua
        └── ...
    └── plugins/
        └── colorscheme.lua
        └── ...
```

In `colorscheme.lua` it should look like:
```lua
return {
    "catppuccin/nvim"
}
```
This code should be self-explanatory but, I'll give you a "high level overview" of it.
It returns a table.

Whoo! Now in `lazy.lua` replace whatever I gave you (`replace("lazy").setup(...)`) with...
```lua
require("lazy").setup({
  { import = "plugins" }
})
```

Now we're all done! Now let's go get a cup of mocha.
In our `setup/init.lua`...
```lua
-- Some code here...
vim.cmd.colorscheme "catppuccin"
```

Now it should show the beautiful catppuccin theme! Let's actually get a cup of mocha now!

*(Quick plug: [here](https://github.com/asyncedd/nvim))*

kthxbye :wq
Resolvendo problemas no HackerRank: Separando meias por cores!
Tags: javascript, beginners
Published: 2023-02-24 13:37:06

Olá, seja bem vindo a mais uma etapa do Resolvendo problemas no Hacker-Rank,nessa sessão iremos dividir meias que estão categorizadas dentro de um array de números. Cada número representa uma cor. Vejamos como separar isso.

**Sales by Match -**

O problema é direto e nos diz:"Determine quantos pares de meias com cores correspondentes existem." Logo após ele nos dá a sequência: 

- n = 7
- arr = [1,2,1,2,1,3,2]

Conseguimos formar um par de cor 1(arr[1,1]),e um par de cor 2(arr[2,2]), sobrando [1,2,3] um de cada cor.

O código para resolver isso foi feito usando Reduce, da seguinte maneira:


```
function sockMerchant(n, ar) {
    // Write your code here
  const count = ar.reduce((acc, cur) => {
    acc[cur] = (acc[cur] || 0) + 1;
    return acc;
  }, {});
  
  const numbersPairs = Object.values(count).reduce((acc, cur) => {
    return acc + Math.floor(cur / 2);
  }, 0);

  return numberPairs;
}
```
A primeira linha da função cria uma variável `count` e a inicializa como um objeto vazio. Isso é feito para armazenar a contagem de cada cor de meia presente no array ar. É usado o `(acc[cur] ||0)+1` para verificar se a cor da meia já existe. Caso sim,adiciona 1 e caso não se cria um contador com início de valor 1.

Depois disso, a função `Object.values` é usada para obter um array com os valores dos contadores presentes no objeto `count`. Esses valores são passados como primeiro argumento para a função reduce seguinte que recebe os mesmos dois parâmetros que a função reduce anterior. 

A função passada como primeiro argumento para reduce soma o número de pares de meias encontrados para cada cor de meia presente em count. Isso é feito dividindo o valor do contador por 2, arredondando para baixo com Math.floor, e somando o resultado ao acumulador acc. O resultado final é retornado no final da função reduce.

Por fim, o resultado final é retornado pela função sockMerchant.

Com isso concluímos mais um episódio, e nos vemos na próxima!!!
Video — Transformer training shootout: AWS Trainium vs. NVIDIA A10G
Tags: transformers, deeplearning, nvidia, aws
Published: 2023-04-03 10:01:36

---
title: Video — Transformer training shootout: AWS Trainium vs. NVIDIA A10G
published: true
date: 2023-02-24 13:29:56 UTC
tags: transformers,deeplearning,nvidia,aws
canonical_url: https://julsimon.medium.com/video-transformer-training-shootout-aws-trainium-vs-nvidia-a10g-f2408533b852
---

### Video — Transformer training shootout: AWS Trainium vs. NVIDIA A10G

In this video, I compare the cost-performance of AWS Trainium, a new custom chip designed by AWS, with NVIDIA A10G GPUs.

I first launch a trn1.32xlarge instance (16 Trainium chips) and a g5.48xlarge (8 A10Gs). Then, I run a natural language processing job, fine-tuning the BERT Large model on the full Yelp review datatset. I use the BF16 data format with the maximum sequence length supported by the model (512). The results? The Trainium job is 5x faster. As the trn1 instance is only 30% more expensive, this is a huge improvement in cost-performance!

{% youtube 2SquGhkld7k %}
dialog flow cx with terraform
Published: 2023-02-24 13:24:47

I got this error when dealing with the official script given in this link

https://github.com/GoogleCloudPlatform/contact-center-ai-samples/tree/main/dialogflow-cx/shirt-order-agent

; the error │ Error: Error creating Page: googleapi: Error 400: com.google.apps.framework.request.BadRequestException: Entity type 'projects/-/locations/-/agents/-/entityTypes/sys.color' of form parameter 'color' is not a sub-resource of the agent. │ │ with google_dialogflow_cx_page.new_order, │ on pages.tf line 49, in resource "google_dialogflow_cx_page" "new_order": │ 49: resource "google_dialogflow_cx_page" "new_order" {
Netex Sensör, Netex Sunucusuna Nasıl Eklenir?
Tags: liman, netex
Published: 2023-02-24 13:10:01

# Netex Sensör (Linux-Client) Kurulumu 

- Netex sensör kurulacak makinenin terminali açılır.

- İçe aktarılmış olan "netex-sensor-x64.deb" dosyası aşağıdaki komut yardımı ile bağımlılıkları dahilinde kurulur:

```
# sudo apt install ./netex-sensor-x64.deb
```

- Kurulum sonrası **/opt/netex-sensor/.env** içine girilir ve düzenlemeler yapılır.
    
 **netex_server_IP:** Netex server IP adresi girilir.
 **dns_server:** DNS server girilir.

```
# cat /opt/netex-sensor/.env
SERVER_URL="https://netex_server_IP:7782"
LOG_LEVEL="DEBUG"
DNS_SERVER_URL="dns_server:53"
```

- Dosya kaydedilip çıkılır ve netex-sensor yeniden başlatılır:

```
# systemctl restart netex-sensor
```

- Ardından şu komut ile kontrol edilir:

```
# systemctl status netex-sensor
```
böylece Netex sensör, Netex sensör için istenen sunucuya eklenmiş olur.

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

Daha sonrasında Liman Netex Eklentisi ile sensörler izlenebilmektedir.
Metaprogramação - Ela pode ser útil em diversas situações, mas não abuse!
Published: 2023-02-24 13:00:00

Meu gerente Guilherme Franco aqui da Vindi fez essa postagem aqui no LinkedIn com uma dica muito legal sobre Refactor no Rails, que voce pode conferir no seguinte link:

https://lnkd.in/d79spFHw

Nessa postagem eu interagi com ele e deixei um comentário sobre a o uso ou não de metaprogramação, veja lá o que ele respondeu.

Se você é um iniciante em Ruby ou está apenas começando a explorar o mundo de desenvolvimento web, deve-se perguntar o que é metaprogramação e como ela pode ser útil.

Metaprogramação é uma técnica avançada de programação que permite modificar o comportamento de um programa em tempo de execução.

Ela pode ser útil em diversas situações, como quando você precisa adicionar novos recursos a uma classe existente ou criar comportamentos personalizados(use com moderação) para sua aplicação.

No exemplo da imagem, exploramos de maneira breve um dos conceitos básicos de metaprogramação em Ruby e que certamente você já viu e talvez já tenha usado seus projetos.

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

Neste exemplo, usamos attr_accessor para criar os métodos nome e idade automaticamente. Com isso, podemos definir e acessar esses atributos como se fossem variáveis comuns. Isso é possível graças à metaprogramação em Ruby, que permite definir e alterar o comportamento de uma classe em tempo de execução.

Viu, essa é uma dica legal de código para iniciantes em Ruby sobre metaprogramação é o uso de métodos attr_accessor, que permite criar getters e setters para uma classe.

Sacou?

Em Ruby a metaprogramação é ainda mais poderosa pois podemos adicionar, modificar, remover, executar, etc. qualquer código em tempo de execução. No entanto esse “poder” exige cuidado para evitar complicações de manutenção de código. Um dos pontos negativos da forte utilização de metaprogramação em Ruby é que, quando se abusa dela, fica muito difícil debugar e manter o código, pois você pode ver no stack trace que ocorreu um erro em um determinado método e, ao procurar por esse método, não encontrar nada.

Fontes:

"Metaprogramming Ruby 2" por Paolo Perrotta: um livro muito popular sobre metaprogramação em Ruby que aborda conceitos avançados e práticos. Disponível em: https://lnkd.in/dP9hFMXB

"The Well-Grounded Rubyist" por David A. Black: um livro abrangente sobre Ruby que inclui um capítulo sobre metaprogramação. Disponível em: https://lnkd.in/dUBkmzHR

Site do Marcos Brizeno: https://lnkd.in/dZxiHQJv

#desenvolvimento #refactor #rubyonrails #quicktip #DevRel
useSWR-Next.JS Fetching Remote Data
Tags: javascript, nextjs, react, webdev
Published: 2023-02-24 12:40:32

useSWR is a popular React hook that is used for data fetching. It was developed by Vercel, the company behind the Next.js framework. The name SWR stands for "stale-while-revalidate," which is a caching strategy that the hook uses to optimize data fetching.

Let's take a closer look at the useSWR hook and how it can be used in React.

- What is useSWR?

useSWR is a React hook that provides a simple way to fetch data from an API and manage the state of that data. It does this by caching the data locally and automatically updating it when necessary.

One of the main benefits of using useSWR is that it optimizes data fetching by using a stale-while-revalidate caching strategy. This means that when data is fetched, it is cached locally and can be immediately displayed in the UI. However, the data is also flagged as "stale" and will be automatically revalidated in the background. This ensures that the data is always up-to-date, without the need for the user to manually refresh the page.

- How to use useSWR?

To use the useSWR hook in your React application, you'll need to install the swr package. You can do this by running the following command in your terminal:
`npm install swr`

Once the swr package is installed, you can import the useSWR hook and use it in your functional components. Here's an example:
```
import useSWR from 'swr';

function MyComponent() {
  const { data, error,isLoading } = useSWR('/api/data', fetch);

  if (error) return <div>Error fetching data</div>;
  if (isLoading) return <div>Loading...</div>;

  return <div>{data}</div>;
}
```

In this example, we're using useSWR to fetch data from an API endpoint (/api/data) using the fetch function. The hook returns an object with two properties: data and error. If there's an error fetching the data, we display an error message. If the data is still loading, we display a loading message. Otherwise, we display the fetched data.

useSWR also provides several options that you can use to customize its behavior, such as setting the refresh interval, specifying the cache key, and configuring the caching strategy.

Conclusion

In summary, the useSWR hook is a powerful tool for data fetching and state management in React. Its ability to optimize data fetching through caching and automatic revalidation makes it a popular choice for building high-performance React applications. If you're building a React app that needs to fetch data from an API, be sure to consider using the useSWR hook.
How to setup a Monorepo: React, React Native, and Node
Tags: react, reactnative, node, javascript
Published: 2023-02-24 12:38:54

Need help in setting up a monorepo.

Here is what the monorepo is meant to contain:

| Module        | Use case                   |
|---------------|----------------------------|
| React Native  | User facing mobile app     |
| React/Next    | User facing web app        |
| React/Next    | Admin Panel web app        |
| UI package    | For user and admin web app |
| Utils package | Common JS utils            |
| Node          | Backend server             |

<br/>

Please advise on the best method to configure my repository for this.
Kindly, also provide any github repositories with a comparable format to which I may refer.
DHCP Logları Netex Sensöre Nasıl Yönlendirilir?
Published: 2023-02-24 12:38:13

- Logların toplanması gereken Windows makinesine NXLog'un en son sürümünü [buradan](https://nxlog.co/downloads/nxlog-ce#nxlog-community-edition) indirip yükleyin.

- Kurulumdan sonra, nxlog.conf dosyasını **C:\Program Files\nxlog\conf** klasöründe bulun.

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

- Bir text file kullanarak nxlog.conf dosyasını açın. Windows sürümünüz için verilen metni kopyalayıp yapıştırarak **Output syslogout** satırının içindeki:
    - **Host:** Log gönderilmek istenen sensör'ün IP'si
    - **Port:** Log gönderilmek istenen sensör'ün port'u
olacak şekilde değiştirin ve ardından dosyayı kaydedin.

**Windows x64 bit OS:**

```
define ROOT C:\Program Files\nxlog

Moduledir %ROOT%\modules
CacheDir  %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir  %ROOT%\data
LogFile %ROOT%\data\nxlog.log

<Input watchfile>
  Module im_file
  File 'C:\Windows\System32\dhcp\DhcpSrvLog-*.log'
  Exec $Message = $raw_event;
  Exec if file_name() =~ /.*\\(.*)/ $SourceName = $1;
  SavePos TRUE
  Recursive TRUE
</Input>

<Processor filewatcher_transformer>
  Module pm_transformer
  Exec $Hostname = hostname();
  OutputFormat json
</Processor>

<Output syslogout>
  Module om_tcp
  Host sensör_IP  
  Port 7785       
</Output> 

<Route 1>
  Path watchfile => filewatcher_transformer => syslogout
</Route>
```


- Config işlemini tamamladığımıza göre artık nxlog servisimizi restart ederek loglarımızı gönderebiliriz.

- Control Panel > Services'e gidin ve **nxlog** service'ini bulun.

- nxlog'a sağ tıklayın ve **Restart**'a tıklayın.

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

- DHCP logları artık istenen sensöre yönlendirilir.

**ÖRNEK**
- Logları göndermek istediğimiz sensör makinesinde şu komut çalıştırılır: 

```
# tail -f /opt/netex-sensor/output.log
```
- DHCP içindeki makinelerden birinde ise şu komut çalıştırılır:

```
# systemctl restart NetworkManager
```
ardından DHCP loglarının Netex sensöre yönlendirilmesi incelenebilir.


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

- Liman MYS - Netex eklenti arayüzünde ise Discovery → Sensors sekmesinde ilgili sensörün solundaki ">" butonuna tıklanır ve sensöre ait ayrıntılar listelenir.


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

- Ayrıntıların gözüktüğü ekranda sağdaki yenileme butonuna tıklanarak DHCP kaynağına son erişim tarihi buradan kontrol edililir.
Coding Challenge at Blue Saturn
Tags: beginners, community, challenge, motivation
Published: 2023-02-24 12:35:12

𝐒𝐮𝐦𝐦𝐨𝐧𝐢𝐧𝐠 𝐚𝐥𝐥 𝐝𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬!

Are you ready for a coding challenge?
Our team is excited to announce our upcoming coding challenge that will put your skills to the test. Whether you're a seasoned developer or just starting out, this challenge is for you.

Here are the details you need to know:

📅 Start: 24/02 at 9am EST
📅 End: 25/02 at 6pm EST

To register, simply fill out this form: https://lnkd.in/eyHgdVSq

What's in it for you?

💸 Cash prizes for the two most outstanding submissions
🏆 $150 for the first-place winner
🏆 $50 for the second-place winner
🎖️ A coding badge for successfully completing the task

The task will be released on the 24th on our Discord server. Our team of developers will thoroughly review each submission, evaluating its functionality and the quality of the code.

Don't miss out on this opportunity to showcase your skills and earn rewards. Register now and get ready to start coding!

#coding #developer #challenge
Syntax(C++)
Tags: programming, cpp, beginners
Published: 2023-02-24 12:27:09

I would have left asking you to take a look at the code below before to realize its syntax.
#include <iostream>
using namespace std;

int main ().
{
cout < < < " Hello World;

return 0;
}
Now let's analyze a line of code.

scope: #include <iostream> from this the library (#include) - calling is implemented. "iostream" means input and output stream - allows you to work with input and output objects, cout (see 5 lines in the code).
row: using namespace std means that we can use names for objects and variables from a standard library.
If you don't understand how #include <iostream> and how it works, don't worry using namespace std. Just think of it as something that always appears in your app.

row: empty row abandoned. C++ ignores space.
row: always in C++ program