teleren/devto huggingface dataset:
Audio transcription for WhatsApp
Published: 2023-06-20 16:09:58

---
title: Audio transcription for WhatsApp
published: true
description: Simple code to add audio transcription to your WhatsApp conversations
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-20 16:05 +0000
---

WhatsApp is working on their native feature for audio transcription, which is already available to some users.
They are taking their sweet time, so I made public my own version that I've been using for some time.

You need an API key from OpenAI, but you also have the option to run everything locally, and not pay for the transcription, by installing OpenAI's Whisper.

You can find my code here: 
https://github.com/silvanojr/WhatsAppTranscription
Advice from Senior Software Engineers
Tags: learning, webdev, beginners
Published: 2023-06-20 15:37:42

Hi I am a 3rd year Software Engineering Student.I am currently Learning ReactJS and then I will move onto Full Stack development.But I wanted to learn Artificial Intelligence so that I can use my web development skills along with AI/ML/.So should I learn AI along with my web development learning or should I first learn web development and then Artificial Intelligence.Please Guide me.
Docker Learning Path - learn from best YouTube videos
Tags: docker, basics, videos
Published: 2023-06-20 15:22:23

---
title:  Docker Learning Path - learn from best YouTube videos 
published: true
description: learn docker from videos, because watching is better than reading :P
tags: docker, basics, videos
cover_image: https://www.filepicker.io/api/file/T9nYp763Qc2kOP1kCjAr
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-20 15:14 +0000
---

### Install Docker

- Install Docker on your system by following the official Docker documentation for your specific operating system.
- YouTube link: [How to Install Docker on Windows 10](https://www.youtube.com/watch?v=lcYiJGtd2gc) | [Install Docker on macOS](https://www.youtube.com/watch?v=mbSsh40_8WM) | [Install Docker on Ubuntu](https://www.youtube.com/watch?v=1_vnPyR4mX4)

### Docker Basics

- Learn the basic concepts of Docker, such as containers, images, and Dockerfile.
- YouTube link: [Docker Tutorial for Beginners - Full Course](https://www.youtube.com/watch?v=fqMOX6JJhGo) (9M+ views)

### Working with Docker Images

- Understand how to pull, build, and push Docker images.
- YouTube link: [Docker Images Explained with Examples](https://www.youtube.com/watch?v=3c-iBn73dDE) (1.4M+ views)

### Docker Containers

- Explore how to run, manage, and interact with Docker containers.
- YouTube link: [Docker Tutorial - Running Containers](https://www.youtube.com/watch?v=JprTjTViaEA) (3.2M+ views)

### Docker Compose

- Learn how to define and manage multi-container applications using Docker Compose.
- YouTube link: [Docker Compose in 5 Minutes](https://www.youtube.com/watch?v=1SaMdx9B05w) (1.7M+ views)

### Docker Networking

- Understand how to connect containers, expose ports, and work with network configurations in Docker.
- YouTube link: [Docker Networking Basics](https://www.youtube.com/watch?v=Vyp5_F42NGs) (480K+ views)

### Docker Volumes

- Explore Docker volumes and how to persist data between containers.
- YouTube link: [Docker Volumes Explained with Examples](https://www.youtube.com/watch?v=p2PH_YPCsis) (209K+ views)

### Dockerizing an Application

- Learn how to containerize an application by creating a Dockerfile and building an image.
- YouTube link: [Dockerize Your App in 5 Minutes](https://www.youtube.com/watch?v=hP77Rua1E0c) (380K+ views)

### Docker Registry

- Set up a private Docker registry to store and distribute Docker images.
- YouTube link: [Creating Your Own Docker Registry](https://www.youtube.com/watch?v=0UOIj32ZPzU) (180K+ views)

### Docker Swarm (Optional)

- If you're interested in orchestration, learn how to create a Docker Swarm cluster and deploy services.
- YouTube link: [Docker Swarm - Introduction and Demo](https://www.youtube.com/watch?v=Qs4dX7SH7FE) (310K+ views)
Easily Use QuickJS In React Native
Tags: reactnative, quickjs, performance
Published: 2023-06-20 15:15:53

## What Is QuickJS
QuickJS is a small and embeddable Javascript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt. More features can be found [here](https://bellard.org/quickjs/).

## Why would I choose QuickJS for React Native
Based on the performance results on large-scale real-world react-native application and its main features. QuickJS is suitable for some scenarios and not for the others. Besides my humble opinions as follows, you could try using QuickJS to run javascript in ReactNative yourself by [adding a few lines of codes](https://github.com/bojie-liu/react-native-quickjs#installation) in your application to see the results in your cases.

1. On Android, QuickJS is slower than V8 in most of my tests. Although it has advantages in memory and binary size which is important on some resource-limited devices. Also QuickJS is benefit from its startup time for some simple bundles.
2. On iOS, QuickJS simply better than JSC with code cache and worst than JSC without code cache.
3. QuickJS is easy to customize when it compared with V8 or Hermes. Like adding some high performance builtin functions or customized classes. It depends on your business.
4. Currently QuickJS have no inspector. But it seems some open source projects have made it worked. Anyway it needs extra works to support inspector in the future.

## Performance Result

Real world bundle performance
   1. We tested QuickJS/V8/JSC with an online bundle size of 1.43M.
   2. On Android, we enabled code cache for both QuickJS and V8. For TTI, QuickJS is 5-20% slower than V8. For PSS memory, QuickJS is 40-(-5)% lower than V8.
   3. On iOS, TTI using QuickJS is 15% slower than JSC without code cache. With code cache, QuickJS is 15% faster than JSC and 50% lower than JSC in footprint memory usage.

## ESx Compatibility

As listed on official QuickJS [website](https://bellard.org/quickjs/). QuickJS passed 82% of ECMA-262 tests. Meanwhile V8 passed 86% and JSC passed 85% in 2022. If internationalization tests which accounts for nearly 3% are excluded, QuickJS is fairly close to V8 and JSC. You can checkout [https://test262.report/](https://test262.report/) for failed cases just in case.

## Github
If there are any further questions, welcome to communicate at [https://github.com/bojie-liu/react-native-quickjs](https://github.com/bojie-liu/react-native-quickjs).
Python : Virtual Environment + requirments.txt
Tags: python, virtualenv
Published: 2023-06-20 15:01:46

---
title: Python : Virtual Environment + requirments.txt
published: true
description: 
tags: python, virtualenv,basic,
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-20 14:59 +0000
---

Python projects must always be developed in isolated environments or virtual environment so that all our dependencies are locked to that single project only.

`requirements.txt` in Python is `package.json` of NodeJS

It contains all the packages required for running the python project.

Lets see how we can create a virtual environment in Python and generate a `requirements.txt` file

## Creating & Managing Virtual Environment

### Install

`virtualenv` is a tool to create isolated environment in Python. Install this tool using `apt-get`

fire the following command on bash terminal

```bash
$ sudo apt-get install python3-venv
```

### Initialize

traverse to the project folder and run the following command

```bash
$ virtualenv venv
```
this creates a copy of Python in whichever directory you ran the command in, placing it in a folder named `venv`

### Activate

to begin using the virtual environment, it needs to be activated using the following command

```bash
$ source venv/bin/activate
```

install any new modules without affecting system default Python or other virtual environments using pip/pip3

```bash
$ pip3 install numpy scipy matplotlib
```

these packages will be installed in the project folder only under `venv` folder

now we can generate `requirements.txt` using following command

```bash
$ pip3 freeze --local > requirements.txt
```
`--local` argument ensures only virtual environment packages are written to requirements.txt

### Deactivate

once your work is completed you stop the virtual environment

```bash
$ deactivate
```

### Delete

There might be a case where you want to remove the virtual environment. You can simple do this my deleting the `venv` folder.
Gitlab connect using SSH from Macbook
Tags: git, gitlab, ssh
Published: 2023-06-20 14:56:12

---
title: Gitlab connect using SSH from Macbook
published: true
description: how to connect to gitlab server using ssh
tags: git, gitlab, ssh
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-20 14:52 +0000
---

To connect GitLab from your MacBook, you can follow these step-by-step commands:

1. Open the Terminal application on your MacBook. You can find it in the "Utilities" folder within the "Applications" folder or use the Spotlight search to find it quickly.
2. Configure your Git identity by running the following commands:
    
    ```bash
    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
    ```
    
    Replace "Your Name" with your actual name and "[your.email@example.com](mailto:your.email@example.com)" with your email address. These commands set your global Git configuration, which will be used for all your repositories.
    
3. Generate an SSH key pair by running the following command:
    
    ```bash
    ssh-keygen -t ed25519 -C "your.email@example.com"
    ```
    
    This command generates an Ed25519 type SSH key pair. When prompted for a file to save the key, you can press Enter to accept the default location (`~/.ssh/id_ed25519`).
    
4. Start the SSH agent by running the following command:
    
    ```bash
    eval "$(ssh-agent -s)"
    ```
    
5. Add your private key to the SSH agent by running the following command:
    
    ```bash
    ssh-add ~/.ssh/id_ed25519
    ```
    
    If you saved your key with a different filename or location, adjust the command accordingly.
    
6. Copy your public key to the clipboard by running the following command:
    
    ```bash
    pbcopy < ~/.ssh/id_ed25519.pub
    ```
    
    This command copies the contents of your public key to the clipboard.
    
7. Log in to your GitLab account in a web browser.
8. Navigate to your GitLab account settings and find the "SSH Keys" section.
9. Click on "Add SSH Key" or a similar button.
10. Paste the public key from your clipboard into the "Key" field.
11. Provide a title for the key (e.g., "MacBook SSH Key").
12. Click on "Add Key" or a similar button to save the SSH key in your GitLab account.

Now you have successfully connected GitLab from your MacBook. You can clone repositories, push changes, and interact with GitLab using the Git commands in the Terminal. Remember to adjust the repository URLs in the Git commands to match the repository you want to work with.
Meet CodingBuddy.dev: Your New AI-Powered Coding Companion
Tags: ai, chatgpt, git, codingbuddy
Published: 2023-06-20 15:00:23

Hello, DEV community!

Are you tired of juggling between multiple websites while coding? Do you wish there was one place that could address all your coding queries? Well, look no further! Meet CodingBuddy.dev - your new AI-powered coding companion.

[CodingBuddy.dev](https://codingbuddy.dev) is a revolutionary tool that brings together all the resources you need as a developer, right at your fingertips! Instead of switching between tabs for Git commands, shortcuts, type creation, and more, you can now find it all in one place. And the best part? It's driven by ChatGPT model, making it highly reliable and efficient.

Here are some of the features you can enjoy with CodingBuddy:


![Tool usage example screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y74gjbovtr5jimiunb79.png)

**Git:** From cloning repositories to resolving merge conflicts, navigate through Git with ease.

**Commands/Shortcuts:** Learn and use commands and shortcuts for Linux, Windows, and macOS without leaving your workspace.
Code Formatting: Keep your code clean and easy-to-read with our quick code formatting tool.

**Code Formatting:** Clean code is happy code! Just ask CodingBuddy, and it will help format your code in a jiffy.

**Type Generation:** Easily create complex types in TypeScript or any other language.

**Witty Responses:** We believe in making coding fun. Enjoy a few laughs as you code with our witty responses.
[CodingBuddy.dev](https://codingbuddy.dev) is absolutely free to use! It was born out of my desire to simplify the coding process and bring together the scattered resources into one easy-to-use platform.


![Tool available options screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cswqzaa5ailmdw42g6xo.png)

Feel free to check out [CodingBuddy.dev](https://codingbuddy.dev) and give it a try. Your feedback is invaluable to us, and we are always open to feature suggestions.

Let's code smarter, not harder, with [CodingBuddy.dev](https://codingbuddy.dev) - your ultimate coding buddy!

**Instagram**: _@thatsdailydev_
**Reach out**: _admin@codingbuddy.dev_
**Twitter**: _@thatsveeki_
Kotlin Decoded Intro and useful resources for learning Kotlin
Tags: kotlin, programming, learning, beginners
Published: 2023-06-20 14:58:06

Welcome to Kotlin Decoded, a series of articles where I share my notes on learning Kotlin as a Java developer.

These articles compare Kotlin and Java and provide useful tips from various sources. They can save you some time and clarify some concepts.

The articles are mainly for Java developers. But you may still learn something new if you come from another language. Just keep in mind that this series is not a comprehensive Kotlin tutorial and is not suitable for beginners without any prior programming experience.

## Learning resources

Here are the resources I’m going to use to learn Kotlin. I’ll update the list during my journey. If you know other good ones, feel free to provide them in the comments.

1. Kotlin for Java devs | YouTube playlist — [youtube.com](https://www.youtube.com/playlist?list=PLrnPJCHvNZuAIbejjZA1kGfLeA8ZpICB2)
2. Intermediate-level Kotlin | YouTube playlist — [youtube.com](https://youtube.com/playlist?list=PL7NYbSE8uaBAchSwbJEQTGhWlVM8HYt7T)
3. Basic Kotlin syntax — [kotlinlang.org](https://kotlinlang.org/docs/basic-syntax.html)
4. Big Kotlin syntax summary + comparison to Python — [khan.github.io](https://khan.github.io/kotlin-for-python-developers/#extension-functionsproperties)
5. Kotlin Koans — [kotlinlang.org](https://kotlinlang.org/docs/koans.html)
6. Kotlin by example — [kotlinlang.org](https://play.kotlinlang.org/byExample/01_introduction/02_Functions)
7. Kotlin for Java developers course — [developer.android.com](https://developer.android.com/courses/pathways/kotlin-for-java)
8. Other learning resources suggested by DEV community — [dev.to](https://dev.to/yechielk/what-are-your-favorite-kotlin-resources-f43)
GeraDuo
Tags: react, aspdotnet, csharp, typescript
Published: 2023-06-20 14:53:30

O **GeraDuo** é uma plataforma que foi construída para atender às necessidades dos amantes de jogos, permitindo que eles encontrem facilmente parceiros de jogo compatíveis. A plataforma é alimentada por um conjunto de poderosas ferramentas de desenvolvimento, incluindo **ASP.NET** para a criação da API e **React** para o desenvolvimento da interface do usuário. Além disso, o banco de dados foi implementado utilizando o **SQL Server**, proporcionando uma base sólida para armazenar as informações dos usuários.

A API desenvolvida em **ASP.NET** é responsável pela lógica de negócios e pela comunicação com o banco de dados. Ela oferece uma interface eficiente para interagir com os dados cadastrados pelos usuários e realizar as operações necessárias para a funcionalidade do GeraDuo. Foi utilizado o micro ORM **Dapper** para realizar operações com o banco de dados, através de views e procedures.
Nessa API, temos três entidades principais que são, **PLAYER**, **GAME** e **AD**. **PLAYER** representa o jogador que irá se cadastrar no sistema para buscar outro jogador compatível. GAME representa os jogos disponíveis na plataforma para fazer o pareamento. AD é o anúncio que os **PLAYERS** criam contendo informações, incluindo o **GAME**, para que haja o pareamento de PLAYERS. Também é feita a geração de token de maneira segura e eficiente, para quando houver uma autenticação do usuário no front-end.

A interface do usuário do GeraDuo foi construída usando o framework React, que é conhecido por sua abordagem eficiente e responsiva para o desenvolvimento de interfaces de usuário modernas. Com React, os desenvolvedores podem criar componentes reutilizáveis, tornando o código mais organizado e fácil de manter. Além disso, o React permite atualizações em tempo real e uma experiência de usuário interativa, fornecendo uma interface fluida e responsiva para os usuários do GeraDuo. Os modelos de estilização foram feitos através de classes CSS, foi utilizado o **Radix UI** para a implementação dos modais e para a autenticação do usuário não foi utilizado nenhum framework.

Em suma, o GeraDuo é o resultado do uso estratégico de ferramentas e tecnologias avançadas. Com a combinação do ASP.NET para a API, React para a interface do usuário e o SQL Server para o banco de dados, o GeraDuo oferece uma plataforma para conectar jogadores de forma eficiente. Lembrando que o GeraDuo é um aprimoramento de um sistema feito em um bootcamp pela rocketseat.

Repositórios: 
API - https://github.com/mattmascarenhas/geraduo-api-aspnet
WEB - https://github.com/mattmascarenhas/geraduo-web-react
GitHub Repos To Learn Web3
Tags: programming, web3, productivity
Published: 2023-06-20 14:02:35

Learning blockchain is essential to grasp the revolutionary potential of decentralized systems, enabling you to navigate the evolving landscape of digital currencies, smart contracts, and secure data management, ultimately opening doors to innovative career prospects and driving technological advancements across diverse sectors.

## DeFi-Developer-Road-Map
It is an meticulously curated handbook for web 3 developers, encompassing a compilation of top-notch tools for DApps, abundant development resources, and invaluable lifehacks.

[Read Full Article (links provided)...](https://brojenuel.com/blog/Github-Repos-To-Learn-Web3)

P.S.
Sorry for redirecting you to my article website. You can download my [Chrome Extension](https://chrome.google.com/webstore/detail/brojenuel/ahgaafbiccggaijihgndjhkofppkiobn) to be updated on my articles.
Quote hàng ngày #1
Tags: quote, webdev, beginners, vietnam
Published: 2023-06-19 14:54:59

## Quote hôm nay là...
> Good code is not just functional, it is also beautiful. Good code is organized, easy to read, and well documented. Organization can be achieved by separating code into useful functions and collecting functions into modules or libraries. Good organization means that at any one time, we only need to focus on a small part of a program.
(_Computer Science I - Dr. Chris Bourke_)

## Chuyện là...
Hôm nay rảnh nợ ngồi đọc quyển _Computer Science_ thì thấy đoạn quote khá hợp ý và mình cũng chiêm nghiệm khá đúng khi đi làm một vài năm. Đôi khi có một vài bạn fresher hoặc junior được mình kèm hoặc muốn được mình góp ý để có thể code tốt hơn sau nhiều lần ăn blame từ các senior, mentor hay leader 🤣.

## Mình nghĩ rằng...
Việc code tốt lên thì cũng có nhiều yếu tố, có lý do khách quan ví dụ như được ở trong môi trường làm việc chuẩn, có đủ tài nguyên cần thiết để phát triển, cũng có lý do chủ quan, do bản thân tự thân mày mò để mình tốt hơn, ví dụ như tự đi tham khảo tài liệu, học từ những người giỏi hơn. Chung quy đều là phải có tài liệu, phải có tiêu chuẩn, từ tiêu chuẩn thì mới có thể phát triển mở rộng ra những thứ khác được. Ở đâu đó mình có nghe 1 câu là "_Khi bạn có 1 nền tảng vững chắc rồi thì việc bạn giỏi lên chỉ còn là vấn đề thời gian._"

## Đúc kết...
Quay lại việc code tốt lên, ngoài việc code chạy được, chạy đúng ra thì việc code sạch, đẹp, dễ bảo trì cũng là một yếu tố tiên quyết để đánh giá 1 developer có đủ tính kiên nhẫn, tỉ mỉ và gọn gàng hay không. Qua vài năm đi làm thợ code thì mình đúc kết lại được như thế này: 

1. Đầu tiên, bạn phải biết bạn đang làm gì giữa 1 đống chữ (Điều này rất quan trọng, bạn phải biết bạn đang làm gì khi muốn thêm 1 phần code vào giữa những phần khác, phải đánh giá được nó sẽ ảnh hưởng thế nào với những phần code còn lại)
2. Thứ hai, bạn cần phải đặt tên theo một tiêu chuẩn nhất định (cái này gọi là naming convention, refer cái repo này: https://github.com/kettanaito/naming-cheatsheet#naming-convention)
3. Thứ ba, nhận biết một hàm như thế nào là đủ "lớn" và cần refactor (về vấn đề này thực sự có khá nhiều ý kiến, nhưng theo kinh nghiệm cá nhân mình, một hàm thực sự chỉ nên có dưới 50 dòng không tính khoảng trống và comment)
4. Thứ tư, một hàm nên chỉ làm một nhiệm vụ (ví dụ hàm getMessage thì sẽ không tạo thêm message, nó làm mất đi tính uniqueness của hàm và khiến việc đặt tên hàm dường như không còn nhiều ý nghĩa, cùng với việc viết unit test sẽ có cảm giác như đang viết e2e testing vậy)
5. Thứ năm, guard clause có thể giúp bạn code đẹp hơn (nếu bạn thấy quá nhiều if-else lồng nhau thì bạn nên dừng lại và nghĩ về việc refactor đoạn if-else sử dụng điều kiện tổng hợp hoặc guard clause, như này: https://deviq.com/design-patterns/guard-clause)
6. Thứ sáu, nên tuân theo các design pattern và best practice trên internet, đừng tự invent lại những gì đã có sẵn trừ khi bạn nắm chắc được hầu hết các chuẩn khác và nhận ra "Ồ cái này có thể làm tốt hơn")

Và quan trọng hơn cả là luôn học hỏi từ những thứ trên internet, bất cứ điều gì có thể học được đều luôn tốt. Have a nice day!!