teleren/devto huggingface dataset:
Types of Trees in Data Structures
Tags: datastructure, tutorial, tree
Published: 2021-01-12 17:15:20

Today, we are going to learn the types of trees in tree Data Structure. So let's get started.

# 1. Binary Tree:
These types of trees have 0,1 or 2 nodes as children nodes.
 ![](https://aakashcode12.files.wordpress.com/2021/01/image.png?w=1024)

# 2.Full or Strict Binary Tree:
Strict or Full Binary Tree are the trees which either have 0 or 2 children
![](https://aakashcode12.files.wordpress.com/2021/01/image-1.png?w=1024)

# 3. Almost Complete Binary Tree :
Almost complete trees are the trees which first towards left and then right. Also they prefer staying on same level first. They fill left right and then move onto the next level.
![](https://aakashcode12.files.wordpress.com/2021/01/image-2.png?w=1024)

# 4. Complete Binary Tree
Last level can be incomplete, but all level (also it's filled from left).

At some places, they write complete and perfect binary tree as same.
![](https://aakashcode12.files.wordpress.com/2021/01/image-5.png?w=1024)
# 5. Perfect Binary Tree :
Perfect Binary Tree is a binary tree in which all the internal nodes have two children and all leaf nodes are at the same level. 
![](https://aakashcode12.files.wordpress.com/2021/01/image-3.png?w=1024)
# 6.Binary Search Tree (BST):
The binary tree in which all the elements are filled according to this rule:

each node must have a child smaller then itself in left node and greater value in right node.

![](https://aakashcode12.files.wordpress.com/2021/01/image-6.png?w=1024)
# 7. Skewed Binary Tree:
They have one or zero child node and elements are either added in ascending or descending order in the Binary Search tree to get this tree.

![](https://aakashcode12.files.wordpress.com/2021/01/image-7.png?w=1024)
#AskDevTo: What are you learning in 2021?
Tags: survey, technology, community, askdevto
Published: 2021-01-12 17:04:59

So, it's been a few days into the New Year, and by now, I think we all have a rough idea of what technologies we will be working on for the first quarter, and what technologies we want to pick-up over the year as well.

As such, I wanted to create and share a laundry list of things that I can add/remove from over the year - but keep it public to hold myself accountable and keep track of my progress. 

Feel free to copy this template and create your own list of tech that's on your radar, and reply with a link to it so I can check it out as well :) 

Here's what I have on my mind for now... (Last updated 12/01/2021)

### Currently Focusing On:

- Becoming well versed with the online/web ecosystem and frameworks, specifically React, Redux Saga etc. for client-side, and NestJS/Serverless for backend
- Brushing up on some Java/C# back-end updates (Spring 5, .NET core 5)
- Getting familiar with the AWS platform for cloud system design and architecture
- Job-searching (for a full stack role, feel free to reach out if you have an opportunity in mind)

### For later down the road:

- Switch over completely to using Go-Lang for back-end development PLUS check out the gRPC ecosystem in languages I know
- Get really good (specialize) with AWS (Certified Solutions Architect/Developer)
- Continue to get better with JS frameworks + design (CSS/SCSS) thinking of picking up Vue, and Svelte - most likely, in that order
- Dabble into Elixir + Phoenix
- Write some Nim/Rust code (and finalize which one I want to pick up as a hobby-coder)
Are You Using Web Speech API? (Should You Reconsider?)
Tags: javascript, webdev
Published: 2021-01-12 16:41:17

I've seen quite a lot of projects using [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API), the browser API for speech recognition. 

While this is great as in we need more people building voice user interfaces in browsers, I'm not sure if it's at all suitable for production use. 

First of all, it's severely lacking in browser support, meaning it's pretty much a Chrome (and derivates) specific feature. 

Second, as it's only for speech recognition, it's [not very easy](https://www.speechly.com/blog/web-speech-api-alternative/) to leverage it for anything that's not just replacing keyboard. 

And if you think about it, speech is not at all like a keyboard with voice. Written and spoken language are [pretty much two different languages](https://omniglot.com/writing/writingvspeech.htm) and even if saying something like "Turn off the lights" is pretty intuitive and fast, typing that to do the same action would not be very good UX.

This is why any voice user interface will anyway need a natural language understanding component to extract meaning out of what the user said. Even with the most simple voice user interfaces, actual users will come up with very many different ways of expressing the same intent and grepping text transcripts is not a viable solution.

So this is my question: Are you using WebSpeech API and for what kind of projects? What do you think are the benefits of the API compared to some other solutions? Have you considered other options and why did you ditch those?
Inspecting application metrics with dotnet-monitor
Tags: dotnet, diagnostics, metrics, performance
Published: 2021-01-12 16:40:29

dotnet-monitor is a command line tool that makes it easier to get access to diagnostics information in a dotnet process.

In the episode, Rich is joined by Sourabh who explains to us the importance of gathering application diagnostics and also gives us a demo of how to run dotnet-monitor in Kubernetes

{% youtube hbgPvjTJSLY %}
If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).

<ul>
<li><a href="https://aka.ms/dotnet-monitor" target="_blank">Introducing dotnet-monitor</a></li>
<li><a href="https://github.com/dotnet/diagnostics/" target="_blank">.NET Diagnostics on GitHub</a></li>
<li><a href="https://docs.microsoft.com/dotnet/core/diagnostics/diagnostics-in-containers?WT.mc_id=dotnet-00000-cephilli" target="_blank">Collect diagnostics in containers</a></li>
<li><a href="https://docs.microsoft.com/dotnet/core/diagnostics/?WT.mc_id=dotnet-00000-cephilli" target="_blank">What diagnostic tools are available in .NET Core?</a></li>
</ul>
Get all keys and values from json object in Python
Tags: python
Published: 2021-01-12 16:39:58

In this [Python](https://python.org) tutorial we are going to see how we can get all the keys in this json object and also all the values of the keys.

okay so let me get started let me take one empty python file 
here, so yeah so let me save this file first as example.py. 

## Load json

As it is a json i need to import this package called **json**. This lets you play around with [json](https://pythonprogramminglanguage.com/python-json/). Then it is available in this particular Python file. 

    import json

Right so take that file path and try to open that with *open as json file*.

    with open("C:\\pythonPrograms\\example.json") as jsonFile:

That will do json [decoding](https://pythonspot.com/json-encoding-and-decoding-with-python/). Our json file looks like this:

```json
    {"emp_details":[
             {"name": "a",
              "id": "123"
             },
             {"name":"b",
              "id":"345"
             }
    ]
    }
```

You need to give the file name, so this is my file name. It should have double slashes not the single slash, so once we have this using the json library that we have imported you need to load the json object. Let's go.

![Let's go](https://dev-to-uploads.s3.amazonaws.com/i/3rozmhb8m4ik4qa8xgpe.jpg)

## Get keys and values

Using load function json file, this let me keep it into a variable called data.

```python
    data = json.load(jsonFile)
```
    
Then you have a Python [object](https://pythonbasics.org/class/). Now you can get the keys and values. The code below depends on what your json file looks like. In our json file there's a header named emp_details.

```python
    jsonData = data["emp_details"]
    keys = x.keys()
    values = x.values()
```

That gives us this code:  

```python
    import json
      
    with open("test.json") as jsonFile:
        data = json.load(jsonFile)
        jsonData = data["emp_details"]
        for x in jsonData:
            keys = x.keys()
            print(keys)
            values = x.values()
            print(values)
```

It will output:

    {'name': 'a', 'id': '123'}
    dict_keys(['name', 'id'])
    dict_values(['a', '123'])
    {'name': 'b', 'id': '345'} 
    dict_keys(['name', 'id'])
    dict_values(['b', '345'])

If you want, you can loop over the keys and values inside the loop, to do the formatting.


Here we use a [for loop](https://python-commandments.org/python-for-loop/) to iterate over the keys and values. If your json file is small like the one in this example, you don't necessarily have to use a loop.

That's all :-)
How Prime Numbers Keep the Internet Secure (RubyConf 2020)
Tags: techtalks, ruby, algorithms, computerscience
Published: 2021-01-12 16:38:44

# Abstract
You may not know it, but you use prime numbers every day. They play a major role in internet security in the form of encryption.

In this talk, you will learn the inner workings of how the internet uses prime numbers to keep your data private as it travels over the wire. We will cover topics such as symmetric and asymmetric encryption, and why prime numbers are just so damn hard to crack. By the end, you will understand how to encrypt and decrypt data yourself with just the Ruby standard library.

So come join me as we demystify HTTPS using code, color theory, and only a pinch of math 🤓.

# Presentation

{% youtube f_Qan-eNT-g %}

I gave this presentation at RubyConf2020.
What describes a productive day for you?
Tags: watercooler, productivity
Published: 2021-01-12 16:35:22

---
title: What describes a productive day for you?
published: true
description: 
tags: watercooler, productivity
cover_image: https://www.paldesk.com/wp-content/uploads/2019/12/why-is-technology-important-for-productivity.png
---
Sometimes if I have fixed a bug for so long, done tasks that would not be in my competency, or haven't complete my planned tasks for the day, I often end up working late in the night to feel productive for the day.

Do you have some measure that defines whether or not your day has been productive?
Angular Folders and Routing
Published: 2021-01-12 16:33:01

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/g5pkaqvqakdb12b2xb4p.gif)

When we first create a project we will see a folder structure similar to the image shown above. 

As a new Angular developer, the most popular folder is 'src', this is where the components are created. This folder is also referred to as the 'root' folder of your application. 

What's a component? It's simply a collection of files that extends a web page to include four things: HTML, the Styling, the Typescript (code behind) and the Test.

To create a new Component the command is simply 'ng g c name' where name is any name desired.

Issue this command in the src/app folder:

```
ng g c Start
``` 

Just make sure you are in the 'src' folder when that command is issued.

Want to see your page? The easiest way is to create a route for it. 

**Routes**
Routes are entry points to specific pages in your web site. 

It the instructions to create the new project were followed on the previous series post, you should see a file named app-routing.module.ts

Open that file. There are two things to know about creating routes, 1) We have to import the component we want to have routed, and 2) We have to configure a path.

Assume the new component we just created is named StartComponent. 

Type this in:
```
import {} from './start/start.component';
```
As you type in the 'from' part above, after typing in './', you should see suggestions for the path desired. Note that by typing in '../' you control how far back to look in your solution. 
```
from './start/start.component';
```
After the path is found then go back to the brackets and fill in the name of 'start' and a suggestion should pop up giving you this.

```
import { StartComponent } from './start/start.component';
``` 
Congratulations you now have a reference to that 'component'.

*Route*
In the app-routing.module.ts there is a section named 'routes' it should have this in it, to see your new 'StartComponent'
```
const routes: Routes = [
  { path: 'start', component: StartComponent },]
```

Explanation: 
const means it is a constant variable. 'routes' is the name of the variable. : Routes[...] means that the value of 'routes' is an array named Routes, which has things in it, each thing being separated by a comma.

The we see an open bracket, { this is a symbol to JavaScript saying we want to define an object. So in JavaScript an empty object would be this: {} 

JavaScript likes the concept of name/value pairs. In an object we have this {name:value} where name is anything we want and value is what is returned when we reference that name.

let t = {time:'10am'}; 
let currentTime = t.time;
is a statement where currentTime will have the value of '10am'.

This applies to our routing entry as follows:

```
const routes: Routes = [
  { path: 'start', component: StartComponent },]
```
Anytime the user goes to your site and types in http://mysite/start 

The startComponent page will be displayed due to the route entry. 

Image: Route 66 as it is today somewhere.

JWP2021
Which Linux distro is most stable for daily use?
Tags: discuss, linux, os
Published: 2021-01-12 16:28:55

---
title: Which Linux distro is most stable for daily use?
published: true
description: 
tags: discuss, linux, os
cover_image: https://miro.medium.com/max/4000/0*BU2ZZXi5ARVnRnI3.png
---
For all the experienced Linux users out there, which Linux has been the most stable and caused the least headaches for you?

Best if you have worked with multiple distros and could share a comparison based on personal experience.
🔐 Connecting Auth0 to MongoDB
Tags: auth0, mongodb, database
Published: 2021-01-12 16:27:11

⚙️ Configure **MongoDB** as an **Auth0** custom `database` to simplify user migration or just add OAuth/Open ID Connect.
[Read more...](https://auth0.com/blog/connecting-auth0-to-mongodb/?utm_source=content_synd&utm_medium=sc&utm_campaign=auth0-mongodb)
Conditionals and Looping Tutorial in WayScript
Published: 2021-01-12 16:25:20

Introduction
------------

Two really powerful programming tools used when creating programs in WayScript are conditionals and looping. These give users the ability to execute specific tasks automatically by simply inputting a module instead of writing code. In today’s tutorial, we’re going to look at how these two tools can be used in a simple example script. Keep reading to follow along!

Building our Script
-------------------

For this example, we’ll use the HTTP Trigger module to create a sign-up page that uses e-mail. Using this module in the left screen toolbar, create a variable called “email” by typing it into the input box under “Outputs.” Next, the Google Sheets module is added so that the information from the HTTP sign-up page can be passed into it. In the toolbar choose which file to write the information into, and then add the “email” variable. To finish this step, add the HTTP Response module so that the program passes the results to the webpage.  
  
Now, add a function to the script by clicking on the plus button in the upper left corner of the screen. Your tree should now look like this.  
  

![tutorial step #1](https://wayscript.com/blog_img/156/1.png)

  
  
Let’s say we want to send a user an e-mail based on how much time has passed since they signed up on our created webpage. First, the Time Trigger module is added to the function. Then, we’ll use the same Google Sheet from earlier by adding the Google Sheets module and selecting the appropriate file. Next, rename and import the column headers; this then stores them as WayScript variables to be used later.  
  
To loop over these variables the process is pretty straightforward. Simply add a Loop tool and choose the variables created from the column headers from the drop-down menu. Conditional statements are just as easy. Add the If tool below the Loop; this is an example of what that would look like.  
  

![tutorial step #1](https://wayscript.com/blog_img/156/2.png)

  
  
In the toolbar, select the appropriate variable that you want to loop. This example uses the “days since signup” and the “is the same as” comparison, setting it equal to 1. Then, by adding the Gmail module underneath the If tool in the tree, an e-mail can be sent to the user that meets those criteria. Else If statements can also be added the same way as the If tool, creating another set of criteria with an attached action.  
  
The options for using loop and conditional tools are endless, and this tutorial just provides a simple example of this. WayScript has the tools and versatility to create almost any kind of script you need, all in an easy to use format.

Conclusion
----------

Questions about this script or anything else? Join our [discord](https://discord.gg/VWbXSbj). We're always around to help. If you want to work the full script template, just find it [here](https://wayscript.com/user/derricks/RfrutZ5H).
I finally graduated and now I have time to write again!
Tags: blog, career, devjournal, writing
Published: 2021-01-12 16:21:52

---
title: I finally graduated and now I have time to write again!
published: true
description: I've finally graduated University! Now I have more free time and I plan to use it to create valuable content online, starting by bringing back my blog.
tags: blog, career, devjournal, writing
---

One of my plans for 2020 was to keep writing articles here on DEV.to at least twice a month, but many things happened that force me to forget about that and focus on some of my other goals for 2020.

{% twitter 1212133951491526657 %}

On the bright side, I did manage to achieve some of my goals:

✅🎓Graduate University
✅✏️Draw more
✅💪Keep working out
✅☀️Befriend the sunlight

I'm actually really happy with what I managed to achieve, and I don't regret leaving my blog behind because I really wanted to graduate and studying ended up taking more time than I thought. However, the thing that I missed the most during the whole year was *writing*. 

I started this blog on 2019, writing weekly articles about the things that interested me the most about my work and it was an extremely satisfying experience. It made me realize how much I love to write and I also learned a lot in the process.

That's why in 2021 I will be focusing mainly in *creating valuable content*. I already started working and polishing my process. **I'm really happy to be back** 😊.

The idea for this year is to work on my side projects and document everything I learn in this blog. I'll be working with my fiance, @maurogarcia_19. He's usually in charge of the frontend.

So the first project we'll be working on is a **Chrome extension**. I won't get into any details about the project yet, but I'll say that I've never built a Chrome extension before, so I took a week to read the docs and do a small sample project just to learn how everything works. After doing a lot of reading and experimenting, I wrote an article explaining how to create a simple chrome extension from scratch:

{% link paulasantamaria/creating-a-simple-chrome-extension-36m %}

## What are your plans for 2021?

If you're planning to write more this year too, comment below so I can follow you. Lets help keep each other accountable and motivated!
AE Studio is hiring Full Stack Developers in Brazil
Tags: hiring, javascript, typescript, node
Published: 2021-01-12 16:09:30

---
title: AE Studio is hiring Full Stack Developers in Brazil
published: true
description: AE Studio is a mid-sized startup from California and we are looking for developers to work remotely and/or from our office in Florianópolis. We have a team of highly skilled developers building products to increase human agency using the most recent technologies for cool startups, celebrities, and sometimes large companies like Samsung and Berkshire Hathaway. We have an awesome work environment and a highly productive process.
tags: hiring, javascript, typescript, nodejs
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/fpymrknzxd23ysiazgc4.jpeg
---

AE Studio is a mid-sized startup from California and we are looking for developers to work remotely and/or from our office in Florianópolis. We have a team of highly skilled developers building products to increase human agency using the most recent technologies for cool startups, celebrities, and sometimes large companies like Samsung and Berkshire Hathaway. We have an awesome work environment and a highly productive process.


We are looking for someone with strong problem-solving skills and self-management skills.


### STACK (one of)

- JavaScript / Node.js / React
- Ruby on Rails
- Go

### ABOUT YOU

- Experience in Full Stack Development
- Real agile experience
- Growth mindset
- Willingness to learn our systems
- Full-time availability
- Demonstrated ability to work independently/autonomously
- Ability to communicate effectively and work exclusively in English. (This is a must)

### BONUS POINTS FOR

- TypeScript
- React Native / Ionic
- Swift
- Angular
- Python
- Clean Code, Unit Tests
- Experience managing clients and client relationships is a big plus

### What do you get out of it???

- Opportunity to work on challenging and interesting projects with cutting edge tech and in innovative fields
- Collaborative & friendly work environment (we're all nice 🤗)
- Good pay 💰
- Reasonable work hours
- Opportunity to flex your entrepreneurial side and work on exciting internal projects

### APPLY

http://bit.ly/ae-studio-join-devto
Do you associate music with any fond coding memories?
Tags: discuss, watercooler
Published: 2021-01-12 15:59:20

When I was first getting into software development, I had a thing for **_The Doors_**, so I coded to songs like **_Riders in the Storm_**.

When I was early in my coding career, I had a **_Pink Floyd_** phase.

I recall one tight deadline where I had **_Nirvana_** on loop for hours.

**_Kanye_** was my go-to for productive coding sessions for a long time.

I go back to these places often to resurrect the headspace I was in at the time. Does anyone else do this?
Day 12 Challenge
Tags: challenge, webdev, javascript, 365daysofcoding
Published: 2021-01-12 15:40:19

Day 12! This one was a request. Implement the function uniqueInOrder which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.

Another way of saying it: create a function that accepts a string or an array and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.


Examples:
```javascript
      uniqueInOrder('AAAABBBCCDAABBB') // ['A', 'B', 'C', 'D', 'A', 'B']
      uniqueInOrder('ABBCcAD') // ['A', 'B', 'C', 'c', 'A', 'D'] 
      uniqueInOrder([1,2,2,3,3]) // [1,2,3] 
      uniqueInOrder(['hello', 'Hello', 'Hello', 'Hello', 'dev', 'dev', 'world', 'World', 'dev', 'world']) // ['hello', 'Hello', 'dev', 'world', 'World', 'dev', 'world']
      uniqueInOrder([1, 1, 2, 2, 3, 3, 1, 1, 1]) // [1,2,3,1]
```