teleren/devto huggingface dataset:
Decisions and Policies
Tags: management
Published: 2021-01-23 16:29:19

I spent like a year and a half as a part-time manager in my previous job. When you enter into a new position, there's a natural tendency to continue using the exact same things as we have done in the past, since they worked in the past, they should still work in new position, right? 

Well, it turns out they don't. Thing that brought you here won't brought you there. That's a popular saying and it's true.

However, while the skills we've developed in the past won't bring you to the next level, they can be refactored to work for your new role.

As developers, we thrive to reuse code, avoid repeating ourselves on each piece of functionality that we add. That gives the codebase we're writing a consistency on how it's structured. As developers, we encapsulate code into functions/classes/modules. So that, we can reuse the code by applying the function any number of times.

As managers, we can also reuse something. **What we can reuse, are the decisions**. And, like code, **we can encapsulate decisions into policies**.

![decisions](https://dev-to-uploads.s3.amazonaws.com/i/j1ofr82q16c0f4om9zcq.png)

Policies and best practices are tools for us, managers, that resemble functions in codebases. Policies bring order and consistency to our teams.
Using HUD&UI elements in developing Desktop apps
Tags: design, hud, ui
Published: 2021-01-23 16:26:37

I want to ask is there anyone could use HUD&UI elements for developing Desktop app? I watched some videos in YouTube, they look quite beautiful, however all of them are made in After Effects. Now I am interested in using such elements, but don't know how ... Is it possible to use them with WPF, or with other frameworks?
VSC: Tasks vs &&
Tags: vscode, javascript, npm, help
Published: 2021-01-23 16:05:19

With building projects, like a MERN project, 
Do you have a “local” or “on your computer” script that you run or CL of:
mkdir file && cd file && mkdir test %% XD test && touch index.JS %% echo “test” >> index.JS && cd - && cd test ?
Color palettes website colorsui.com 🎨 - Ready to use
Tags: webdev, productivity, tooling, sideprojects
Published: 2021-01-23 16:03:53

Hi there, I've created a color palette website called https://colorsui.com. Colors UI where you can find beautiful color palettes, palette generator, Tint and Shade generator, solid colors, material colors, and more. Please visit https://colorsui.com
Calculando a velocidade em Python
Tags: python, programming, beginners
Published: 2021-01-23 15:54:42

Estou apredendo a programar, então se o código abaixo estiver com alguma informação incorreta, por favor deixe a explicação correta nos comentários. 

```python
distancia = float(input("Informe a distância: "))
tempo = float(input("Informe a tempo: "))

velocidade = distancia / tempo

#mostrar a velocidade
print(" A velocidade é : " + velocidade + " !") """print para mostrar ao usuário"""
```


Exemplo de como irá aparecer para o usuario:

Informe a distância: 
Informe o tempo:

A velocidade é: 


Explicação do código:
 
```python
distancia = float(input("Informe a distância: ")) """criamos uma variável para a informação ser guardada, depois iremos imprirmir na tela uma pergunta para o usuário, e para permitimos que ele insira a informação, utilizamos o input. O float é um ponto flutuante (2,55 - 13,444 - 5,265) é utilizado para "números quebrados" e o int são números inteiros ( 1 - 2 - 3)"""
"""suponhamos que em distancia seja inserido o valor de 100"""

tempo = float(input("Informe a tempo: ")) """inserimos 20"""

velocidade = distancia / tempo ""velocidade = 100/20"""
"""criamos uma variável para salvar o valor da conta. E para que a conta seja realizada informamos os números que o usuário informou."""

"""mostrar a velocidade"""
print(" A velocidade é : " + velocidade + " !") """resposta é 5"""
""" vai aparecer para o usuário """
```

A velocidade é 5 !
trying to implement Firefox send again!
Tags: discuss, help, javascript
Published: 2021-01-23 15:02:34

Hi there 🙋‍♂️, hope so y'all are well and awesome, so i am writing this post cuz i was encountering some issues in Firefox send, i heard of that service but never got a chance to use it but somehow i got GitHub recommendation of firefox send so i was trying to make it alive again and try it but after following the docs, i was getting errors, would anyone help me resolve these, I ran the commands(though i used yarn instead of npm cuz npm was giving me errors)->
`yarn install`
`yarn run start`

but I got this as an output->
```$ npm run clean && cross-env NODE_ENV=development L10N_DEV=true FXA_CLIENT_ID=fced6b5e3f4c66b9 BASE_URL=http://localhost:1337 webpack-dev-server --port=1337 --mode=development

> firefox-send@3.0.22 clean E:\send\send
> rimraf dist

E:\send\send\node_modules\convict\src\main.js:268
      throw new Error("'" + fullName + "' uses an unknown format type: " +
      ^

Error: 'listen_address' uses an unknown format type: ipaddress
    at normalizeSchema (E:\send\send\node_modules\convict\src\main.js:268:13)
    at E:\send\send\node_modules\convict\src\main.js:694:5
    at Array.forEach (<anonymous>)
    at convict (E:\send\send\node_modules\convict\src\main.js:693:24)
    at Object.<anonymous> (E:\send\send\server\config.js:6:14)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (E:\send\send\server\storage\index.js:1:16)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
error Command failed with exit code 1.
Global Dark-Mode Switch (JS & Query)
Tags: javascript, darkmode, website
Published: 2021-01-23 15:49:33

Simple dark-mode switch using filter: invert(1); will cause body DOM problems down the line.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uq7b78s8p8r1o4fmjgbf.png)

Better use this method to point HTML as css class either using JQuery or ES6.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1gfr1fr3qyxcpx73take.png)



Mohnish Landge
https://github.com/mohnishlandge
Hope you find it Useful-
First, learn the code you'll actually use in your projects.
Config Gitlab Runner To Push A Tag
Tags: gitlab, devops, cloudopz, cloud
Published: 2021-01-23 14:18:45

<h2>
Any commits should be tagged align with build version especially master branch. How to configure Gitlab runner to do this?
</h2>

## What’s In This Document 
- [What is the usecase](#-What-is-the-usecase)
- [Solve problem by using OAUTH2.0 and tokens](#-Solve-problem-by-using-OAUTH2.0-and-tokens)

### 🚀 **[What is the usecase](#-What-is-the-usecase)**
- Developer tells gitlab runner to tag the commit and publish the tag
[.gitlab-ci.yml]()
```
build:
  stage: build
  script:
    - echo "Build and tag the commit"
    - tag=1.0-${CI_COMMIT_SHORT_SHA}
    - git tag $tag
    - git push origin $tag
  tags:
    - gitlab-runner
```

- But got the error `remote: You are not allowed to upload code.`
```
Build and tag the commit
$ tag=1.0-${CI_COMMIT_SHORT_SHA}
$ git tag $tag
$ git push origin $tag
remote: You are not allowed to upload code.
fatal: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.com/hello-gitlab.git/': The requested URL returned error: 403
ERROR: Job failed: exit status 1
```

### 🚀 **[Solve problem by using OAUTH2.0 and tokens](#-Solve-problem-by-using-OAUTH2.0-and-tokens)**
#### **1. Create access token**
- Go to `User Setttings` -> `Access Tokens`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4mve0fn40k5wnkp2e6cp.png)

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

#### **2. Update [.gitlab-ci.yaml](https://github.com/vumdao/gitlab-tag/.gitlab-ci.yaml)**
```
build:
  stage: build
  before_script:
    - project_url=$(echo $CI_PROJECT_URL | sed 's/https:\/\///')
    - git remote set-url origin https://oauth2:$GITLAB_TOKEN@$project_url
  script:
    - echo "Build and tag the commit"
    - tag=1.0-${CI_COMMIT_SHORT_SHA}
    - git tag $tag
    - git push origin $tag
  only:
    refs:
      - tagme
  tags:
    - gitlab-runner
```

#### **3. Check result**
```
Build and tag the commit
$ tag=1.0-${CI_COMMIT_SHORT_SHA}
$ git tag $tag
$ git push origin $tag
warning: redirecting to https://gitlab.com/hello-gitlab.git/
To https://gitlab.com/hello-gitlab
 * [new tag]           1.0-0714997f -> 1.0-0714997f
 Job succeeded
```

#### **Ref: [Make pipeline permissions more controllable and flexible](https://gitlab.com/groups/gitlab-org/-/epics/3559)**

### **Visit wwww.cloudopz.co to get more**


<h3 align="center">
  <a href="https://dev.to/vumdao">:stars: Blog</a>
  <span> · </span>
  <a href="https://vumdao.hashnode.dev/">Web</a>
  <span> · </span>
  <a href="https://www.linkedin.com/in/vu-dao-9280ab43/">Linkedin</a>
  <span> · </span>
  <a href="https://www.linkedin.com/groups/12488649/">Group</a>
  <span> · </span>
  <a href="https://www.facebook.com/CloudOpz-104917804863956">Page</a>
  <span> · </span>
  <a href="https://twitter.com/VuDao81124667">Twitter :stars:</a>
</h3>
Regras do Python
Tags: python, programming, beginners
Published: 2021-01-23 15:36:56

1 - Os nomes não podem começar com nº;
2 - Não pode haver espaços no nome/variável, exemplo:
    nome do aluno = print(input("Digite o nome do aluno")) #desta forma está incorreto

   nome_do_aluno = print(input("Digite o nome do aluno")) #está é a forma correta  

Quando criar uma variável que possua espaço, substitua por underline

3- Não é possivel usar esses simbolos como variável "" ; >< / ? | ( ) ! @ # $ % & * ~ - +

4- É considerado a melhor pratica (pep8) que os nomes são em minusculo 


Procure utilizar nomes especificos para as variáveis, pode ser uma maneira muito util de acompanhar diferentes variáveis.
Hello World em Python
Tags: python, programming, beginners
Published: 2021-01-23 15:29:37

Um dos primeiros comando/ códigos que se pode aprender é o Hello Word. 

Ele é extramente simples, podendo ser feito em somente uma linha.


"""o comando print serve para exibir o que estiver escrito entre parenteses com as aspas " " ou ' '. Se não estiver escrito dentro de aspas dará errado. 

```python
print("Hello World!") 
```

""" Quando executar ele aparecerá desta forma"""

Hello World!
Hack your habits - 30 days to a better codebase!
Tags: webdev, programming, productivity, motivation
Published: 2021-01-23 15:24:22

It's so easy for technical debt and temporary hacks to grow in our codebase... and so hard to motivate ourselves to fix these problems!

Instead of waiting until we get overwhelmed one day, what if we picked one small task a day to accomplish? By using the tiny wins strategy, keeping up our codebase is easy and fun.

Need help getting started building this habit? Join the totally free 30-Day code quality challenge and we will supply one daily challenge for you to tackle and a forum of other participants to encourage you.

It is programming language agnostic and open to anyone! Check it out here: https://tuple.app/code-quality-challenge
Creating tech blog using MERN stack. Help!
Tags: node, javascript, help, blogging
Published: 2021-01-23 15:22:57

I am fairly new to blogging sites architecture and planning to create one in MERN stack.

I am good with MERN tech, but never built something of production level. There is lot of decision that I think I have to take before starting with code. 

For starter... 
1. What are some best practices to store each of the articles, is 
   it in database(Mongodb)? 
2. How static assets like images and videos are stored for 
   blogging sites? 
3. Do I need to implement some caching for api calls?

I want to built it from beginning and publish it as I know the tech but systems design is kinda daunting me!

Has anyone faced such challenge? What are your advice?

Thanks for reading.
How to get parameters from the controller Comprehensive set | Spring web development programming
Tags: spring, java, backend, webdev
Published: 2021-01-23 15:01:43


{% youtube fIMr_pffQJI %}

(Reference) The difference between get and post is that the parameters of get are exposed in the url, but
Post is not exposed and parameters are transmitted to the body.

Spring supports it in various ways.
I think you can code in a way that suits your business
Tags HTML para utilização em textos.
Tags: html
Published: 2021-01-23 14:41:41

Nesse artigo vamos ver as principais tags que usamos dentro do HTML para a formatação dos textos, então sem enrolação vamos nessa!

###Tags que serão apresentadas.

```html
<h1>h1: utilização</h1>
<h2>h2: utilização</h2>
<h3>h3: utilização</h3>
<h4>h4: utilização</h4>
<h5>h5: utilização</h5>
<h6>h6: utilização</h6>

<p>p: utilização</p>

<strong>strong: utilização</strong><br/>

<cite>cite: utilização</cite><br/>

<pre>pre: utilização</pre><br/>

<i>i: utilização</i><br/>

<u>u: utilização</u><br/>

<b>b: utilização</b><br/>

<em>em: utilização</em><br/>
```
Antes de explicar cada uma das tag, quero falar primeiro da tag `<br>`, pois ela aparece na frente de algumas tag que vamos estudar, pois então, a tag `<br/>` tem o papel de quebra a linha, portanto quando você utiliza a tag ela quebra o conteúdo que esta na frente dela para linha de baixo.

###Utilização da tag `<h1></h1> ... <h6></h6>`

```html
<h1>h1: utilização</h1>
<h2>h2: utilização</h2>
<h3>h3: utilização</h3>
<h4>h4: utilização</h4>
<h5>h5: utilização</h5>
<h6>h6: utilização</h6>
```
A tag `<h1></h1>` até `<h6></h6>` tem o papel de representa os títulos da pagina, mas dando um aviso essas tag são muitas das vezes diferenciados pelo seu tamanho, mas essas tag tem o objetivo de organizar a relação de autoridade entre os títulos e não somente ter um tamanho diferente.

###Utilização da tag `<p></p>`

```html
<p>p: utilização</p>
```
A tag `<p></p>` tem o objetivo de especificar um paragrafo dentro de um texto, com certeza e uma tag que será bastante usada.

###Utilização da tag `<strong></strong>`

```html
<strong>strong: utilização</strong>
```
A tag `<strong></strong>` deixa o conteúdo que esta dentro dele em negrito, mais esta tag tem o foco em dar importância para uma palavra ou frase.

###Utilização da tag `<cite></cite>`

```html
<cite>cite: utilização</cite>
```
A tag <cite></cite> deixa o texto que está dentro dela em itálico, mas ela tem o foco em deixar uma frase ou palavra como citação, portanto ela e mais usada para destacar uma citação.

###Utilização da tag `<pre></pre>`

```html
<pre>
      Olha como
	o texto fica,
    ele esta do mesmo
        jeito que formatei
</pre>
```
A tag `<pre></pre>` tem como foco apresentar na tela um texto pré-formatado, portanto ele é mais usado para poemas, entre outras, sendo que a fonte do texto fica mono-espaçada.

###Utilização da tag `<i></i>`

```html
<i>i: utilização</i>
```
A tag `<i></i>` deixa o texto que esta dentro dela em itálico.

###Utilização da tag `<u></u>`

```html
<u>u: utilização</u>
```
A tag `<u></u>` deixa o texto dentro dela em sublinhado. 

###Utilização da tag `<b></b>`

```html
<b>b: utilização</b>
```

A tag `<b></b>` deixa seu texto em negrito.

###Utilização da tag `<em></em>`

```html
<em>em: utilização</em>
```
A tag `<em></em>` deixa o texto que esta dentro dela em itálico.

###Conclusão:

Obrigado por ler até aqui, espero ter ajudado você

Ahh, deixa um comentário para mim.
what are some of the applications of python in data science?
Tags: datascience, python
Published: 2021-01-23 14:29:13

Python is a universally useful, high-level programming language that discovers its application in different fields. Python is widely utilized in the Data Science area for its gigantic rundown of highlights. Highlights of Python that makes it a decent choice for Data Science experts are: 

It's not difficult to learn and utilize in view of high code-comprehensibility. 

Its open-source, free, and has a major local area to help you in any sort of circumstance. 

Supports different libraries like NumPy, SciPy, Scikit-Learn, TensorFlow, Pandas, Matplotlib, and so on which stretches out the utilization of Python to complete your work is.

Recently I came to know the importance of data science. After suggestions from my friends and mentors, I have taken a <a href="https://intellipaat.com/data-scientist-course-training/">Data Science Online Course</a>.
Useful Resources for CKAD Certification
Tags: kubernetes, docker, career
Published: 2021-01-23 14:20:59

Kubernetes is the most known tool for deployment automation, scaling, and management of containerized applications. Many companies have defined K8s as their main infrastructure to run production software.

Kubernetes skills become a must-have nowadays and aligned to that the Cloud Native Computing Foundation has developed a set of certifications.

I've decided to go for [Certified Kubernetes Application Developer](https://www.cncf.io/certification/ckad/) as it is more aligned with my software engineer career and helps to have more credibility in the job market and recognition of competency.

If you are thinking about taking the exam or even just would like to learn Kubernetes, here is a list of resources that could be useful:

Books:
 - [Quickstart Kubernetes](https://leanpub.com/quickstartkubernetes)
 - [The Kubernetes Books](https://leanpub.com/thekubernetesbook)

On-demand Courses:
- [Kubernetes for Absolute Beginners](https://www.udemy.com/course/learn-kubernetes/)
- [Certified Kubernetes Application Developer](https://www.udemy.com/course/certified-kubernetes-application-developer)

Youtube:
- [Kubernetes Tutorial for Beginners by Techworld with Nana](https://www.youtube.com/watch?v=X48VuDVv0do) {% youtube X48VuDVv0do %}
- [Learn Kubernetes Playlist by Just me and Opensource ](https://www.youtube.com/playlist?list=PL34sAs7_26wNBRWM6BDhnonoA5FMERax0)

Hope this content helps! :smile:
Cover image: <a href="https://pixabay.com/pt/users/darkmoonart_de-1664300/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4230648">DarkmoonArt_de</a> by <a href="https://pixabay.com/pt/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4230648">Pixabay</a>
Daily Challenge #311 - Connect the Letters
Tags: challenge
Published: 2021-01-22 20:59:58

---
title: Daily Challenge #311 - Connect the Letters
published: true
series: Daily Challenge 
description: Create a method to connect letters without intersecting them.
tags: #challenge
//cover_image: https://direct_url_to_image.jpg
---
Write a function which accepts a string consisting only of A, B, X and Y, and returns a maximum number of possible pairwise connection that can be made.

Here's the catch -- you need to follow the rules below: 
- You can connect A with B or B with A or X with Y or Y with X.
- Each letter can participate in such connection only once.
- Connections must all be done in the same direction. 
- Connections must not intersect.

###Example
```
B X A B A Y B A
  | |_|   | |_|
  |_______|
```
No matter how you connect A to B and X to Y (without intersecting), you will only be able to make three connections in this example, so the answer for `connect(BXABAYBA)` is `3`. 

###Tests
connect("BXABAYBA")
connect("AAAAAAAA")
connect("ABABABAB")
connect("BABBYYAYAAB")

***
This [challenge](https://www.codewars.com/kata/58f5f479bc60c6898d00009e) comes from smiks on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!

Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!
Recovering OSX disk space
Tags: osx, brew, docker
Published: 2021-01-23 14:15:34

**Warning**: Be careful about these commands, before applying these, remember, you are deleting files and data. Be aware of what are you deleting. You could lose data forever.
 
I wrote this post because when you are developing you depend on tools, dependencies, docker images, etc. And in some moment your disk is full.

Using the next commands you can recover some disk space used.

Recover some disk space used by:

### Brew

```
brew cleanup
```

### Docker

If you are using docker, check docker's directory

    du --max-depth=1 -h ~/Library/Containers/com.docker.docker/Data

If it is using too much space you could apply a prune. Remember this command will delete docker's images and volumes.

If you have important data, back up it before.

```
docker system prune -a --volumes
```

### Cache directories

Check your Cache directory and delete some of the directories that use more disk space (in my case those were Spotify, pip, and Cypress).

```
du --max-depth=1 -h ~/Library/Caches/ | sort -hk1
```


I hope that these commands could be useful for recovering some space on your disk.

Do you have other tips to recover disk space on OSX? please add those in the commentaries.
10 Icon Sets To Make Your Project Look Great
Tags: webdev, programming, design, showdev
Published: 2021-01-23 14:10:56

Design plays an important role when it comes to branding your product. And one of the main aspects of a good design is a well-chosen icon set.

A good icon set transmits the message your product is conveying: it can be slim, bold, quirky, you name it. It all tells the user that your brand is classy, techie, casual and so on.

Thankfully, options are vast, with many projects out there providing well-designed and beautiful icon sets.

*Shameless plug*: that's why I created [Dev Resources](https://devresourc.es), to keep all the good things I found in the last years, including the ones mentioned in this article, in one place. No more forgetting or messy bookmarks.

Without further ado, let's talk about 10 icon sets to make your project look great.

---

# Icons8

Get free icons for graphic design, UI, social media, and mobile. Search for static and animated icons with consistent quality. PNG, SVG, GIF, AE formats.

🔗 https://icons8.com

# Font Awesome

The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.

🔗 https://fontawesome.com

# Flaticon

Download all icons in SVG, PSD, PNG, EPS format or as webfonts.

🔗 https://www.flaticon.com

# Material Design

Get Material Icons to make your project look great.

🔗 https://material.io/resources/icons

# iconmonstr

Free simple icons for your next project.

🔗 https://iconmonstr.com

# Orion

The best Icon Tool. 8613 Free SVG & PNG Icons. Search, organize, edit and download our highly flexible Icons.

🔗 https://orioniconlibrary.com

# Smashicons

Download the world's largest and most complete icon set. Smashicons includes over 335,975 icons for Designers and Developers.

🔗 https://smashicons.com

# Smplkit

An open source, do-whatever-you-want icon font to use in your projects.

🔗 https://www.smplkit.com

# Heroicons

Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS.

🔗 https://heroicons.com

# Simple Icons

1493 Free SVG icons for popular brands.

🔗 http://simpleicons.org

---

# **Bonus:** Dev Resources

As I mentioned at the beginning of this article, Dev Resources is a compilation of all resources you might need as a developer. You can find all the resources above and a lot more.

No more forgetting or messy bookmarks.

🔗 https://devresourc.es

---

I hope you enjoy this list and that it helps you with your developer journey.

And if you want to connect with me, you can find me on Twitter as [@marcelcruz](https://twitter.com/marcelcruz).

Happy coding!