teleren/devto huggingface dataset:
🤔Imagine your system with independent pieces of code.
Tags: opensource, microservices, luos
Published: 2022-09-02 15:41:59

🤔 Imagine your system with independent pieces of code. This microservices philosophy has been used in the ESO project led by Alexis Gorlier with Luos.

⏩ The objectives of the project become distinct services: measuring altitude, triggering the parachute or managing the flow of oxidizer to inject into the thrusters.

💬 They communicate with each other, use the same resources (or not) and are managed as microservices.


![Electronic system without Luos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e7mof4n9p4w88qkofqot.png)

![Electronic system with Luos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj9ndwztkhkehamb8eq6.png)
Steven Kotler
Tags: stevenkotler, flowstate, trainyourbrain
Published: 2022-09-02 15:34:55

As an extension of my previous post regarding James Altucher, I would also ask whether anyone out there is also interested in the concept of "flow state".  This is another concept I am have been researching as it concerns mental training. [Steven Kotler Blog](https://www.theartofimpossible.com/blog)
Too many Chrome tabs 😩💣
Tags: webdev, productivity, programming
Published: 2022-09-02 15:32:47

You're probably also struggling with too many tabs and you don't close them because you might need something, but if you do, you'd rather open a new tab because you'll find it sooner than if you were to look through the opened tabs. I'm looking for a solution to this because I have this bad habit too.

![Maurer Krisztián](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ve478nr0nfuf8s5i9ung.jpg)
Let's see what options we have in chrome:

#### 🔖 Bookmark
This is probably what most people use, I made the mistake that if I wanted to save something quickly, I put it in a bookmark and currently there are 443 page saved without context. I don't use them, if I need something can't find it. There are better solutions for this:
You can create a folder in bookmarks where you can collect the related things. But if you only want to save it because you want to look at it later, there are better ways for this, e.g. "add tab to reading list"

## Tab --> right click

#### ✅ add tab to reading list
If you see an article or YouTube video or website that might be interesting but you want to watch/read it later, you can add it to the reading list so you can bring it back at any time,  don't need to take up space unnecessarily. It's like a temporal bookmark. And if you've read it, you can mark or delete it.

#### 📌 pin
If you pin a tab, it will remain there even after the browser is restarts.

 If there are websites that you open every time you start the browser you can pin them and save time. for example gmail, dev.to, twitter etc.

#### 💯 group

You can group the tabs, and toggle the groups depending on which one you use. 

For example, if you are working on a bug and you are looking for a solution, you can put all related tabs in that group, and there can be a 'Fun' group next to it, which includes those tabs when you relax, etc. when you're working on that bug, you can hide the other groups and you don't have to search across all tabs. When you're done with the bug, you can close all the tabs that belong to the group with one click. Of course, it's just an example, you can use it in many ways. 

![Maurer Krisztián](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3h8m4bpee6j130b40ipk.jpg)

Thank you for reading. 🙏  I'm curious how you manage tabs, please leave a comment with your tip. 🙂
Руководство по созданию расширения кошелька
Published: 2022-09-02 15:22:11

В этом руководстве мы будем использовать "Petra Aptos Wallet". В этом руководстве рассказывается о том, как установить расширение Petra и как использовать его в вашем dApp.

1. Установите Petra в Chrome
2. Функциональность кошелька
3. Интеграция dApp

## Шаг 1. Установите кошелек в Chrome

1. Перейдите на страницу [руководство по установке расширения Petra](https://dev.to/egormajj/rukovodstvo-po-ustanovkie-rasshirieniia-petra-5hb).
2. Нажмите кнопку Добавить в Chrome.

Теперь вы должны увидеть "Petra Aptos Wallet" в ваших расширениях Chrome!

_Подсказка: Откройте загруженное расширение, нажав на значок с изображением кусочка головоломки на панели инструментов Chrome._

## Шаг 2. Функциональные возможности кошелька

В кошельке внедрены некоторые основы взаимодействия с Aptos

- Создать новую учетную запись
- Пополнить учетную запись тестовыми coins
- Отправить coins на другой адрес
- Связываться с ресурсами аккаунта в Explorer
- Просматривать и создавать NFT
- Выберите различные сети

## Шаг 3. Интеграция dApp

dApps могут делать запросы к кошельку со своего сайта:

- `connect()`: просит пользователя разрешить соединение с dApp (_необходимо для выполнения других запросов_)
- `isConnected()`: показывает, установило ли dApp соединение с кошельком
- `account()`: получает адрес учетной записи, подписанной в кошельке
- `signAndSubmitTransaction(transaction)`: подписывает данную транзакцию и отправляет в сеть
- `signTransaction(transaction)`: подписывает данную транзакцию и возвращает ее для отправки в dApp
- `disconnect()`: Удаляет соединение между dApp и кошельком. Применяется, когда пользователь хочет удалить соединение.

Использование

```javascript
// import transaction build from aptos sdk: https://github.com/aptos-labs/aptos-core/tree/main/ecosystem/typescript/sdk
import { BCS, TxnBuilderTypes } from 'aptos';

// Establish connection to the wallet
const result = await (window as any).aptos.connect()

// Check connection status of wallet
const status = await (window as any).aptos.isConnected()

// Gets the address of the account signed into the wallet
const accountAddress = await (window as any).aptos.account()

// Create a transaction
const transaction = {
    arguments: [address, '717'],
    function: '0x1::coin::transfer',
    type: 'entry_function_payload',
    type_arguments: ['0x1::aptos_coin::AptosCoin'],
};

// Send transaction to the extension to be signed and submitted to chain
const response = await (window as any).aptos.signAndSubmitTransaction(transaction)

// Send transaction to the extension to be signed and returns
const signedTransaction = await (window as any).aptos.signTransaction(transaction)

// Disconnect dApp from the wallet
await (window as any).aptos.disconnect(transaction)
```
Seq on Azure Web Apps is no more
Tags: azure, logging, cloud, docker
Published: 2022-09-02 15:09:50

## What is Seq?
 
[Seq](https://docs.datalust.co/docs/an-overview-of-seq) is is a real-time centralized, search and analysis server for structured application log data. Its richly featured user interface, JSON event store, and familiar query language syntax makes it efficient to detect and diagnose issues in complex applications and microservices.

As it is self-hosted and cross platform it can be deployed either on-premise or in the cloud.
The cloud option makes it an attractive proposition to use as it is as easy to setup as [azure](https://azure.microsoft.com/en-us/services/app-service/containers/#overview) make this a seamless process.

## Azure web app support ends
![Documentation screenshot warning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eorg4phugx8f1ipf0wue.png)
However, in August 2022, the maintainers of this popular open source application log ingesting service, announced that they had stopped support for both Azure websites and Azure web apps.
The main reason as per the [documentation](https://docs.datalust.co/docs/using-azure-websites-or-app-service) 

> These services permit container instances to run concurrently, which will cause storage corruption when hosting Seq.

The issues related to this have been reported since 2018 as seen per the GitHub issues below.

- [Issue #1](https://github.com/datalust/seq-tickets/issues/724)
- [Issue #2](embed https://github.com/datalust/seq-tickets/issues/777)
- [Issue #3](https://github.com/datalust/seq-tickets/issues/1354)

In one of the responses, as seen in the screenshot below, they had advised against using this approach.

![Early response to Azure web apps issues](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5o3n07dp2uuza0cu1vc7.png)

## Alternative options

### Serverless
Those who still want to use serverless Docker container hosting in Azure, Azure Container Instances (ACI) is an option.
However, for persistent storage an Azure Premium Files share must be used. Seq further recommends using [Azure Kubernetes Services (AKS)](https://docs.datalust.co/docs/using-aks)

### Virtual machine
This serves as a better [alternative](https://docs.datalust.co/docs/azure-installation) in my experience as there is no interference in Seq data and then the complete control over it's management.
What Machine Learning can do in an Outbreak Pt 1
Tags: pandemic, outbreak, healthcare, machinelearning
Published: 2022-09-02 15:08:39

The World around is constantly seeking for attention,often times we never pay attention till defining moments occur.
We live in critical times now,from disease outbreaks to public Health Emergency concerns,the need for decisive actions cannot be overemphasized.
Experts need to curtail this outbreaks with accurate data and speed to curb the spread and eventually get figures to drop as the health concerns die out.
Research and efficient service delivery is always prioritised as well as getting vaccines to curb the virus. 
AWS Machine learning resources are there, to help you make sense of it all, starting from the data collected and keeping at pace with innovation.
AWS Service delivery pretty much covers it all,always conforming to the "Well Architected" framework  delivering reliability, security, and data privacy also. 
 AWS machine learning has empowered healthcare providers and the stakeholders in the ecosystem to improve and accelerate,  accelerating diagnosis while managing global health, enabling drug discovery, and using technology to update health infrastructure globally.
Amazon healthlake has acted as an aggregator,of diverse data collected in healthcare and making sense of it by analysis, organizing in with modern architecture and performs advanced analytics.
The actions of healthlake compound in helping with critical decisions made by health stakeholders in resource allocation and predictions made on patient health and mode of treatment.
Machine learning draws out important data to make decisions on advancing science,drug discovering and health management.

Healthlake flow of activity are as follows:

1. Import
2.Store
3.Transform
4.Query and Search
5.Analyze



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

For more information visit [https://pages.awscloud.com/HealthContactSales.html?languages=english](https://pages.awscloud.com/HealthContactSales.html?languages=english)
Руководство по установке расширения Petra
Published: 2022-09-02 15:06:37

Расширение Petra (Aptos Wallet) теперь доступно в магазине Chrome. Чтобы установить расширение Petra в браузер Chrome, вы можете выбрать один из следующих вариантов:

## Установка из Интернет-магазина Chrome

1.Перейдите на [страницу расширения Petra Wallet](https://chrome.google.com/webstore/detail/petra-aptos-wallet/ejjladinnckdgjemekebdpeokbikhfci).
2.Нажмите кнопку Добавить в Chrome.

## Установка из репозитория GitHub
1.Скачайте последнюю версию [Petra Wallet](https://github.com/aptos-labs/aptos-core/releases?q=wallet&expanded=true) и разархивируйте.
2.Откройте окно в браузере Chrome и перейдите к Расширениям любым из приведенных ниже способов:
 - В правом верхнем углу окна браузера нажмите на три вертикальные точки, затем Другие инструменты, а затем Расширения, или
 - На новой вкладке или в окне введите `chrome://extensions` в поле URL и нажмите кнопку return.

3.Включите режим разработчика в правом верхнем углу страницы Расширения.
4.Нажмите на Load unpacked в левом верхнем углу и укажите на папку 'build', куда вы только что распаковали загруженный файл Wallet.

Теперь вы увидите Wallet в расширениях Chrome.

> **ПОДСКАЗКА**
> Если вы хотите восстановить существующую учетную запись кошелька Aptos в Petra, вам необходимо сначала создать новую учетную запись в Petra, затем вы можете переключиться и импортировать учетную запись.
A neat Python buffer read iterable.
Tags: python
Published: 2022-09-02 14:57:20

I've recently discovered a Python "nifty" regarding `iter()`. We've seen this form of iterable file read a million times:

```python
with open('eek.txt', 'rt') as f:
    for line in f:
        # Some super-cool stuff!
```

But!! Did you know you can read arbitrary-length buffers in a similar form? Use the `iter(object, sentinel)` form of the call and you can do this:

```python
with open('eek.txt', 'rt') as f:
    # Use whatever chunk size you want
    for buff in iter(lambda: f.read(1024), ''):
        # Super-cool stuff using a 1K buffer!!
```

The use of `iter(read_chunk, '')` is basically saying: _"Call `read_chunk` until you get an empty string."_ This could be done with binary files as well. The mode would be `'rb'` and the sentinel would be `b''`.

Neato, eh?

[`iter` function documentation](https://docs.python.org/3/library/functions.html#iter)
Make C preprocessor
Tags: beginners, c, preprocessor
Published: 2022-09-02 14:36:27

Hi! 
I am making C language compiler in full scratch. Yesterday, my project reached to making C language preprocessor that can process **stdlib.h**.

This is my repository.
[r-mutax/mcc](https://github.com/r-mutax/mcc)

My preprocessor's output and `cc` command output is same. If the output of the preprocessor is the same, the compiled result should be the same.
This is a first step of my great job.
Thanks.
Brash one-liner to rename files Matching a pattern
Tags: tutorial, bash, productivity
Published: 2022-09-02 14:20:33

One day I found myself in the situation where I needed to rename a series of files by removing a pattern on Each file. Guess what ? They were around 150 PDF files, so no way for me to do it manually.
While searching on the internet, I found the term brash one-liner. **It's a kind of long series of bash command combined in order to achieve a goal.**
So I had to define mine in order to solve my problem. After a lot of experimentations, I came out with this brash one-liner :
```bash
pattern='some-pattern'; find -type f -iname "*$pattern*" | xargs -0 -I{} echo "file=\"{}\"; mv \"\$file\" \"\${file//\"$pattern\"/} " | bash
```
Looks cryptic? Yeah, you're right, it is a little bit.
So let me explain my approach to solve this problem.
My approach to solve it uses 4 steps:
 * __Pattern Definition__
 * __Files Searching__  
 * __Text-Based bash command definition__
 * __Command Execution__

# Pattern Definition #
```bash
   pattern='some-pattern';
```
here I just keep my pattern in a variable to avoid repeating myself *(I'm a DRY guy)*
*Note: I use the single quotes here because my pattern don't need to be evaluated before execution by the shell*

# Files Searching #
```bash
  find -type f -iname "*$pattern*"
 ```
Here I search for all files matching my pattern, ignoring the case with the help of the find command 
**Note: we have to ensure ourselves that the pattern only matches the files we are looking to rename, otherwise it's going to rename the unexpected files. Please try to run this separately first to verify it.** 

# Text-Based bash command definition #
```bash 
   xargs -0 -I{} echo "file=\"{}\"; mv \"\$file\" \"\${file//\"$pattern\"/} "
```
This is where the magic operate, so we have to use a little trick to define the new name of each file.
Here, my approach is to use **shell expansion**.
I've chosen to use the xargs command because it will execute the same command for each file found.
The __-0__ argument here is to end each entry with the null character.
The __-I{}__ is to tell xargs to replace all occurrences of __{}__ in the command with the entry.
Inside my text-based command, I define a so that I will substitute all occurrences of *$pattern* with a blank character.
I've used the escape character to avoid the **file** variable to be evaluated before execution.
*Note: I could've used the* **sed** *command, but I wanted to reduce typing. By the way, this is the place where we can build any complex command, so it's up to your imagination.*

# Command Execution #
```bash
   bash
```
Here is where the bash come to the game and execute the text-based bash command that it receives.


At the end of the day, I hope that this little tutorial will help you if you face this type of problem. Feel free to send me any suggestion or improvement in the discussion, thank you for your attention.
Astro v1.0, Tailwind CSS, Radix UI and Sticky Scroll - Frontend News #28
Tags: webdev, tailwindcss, vscode, news
Published: 2022-09-02 14:13:36

{% youtube ZHQfGwkxCYc %}
Hi! The fresh Frontend News is already on the channel! What’s in? 👇

What’s in Frontend News #28?
🟣 Astro version 1.0
🟣 Tailwind CSS Templates
🟣 Radix UI v1
🟣 Visual Studio Code’s new feature - Sticky Scroll

Enjoy, you can read the article at [Frontend House](https://frontendhouse.com/frontend-news/astro-v10-tailwind-css-radix-ui-and-sticky-scroll-frontend-news-28).
Kanako's short introduction
Tags: beginners
Published: 2022-09-02 14:01:44

Hi, I’m Kanako from Japan.
I’ll tell you my careers shortly.

I entered a land developing company after graduating university.(I majored in law.)
The company mainly develops shopping malls, and I was involved in a variety of tasks such as rent negotiations with tenants, contract with tenants, booking events, communication with the head office etc.
I liked the job itself, however the work was quite hard. I usually get back to my home around 10:00pm on average, and sometimes around 01:00am when it were busy.

Since I got exhausted by the work and I just wanted to leave my work place on time everyday, I quitted the job and I started working as an embedded engineer for cars. (The next company provided an opportunity to study the basics for engineering and C.)  Although I could finish my work on time everyday, soon I got bored with the new job because the project was so huge that it was hard to see outcomes of my work.

Therefore I quitted the job again and decided to be a web related worker since I thought it’s much easier to see my outcomes. After quitting the work, I studied Photoshop and Illustrator and some easy coding skills by myself, learned the WEB on YouTube, then I got a job as a web designer for e-commerce site.

I used to make images of products, register new products with CSV files, and do easy coding. On the job, I met a skillful colleague of front-end developer, and I learned a lot from her. While working with her I started thinking to be a front-end developer like her. 

My goal is to be a front-end developer who can also cares about appearance, not to be just an engineer. You naturally want to go to the easy-to-understand and beautiful shop when you go shopping at a real store. I think It's the same with websites. That's why I want to become a developer who can think of user-friendly design as well as technology as a front-end developer.

My self introduction became quite long...That's it!
Thank you for reading it above:)
Separação das Camadas de Serviço no FrontEnd
Published: 2022-09-02 13:51:45

Fala galera!
Tudo certo?

Vim compartilhar com vocês essa maneira de separar a camada de serviços e chamadas a API no Front End, esse modelo é composto por 4 serviços "essenciais":

- HttpService(aonde tem os interceptors de token e de toast no response) 
- AuthService(aonde ocorre a autenticação), 
- ToastService(aonde está o serviço de toast messages)  
- StorageService(aonde ocorre a manipulação de dados no localStorage) 

Permitindo que os serviços sejam criados apenas uma vez e chamados em toda a aplicação,já com os interceptors e toast  por estarem herdando do HttpService os outros serviços essenciais.

Abaixo estão imagens dos arquivos dos serviços e das chamadas nos pages.

Service Article:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jyxpg9zsm5bijy30ytn.png)
Service Article Delete:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f54p0x7wvo71omgus1pb.png)
Service Article GetId:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iy37fj31dmbd5mp9t59n.png)

Service Article getAll:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vl8n6zl976jre1mjt1md.png)
Service Article Post:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5o5q0twtqlq96ymef6x.png)
Service AuthService:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nl0yfziriabj2eth810b.png)
Service HttpService
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgmbw17ls4bweutay276.png)
Service StorageService:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3h9wsl6fxa77ljk4194.png)
Service Toast:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtrrqydh4017b5w2m1gs.png)
Service Article Put:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u26xv3dnayhen3641deh.png)



Link do repositório do projeto nos comentàrios.
Follow Friday: CSS Edition (2 September 2022)
Tags: meta, writing, css, html
Published: 2022-09-02 13:42:33

---
title: Follow Friday: CSS Edition (2 September 2022)
published: true
description: 
series: Follow Friday
tags: meta, writing, css, html
---

_Happy Friday, friends! 🎉 Follow Friday is your weekly opportunity to shout out fellow DEV Community members doing awesome work. Check out the comments and follow someone new!_

Cascading Style Sheets (CSS) is a simple language (_yes, I said it's a language!_) for adding style (e.g., fonts, colors, spacing) to HTML documents. It can be extremely frustrating — and some of you are using it as a proper art medium 🧑‍🎨🖼️

So, devs: who are your favorite DEV community members flexing their CSS skills?

_**Formatting tip**: to populate a card with a follow button, use the liquid tag syntax `{% embed https://... %}` and insert the URL of your favorite author's profile._

Join in on the #FollowFriday fun by @mentioning your favorite author to follow for CSS tips & tricks (and letting us know why you love their posts!) ⤵️