teleren/devto huggingface dataset:
Swagger 101
Tags: testing, api, rest, auomation
Published: 2021-02-06 22:08:00

If you're involved with building, consuming, or testing REST APIs, you're probably familiar with Swagger.  So what is it, and what can we do with it?

# Swagger Specification

The Swagger Specification was originally created by [SoftBear Software](https://smartbear.com/) and is a specification format used to describe REST APIs.

The specification allows the author to describe REST API characteristics such as endpoints, authentication methods, valid actions, parameters, and expected responses, in YAML or JSON format.  

The specification was rebranded as the "OpenAPI Specification" when it was donated by SmartBear to the open-source community in 2015.  It is is now overseen by the [OpenAPI Initiative](www.openapis.org).  Most people I know still call it the "Swagger spec".

You can learn more about the OpenAPI Specification [here] (http://spec.openapis.org/oas/v3.0.3).


# Swagger Software
Swagger software is an open-source toolkit that is focused on the OpenAPI Specification and can be used to build, consume, and test APIs.

The [Swagger Editor](https://editor.swagger.io/) is a browser-based editor where you can create or edit an OpenAPI specification document.

[Swagger Inspector](https://inspector.swagger.io/builder) is a browser-based tool which can be used to generate an OpenAPI spec for an existing REST API.

The [Swagger UI](https://swagger.io/tools/swagger-ui/) can leverage an existing OpenAPI specification document to present a user interface that can be used to visualize and interact with the API.

[Swagger Codegen](https://github.com/swagger-api/swagger-codegen) can leverage an existing OpenAPI specification document to create server stubs, client libraries, and documentation.

# What's the value?

Everything Swagger-related starts and ends with the Swagger spec.  Once created, the spec has a number of uses:  

- as documentation of API behavior, valuable to developers, testers, and API consumers
- as input to Swagger UI, allowing consumers to interact with the API through the browser
- as input to 3rd party tools used to generate client libraries and server stubs
- as input to 3rd party test automation tools that allow API tests to be automatically generated based on expected behavior defines in the specification

# What's next?
Of course, this is just a basic overview of some Swagger concepts.  In my next post I plan to look at how we can leverage the Swagger spec to generate automated API tests.  

These automated tests can immediately let us know if the API does not conform to its spec.

Stay tuned!

<a href="https://dev.to/leading-edje">
  ![Smart EDJE Image](https://dev-to-uploads.s3.amazonaws.com/i/5uo60qforg9yqdpgzncq.png)
<a/>
The Ultimate Fullstack Web Development Bootcamp
Tags: react, python, django, javascript
Published: 2021-02-06 21:43:18

![Cover Image](https://dev-to-uploads.s3.amazonaws.com/i/oq2vd3uvgm5b3m6llui5.png)

I have been working on a new course that's so big and so thorough it can only be called a "bootcamp".

The Ultimate Fullstack Web Development Bootcamp

This has been a work in progress since August 2020. It's taken 6 months to create this massive bootcamp, and it encompasses everything you need to become a junior web developer.

**And it's only available on Udemy.**

## What is a Bootcamp?

An online coding bootcamp is typically a MASSIVE coding course that covers several subjects. It's not just 3 or 4 subjects, it's the full A-Z suite of technologies you need to break into web development. 

## What will you learn?

You are going to learn so much it'll make your brain hurt. I wish I was kidding... 

In The Ultimate Fullstack Web Development Bootcamp you're going to learn:

* How websites work
* How to get started with coding
* How to setup your code editor (VS Code) like a boss 
* HTML5
* CSS3
* JavaScript ES6+
* jQuery
* React.js
* Bootstrap 5
* APIs
* Command line
* Git & GitHub
* Python
* Django
* Databases
* Wagtail CMS
* And lastly, how to get a job as a web developer. 

There's 26 courses in total making up each of the 26 modules, spanning these 17 subjects listed above.

There's a project at the end of each module. 

Over 525 lessons, 400 tasks, 11 e-books, 37 hours, and 26 projects. And by the end of this bootcamp, you'll be able to call yourself an intermediate level web developer. 

Here's the thing...

Companies don't want to hire junior web developers anymore. They expect everyone in the world to be junior and that you should have taught yourself all the things a junior dev needs to know. But that's not fair. 

So this bootcamp is going to fastforward your skill to an intermediate developer level. 

That means you can bypass the "oh we aren't hiring junior developers" disappointment and go straight for the awesome tech jobs.

## When will it be available?

I'm aiming to have this bootcamp launched on Udemy.com by **February 12th, 2021 (if everything goes well)**. This is going to heavily depend on how slow Udemy is to review the course, and if they have any problems with it. Sometimes they do, sometimes they don't have a problem, it really depends on the person who ends up reviewing the course.

## How do I pre-sign up?

The bootcamp has not launched yet. (At least not at the time of writing this). If you want to get in early you can sign up using this link [https://mailchi.mp/fc8a371ed3ad/the-ultimate-web-developer-bootcamp](https://mailchi.mp/fc8a371ed3ad/the-ultimate-web-developer-bootcamp)

If you sign up early, I'll email you with a $10 coupon code so you can get access to this massive bootcamp for just $10. But you MUST sign up early in order to receive the discount code.
GitHub Zero to Hero Free
Tags: github, tutorial, devops
Published: 2021-02-06 21:29:37

O GitHub é a principal plataforma para pessoas desenvolvedoras atualmente, e não apenas para projetos Open Source,
mas também para projetos pessoais e corporativos, e cada vez mais empresas vem adotando o uso do GitHub para seus projetos.
.
Hoje, o GitHub é uma das plataformas de DevOps mais completas do mercado, apoiando não apenas na gestão do seu código fonte, mas também
durante todo o processo de desenvolvimento, e implantação das aplicações em todos os seus ambientes.
.
Tenho entrevistado atualmente, diversos profissionais, para diversos clientes, e cada vez mais o GitHub tem sido um requisito para as vagas.
Pensando nisso, resolvi montar para você, um treinamento de GitHub, totalmente gratuito, para te ajudar a sair do Zero para o Hero. 
.
Saia desse treinamento, sabendo tudo sobre o GitHub, desde como criar uma conta, como gerenciar projetos, e como implanta-los nos ambientes de nuvem ou privados.
Aproveite essa oportunidade unica de participar desse treinamento. E quem estiver cadastrado, e estiver online, terá acesso a um certificado de conclusão. E durante 
o treinamento, também contaremos com um sorteio de alguns brindes.
.
Não perca tempo, inscreva-se agora mesmo:
https://aka.tips/GHZeroToHero
Azure Kubernetes Services en vidéos
Published: 2021-02-06 21:19:53

Bonjour,

J'ai eu l'occasion de proposer plusieurs talks sur Azure Kubernetes Services, en meetup ou conférence. Les voici agregé dans cet article par ordre d'accessibilité :)

**Se simplifier Kubernetes grâce à Azure ? Merci AKS !**
> On ne présente plus Kubernetes, l'orchestrateur de conteneur de Google permet de déployer et mettre à l'échelle facilement nos conteneurs Docker. Azure nous propose avec AKS (Azure Kubernetes Services) une offre managée Kubernetes dans Azure pour faciliter la gestion de notre cluster k8s. Nous verrons dans cette présentation comment mettre en place cette solution pour déployer, manager et monitorer nos applications.
Vidéo : [ici](https://www.youtube.com/watch?v=kUCc_OzCAY0)
 
**Azure DevOps + Terraform + AKS = une automatisation de bout en bout pour du Kubernetes dans Azure**
> Aujourd'hui on aborde l'approche "Everything as Code" ! De l'infra aux apps sans oublier le CI/CD, tout est du code. Au programme : - Définition d'un cluster AKS avec Terraform - Automatisation du déploiement de l'infrastructure et des apps avec des pipelines Azure DevOps.
Vidéo : [ici](https://www.youtube.com/watch?v=cdE3HkhcnQA)
 
**Tips & Tricks pour de la haute disponibilité avec Azure Kubernetes Services**
> Si il y a une seule raison à retenir pour l'utilisation d'un cluster Kubernetes c'est bien pour garantir de la haute disponibilité. En théorie ça peut paraître simple mais en pratique ... Voyons ensemble les différentes stratégies pour garantir de la haute disponibilité au niveau de son infra et de ces applications dans AKS.
Vidéo : [ici](https://www.youtube.com/watch?v=ifrNsn0T8qU)
 
**Du DevOps multi Cloud avec Kubernetes et Terraform**
> Un cluster Kubernetes sur le Cloud c’est bien, mais sur plusieurs Clouds c’est mieux ! Mise en oeuvre, à partir d’un projet .Net Core et de script Terraform, d’un pipeline d’intégration et déploiement continu avec Azure DevOps pour déployer une application dans un cluster Kubernetes sur Azure, AWS et GCP. Ou comment rendre son application et son CI/CD agnostique du clouder utilisé !
Vidéo : [ici](https://www.youtube.com/watch?v=fz6BFSAF_xs)

J'espère que ces présentations vous seront utile :)
A bientôt.

Thomas
Solution: Binary Tree Right Side View
Tags: algorithms, javascript, leetcode
Published: 2021-02-06 21:16:13

*This is part of a series of Leetcode solution explanations ([index](https://dev.to/seanpgallivan/leetcode-solutions-index-57fl)). If you liked this solution or found it useful,* ***please like*** *this post and/or* ***upvote*** *[my solution post on Leetcode's forums]().*

---

####[Leetcode Problem #199 (*Medium*): Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/)####

---

***Description:***

*Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.*

---

***Examples:***

Example:||
|---:|---|
*Input:*|[1,2,3,null,5,null,4]
*Output:*|[1, 3, 4]
*Visual:*|![Example Visual](https://dev-to-uploads.s3.amazonaws.com/i/d630sknmfmrey2d8n9en.PNG)

---

***Idea:***

A problem dealing with tree traversal typically means a **breadth first search** or a **depth first search** approach. Since we're tasked with isolating a value from each level, this would naturally bring to mind the BFS approach... but let's keep DFS on the back burner; we'll come back to it.

A BFS approach usually entails the use of a queue (**q**) where we push each node's children onto **q** while we move along a level of the tree from one side to the other. This ensures that when each level is completed, we have the next level ready to go in **q**. In order to separate each level, since we're continuously adding to **q**, we can just take the length of **q** at the beginning of each level to figure out when the next one begins.

In this case, we can run our BFS from right to left and simply push the first value of each level in our answer array (**ans**) before **returning** the array upon complete traversal of the tree.

But what about the DFS approach? DFS solutions often allow us to find a concise, **recursive** solution, and while they're not always the first thought when it comes to tree traversal problems where the level is important, in this case we don't need the level as a whole, we just need one end of each level.

This means that we can define a recursive function (**dfs**) to run through the nodes from left to right and simply overwrite the value for each level (**ans[lvl]**) as we get to each node, since the last value from left to right on each level will be the one we want to keep.

---

***Javascript Code w/ BFS:***
```javascript
var rightSideView = function(root) {
    let q = [root], ans = []
    while (q[0]) {
        ans.push(q[0].val)
        for (let i = 0, len = q.length; i < len; i++) {
            let curr = q.shift()
            if (curr.right) q.push(curr.right)
            if (curr.left) q.push(curr.left)
        }
    }
    return ans
};
```

---

***Javascript Code w/ DFS:***
```javascript
var rightSideView = function(root) {
    let ans = []
    const dfs = (node, lvl) => {
        if (!node) return
        ans[lvl] = node.val
        dfs(node.left, lvl+1)
        dfs(node.right, lvl+1)
    }
    dfs(root, 0)
    return ans
};
```
.Xresources
Tags: archlinux, appearance, configuration
Published: 2021-02-06 15:27:17

I wanted to share my Xresources because I just love the way it looks. 
I use Tokyo Night theme for my URxvt, vim, and airline

[Click here for Tokyo Night](https://github.com/HaxNet/tokyonight-vim)

I forked it so I can just remember to get it whenever I decide to reformat or install Arch somewhere else.

![Arch Layout](https://dev-to-uploads.s3.amazonaws.com/i/svbqos1lpmhgd06thpwx.png)


!Tokyo Night theme
! general
*foreground: #a9b1d6
*background: #1a1b26
*cursorColor: #a9b1d6

! terminal padding color
*borderColor: #1a1b26

! black
*color0: #1a1b26
*color8: #4e5173

! red
*color1: #F7768E
*color9: #F7768E

! green
*color2: #9ECE6A
*color10: #9ECE6A

! yellow
*color3: #E0AF68
*color11: #E0AF68

! blue
*color4: #7AA2F7
*color12: #7AA2F7

! magenta
*color5: #9a7ecc
*color13: #9a7ecc

! cyan
*color6: #4abaaf
*color14: #4abaaf

! white
*color7: #acb0d0
*color15: #acb0d0
! Tokyo Night theme ends

! Rofi
rofi.font: monospace 12
rofi.padding: 20
rofi.line-padding: 2
rofi.color-enabled: true
rofi.hide-scrollbar: true
rofi.separator-style: solid
rofi.color-window: #1c2023, #919ba0, #1c2023
rofi.color-normal: #1c2023, #919ba0, #1c2023, #a4a4a4, #1c2023
rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
rofi.kb-cancel: Escape,Alt+F1

! xterm
xterm*termName: xterm-256color
xterm*font: monospace
xterm*faceName: monospace:size=11
xterm*loginShell: true
xterm*vt100*geometry: 90x34
xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*eightBitInput: false
xterm*allowBoldFonts: false

! URxvt
URxvt*saveline: 15000
URxvt*termName: rxvt-256color
URxvt*iso14755: false
URxvt*depth: 32
URxvt*background: [95]#1C2023
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*internalBorder: 0
URxvt*externalBorder: 0
URxvt*letterSpace: -1

!URxvt.font: xft:ProFont for Powerline:style=regular:size=13
!URxvt.font: xft:Meslo LG S for Powerline:style=regular:size=11
!URxvt.font: xft:FiraCode Nerd Font Mono:size=11
!URxvt.font: xft:RobotoMono Nerd Font Mono:style=bold :size=11
!URxvt.font: xft:Source Code Pro for Powerline:style=regular:size=11
!URxvt.font: xft:monospace:size=9
URxvt.font: xft:Hack:style=Regular:size=9
!URxvt.font: xft:DIN Round Pro:style=Light:size=11
URxvt.copyCommand: xclip -i -selection clipboard
URxvt.pasteCommand: xclip -o -selection clipboard
URxvt.urlLauncher: exo-open
URxvt.cursorBlink: true
URxvt.cursorUnderline: true
URxvt.underlineURLs: true
URxvt.urlButton: 1
URxvt.geometry: 90x34
URxvt.tabbed.tabbar-fg: 4
URxvt.tabbed.tabbar-bg: 16
URxvt.tabbed.tab-fg: 15
URxvt.tabbed.tab-bg: 4
URxvt*buffered: false

URxvt.perl-ext-common: default,matcher,font-size
URxvt.url-launcher: /usr/bin/qutebrowser
URxvt.matcher.button: 1

!https://github.com/HaxNet/urxvt-font-size install this to increase the size in the terminal
URxvt.keysym.C-Up:     font-size:increase
URxvt.keysym.C-Down:   font-size:decrease
URxvt.keysym.C-equal:  font-size:reset
Typescript read-only object to an Enum type
Tags: typescript, webdev
Published: 2021-02-06 21:03:11

Sometimes I need to convert a read-only object to an enum type; so I created a simple function utility that helps me to convert this object to an "enum" type.
This is the code to build the type.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/c0nggq86mb7g1lcj0drh.png)
Some examples of use.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/34c66ua75zz1vdd4ghlc.png)

[Gits URL](https://gist.github.com/Puppo/27f40b59bd3f497e3d1108b07a47678e/revisions)
wsl2 - Install Ubuntu on Windows 10 FAST with Windows Terminal
Published: 2021-02-06 20:52:33

I've just uploaded a new video where I show how to install Ubuntu 20.04 on Windows 10 or your favorite Linux distribution using Windows Subsystem for Linux 2, or just shortly WSL2.
This will allow you later to install and configure your favorite containers management tools like buildah, podman or Docker.

Please check it out and subscribe to my channel to be notified when my new videos will be released.

Thank you in advance.

Link to video: [https://youtu.be/tqE9zcA8L3U](https://youtu.be/tqE9zcA8L3U)

Link to my personal blog: [https://www.anmalkov.com](https://www.anmalkov.com)

Link to my playlist: [Learn containers fast by doing](https://youtube.com/playlist?list=PLDoQ6gLAki7eu_ugunWVPX10fFOcok1iG)
What is ReactJS
Tags: react, node
Published: 2021-02-06 20:39:14

![No Bad Days](https://dev-to-uploads.s3.amazonaws.com/i/r8a2nbw7f66ax47rttjc.jpg)

https://dedevop.com/what-is-reactjs/

React is a JavaScript library for building fast and interactive User Interfaces, it was developed at Facebook in 2011 and currently, it’s the most popular javascript library for building user interfaces as you can see on google trends react is dominating the space of libraries and frameworks for building user interfaces the other two players here are Angular and Vue.
What Companies Get Wrong about Remote Salaries
Published: 2021-02-06 20:27:32

As companies had to adjust to remote working last year, many were open to hiring outside their location. When deciding what to pay a software engineer, most do a quick search for market rates in that area and then offer a salary around that rate.

I have been working remotely from Mexico for years and have also hired freelance software engineers and designers. I have had no shortage of work at multiples of the market rate (a few thousand dollars a month) in my area, Guadalajara, for years. If you make me an offer at market rates, I will never accept. Neither would many other engineers I have met in Guadalajara who also earn significantly more than the market rate.

Companies that are known for adjusting heavily for the cost of living, such as GitLab, tend to offer low salaries even considering market rates. Whenever I encounter this situation, I can guarantee the company is not hiring the best engineers in the area.

I recently received an email for a job that pays in the range of 110k - 170k USD. If I actively search for a job, I know I can find more offers of a similar, or better, salary range. I was 22 when I was no longer “employable” in Mexico because of the salary I demanded.

I have learned that there are two types of companies that hire remotely. The first type looks to hire engineers at a cheaper rate. The second type wants to hire the best engineers. Be the latter.
Mobile app makers review
Tags: mobile, review
Published: 2021-02-06 20:13:36

A friend came to me recently with the idea of creating a mobile app that would support the learning platform that he already has. We discussed what features he wanted and what his budget was. The budget was tight, and I realized that developing the app from scratch was not an option. I used [this cost calculator](https://www.appdevelopmentcost.com) to get an estimate for the custom-built app. Later, I found [this calculator](https://digitalya.co/app-cost-calculator/) that seems simpler and gives a lower estimated cost. It seemed that the only way forward was to look for a platform that would generate the app for me.

I knew that there should be some mobile app generators on the market, but I had no idea what features they offered and at what cost. To my surprise, I discovered that there were more than mature 20 platforms, all offering similar features. I soon found out that the mobile-app-makers industry is quite mature: there are [reviews](https://www.websitetooltester.com/en/blog/app-makers/) and [comparisons](https://apptooltester.com/best-app-maker/) and [top10’s](https://mashable.com/article/build-mobile-apps/).

I soon understood that all those articles would not help me with my problem: determine how much it would cost to run such an app. The reason is that the platforms are vastly diverse in terms of their offering: different prices for similar, but not always the same set of app features. The services included in the contract and the actual terms would also vary greatly. I had to make my research and comparison, based on the needs of my friend.

In this post, I’m sharing the results of the research that I’ve done. Disclaimer:

* I might have missed a few app makers as I only used [this article](https://www.websitetooltester.com/en/blog/app-makers/) as a source
* My focus was on the feature set that my friend needed. I didn’t look at the rest of the offered features.
* I only spent 10-15 minutes with each app builder platform, so I might have missed details that need more digging (or contacting customer support).

[This comparison sheet](https://docs.google.com/spreadsheets/d/1WyHLw6Me-z0Xlr7LN3yDkofoKiII19xEZYAQILvR5-0/edit#gid=0) is not detailed nor complete enough to allow me to select a “winner”. Instead, I will use it during the discussions with my friend to make a shortlist of 2-3 mobile app makers that I will investigate further.
How to run a test multiple times with Cypress to prove it is stable
Tags: cypress, testing, automtion, e2e
Published: 2021-02-06 20:13:07

## The series "Pinches of Cypress" is getting track!

Today you will learn how to ensure that your tests behave the same way when run multiple times.

[**Cypress.io**](https://cypress.io) is a fantastic testing framework!

It packs together with it several other famous libraries to make life easier for its users, that is, your life!

One of these libraries is [**lodash**](https://lodash.com/).

Just use

`Cypress._`

And you can invoke any feature of **lodash**. 🤩

Among the various features of **lodash**, one that “fits like a glove” for the problem we want to solve is [**.times**](https://lodash.com/docs/4.17.15#times).

An example would ease the understanding, right?

Here we go!

```js
Cypress._.times(5, () => {
  it.only("successfully submits the form", () => {
    const customer = {
      firstName: "John",
      lastName: "Doe",
      email: "john-doe@example.com"
    };

    cy.fillMandatoryFields(customer);
    cy.contains("Send").click();

    cy.get(".success p")
      .should("contain", "Form successfully submitted.");
  });
});
```

After running the above test, I have the following result.

```sh
Sample app
  ✓ successfully submits the form (1725ms)
  ✓ successfully submits the form (1212ms)
  ✓ successfully submits the form (1200ms)
  ✓ successfully submits the form (1195ms)
  ✓ successfully submits the form (1256ms)


5 passing (8s)
```

As you can see, my test looks stable and passed 5 times in a row. Yay! 🎉

Problem solved!

___

What's up? Any thoughts about the series?

I'm collecting feedback and creating a backlog for the next posts. Leave a comment with what you would like me to address in future content.

___

This post was originally published in Portuguese on the [**Talking About Testing**](https://talkingabouttesting.com/2021/02/06/como-rodar-um-teste-varias-vezes-com-cypress-para-provar-que-ele-e-estavel/) blog.
___

Would you like to learn about **test automation with Cypress**? Get to know my online courses on [**Udemy**](https://udemy.com/user/walmyr).