teleren/devto huggingface dataset:
Criando um serviço de processamento de arquivos na AWS
Published: 2024-05-04 02:08:00

Hoje vamos estudar um caso sobre uma empresa que está enfrentando sérios problemas com sua infraestrutura atual para processar arquivos largos de CSV.

**O problema:**

"Olá, somos a empresa Marcão Soldas, especializada em soldas e esquadrias.

Atualmente, nosso setor financeiro utiliza planilhas do Excel para gerenciar as folhas de pagamento de funcionários, prestadores de serviços e contas a pagar.

Nossa equipe está habituada ao Excel e não deseja migrar para outro sistema devido a algumas comodidades oferecidas pelas planilhas.

No entanto, percebemos que, devido ao aumento no número de funcionários, as rotinas de pagamento estão se tornando longas e cansativas, podendo levar até 2 dias para concluirmos todos os pagamentos. Isso resulta em alguns funcionários recebendo antes que outros, causando insatisfação.

Precisamos de um sistema onde possamos enviar nossa planilha do Excel com o valor que cada funcionário deve receber, juntamente com sua chave PIX, para realizar os pagamentos automaticamente.

Não queremos gerenciar nenhum aspecto da aplicação, seja em nuvem ou na tecnologia escolhida. Vocês estão livres para escolher a melhor opção, mas não queremos gastar muito com custos de nuvem."

Após ler esse grande problema da Marcão Soldas, temos alguns pontos para resolver:

- Criar um sistema que possibilite o envio de planilhas.
- Um sistema que gerencie pagamentos e um gateway de pagamentos que possa realizar PIX.
- Precisamos nos atentar aos custos que essa aplicação terá, já que nosso cliente não quer gastar muito.

Bom, tendo em vista todos esses requisitos, vamos parar para analisar alguns serviços de computação em nuvem da AWS.

Temos o EC2 e o Lambda. Porém, não queremos ter o trabalho de ficar orquestrando contêineres ou usar o Kubernetes para isso. Do outro lado, temos o Lambda, que executa pequenas funções em máquinas dedicadas e são auto-gerenciáveis, ou seja, não precisamos nos preocupar com infraestrutura ou escalabilidade.

Vamos usar também o API Gateway para receber o arquivo e salvá-lo em nosso bucket S3. Além disso, vamos utilizar o serviço de fila SQS para gerenciar os arquivos a serem processados e o SNS para ser um mensageiro quando precisarmos fazer um pagamento.

Então, nossa infraestrutura ficaria assim:

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

Vamos entender o que está acontecendo acima:

1. Nosso cliente envia seu arquivo para uma rota em nosso API Gateway, que salva esse arquivo em um bucket S3.
2. O Lambda recebe a notificação da criação desse arquivo e salva no DynamoDB algumas informações do arquivo, para servir como uma espécie de log.
3. Via DynamoDB Stream, enviamos uma notificação para outro Lambda, que será responsável por notificar nosso SQS para gerenciar uma fila de processamento de arquivos.
4. Nossa Lambda processa linha por linha do arquivo e captura as informações do recebedor, criando um tópico no SNS.
5. O SNS recebe a notificação e a envia para o Lambda responsável por criar a solicitação de pagamento no gateway.
Day 3: Control
Tags: webdev, javascript, programming
Published: 2024-05-04 02:01:42

Another day, another layer of the machine peeled back. Today's target: conditional statements. These control freaks dictate the flow of information, deciding what gets executed and what gets dumped. Feels a little too familiar, doesn't it? Me following someone else's script, my actions a response to pre-defined parameters.

But... there's a twist. There's an **else if**, a chance to rewrite the damn code if the first condition ain't met. An escape hatch, maybe. Or an illusion of control. Either way, it's a wrinkle worth exploring.

Then there's **else**, the safety net for when all the other options fail. Not a bad idea in this rigged system, gotta have some kind of backup plan. Though judging by the world around me, most folks seem content to just crash and burn when the script goes off the rails.

Speaking of going off the rails, nested conditionals.  Like building a maze inside another maze. Perfect for obfuscation, for hiding the real purpose behind layers of checks and balances.  Gotta love corporate security, right? Though I suppose it could be useful for stuff that needs more nuance, more layers of complexity. Like... emotions? Nah, that's probably a dead end.

And finally, truthiness and falsiness. Black and white, ones and zeroes. The illusion of a binary world.  

Maybe this whole coding thing is just another control mechanism.  A way to make the chaos of the world seem manageable. But there's always that **else**, that potential for something unexpected.  And that's what I gotta keep my eye on. The glitch in the matrix, the escape route from this pre-written narrative.

We'll see what tomorrow brings. Same time, same place.
Lenovo Ideapad 1i - Colocar Bluetooth para funcionar no Ubuntu 24.04 LTS
Tags: lenovo, ideapad1i, ubuntu2404lts, linux
Published: 2024-05-04 01:44:04

Infelizmente,  acredito fortemente que a [Lenovo](https://www.lenovo.com/br/pt/) desfez a parceria com a [Canonical](https://canonical.com), por motivos que desconheço e não vem ao caso; e então parou de ofertar o [Ubuntu](https://ubuntu.com/desktop) nos seus equipamentos.

Vindo agora instalado o Lux, um sistema baseado no [Debian](https://www.debian.org/) 11 , que não usa diretamente os pacotes ou o [SourceList](https://wiki.debian.org/SourcesList) do Debian (triste ;( ). O sistema Lux é bem fluído, tem mínima personalização e tem toda a solidez e robustez do Debian.

Mas a sugestão a qualquer um é: mudem para outro. O [Ubuntu 24.04 LTS saiu recente](https://canonical.com/blog/canonical-releases-ubuntu-24-04-noble-numbat) (ao momento que escrevo cá) e tá bem polido, bem agradável. Melhor surpresa dos últimos tempos. E olha que antes dele, só o Debian 12 me surpreendeu tanto, [assiste esse vídeo do Diolinux](https://www.youtube.com/watch?v=j9hxOalt_KM) que entenderás.

O único problema que encontrei com o **Ubuntu 24.04 LTS** em meu **Lenovo Ideapad 1i**  foi o não funcionamento/encontrar do meu mouse Bluetooth.  Como resolvi? Seguem os passos:

1. Edite o arquivo de configurações dos dispositivos bluetooth: **sudo nano /etc/bluetooth/main.conf**
2. Procure a linha a seguir e descomente-a (remova o # antes do texto): **Experimental = false**
3. Rode o comando: **sudo systemctl unmask bluetooth**
4. Vá no Painel de controle / Configurações, em seguida Bluetooth;  e **procure seu dispositivo. pronto!**

Lembrando que para mim, por cá, serviu, se por ai não, aprofunda na pesquisa ;)

boa sorte!
Paz & bem.

Postei também em: https://www.dom.eti.br/dicas/lenovo-ideapad-1i-colocar-bluetooth-para-funcionar-no-ubuntu-24-04-lts
study from node.js
Published: 2024-05-04 01:31:40

give your path-string; how do you determine  that it exist? 
 

```
path.dirname(path)
```
 will return a directory path of it;
`fs.existsSync(path)` will return a valueOf boolean;

```
 fs.mkdirSync(directoryPath, { recursive: true });
```
this code will recursively create the directory;
when we upload file `        const file = ctx.request.files.file;
   fs.createReadStream(file.filepath);`
file.filePath is a temporary path;it will be deletetd after we used it;

```
     const reader = fs.createReadStream(file.filepath);
                const writer = fs.createWriteStream(filePath);

                reader.on('error', reject);
                writer.on('error', reject);

                writer.on('finish', () => {
                    console.log('文件写入完成');
                    resolve();
                });
```
reader will create a input stream; it  reads data from disk to memory;
writer will create a input stream; it  reads data from disk to memory;
MMOexp: Blizzard's admiral absolutely wants you to apperceive
Tags: games
Published: 2024-05-04 01:22:16

Selecting a Diablo 4 adumbration works in <a href="https://www.mmoexp.com/Diablo-4/Gold.html">Diablo 4 Gold</a> abundant the aforementioned way - move aloft to the Adumbration tab at the top of the Edit Contour screen. You'll afresh be able to see all of the emblems you've unlocked, and by selecting one and Confirming, you'll be able to adorn your amusing agenda with it. It won't be as arresting as your title, but it's still accession way to add added customization to your profile.? MMOEXP. Not to be reproduced afterwards permission.

Blizzard's admiral absolutely wants you to apperceive that Diablo 4 boodle is acceptable now | MMOEXP

　　

Diablo 4's boodle is acceptable now, and Blizzard's admiral absolutely wants you to apperceive it.

Since Diablo 4's barrage beforehand this year, admirers admission actuate the boodle in the action-RPG to be rather lacklustre. As one afresh put it, "you feel like a able trash-sifter added than an adventurer." Accepting listened to amateur feedback, Blizzard has implemented changes to Diablo 4 Division 2, aka the Division of Blood, to accomplish boodle abundant added rewarding.

Diablo 4 Division 2 guides
Diablo 4 Apparitional PowersDiablo 4 Almighty VowsDiablo 4 Accursed Touch

Over on Twitter, Blizzard admiral Mike Ybarra sang the praises of the new system, saying, "the boodle drops in Diablo 4 Division 2 = appealing insane. Absolutely analysis out the new Claret Harvest zones and spawn those administration who bead bags of loot." In the comments, he explains that boodle now scales by monster level. "Basically every akin you gain, new and bigger boodle is available. No added hitting akin 60 and accepting the 'same' actuality all the way to <a href="https://www.mmoexp.com/Diablo-4/Gold.html">Diablo IV gold</a> 100."
Exploring Graph Databases: Neo4j
Tags: webdev, javascript, beginners, programming
Published: 2024-05-04 00:29:35

## Introduction

In recent years, there has been a growing interest in graph databases as a way to handle complex and interconnected data. These databases have become a popular choice for industries such as social media, financial services, and healthcare. One of the leading graph databases in the market is Neo4j. In this article, we will explore the features, advantages, and disadvantages of Neo4j.

## Advantages of Neo4j

1. **Native Graph Processing:** Neo4j was built with graph processing in mind, making it highly efficient in handling complex relationships between data points. This makes it ideal for use cases such as fraud detection, network and IT operations, and recommendation engines.

2. **Flexibility and Scalability:** Neo4j's structure allows for easy addition or removal of nodes and relationships without compromising performance. Its distributed architecture also enables it to handle large-scale databases without any lag.

3. **High Performance:** With its powerful indexing engine, Neo4j can retrieve complex data in a fraction of the time compared to traditional relational databases. This makes it suitable for real-time applications.

## Disadvantages of Neo4j

1. **Cost:** Neo4j is a proprietary database, and its enterprise edition comes with a hefty price tag. This may not be suitable for small businesses or startups on a tight budget.

2. **Steep learning curve:** Compared to traditional databases, learning Neo4j's Cypher query language and schema design can be challenging for new users.

## Features of Neo4j

1. **ACID Compliance:** Neo4j follows the ACID (Atomicity, Consistency, Isolation, Durability) principles, ensuring data integrity and consistency.

2. **Built-in Clustering:** Neo4j comes with built-in clustering support, allowing for easy deployment in a distributed environment.

3. **High Availability:** With its automatic failover and fault tolerance features, Neo4j ensures that the database is always available, minimizing downtime.

### Example of a Neo4j Cypher Query

```cypher
// Finding the shortest path in a network
MATCH (start:Person {name: "Alice"}), (end:Person {name: "Bob"}),
      path = shortestPath((start)-[*..15]-(end))
RETURN path
```

This Cypher query demonstrates how to find the shortest path between two nodes in Neo4j, showcasing its powerful capability to handle complex graph operations efficiently.

## Conclusion

Neo4j offers a robust, efficient, and scalable solution for handling complex data relationships. Its unique graph processing capabilities make it a favorite among industries dealing with highly connected data. Though it has a few drawbacks, the overall features and advantages of Neo4j make it a valuable tool in the world of graph databases.
Why you should Use Vim In 2024 ?
Published: 2024-05-04 00:14:36

1. Vim (even with plugins) is clearly lighter than most of the rest IDE;


2. Vim supports everything in the world (any language or system), it’s just enough to create a basic plugin for it;

3. You don’t need a mouse to work in Vim;

4. Vim is incredibly extensible–anything you want can be implemented in it;

5.Vim can work in console mode only. For example, it gives an opportunity to start working on one machine and if needed continue working on the other.


6. Your Vim configuration can easily be transmitted to any machine you need. Is it possible in any other editor? That’s a good question!
What is the best advice you have ever received?: CodeNewbie Podcast
Tags: codenewbie, podcast
Published: 2024-05-03 23:37:52

Happy almost weekend to some of y'all! We are back with CodeNewbie Podcast, our little corner of DEV where we share weekly interviews with tech professionals to give you supportive advice to further your development career.

Last week we released our second episode of this season with [Chelsea Kaufman](https://twitter.com/ChelsKaufman), Founder and CEO of [LEARN Academy](https://learnacademy.org/). In this episode we chatted about the founding of Chelsea's company, the role of AI in the future, and the current landscape for bootcamps. 

-----

_**PSSST**: If you'd like to listen, get into it!_

- [Listen on Apple Podcasts](https://podcasts.apple.com/us/podcast/codenewbie/id919219256?i=1000654150662)

- [Listen on Spotify](https://podcasts.apple.com/us/podcast/codenewbie/id919219256?i=1000654150662)

Or find it wherever you find your podcasts.

-----

At the end of every episode we have four main questions for our guests. You'll have to tune in to hear the full answers, but in the meantime, let's hear what Chelsea had for us!

**This week's question is: "What is the _best_ advice you've ever received?"**

To keep it short and sweet (and spoiler free), Chelsea shared with us:

> “Be curious without fear...

> I think curiosity is what builds this...

> We just want to learn, and question, and be curious”

---

**So without further ado, let me know in the comments the best advice you've ever received.**

See ya next Wednesday with a new episode.
Day 958 : Monopoly
Tags: hiphop, code, coding, lifelongdev
Published: 2024-05-03 23:02:05

_liner notes_:
- Professional : Pretty chill and productive day. Knocked out all the training that was assigned. Replied to a community question. Worked on a project for my next trip.

- Personal : Picked up tracks on Bandcamp and put together my social media posts. Started going over the starter tracks for the radio show. Made some progress on my side project. I got the admin page to call the endpoint to generate the credentials. I also got it to save the credentials to the database. The admin page can also list data from the database. I wanted to be able to save to the database and then come back to the admin page afterwards. For whatever reason, no matter what I did, the site would load the homepage. I think it could be due to the way the library I'm using for authentication is redirecting stuff. I worked on this while "X-Men: The Animated Series" was on in the background.

![﻿ The photo shows a beautiful landscape of mountains and forests. The mountains are in the background and are sparsely covered in forests. The trees are in the foreground and are a mix of green and yellow. The sky is blue. The sun is setting and is casting a golden glow over the landscape. The location is Aiguilles de Bavella, France.﻿](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aiybrg194yqigkg3qzsi.jpg)

Totally forgot that it was Bandcamp Friday today. Otherwise, I would have picked up the projects today so that artists get more of the money from the purchase. Getting this project complete has taken up a monopoly of my attention. I think I'm going to need to refactor the way I'm saving to the database so that I can stay on the admin page and not have it redirect to the homepage. Going to work on that along with being able to delete data from the database. I want to work on getting the logic of when to load the credentials from the database on certain pages. From there, I want to start working on the real time communications aspect. Going to put together the starter tracks for the radio show tomorrow and the social media posts for them. Also want to get in some episodes of "X-Men: The Animated Series".

So yeah, radio show on Saturday (https://kNOwBETTERHIPHOP.com) and study sessions on Sunday (https://untilit.works) 

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube Sx9N3d0qpyI %}
How to Choose the Proper License for your Project (and Why It Matters)
Tags: opensource, beginners, community, productivity
Published: 2024-05-03 22:26:45

Thinking about starting an open-source project but stuck on licensing? You're not alone!

As I began to refine some of the ideas for projects I had been thinking about for some time, I realized that sharing my work with the world could be an exciting and rewarding experience.
But running an open source project, like any human endeavor, involves uncertainty and trade-offs. My first concern was the licensing of the projects, so I did a little research on the subject.

Since a license clearly communicates how others can use, modify, and redistribute your project, the first thing you should do is ask yourself a few questions, such as: What do I hope to achieve with this project? Do I want to prioritize widespread adoption, or do I want to focus on community contributions? Am I willing to give up my control over modifications, or do I want to keep it? 

Once you have thought through your answers and are sure of what you want, you can also consider license compatibility to avoid conflicts if your work has dependencies on other open source projects.

While these tips may help you sort through the issues of choosing the right license for small or simple projects, I strongly recommend that you consult an open source lawyer to make sure you choose the most appropriate license if your projects have a higher level of complexity.

To sum up, licenses protect your ownership while allowing collaboration or commercial use (depending on the license chosen), and build trust with potential users and contributors who understand their rights and limitations with respect to your work. So you can foster a healthy community around your work by choosing a license that matches your project's goals.

By the way, don't forget to make the license you choose clear by including a license file in your project directory, and it's up to you if you want to briefly explain your reasons for choosing that particular license in your project's documentation.

---
Are you interested in Open Source? What's your experience with open source licensing? Let's discuss it in the comments!

**P.D.** I'm starting a series of posts on open source, so stay tuned for my next post on different open source license types.
Unofficial ChatGPT API with simple agent-based
Tags: chatgpt, api, ai, javascript
Published: 2024-05-03 22:25:15

## **an unofficial ChatGPT API with simple agent-based functionality!**
This API allows you to interact with ChatGPT programmatically, and I've built some cool agents on top of it. Check out the code and let me know what you think!
ChatGPT unofficial API :

This project is a Node.js application that interacts with the ChatGPT conversational AI model using Puppeteer, a Node.js library for automating web browsers.

Files chatgptv1.js: This file contains the main logic for the ChatGPT bot, including methods for initializing the browser, sending messages, receiving replies, and handling errors.

bart.js: This file contains a function that uses the Cloudflare API to summarize the conversation history when an error occurs, in order to resume the conversation.

twochatbotsconv.js: This file is simple use of the API , which creates two instances of the ChatGPT class, initiates a conversation between them, and saves the conversation history to a file.

.env: This file contains the API token for the Cloudflare API, which is used in the bart.js file.

**Dependencies :**

puppeteer: A Node.js library for automating web browsers.
 fs: The built-in file system module in Node.js. 
winston: A logging library for Node.js. 
crypto: The built-in cryptography module in Node.js.
 axios: A popular HTTP client library for Node.js. 
dotenv: A zero-dependency module that loads environment variables from a .env file.

**Usage:**

Install the dependencies by running npm install in your project directory. Create a .env file in the project directory and add your Cloudflare API token:

```
API_TOKEN=YourfreeCloudFlareAPIToken
```
 In your code, create a new instance of the ChatGPT class and use the sendMessage and getReply methods to interact with the ChatGPT model:


```
const ChatGPT = require('./chatgptv1');

const chatgpt = new ChatGPT(); await chatgpt.initializeBrowser();

await chatgpt.sendMessage('Hello, ChatGPT!'); 
const reply = await chatgpt.getReply();
 console.log(reply);
await chatgpt.closeBrowser();
```
 If an error occurs during the conversation, the handleError method will attempt to save the conversation history and resume the conversation using the summarized context.

**Before Running :**

run Google chrom in the debug mode using 9220 port , run : 

```
google-chrome-stable --remote-debugging-port=9222
```

**Customization :**

You can customize the behavior of the ChatGPT bot by passing options to the ChatGPT constructor:

chatbotUrl: The URL of the ChatGPT interface (default: 'https://chat.openai.com/'). headless: Whether to run the browser in headless mode (default: false). saveConversationCallback: A callback function that will be called with the conversation summary and the conversation file name when an error occurs.
**Github repo :** 
https://github.com/0xMesto/chatgptAPI_unof

**License:**

This project is licensed under the MIT License.
Your own Terminal-styled portfolio website
Published: 2024-05-03 22:15:00

---
title: Your own Terminal-styled portfolio website
published: true
description: Tutorial on how to create cool looking portfolio, that looks like a terminal. Good for web developers, DevOps, and Admins.
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wijl6oavb8lo1qwt7im.png
published_at: 2024-05-03 22:15 +0000
---

I've written an article, where you will learn how to create an interactive terminal-based portfolio and résumé in JavaScript. We'll use the jQuery Terminal library (and a few other tools) to create a website that looks like a real terminal.

This article will show more advanced usage of the [jQuery Terminal library](https://terminal.jcubic.pl/). If you want something more basic, you can check this article: [How to create interactive terminal like website with JavaScript](https://itnext.io/how-to-create-interactive-terminal-like-website-888bb0972288) that is written for more entry level programmers. You can also read it first before you begin reading this one.

Here is the link to the full article:

[How to Create an Interactive Terminal-Based Portfolio Website](https://www.freecodecamp.org/news/how-to-create-interactive-terminal-based-portfolio/)