teleren/devto huggingface dataset:
O que é Apache Kafka?
Published: 2023-04-05 01:20:44

O Apache Kafka é uma plataforma de streaming distribuída que foi inicialmente desenvolvida pelo LinkedIn, em 2011. Desde então, o Kafka tornou-se uma das ferramentas mais populares para processamento em tempo real de fluxos de dados em grande escala.

Em termos simples, o Kafka é um sistema de mensagens distribuído que permite que as aplicações publiquem, armazenem e consumam fluxos de dados em tempo real. Ele foi projetado para ser escalável, durável e tolerante a falhas, permitindo que as aplicações processem grandes volumes de dados de forma eficiente e confiável.

O Kafka consegue lidar com grandes volumes de dados de diferentes fontes, incluindo logs de servidores, transações de e-commerce, registros de cliques e muito mais. Ele é especialmente útil em casos de uso que exigem o processamento de dados em tempo real, como análise em tempo real, monitoramento de infraestrutura, detecção de fraudes, recomendação de conteúdo personalizado, entre outros.

O Kafka é construído em torno do conceito de "streams", que são fluxos de dados contínuos que podem ser processados em tempo real. Os streams são divididos em "tópicos", que são categorias ou canais de dados específicos. As aplicações podem publicar dados em tópicos e consumi-los em tempo real. O Kafka armazena os dados em tópicos por um período configurável, permitindo que as aplicações os acessem posteriormente, se necessário.

Além disso, o Kafka é altamente escalável e pode ser executado em clusters de servidores. Ele consegue lidar com cargas de trabalho em grande escala e garantir que os dados sejam processados ​​sem interrupções, mesmo em caso de falha de um servidor ou outro componente do sistema.

Resumindo, o Apache Kafka é uma plataforma de streaming distribuída que permite que as aplicações processem grandes volumes de dados em tempo real. Ele é altamente escalável, tolerante a falhas e pode ser usado em uma ampla variedade de casos de uso que exigem processamento em tempo real de dados de streaming.
Golang Web App Demonstration
Tags: go, webdev, tutorial
Published: 2023-04-05 00:38:12

## Introduction

Today, I will be demonstrating in a series of videos how to build a very basic web app using Golang. The app I will be demonstrating is very basic, and it does close to nothing, but it does highlight the major ideas in web app creation. Without further ado, let's jump right in!

---

## Routing and Middleware
{% youtube Xmu3zPmqRTQ%}

---

## Handlers
{% youtube vHyr7-Bwn3M%}

---

## Form Handlers
{% youtube DCZuNLBap0o%}

---

## Database access
{% youtube 6dT4LUEi-VI%}
[Golang Database Drivers](https://github.com/golang/go/wiki/SQLDrivers)

---

## HTML Templates

_With rendering and building, as well as models._

{% youtube P-tTx3jIlv0%}


[Go Template Cheat Sheet](https://gowebexamples.com/templates/)

---

## Styling and images

{% youtube Sy3nNXRuejA%}

---

## Writing to log files

{% youtube qkB0ixZ4Ogc%}

---

## Testing

{% youtube O3qv7YWmxC4%}
Serpro oferece 600 vagas com remuneração inicial de R$ 9 mil
Published: 2023-04-17 12:46:40

---
title: Serpro oferece 600 vagas com remuneração inicial de R$ 9 mil
published: true
date: 2023-04-05 00:00:00 UTC
tags: 
canonical_url: https://josafa.com.br/blog/concurso-serpro-2023/
---

Se uma vaga de emprego com salário de mais de 9 mil reais, além de diversos benefícios e a possibilidade de trabalho remoto te interessa, essa notícia é para você. 

O Serpro, empresa de tecnologia do Governo Federal, irá abrir um concurso público para o cargo de Analista com especialização em Tecnologia. Serão cerca de 600 vagas em todo o Brasil, com a possibilidade de atuar em regime de trabalho remoto, inclusive no exterior, conforme as condições estabelecidas em normativos vigentes. 

## Qual o salário de um Analista do SERPRO? 

A remuneração inicial é de R$ 9.025,73, correspondendo ao salário nominal de R$ 7.848,46 mais gratificação de R$ 1.177,27, para uma jornada de 40 horas semanais. Além do salário, os empregados do Serpro têm direito a diversos benefícios, como plano de saúde, plano de previdência complementar, auxílio-alimentação, auxílio-creche, entre outros. 

## Quem pode fazer o concurso do SERPRO? 

Para concorrer a uma dessas vagas, é necessário possuir graduação na área de tecnologia ou em qualquer outra área de formação, desde que possua curso de pós-graduação na área de tecnologia com carga horária mínima de 360 horas. 

## O que faz o SERPRO? 

A empresa contribui para o desenvolvimento da tecnologia no setor público, fortalecendo o braço de conexão entre governo e sociedade, gerando facilidades para o cidadão. Alguns exemplos de soluções desenvolvidas pelo SERPRO são a Carteira Digital de Trânsito, o Gov.br e o DNI. A banca organizadora escolhida para o processo seletivo é o Centro Brasileiro de Pesquisa em Avaliação e Seleção e de Promoção de Eventos (Cebraspe), uma das mais conhecidas e renomadas organizadoras de concursos públicos no Brasil. 

## Último edital do SERPRO. 

Também sob organização do Cebraspe, o último concurso do SERPRO ocirreu em 2021 e ofertou 165 vagas temporárias para o cargo de Analista, nas especialidades de Ciência de Dados e Desenvolvimento de Sistemas. Veja as matérias que foram cobradas naquele edital:

### Conhecimentos básicos: 

- Língua Portuguesa – 20 questões 
- Língua Inglesa – 05 questões 
- Estatuto Social do SERPRO – 05 questões 
- Raciocínio Lógico – 05 questões 
- Legislação acerca de privacidade e proteção de dados pessoais – 15 questões 

### Conhecimentos específicos: 

- (Segurança da Informação, Processo, Programação, Bancos de Dados, Padrões de Projeto, Big Data, Inteligência Artificial, entre outros) - 70 questões. 

Se você deseja ingressar no Serpro, é importante ficar atento ao edital e começar a se preparar desde já. Invista em cursos preparatórios, estude as áreas exigidas e se informe sobre a empresa. Essa pode ser a sua chance de ter uma carreira sólida na área de TI no setor público, com estabilidade financeira e benefícios atrativos.
Beyond the Recipe: Why Communication Needs More than Just a Pinch of AI
Tags: ai, chatgpt, cooking, communication
Published: 2023-04-04 23:55:51

In the age of Artificial Intelligence (AI), it's easy to think that technology has made everything so simple and effortless. From shopping online to booking travel, everything seems to be automated and efficient. However, a [recent caricature from Marketoonist](https://marketoonist.com/2023/03/ai-written-ai-read.html) has highlighted the importance of human effort and engagement in our communication and understanding of information.

The caricature shows a man writing an email with the help of AI based on a single sentence, and the recipient using an AI to summarize the email back into one sentence. While this may seem like a quick and easy way to communicate, it emphasizes the fact that just sending a single phrase isn't enough. We still need to see an effort from the author and, more importantly, we need to make some effort to extract an important piece of information out of it. Otherwise, we won't be satisfied enough with that piece of information as we didn't do enough to get it.

This concept is similar to how we don't just want to consume nutrients in a pure form. We need food to taste nice, to look nice, and we need to feel like we did enough cooking the food and extracting nutrients out of it. Similarly, when we communicate with others, we need to put in effort and care to ensure that we're delivering the information effectively and that the recipient is understanding it correctly.

In today's fast-paced world, it's easy to fall into the trap of wanting everything to be done quickly and efficiently. However, it's important to remember that sometimes, the best things in life require a bit of effort and engagement. Whether it's taking the time to prepare a delicious meal or putting in the effort to write a thoughtful email, the end result is always more satisfying when we know we've put in the effort.

The caricature is a reminder that AI is not a substitute for human effort and engagement. While technology has certainly made our lives easier in many ways, we still need to make an effort to connect with others and understand information fully. By doing so, we can ensure that we're not just communicating effectively, but that we're also building meaningful relationships and connections with those around us.

In conclusion, while the caricature may be a humorous representation of our reliance on technology, it also serves as a reminder that human effort and engagement are essential for effective communication and understanding. Let's not forget to put in the effort to truly connect with others and extract important information, just as we don't want to miss out on the taste and nutrients that come from a well-cooked meal.
Modeling: make inside faces colored, differentiate between the outside and inside faces in Blender
Tags: beginners, productivity, opensource
Published: 2023-04-04 23:34:17

Ever wonder how to make the inside faces of an object to be more visible in Blender? You don't need any special add-on. It's a feature called _face orientation_. Here's how to use it:

1. You can enable this feature under the **Viewport Overlays** menu, as shown in the screenshot below:

     ![Viewport Overlays menu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xlo9jbevvby1rt3dm91.png)

2. However, the default color for face orientation will overlay the object's material color, as shown in the screenshot below:

     ![default face orientation color](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/901t2h5jo6kkcuczg4jw.png)

     If you just want to differentiate between the outside and inside faces without overlaying the object's material color, you can set the theme for the face orientation feature in **Edit > Preferences > Themes > 3D Viewport** and set the front side color's alpha to `0`, as shown in the screenshot below:

     ![face orientation color's alpha](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/att5klpyex0r4rl941oo.png)

Bammm! It's done!

![Done](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bjjixzlmluguwfmkatt4.png)

---

I hope this help!
Data Explained: ETL
Tags: database, python, sql
Published: 2023-04-04 23:00:59

Extract. 

Transform. 

Load. 


This can be a complex concept. Here’s an easy way to understand it: 

McDonalds. Yes. McDonalds. 


You order from the drive-through and receive your order (**Extract**) 


Add ranch. People like ranch. 

Add Barbeque Sauce to your Fries. 

And Take off the Onions. Eww.   (**Transform**) 


Eat. (**Load**)


Garbage In. Garbage Out.
Drupal Install with Configs and hook_install()
Published: 2023-04-04 21:15:55

I was able to perform the following steps to fix a config dependency error and then do a fresh install **with config**.

First, in order to bypass the `--existing-config` restriction on install profiles with a `hook_install()`, comment out `web/core/profiles/standard/standard.install`.

Then, do the following:

```
# A clean install to work with
lando drush si standard -y

# Export any individual missing configs.
# Example:
lando drush config:get comment.type.comment > config/sync/comment.type.comment.yml
lando drush config:get field.field.comment.comment.comment_body > config/sync/field.field.comment.comment.comment_body.yml

# Re-install with existing configs.
lando drush si standard --existing-config -y
```

At this point, you have a working Drupal install with the imported existing configs.

We still want to run the standard profile's installation hook. So, copy the contents of `standard_install()`. In a text editor, paste and edit the PHP statements. Ensure the full paths are supplied to the class names. Copy this set of statements.

```patch
-  $user = User::load(1);
+  $user = Drupal\user\Entity\User::load(1);

-  $shortcut = Shortcut::create([
+  $shortcut = Drupal\shortcut\Entity\Shortcut::create([

-  $shortcut = Shortcut::create([
+  $shortcut = Drupal\shortcut\Entity\Shortcut::create([
```

Hop into a PHP REPL, paste and run the PHP statements.

```
$ lando drush php
Psy Shell v0.10.12 (PHP 8.0.27 — cli) by Justin Hileman
Caonline Rebuild - Workbench Access (Drupal 9.4.5)
>>>   $user = Drupal\user\Entity\User::load(1);
...
  $shortcut->save();
=> 1
>>> exit
```

At this point, you can export configs and commit.

```
lando drush cex -y 
```
How to create a div with a curved bottom
Tags: javascript, webdev, beginners, programming
Published: 2023-04-04 23:00:17

When we need a rounded edge we can use border-radius. But what if we need create a div with a curved bottom?

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

### CSS clip-path
If we read CSS clip path api doc. We will find that we can crop a div into any shape we want with path

clip-path: circle(40%);
clip-path: path('M 0 200 L 0,75 A 5,5 0,0,1 150,75 L 200 200 z');

### Understand svg path
If you copy this path into this svg-path-editor we can visualize the shape of it.

```svg
m 0 0 v 305.867 c 114 30 229 30 343 0 V 0 Z
```

The only problem is what are all those number means. You can drag the control points a little. Then you will find they are nothing but the coordinates of 2d points.

### Write a basic example
If you have realized that those numbers in the path is just coordinates, then we can start write our example

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

```html
<template>
  <div 
    class="demo"
    :style="{ 'clip-path': `path('m 0 0 v 100 c 70 30 140 30 210 0 V 0 Z')`}"
    >
    <p :style="{'padding': '12px'}">hi</p>
  </div>
</template>

<style scoped>
.demo {
  background-color: orange;
  height: 150px;
  width: 210px;
}
</style>
```

### The Code of first example
[Code](https://arnosolo.github.io/blog/how-to-create-a-div-with-a-curved-bottom.html#the-code-of-first-example-optional)

If you find this article useful, maybe you can buy my calculator for $0.99? It is a calculator that can change layout. So you can only keep the buttons you prefer. -> [App Store](https://apps.apple.com/us/app/customizable-calculator/id6446835863?l=zh)
Novo vídeo: Explicando e resolvendo City Office do Exercism em Elixir (usando docs e typespecs)
Tags: elixir, exercism
Published: 2023-04-04 22:48:46

Fazia tempo que eu não fazia um vídeo resolvendo exercícios do [Exercism](https://exercism.org/) (ou do Advent of Code).

Eu gostei deste pois o objetivo era escrever documentação em Elixir.

Assista abaixo:
 {% youtube M5aYm0wPFKs %}
Aulas de Introdução a Elixir (2023)
Tags: elixir
Published: 2023-04-04 22:44:02

Ministrei 3 aulas ao vivo de Introdução a Elixir.
Os vídeos estão abaixo.
Gostei dos dois primeiros mas nem tanto do terceiro.
Devo fazer uma quarta aula?
{% youtube  UC4cIIHry1I %}
{% youtube  KY839kctQnA %}
{% youtube cPyW7uXNEPY %}
Debian: non-free firmwares
Tags: debian, linux, fimware
Published: 2023-04-04 22:40:11

I just became aware of the fact that there was a [resolution back in 2022](https://wiki.debian.org/Firmware) which results in a new component for APT packages.

I currently run on Debian unstable - which is rather stable - and have the following entry in my `/etc/apt/sources.list`:

```
deb http://http.us.debian.org/debian/ unstable main contrib non-free
```

If you want to access firmware packages (including upgrades), you'll have to add `non-free-firmware`. So, my updated list entry now looks like this:

```
deb http://http.us.debian.org/debian/ unstable main contrib non-free non-free-firmware
```
2000's Linux vs Windows
Published: 2023-04-04 22:38:57

"Bad day with Linux, is better than a good day with Windows."
This phrase is an classical of 2000's but it's true. The internet was scare and the man command is the source of learning for Linux

As I said before, you need to learn
- Good S.O
- Network Fundamentals
- One robust language (C, Java)

And study every day.
Stop Wasting Time Comparing Databases Manually! Learn How Dynamic Queries Can Save You Time and Hassle 💻🚀
Tags: beginners, programming, database, devlive
Published: 2023-04-04 22:30:32


In a recent project, we encountered a situation where we needed to compare two databases to ensure that all the information was successfully migrated during a server migration. To address this, I suggested using a technique called dynamic queries to compare the databases programmatically.
 
"Dynamic queries refer to the process of generating database queries on the fly or at runtime, rather than hard-coding them into an application. In other words, instead of having pre-defined SQL statements that are executed against a database, dynamic queries allow you to build SQL statements dynamically based on certain criteria or conditions. This can be achieved using input parameters, database catalogs, conditions, and other dynamic elements." Chat GPT (thanks)
 
For our specific case, we needed to extract the number of rows from all tables in the database so we could compare them between the two databases and verify if everything was properly migrated. This task could be daunting if done manually, especially when dealing with a large number of tables (e.g., 300, 100, etc.). However, using dynamic queries, we were able to automate the process and save time.
 
Here's an example of how we used dynamic queries with PostgreSQL catalog to generate a new query:
 
```sql
SELECT 'SELECT COUNT(*) AS row_numbers, ''' || table_name || ''' AS table FROM ' || table_name || ' UNION ALL '
FROM information_schema.tables
WHERE table_schema='pg_catalog'
UNION ALL 
SELECT 'SELECT 0, ''dummy'''
```
 
**The generated query looks like this:**
 
```sql
SELECT COUNT(*) AS row_numbers, 'pg_stat_xact_user_functions' AS table FROM pg_stat_xact_user_functions UNION ALL 
SELECT COUNT(*) AS row_numbers, 'pg_stat_archiver' AS table FROM pg_stat_archiver UNION ALL 
SELECT COUNT(*) AS row_numbers, 'pg_stat_bgwriter' AS table FROM pg_stat_bgwriter UNION ALL 
SELECT COUNT(*) AS row_numbers, 'pg_stat_progress_analyze' AS table FROM pg_stat_progress_analyze UNION ALL 
SELECT 0, 'dummy'
```
 
**And the result of the generated query would be:**
 
```sql
row_numbers   table
0             pg_stat_xact_user_functions
1             pg_stat_archiver
1             pg_stat_bgwriter
0             pg_stat_progress_analyze
0             dummy
```

 
I hope you find this information useful for your future projects or as a new tool in your toolkit! this can be a powerful technique to generate database queries on the fly or just a time saver when you need to run some maintenance tasks or fix some problem

Let me know if you have any questions, if you face a similar situation in the past, or if this is helpful to you! Happy coding!🤗

❗️❗️No programmer or tech lead was harmed in the making of this article.❗️❗️
Day 728 : For Now
Tags: hiphop, code, coding, lifelongdev
Published: 2023-04-04 22:16:42

_liner notes_:
- Professional : Pretty good day. Looked over some new docs. Helped out with some community questions. Worked on completing a functionality for my proof of concept project. Had a meeting with my manager and of course when I went to demo the functionality I added, the CDN I use to load files when developing went down. I was able to show it though, but couldn't work on anything else. My manager agrees that the project is in a good place to get it ready for an initial release for now, and we can new features down the road. So, I moved on to another ticket and got a demo up and running so I can check it out. Not a bad day. A lot of things happening. 

- Personal : The sample project I've been working on to test things out for my side project is going well. I've added some keyboard events. Like you can tab through the images and they get highlighted so you can see which image is selected. I also added navigation through gallery images with the arrow keys. Making some progress and learning a lot.

![Madhabkunda Waterfall, Bangladesh stone face wall with some green vegetation with a stream of water flowing into a lake at the base.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lt8xh4ctky7zoqiqfz8q.jpg)

Going to go through tracks for the radio show. Going to work on the details page of my sample project and the navigation to get there. Also going to catch up on "Vinland Saga" and go to sleep.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 5u-cjGdVGRw %}
Laravel MailGun with template, tags, and variables
Tags: laravel, mailgun, programming
Published: 2023-04-04 22:16:05

Laravel is a great framework with a large ecosystem. There you can find tools for various services. But sometimes official libraries, and even more so unofficial ones, do not have all the functionality we need.

[Mailgun](https://www.mailgun.com/) is one of the popular email services and Laravel has a [driver](https://laravel.com/docs/mail#mailgun-driver) to use this service. Although Mailgun has a powerful tool for managing templates, such an option is not included in the library.
I found other [libraries](https://prawnstar.medium.com/how-we-send-mailgun-template-emails-in-laravel-16105068c516) on the Internet that offer work with templates, but I wanted to work with the official library and use Mail class. That's why I decided to add the create `Mailgun` trait that expands the capabilities of the library.

```php
namespace App\Traits;

trait Mailgun
{
   public function template($name = 'general'): self
   {
       return $this->withSymfonyMessage(function ($message) use ($name) {
           $message->getHeaders()->addTextHeader('X-Mailgun-Template-Name', $name);
       });
   }

   public function variable($name, $value): self
   {
       return $this->withSymfonyMessage(function ($message) use ($name, $value) {
           $message->getHeaders()->addTextHeader('X-Mailgun-Variables', json_encode([$name => $value]));
       });
   }

   public function tag($name): self
   {
       return $this->withSymfonyMessage(function ($message) use ($name) {
           $message->getHeaders()->addTextHeader('X-Mailgun-Tag', $name);
       });
   }
}
```

Connect this trait to the mail class and now we have the `template`, `tag`, and `variable` methods available.

```php
class MessageMail extends Mailable implements ShouldQueue
{
   use Queueable, SerializesModels, Mailgun;

   /**
    * Create a new message instance.
    *
    * @return void
    */
   public function __construct(
       private User $user,
   )
   {
   }

   /**
    * Build the message.
    *
    * @return $this
    */
   public function build()
   {
       return $this
           ->subject('Email Subject')
           ->to($this->user->email)
           ->html('')
           ->tag('my_custom_tag')
           ->template('mailgun_template')
           ->variable('name', $this->user->name)
           ->variable('link', config('app.url'))
           ->variable('email', $this->user->email);
   }
}
```

I hope that soon such an opportunity will appear out of the box. Or I finally send a Pull Request.
Hello Developer
Tags: frontend, beginners, javascript
Published: 2023-04-04 21:54:02

My name is Samuel Ayomide, and I'm thrilled to be joining the DEV community. I'm currently a computer science student with a passion for high-performance computing.

I'm always on the lookout for ideas, ways to streamline my workflow and increase my productivity, so if you have any tips or tricks you'd like to share, I'd love to hear them!
FREE AWS Cloud Project Bootcamp Week 6 Part 2
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-04-04 21:07:57

[94/100] #100DaysOfCloud Today, I did a part of the Week 6 of the FREE AWS Cloud Project Bootcamp by Andrew Brown.

Here's what was left that I completed:
- Add a test script into db directory so we can easily check our connection from our container.
- Create a new bin script at bin/flask/health-check for health checks.
- Deploy an ECS Cluster using ECS Service Connect

All of them were done through the cli.

[GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/094/Readme.md)

You can watch the Bootcamp through this YouTube playlist : [FREE AWS Cloud Project Bootcamp playlist](https://youtube.com/playlist?list=PLBfufR7vyJJ7k25byhRXJldB5AiwgNnWv)