teleren/devto huggingface dataset:
Push (Upload) Projects into Github:
Tags: github, webdev, career
Published: 2022-08-27 20:01:00

1. **Download git** to access git commands (initiate, add, commit and push files into github)
2. **Create a new repository** on GitHub website. 
3. Go to the project folder to be pushed into created repository.
  
 a. Right click and select "Git Bash Here" on your pc. 
   (This should **open a terminal** with the project folder path)

   b. Copy & Paste this: `git init`
   (This should **initialize a git folder** as a repository local 
    directory)

   c. Copy & Paste this: `git add .`
   (This **adds all the files** in the repository local 
    directory)

   d. Copy & Paste this: `git commit -m "1st commit"` 
    (This **readies** the repository local directory to be 
    "pushed" by committing it)

   e. Copy & Paste this: `git remote add origin
       https://github.com/yourusername/your-repo-name.git`
    (This **connects** your Github repository online to the 
    repository local directory)

   f. Copy & Paste this: `git push origin master`
    (This **pushes** your repository local directory on the 
     Github repository online)
AdonisJS validate file in Object
Tags: adonisjs, programming, node, beginners
Published: 2022-08-27 19:44:00

This is my experience about validating request data using AdonisJS validator and the solution for it. I can't easily find an article about this issue so I decide to write this so that others which have the same issue could find the solution easier.

## Context
This issue happened when I had a data block that need to submit to the backend to handle. Its format looks like this
```
{
  "users": [
    {
      "name": "John Doe",
      "avatar": <File>
    },
    ...
  ]
}
```
And following the documents from AdonisJS, I use this snippet to validate the data
```
params = await request.validate({
  schema: schema.create({
    users: schema.array().members(
      schema.object().members({
        name: schema.string({ trim: true }),
        avatar: schema.file({
          size: '10mb',
          extnames: ['jpg', 'heic']
        }),
      })
    ),
  }),
})
```
## Problem
The problem is that submitted data in the backend will be stored by AdonisJS in 2 parts, `request.all()` and `request.allFiles()`. So the data will be
```
request.all() : { "users": [ { "name": "John Doe" } ] }
request.allFiles(): { "users": [ { "avatar": <File> } ] }
```
And to running the validation, these data pieces will need to be merged to make sure it pass the rules.
Unfortunately, following [AdonisJS's author idea](https://github.com/adonisjs/core/issues/3435#issuecomment-998479662) that deep merge will affect to the performance of the framework. Therefore, **shallow merge is used to combine them** and it looks like this
```
data = {
  ...body,
  ...files,
}
```
And you know what happened. After the merge, user item only has avatar property.

## Solution
As the author suggestion in the comment about, I've change the way to validate the data by **perform deep merge data by using lodash merge and use AdonisJS standalone validator to validate the merged data**
```
import lodashMerge from 'lodash/merge'
import { validator } from '@ioc:Adonis/Core/Validator'
...
allData = lodashMerge({}, request.all(), request.allFiles())

params = await validator.validate({
  data: allData,
  schema: schema.create({
    users: schema.array().members(
      schema.object().members({
        name: schema.string({ trim: true }),
        avatar: schema.file({
          size: '10mb',
          extnames: ['jpg', 'heic']
        }),
      })
    ),
  }),
})
```
And that's how I got the params as same as the way it's submitted.

Readers, let me know if you can see any other way to resolve this issues.

Thanks for reading.
There's a lot of advice on becoming a developer, but they all forget this one key part...
Tags: beginners, career, motivation, codenewbie
Published: 2022-08-27 19:37:00

A few years back I learned about Google's Android Studio and the Android Open Source Project. To this day I **still remember** the curiosity that overtook my being. Hands down it is the leading factor that pushed me into finally making the career change into software development, and doing something that I have such an enjoyable time doing and possess immeasurable passion for. 

Even though I felt I had found my calling, I was still dragging my feet but wasn't sure why. After some serious soul searching and reflection I figured out what was causing me to delay. Making the decision to leave my current career and give up everything I built, from the ground up, that was the scariest part. There's the fear of going for it – of making a change. Fear of failure, fear of looking like a fool. Fear of the unknown, and of leaving behind a life I've invested so much in.

**Then there's also the fear of not making the move..** The fear of looking back on my life with regret. The fear of spending my life not just being in the wrong career, but having to live with the knowledge that I'm still here because I was too afraid to change it.


![You miss 100% of the shots you don't take.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7le618j8dfeibkc1ev32.jpeg)

In the end it turned out to be the best thing I have ever done for myself. I enjoy going to work everyday, I actually look forward to it. There's a sense of fulfillment that I get helping others learn about something that I am so passionate about. It almost makes me feel guilty. Almost.
 
This leads me to a key part to successfully become a developer - If you're thinking about making that move or you're in the process, don't lose sight of what drove you to do it in the first place.

Now I would like to end this with a question: 
**Why do you want to be a developer?**
[Help] Multi-schema on AdonisJS
Tags: postgres, adonisjs
Published: 2022-08-27 19:02:37

Hi there,
I'm working on project using AdonisJS and Postgres to serve for multi-tenant purpose. I want to be able to access multiple schema with 1 source code only but I couldn't find any document about it.

In basic, I will use the client ID to determine the schema that would be used to query the data from.
I can find some document about putting the schema with the table name in the model but that's not what I want because the model will be sticked to one schema only.

Have you experienced with this kind of structure and can you help me?
Thanks.
Display Current Time Using HTML,CSS And JavaScript
Tags: javascript, webdev, tutorial
Published: 2022-08-27 18:56:32

In this Display Current Time, we were Using HTML, CSS And JavaScript. We used the javascript inbuild function for a time, and to display, we used javascript DOM. To show the live time, we used javascript setInterval functions.

For the responsive side, we used CSS media queries. Also, to make it more attractive, we used a background image with an opacity background.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source Code](https://w3hubs.com/display-current-time-using-htmlcss-and-javascript/)
Real-time Poll app using Redis, WebSocket, Node.js and React
Tags: redishackathon, node, microservices, javascript
Published: 2022-08-27 18:53:00

### Overview of My Submission
**Architecture diagram**
![Architecture diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78tgdhxqrh6m83n1silv.png)
For the hackathon I have build a full stack Poll application which uses various Redis modules to implement microservice architecture. The application lets users to create polls and share it with others. Once users cast their vote they can view the results in real-time i.e the poll result graph in Frontend would get updated real-time for all users as votes are being casted.
### Redis Modules used in the app
1. RedisJSON
2. Hash
3. List as queue
4. pub/sub

> Note: The detailed documentation can be found in the Readme file of the GitHub repository embedded. This post contains only the minimal info required for hackathon submission.  

I have used Node.js for the backend and React for the frontend. I have used Socket.io for implementing Websocket and also used socket.io Redis adapter for multi node deployments thus making this a complete horizontally scalable solution.  

### Submission Category: 
Microservice Mavens (I believe my submission can also be considered under MEAN/MERN Mavericks 😄)

### Video Explainer of My Project
{% embed https://youtu.be/LjxmwYUJbwY %}

### Language Used
TypeScript / Node.js

### Link to Code
The project consists of three repositories
1. [Poll API](https://github.com/ashiqsultan/pollboard-backend)
2. [Socket Service](https://github.com/ashiqsultan/pollboard-socket-service)
3. [Frontend](https://github.com/ashiqsultan/pollboard-frontend)  

{% embed https://github.com/ashiqsultan/pollboard-backend  %}
[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: {% embed https://github.com/ashiqsultan/pollboard-backend %}` to share a GitHub repository)

### Additional Resources / Info
I have always wanted to work with Redis for a long time and thanks to this Hackathon as it served as the best time to learn and build a small project using Redis. I spent all the weekends of this month to plan the application. I realized that Redis stack provides a lot of modules so I need pick the right one for my needs. Thanks to the detailed docs and resources by the Redis team. Also a special thanks for the RedisInsight team its such a useful tool for Redis beginners I found it similar to the MongoDB Compass.
### Homepage
![Homepage](https://imgur.com/aSYjmxX.png)
### Vote page
![App Screenshot](https://i.imgur.com/ZIr6uj4.png)
### Create new Poll page
![Create new Poll page](https://imgur.com/t24Nhy7.png)
- - - 
* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
Day-4 of Machine Learning
Tags: python, machinelearning, beginners
Published: 2022-08-27 18:39:23

Day-4 of Machine Learning

- Learnt about Gradient descent and Learning rate. Also got to know how Gradient descent algorithm is derived for linear regression.

Also
- Completed CS50 Week-5 - [Unit test](https://cs50.harvard.edu/python/2022/weeks/5/)
PaperDrop: Drop Anonymous Messages Wherever You Go
Tags: redishackathon, react, node, mongodb
Published: 2022-08-27 17:38:08

### Overview of My Submission
I built [PaperDrop](https://devdevgo.site). An app that allows you to drop anonymous messages based on your location.

I got the idea about the app when I was trying to build my other side project - which lists all the crime events near to you on a map. Also, I've been planning to learn Redis for a long time. This hackathon seemed like a perfect opportunity to do it.

##### Technologies
Frontend: React
Backend: NodeJS(Express)
Database: MongoDB
Caching and Geo-spatial queries: Redis
Deployment: Linode

Other tools:
- ChakraUI for styling
- Mapbox for map
- Certbot for SSL
- GoDaddy for domain

🌏Live project link: [https://devdevgo.site](https://devdevgo.site)

*⚠️ Note: Please make sure you [read the instructions](https://devdevgo.site/instructions) before using the app. Use the app on phone for best experience.*


### Submission Category: 

**Wacky Wildcards**

### Language Used
JS/TS/Node.js


### Link to Code

{% embed https://github.com/thesanjeevsharma/paper-drop %}

### Additional Resources / Info

Screenshots of the app

![Login Page](https://i.imgur.com/qjhg8gF.png)
![Playground Page](https://i.imgur.com/xADKcQj.png)

### Collaborators

😎 This is a solo project, developed by [Sanjeev Sharma](https://dev.to/thesanjeevsharma).

- - - 


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
yeetboard - A fun Multi-Player Whiteboarding App
Tags: redishackathon
Published: 2022-08-27 18:26:01

### Overview of My Submission

I've always been interested in applications which are capable of providing collaborative experiences to user like the VSCode's Live Share, or Figma's interactive & beautiful collaborative UI.

Haven't been able to make a collaborative app, I was motivated enough to take on this challenge of making an online whiteboarding app where multiple users can join in on sessions & collaborate or even brainstorm on a plain canvas.

So, here, in this project, I've attempted to give users freedom to draw, shapes or free-hand. With customisability of the elements they create on empty canvas while being able to collaborate with friends with just ONE-CLICK!


### Submission Category: Wacky Wildcards

### Language Used: JS/TS/Node.js

### Link to Code: https://github.com/kuvamdazeus/yeetboard

## Additional Resources / Info

### Demo Video Showing Features: {% embed https://www.youtube.com/watch?v=RPY1qSU9tjw %}

### Collaborators: None

- - - 




* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
[2022-08-29] AWS ML Weekly Updates
Tags: aws, machinelearning, dynamodb, kafka
Published: 2022-08-27 17:38:00


2022-08-29 업데이트 전달 드립니다.
관련 자료에 대해서 댓글로 이야기 해주셔도 좋습니다 !

---

### SageMaker hands-on Tutorials 소개 
Data preparation, Training, Mode deployment, MLOps 등 다양한 머신러닝 lifecycle task에 맞는 SageMaker 튜토리얼이 있네요. SageMaker를 사용하여 ML개발에 관심 있는 분들 여기 튜토리얼을 살펴 보시면 좋을것 같습니다 ! 
- SageMaker hands-on Tutorials [바로가기](https://aws.amazon.com/sagemaker/getting-started/?sc_channel=sm&sc_campaign=Machine_Learning&sc_publisher=LINKEDIN&sc_geo=GLOBAL&sc_outcome=awareness&trk=machine_learning)

---

### AWS에서 머신러닝으로 고객이 관심있는 제품 타겟팅하기 블로그 글 소개
Amazon Personalize, Pinpoint를 사용하여 고객을 개인화 타겟팅 하는 방법이 블로그로 소개 되었네요. 이 모든 과정을 S3, StepFunction, EventBridge로 이벤트를 연결하여 자동화 처리 되도록 하였습니다. 관심 있는 분들은 자세히 한번 보시면 좋겠네요. 
- [블로그 바로가기](https://aws.amazon.com/blogs/messaging-and-targeting/use-machine-learning-to-target-your-customers-based-on-their-interest-in-a-product-or-product-attribute/)

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

### Machine Learning with Amazon SageMaker Cookbook 책 소개
AWS Machine Learning Hero인 Joshua Arvin Lat가 저술한 SageMaker Cookbook이 출판 되었네요. Amazon SageMaker로 고수준의 머신러닝 모델을 만드는 과정을 단계 별로 가이드했다고 하네요. SageMaker 관련 책을 찾는 분들은 살펴 보시면 좋을 것 같습니다. 
- [Amazon SageMaker Cookbook 바로가기](https://www.amazon.com/Machine-Learning-Amazon-SageMaker-Cookbook-ebook/dp/B093TJ9KG2/)

---

### 기타 관심가는 서비스 업데이트


#### DynamoDB 새로운 테이블 데이터를 S3에서 대량 가져오기 지원 
이번 출시를 통해 데이터를 DynamoDB 새 테이블에 쉽게 마이그레이션 및 로드할 수 있게 되었다고 하네요. 테스트 데이터를 애플리케이션으로 로드하거나, 데이터 복구 등 마이그레이션 작업에 유용하게 사용 할 수 있을 것 같네요. ML분야에서도 DynamoDB를 사용하여 Online Feature Store 구축하기도 하는데요. Online Feature Store에 데이터를 대량으로 마이그레이션 할때 유용하게 사용할 수 있을 것 같습니다.
- [뉴스 바로가기](https://aws.amazon.com/about-aws/whats-new/2022/08/amazon-dynamodb-supports-bulk-imports-amazon-s3-new-dynamodb-tables/?nc1=h_ls) 

---

#### Amazon MSK Serverless 블로그 글 소개 
Amazon MSK Serverless를 소개하는 블로그 글이 올라왔네요. Amazon MSK Serverless 기존 MSK 다르게 사용량을 설정하지 않고 on-demand로 프로비전 됩니다. 사용량을 예측하기 어렵거나 변화가 큰 경우에 사용하면 유용 하다고 하네요. 
- [블로그 바로가기](https://aws.amazon.com/blogs/aws/amazon-msk-serverless-now-generally-available-no-more-capacity-planning-for-your-managed-kafka-clusters/)

---

#### AWS Lambda, 이제 Amazon MSK및 자체 관리형 Kafka를 이벤트 소스로 지원
AWS Lambda가 이벤트 소스로 Amazon MSK 및 자체 관리형 Kafka를 지원한다고 합니다. Kafka에 퍼블리싱된 이벤트를 람다로 처리하기 더욱 편리해질 것 같습니다. 
- [뉴스 바로가기](https://aws.amazon.com/ko/about-aws/whats-new/2022/08/aws-lambda-consumer-group-ids-msk-kafka-event-sources/)

---

[더 많은 AWS ML Weekly Updates 리스트](https://dev.to/yoon/aws-ml-weekly-updates-44nk)
Arquitetura de Sistemas Operacionais #3
Tags: hardware, architecture, todayilearned
Published: 2022-08-27 16:59:36

E agora para finalizar a história dos Sistemas Operacionais do livro, vamos para os anos 1980 e 1990, depois disso o livro apenas faz especulações, mesmo que algumas tenha realmente acontecido, eu prefiro falar apenas sobre os assuntos que o livro dá uma afirmação.

## Década de 1980

Nos anos 80 foi dada a largada para os PC's, graças a IBM, que criou a filosofia de computadores pessoais. O primeiro computador usava o processador da Intel e um sistema operacional da Microsoft. 

Os sistemas que dominavam os mini e superminicomputadores, eram os sistemas multiusuários, com destaque para os baseados em Unix. Nessa época foram feitas várias melhores, com destaque para o protocolo de rede TCP/IP que é usado até hoje.  

Com a evolução dos microprocessadores, principalmente os da Intel. Surgem os primeiros SO's comerciais com interface gráfica, como o Microsoft Windows e OS/2. 

Os softwares de redes passam a ser fortemente ligados aos sistemas operacionais, dando origem ao SO de rede, com destaque para o Novell Netware e o Microsoft LAN Manager. 

## Década de 1990

Nessa época tivemos uma evolução enorme nas áreas de hardware, software e telecomunicação. O que gerou uma abertura para as aplicações evoluírem, que cada vez mais precisavam de mais armazenamento e processamento, o que ocorre até nos dias atuais.

Por conta das evoluções da internet, o TCP/IP criado na década passada passou a ser um padrão de mercado. E como a internet cresceu de forma exponencial, fez com que coisas como segurança e problema de gerenciamento/desempenho se tornassem fatores relevantes e preocupantes na hora de se desenvolver um SO integrado a rede. 

A arquitetura de cliente/servidor, que antes só era aplicada em redes locais, teve um aumento de escala e passou a ser usada na internet e é assim que você consegue acessar qualquer informação independente do lugar que você esteja. E com isso surgiram várias coisas que temos hoje em dia, como: servidores web, correio e servidores de banco de dados. 

Foi nessa década que os SO's baseados em interfaces gráficas pegaram de verdade e se tornaram consolidados. Em 1991 o Linux surge, o SO que é atualmente usado em diversas áreas comerciais e acadêmicos. 

E nessa década ocorreu a popularização dos softwares de uso livre. Como SO's que é o caso do LINUX, banco de dados como (MySQL), servidores web (Apache), etc.
Things you should handle while making a web application as a Developer
Tags: javascript, react, node
Published: 2022-08-27 16:52:37

As a developer while creating apps, you don't know what will happen in the future if anything goes wrong in Application.
After getting some industry experience as a full stack developer, I noticed some issues after the deployment of web apps.
that I should know before making or deploying web apps in frontend and backend both
Let's see some of the points that I discovered or learned from some of my senior developers.

 **Error Handling**
 
While creating apps, error handling is one thing that you should handle and must know Especially in server side or backend 
You never know what will happen in the future in application , so you should always use the try to catch block in all of APIs or in frontend application where you call your Api's .


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

how to use try catch 

`try {
  //your api or anything 
}
catch(err) {
 //it will throw an error
  console.log("error",err)
}`


## logger in server application
 

Sometimes your application will get an error or the server will go down. your server should creates logs if any errors occur That will show when the error occurs, on what day and at what time, and which error it is.

example :
error occurs in your server
server will throw an error 
logger will catch the error and create file of that day

for node js you can use npm packages

## validation 

In the front-end application, you must validate inputs or required fields.

For example, a user needs to add a mobile number in the input box, but he adds abcdef instead of 12245555.

Also, the number length must be at least ten numbers .

If he doesn't fit in the above conditions, you should show an alert message or red message that please add a valid mobile number.
You can apply this type of validation to other inputs, such as email. 
Some tips
You can use a regex validator script or any package like formik or others.


but but ...

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

note you must also validate data in server side also 



## default image

For example, you are using a web application and displaying images from an API.

and the user's internet goes down, or a network problem occurs, or the API is unavailable.

The user will get something like this view in the front-end application.


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

How to fix this

Normally, we create an img tag like this to display an image.

`<img src="your image.jpg" alt="Italian Trulli">`

by using javascript or onerror 
`<img id="currentPhoto" src="SomeImage.jpg" onerror="this.onerror=null; this.src='Default.jpg'" alt="" width="100" height="120">`



 **That's it. There are a lot of things to do  Thanks for reading my post It's my first post, and I hope you enjoyed it**.


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