teleren/devto huggingface dataset:
Online payments 101
Tags: payments, basics, money
Published: 2021-07-19 14:56:06

Photo by <a href="https://unsplash.com/@rupixen?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">rupixen.com</a> on <a href="https://unsplash.com/s/photos/payment?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>

The online payment industry is huge. In 2019 alone, about 5 trillion USD process through online payments in the US. You also bought something online at some point in the past, so it affects everyone, but what it is, and how an "average Joe" can understand the movements behind the scene? This series is aiming to answer that.

### What is online payment?
Generally, online payment is when a transaction of goods happens between two parties over the internet. It can be for buying something online like a shoe or subscription.

### Who is involved?
Processing an online payment usually involves four players:

1. **Customer** (you)
2. **Merchant**
3. **Acquirer/Processor**
4. **Issuing bank**

This all sounds still blurry. What are these? That's ok, we are going to deep dive a bit more. I believe the customer part doesn't need too many explanations right now, so I'm going to talk about the rest of them.

#### Merchant
It's the website or online service you buying something from. Merchant can technically be services that offering something in exchange for money. If you want, you can also set up a website collecting money from your customer.

#### Acquirer/Processor
The company that is processing the payment on behalf of the merchant. Usually, a 3rd party company helps to facilitate the transaction between you and the merchant. Its main job is to make sure that the transaction goes through and the funds are transferred between the two parties. Processors usually offer other services too.

#### Issuing bank
Your bank issued the credit card to you on behalf of the card networks (like Visa or Master Card). They are the one who is holding your money and sending the payment on your (and the processor) request to the merchant.

Originally published at https://petercsoka.hashnode.dev/online-payment-fundamentals
The Most Asked Questions In Interviews For Django Developers
Tags: career, python, django, computerscience
Published: 2021-07-19 14:49:46

Hello guys, in this post, I will tell you the most asked topic in the interview for Django developers, everyone asks and that's the most important thing also in Django. And that is Django ORM, everyone asks you that you know about SQL queries, JOIN, and OR and how to perform that in Django, your interviewer asks you some tricky questions like how can you fetch all the data in Python and SQL they will ask questions related to SQL but remember one thing you are a Python or Django developer, so please give them answer as a Django Developer and tell them how this thing is work in Django because they are going to hire as a Django Developer and guys you already know how Django database queries are much different from SQL queries, so answer carefully if you answer them as a Django Developer or in your own way so they'll hire you easily, change their mind with your answers or your words and be confident. 

I'm telling you guys this from my personal experience they ask questions like:-

1) How to fetch all the data from any row

Ans) Don't say like Select * from table_name no that's the wrong answer and you give an interview for Django developer post, so answer them like that, In Django we create models, and fetch the data from that model with an only line, Model_name.objects.all() that's it. we can fetch all the data from this single line.

2) How you can connect two rows or tables.

Ans) Answer them like, In Django, we can connect Two models with Foreignkey that's it.

3) then they will ask you about Many to Many Field and OneToOneField.

Now, they will ask you about Django Rest Framework.
They straightly ask you these questions and I think I don't need to answer them if you know about Django Rest Framework then you already know these answers. 

1) What is Serializers

2) What is request and Response

3) How to create an API

4) How to serialize Django Queryset.

Most companies test your Django ORM and Django Rest Framework basics, they just want to know that you are capable enough to write some queries or not and the main thing is Python DSA.

Guys company hire you as a Python Django Developer remember this thing, bro you are a Python Developer first then you are a Django Developer, Most people don't study DSA they learn or practice only frameworks but learning the framework is not enough guys, DSA is the most important thing in every developer's life, if you know DSA then nothing can stop you, Some people think that DSA is not used in Django or any framework, remember one thing logics is always written in DSA, you have to write logics in DSA or in your framework guys, they ask you some questions related to DSA like.

1) Tuples and Lists

2) Recursion

3) Reverse the String and etc.

But remember one thing, Be Confident that's it.

```
My linkedin:- https://www.linkedin.com/in/shivamrohillaa/
```

Thank You

Shivam Rohilla | Python Developer
Programming Acronyms and Terms
Tags: programming, devops
Published: 2021-07-19 14:40:59

Here are 12 acronyms and software terms that every coder should know for their software programming career.

Do you know what **all** the below acronyms and terminology mean?

* SaaS
* FaaS
* SRS
* CTO and CIO
* Asynchronous vs synchronous
* Agile Development
* CRUD
* CDF and CSV
* ETL pipeline
* UIX, UI and GUI
* RDBMS
* SCRUM

{% youtube ZM3WYawPHqs %}
Creating a custom scrollbar
Tags: beginners, codenewbie, webdev, css
Published: 2021-07-19 14:28:50

Recently, I figured out about customizing scrollbars. Adding custom scrollbars to websites you make, helps enhance it even further and also helps in overall color-coordination.

To start with, we use ::-webkit-scrollbar.It can be included in your CSS section. It's a pseudo element used to modify the look of a browser’s scrollbar. Most browsers other than firefox support this.

 A sample example of the code would be-
```
/* width */
::-webkit-scrollbar {
  width: 10px;
}
```
This section targets the width of your scrollbar.

```
/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
```
This relates to the progress bar. Properties such as border radius, box shadow can also be added. 

```
/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
}
```
It specifies the properties of the scrolling handle that can be dragged. 
To design that even further you can try-

```
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}
```
This will change the color upon hovering.

####Similarly some of the other pseudo elements you can use are-

####::-webkit-scrollbar-button 
the buttons on the scrollbar (arrows pointing upwards and downwards).
####::-webkit-scrollbar-track-piece 
the track (progress bar) NOT covered by the handle.
####::-webkit-scrollbar-corner 
the bottom corner of the scrollbar, where both horizontal and vertical scrollbars meet
_and many more_

Hope it helps!!

![End](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jmxvam8rgm4ctzd89io.gif)
How to add Magic Link to a SvelteKit application
Tags: svelte, sveltekit, javascript, authentication
Published: 2021-07-19 14:20:45

# What is SvelteKit?

SvelteKit is a framework for building extremely high-performance web apps. 

There are two basic concepts in SvelteKit:

* Each page of your app is a [Svelte](https://svelte.dev/) component
* You create pages by adding files to the `src/routes` directory of your project. These will be server-rendered so that a user's first visit to your app is as fast as possible, then a client-side app takes over

Building an app with all the modern best practices — code-splitting, offline support, server-rendered views with client-side hydration — is fiendishly complicated. SvelteKit does all the boring stuff for you so that you can get on with the creative part.

# Getting started

The easiest way to start building a SvelteKit app is to run `npm init`:

```bash
npm init svelte@next sveltekit-magic
```

The above command will ask you some questions about how you'd like to set the template. Choose the 'SvelteKit demo app'. This comes with a Todo list application built-in. We'll make changes to the app, so the user needs to log in using Magic to access the todos.

```bash
cd sveltekit-magic
npm install
npm run dev
```

This will scaffold a new project in the `sveltekit-magic` directory, install its dependencies, and start a server on [http://localhost:3000](localhost:3000).

Open up [http://localhost:3000](localhost:3000) on a browser, and you should see something that looks like this...

![SvelteKit Welcome Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s26wp27i0wpe70hqhcpf.png)

{WIP} - This guide will not be using the Cookies, @hapi/iron or session with cookies as show in [this](https://magic.link/posts/magic-svelte) Guide.

To read the full guide, please visit https://magic.link/posts/magic-svelte
Centering a DIV like a PRO - #1
Tags: html, webdev, css, frontend
Published: 2021-07-19 13:57:10

In this series of article, I will show some best ways to center a div in HTML.

In the below **codepen**, I have used *inset* to set top, right, bottom, left to 0, then setting the margin to auto.

{% codepen https://codepen.io/abhishekraj272/pen/MWmoBYO default-tab=css,result %}

Connect Me @ [Linkedin](https://www.linkedin.com/in/abhishekraj272/) [Github](https://github.com/abhishekraj272) [Twitter](https://twitter.com/abhishekraj272) [Youtube](https://www.youtube.com/channel/UCvHn2T8DSJzEWzYDdK3Dt8A) 😇

Thanks @[Kevin Powell](https://www.youtube.com/channel/UCJZv4d5rbIKd4QHMPkcABCw) for this trick.
Colour Quantization Using K-Means Clustering and OpenCV
Tags: python, computerscience, datascience, machinelearning
Published: 2021-07-19 13:47:34

Hi Connections,

I recently wrote an article on "Colour Quantization Using K-Means Clustering and OpenCV" which got published on @Analytics Vidhya! 

It would be really great if you could take a few minutes to take a look at it. 

Hope you guys will find it useful. 

#analyticsvidhya #datascience #analytics #machinelearning #algorithms #ai #deeplearning #artificialintelligence #dataanalytics #technology #colorgrading #opencv #opensource #python #kmeans #clustering

https://www.analyticsvidhya.com/blog/2021/07/colour-quantization-using-k-means-clustering-and-opencv/
Top 5 Unknown Machine Learning Models Repository On Github To Help You Through Your Data Science Projects
Tags: machinelearning, datascience, computerscience, python
Published: 2021-07-19 13:46:24

https://medium.com/analytics-vidhya/top-5-unknown-machine-learning-models-repository-on-github-to-help-you-through-your-data-science-99386f641f68

TensorFlow is a free and open-source software library for machine learning. It can be used across a range of tasks but focuses on the training and inference of deep neural networks. 

In today’s article, we will talk about five 5 ML Models Repository On Github To Help You Through Your ML Projects to enhance your skills in data science and AI.

Top 5 Unknown Machine Learning Models Repository On Github To Help You Through Your Data Science Projects(Includes links to Repository on Github)

#machinelearning #datascience #deeplearning #neuralnetworks #github #tensorflow #algorithms #3dmodeling #software #projects #dataanalysis #bigdata #training #artificialintelligence #technology #help #python #ai #ml #data #analytics
🐍 Serverless Django APIs with AWS Lambda and Zappa
Tags: django, python, aws
Published: 2021-07-19 13:44:19

#### 📚 Learn how to develop serverless Django RESTful APIs, use Zappa to deploy them to AWS and add #authentication with Auth0.

### <br>
**TL;DR:** In this article, you will see how to build and deploy a serverless Django API with Zappa.

## Introduction

Serverless technology was developed from the idea of allowing developers to build and run applications without server management. Servers, of course, still exist, but developers and administrators don't need to manage them. This concept was heralded by AWS when it open-sourced its [Serverless Application Model (SAM) framework](https://github.com/aws/serverless-application-model). It then went on to release Chalice, a flask-like Python framework for building serverless applications. You can learn about building Chalice applications and APIs in [this](https://auth0.com/blog/how-to-create-crud-rest-api-with-aws-chalice/) article.

With all the goodness that we are presented with, deploying serverless applications can be difficult when using frameworks like Django. Debugging in production environments can be hard too. Hence, there is a need for a way to deploy painlessly and also provide a means to debug and also monitor logs in production.

Zappa is an open-source Python tool created by Rich Jones of [Gun.io](https://www.gun.io/) for developers to create, deploy and manage serverless Python software on API Gateway and AWS Lambda infrastructure. Zappa allows you to carry out deployment with speed and ease in the most cost-efficient way possible.

In this article, you will learn how to develop serverless Django RESTful APIs, use Zappa to deploy them to AWS, and add authentication with Auth0.

## Features and Benefits of Zappa

Some of the benefits provided by Zappa include:

- **Automated deployment:** With a single command, you can package and deploy your Python project as an AWS serverless app. You can also update and destroy your app with a single command in the different staging environments. You can even deploy your application in different AWS regions.
- **No server maintenance:** in compliance with the serverless ecosystem, Zappa takes away the maintenance of your servers from your list of tasks.
- **Out-of-the-box Scalability:** Zappa enables quick infrastructure scaling.
- **Great Usability:** Zappa provides a single settings file where you can do all your configuration as well as environment variables. It can be stored in JSON or YAML format.
- **SSL certificates:** Zappa provides a dedicated _certify_ command which grants you an access to SSL certificates from different provides such as _let's Encrypt_ and _AWS_

## Using Zappa with Django


[Read more...](https://auth0.com/blog/deploying-django-restful-apis-as-serverless-applications-with-zappa/?utm_source=content_synd&utm_medium=sc&utm_campaign=zappa)
[Clean Code][PT-BR] Guards: You shall not pass!
Published: 2021-07-19 13:35:40

Oi, gente!!! 
deixa eu te perguntar uma coisa: você já sentiu a dor de ver um código como esse abaixo?

```js
 if (email && email.includes('@')) {
   if(password && password.trim() !== '') {
     // DO SOMETHING
   }
 }
```

É só um exemplo, mas imagine 4 a 7 ifs aninhados.

Criar pedaços de código assim é uma prática realmente comum pra quem tá iniciando como dev e é até saudável que façam isso porque, na minha opinião, um programador precisa sentir a dor de escrever um código sujo pra entender o valor do Clean Code.

Ifs aninhados podem realmente ser uma dor de cabeça se crescerem muito mas a gente consegue limpar usando algo chamado **Guards (Guardas)**.

### **Guards?**

Esse é um conceito bem simples de entender: eles basicamente verificam se existe algo *errado*, exemplo: validações, e então param a execução da sua função.

 ```js
function usandoGuards(email, password) {
 if(!email || !email.includes('@')) {
   console.log('Email não é válido');
   
   return; // Aqui é onde a mágica acontece
 }
 
 if(password && password.trim() !== '') {
   // Faz alguma coisa
 }
 
}
```

Como você pode ver no código acima, o primeiro if é o nosso Guard. Ele vai parar a execução se um email inválido for passado. Simples, né?!

O código ainda está sujo por causa dos níveis de abstração mas eu não vou abordar esse assunto nesse artigo. Fica pra um próximo hehehe. Vamos focar nos Guards por ora.

O conceito de Guards é uma forma simples de evitar criar ifs aninhados. Ah, você também pode ter vários Guards:

 ```js
function usandoGuards(email, password) {
 if(!email || !email.includes('@')) {
   console.log('Email inválido');
   
   return; // that's where the magic happens
 }
 
 if(!password && !password.trim() === '') {
   console.log('Password inválido');

   return;
 }
  
 // Faz alguma coisa
}
```

Agora que estamos usando nossos Guards do jeito certo, estamos livres pra escrever qualquer lógica de negócio abaixo porque, no fim, já estamos fazendo a validação com os Guards.

Uma última dica: a necessidade de usar Guards pode ser identificada de forma fácil se você tiver um if-else onde no else, você tem a saída negativa:


```js
 if (user) {
   // Faz alguma coisa
 } else {
  console.log('esse é um erro!');
 }
```

Tente fazer isso sozinho e vai ver a legibilidade do seu código aumentar!

*NOTA: Todos os exemplos foram feitos com JavaScript mas você pode usar a linguagem da sua preferência pois os princípios são os mesmos.*

Alguma opinião ou algo a acrescentar? esqueci de algo? não tenha medo e deixe seu comentário!

Obrigado por ler! =)
[Clean Code] Guards: You shall not pass!
Tags: javascript, cleancode
Published: 2021-07-19 13:11:47

Hi everyone!! let me ask you something: have you ever felt the pain when looking at a code like this one below? 

```js
 if (email && email.includes('@')) {
   if(password && password.trim() !== '') {
     // DO SOMETHING
   }
 }
```

This is just an example, but imagine a 4-7 nested if statements. 

It is indeed common to beginners create pieces of code like that and even healthy because, in my opinion, a programmer must feel the pain of writing a dirty code to catch the value of Clean Code.

Nested if statements can really be a pain in the ass if they get too big but we can clean this up using something called **Guards**

### **Guards?**

This is a really simple concept to understand: They basically verify if there is something *wrong*, i.e validations, and then you stop the execution of your function.

 ```js
function usingGuards(email, password) {
 if(!email || !email.includes('@')) {
   console.log('Email is not valid');
   
   return; // that's where the magic happens
 }
 
 if(password && password.trim() !== '') {
   // DO SOMETHING
 }
 
}
```

As you can see on the code above, the first if condition is now our Guard. It will stop the execution if an invalid email is passed. Really simply, right? 

The code is still dirty because of its abstraction levels but I'm not going to talk about it on this article. Just focus on the Guards for now.

It's a simple way of avoiding really nested if statements. You also can have more than one Guard, check this out: 

 ```js
function usingGuards(email, password) {
 if(!email || !email.includes('@')) {
   console.log('Email is not valid');
   
   return; // that's where the magic happens
 }
 
 if(!password && !password.trim() === '') {
   console.log('Password is not valid');

   return;
 }
  
 // DO SOMETHING
}
```

Now that we are using our Guards in the right way, we are free to write any code related to the business logic because in the end, we're doing the validation with our Guards.

One last quick tip: The need of usage of Guards can be easily identified if you have a if-else statement where the else is the negative output:

```js
 if (user) {
   // DO SOMETHING
 } else {
  console.log('that's an error!');
 }
```

Try to do this on your own and see your code readability increase!

*NOTE: I'm doing this with JavaScript but you can do it with any other language, the principles are the same.*

Do you have opinions or something to add? don't be afraid, leave a comment!

Thanks for reading! =)
Luos new release 1.3.0
Tags: embedded, embeddedsystems, opensource, luos
Published: 2021-07-19 12:27:00

📢 Luos release announcement v1.3.0:

- 🆕 Feature: Manage Pipe type and command
- 🆕 Feature: Add access management to container
- 🆕 Feature: Template Creation for State, Voltage, Motor, Servo
- 🆕 Feature: Add some research API in the routing table
- 🛠️ Fix: Streaming better management for DMA transmission
- 🛠️ Fix: Streaming send data more than 128 byte
- 🛠️ Fix: Routing table exclusion optimization
- 🛠️ Fix: Localhost verbose management
- 🛠️ Fix: Memory data overlap
- 🛠️ Fix: RX task protection when TX task created
- 🛠️ Fix: Transmission retry optimization

🎉 Try it, it's #opensource: https://github.com/Luos-io/Luos/releases/tag/1.3.0 #embeddedsystems
O que é SRE?
Tags: womakerscode
Published: 2021-07-19 12:13:03

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7j66qxwyjoaapqozoau.jpg)
SRE é a abreviação de Site Reliability Engineering, este termo surgiu inicialmente em 2003 e foi criado por Ben Treynor Sloos, VP de engenharia do Google. O termo nasceu quando Ben precisou gerenciar uma equipe de engenheiros de software que eram responsáveis por um ambiente de produção.

SRE como o próprio nome já diz SRE está relacionado com a garantia da confiabilidade dos ambiente de produção. É um tipo de trabalho operacional onde, ao invés de sermos reativos e só atuarmos quando algum problema acontecer, agimos antes garantindo a que o ambiente de produção está funcionando corretamente e minimizando as chances de falha em produção.

Para garantir a confiabilidade em ambiente de produção é comum a adoção de práticas como: monitoramento de aplicações, uso de boas práticas de implantação, gerenciamento de capacidade de serviços, avaliação de latência, uso de ferramentas que permitam avaliar escalabidade de aplicações, entre outras práticas que podem variar de acordo com o contexto de onde estamos atuando.
How to Set User Agent String while Web Scraping

Published: 2021-07-19 12:12:34

Are you getting IP blocked repeatedly when web scraping at scale?

Is this happening even after passing it through a couple of free proxy servers?

It might be because the target website’s algorithm might be picking up on who you are by the User-Agent-String signature that your curl request or any other library you might be using is sending. Even the absence of it is telling.

https://youtu.be/G2AMxPMCRaY