teleren/devto huggingface dataset:
Integrated Build to test, build gradle, automate labels, and much more in single Workflow for Android
Tags: actionshackathon, github, codenewbie, android
Published: 2020-08-15 15:14:28

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow - Custom Android CI with Gradle 
I am a newbie ,to GitHub really fascinated with the Communities present on GitHub and how they works, who likes to contribute on OSS.
So this was my first try to GITHUB ACTIONS.I thought of the tasks which can be automated using the Actions, The options provided were really cool to automate the stuff on a repo.So firstly I added the test,and gradle build with changes integrated in continuation(CI-continuous integration),committed it 
### Hurray!!! Build Successful
I got quite excited with it. As I tried Integrating the Travis CI integration but somehow required a heck lot of time for setting up the integration(I was new to it).
Later, when my first small Pull request got Merged in `google/docsy` one of its maintainer commented "Nice,Thanks" ,It gave me a crazy dopamine boost.
In short, that comment made me move more towards the OSS contribution.So, I decided to add the automated the First PR message for First Commits.

When I was checking repos I saw the labels added on them. Those have made me understand the basic purpose of the PR at just a glance towards it.This was the reason I add the automated labels in the workflow.
So, this was the first workflow Created by me using Custom GitHub actions.

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

# Custom Android CI with Gradle build 
- Integrated Build to test
- build gradle 
- automate labels 
- Greet the First PR Workflow 
- Broken link checker
- Add new contributors directly into the README with their images 
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)


### Submission Category: `Maintainer Must-Haves`, `Wacky Wildcards`

- This will Surely help maintainers to check automated tests,
- gradle build,
- Check First PR and appriciate them,
- automate labels on the PR
- checks Broken links in README file 
- Add new contributors directly into the README

### [android_custom.yml](https://github.com/atharwa-24/VIT_Pune_Events/blob/master/.github/workflows/android_custom.yml)

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)

### Additional Resources / Info:
# Project That uses the workflow:
{% github https://github.com/atharwa-24/VIT_Pune_Events %}



# License:
[MIT License](https://github.com/atharwa-24/VIT_Pune_Events/blob/master/LICENSE)

# Follow:
[GitHub](https://github.com/atharwa-24)
[Dev](https://dev.to/atharwa24)
[Instagram](https://www.instagram.com/atharwa_24)
[Twitter](https://twitter.com/kharkar_atharwa)
[LinkedIn](https://www.linkedin.com/in/atharwa-kharkar-a5351a165/)
Thanos Snap your repo
Tags: actionshackathon, github, opensource, showdev
Published: 2020-08-15 15:06:43

---
title: Thanos Snap your repo
published: true
description: My submission to the GitHub Actions x DEV Hackathon!
tags: actionshackathon, github, opensource, showdev
cover_image: https://camo.githubusercontent.com/78ed03403cfddbefbf2684a83a97fb33c77b9069/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f4c4f6f614a326c62716d6475784f615a70532f67697068792e676966
---

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)

A Github Action to restore the perfect balance to your projects. 


### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)
Wacky Wildcards

### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
{% github stanleynguyen/thanos %}

### Additional Resources / Info

https://github.com/stanleynguyen/thanos-demo
Semicolons in Python?!
Tags: todayilearned, python
Published: 2020-08-15 15:06:18

---
title: Semicolons in Python?!
tags: 
published: true
cover_image: http://res.cloudinary.com/muhimen/image/upload/v1597503869/POST_36_COVER.png
---

I have been coding in Python for roughly about 2 year. And today, I just found out YOU CAN USE SEMICOLONS IN PYTHON!! Isn't that a cool feature? I have never thought using them before.

So, what does semicolons(;) do in Python? Nothing. Uses of semicolons in Python is same as you would use in JavaScript. Python won't throw any syntax error if your "pinky" presses the <kbd>;</kbd> button by mistake. It doesn't matter if you put a semicolon at the end of the statement or not, Python will ignore it, and simply execute the script. Here is a simple example of it.

```python
for i in range(50):
    print(i);
```

## But why should you use semicolons?
Well, there is no reason to use semicolons in Python. Semicolon was introduced in Python to help other people migrating from someother programming languages that requires a semicolon at the end of the statements. It's not a good practice to use it in Python.
Initial Server Setup - Django Deploy
Tags: django, nginx, python
Published: 2020-08-15 14:41:50

Original Post - https://www.codingpaths.com/django/initial-server-setup/

# Initial Server Setup

In this blog, we will be going through initial server setup on Centos7. This is generally recommended before diving straight into production. Centos is an open source Linux distribution under RHEL(Red Hat Enterprise Linux). The reason why Centos is preferred over Ubuntu is because of its stability. Its updates can take about more than 7-8 years to come.

## 1. Configuring Centos 7

After purchasing a server, login into it using the ssh command in the terminal. Remember to use your public ip and the password given by the administrator.

```bash
ssh root@your_ip_here
```

If you are getting a warning like “LC_CTYPE: cannot change locale (UTF-8): No such file or directory”, then enter the following command in your local terminal by logging out. The LC variables determine the language of encoding the characters. So, we need to export this variable.

```bash
logout
export LC_ALL="en_US.UTF-8"
ssh root@your_ip_here
```

### Updating centos

```bash
sudo yum update
sudo yum upgrade
```

### Setting up hostname

```bash
hostnamectl set-hostname centos-server
hostname # to check the hostname
```

### Setting up hostname in the hosts file

```bash
sudo nano /etc/hosts
```

Add your ip followed by tab and then type centos-server which is the hostname. Then hit CTRL+x to exit and enter to save the changes.

## 2. Adding a new user

Root has the most privileges in the OS. It can be destructive to operate the server under root user. To limit the scope, we will be creating a new user. In future, if any need arises, we will change the permissions for this user.

```bash
adduser user_name
passwd user_name #setting up password for new user
gpasswd -a user_name wheel #adding sudo privileges
logout
```

## 3. Securing the server

There are bots all around trying to find vulnerabilities in the servers. Till now, we have used password based authentication which is highly exploitable. These bots try brute force attacks to enter our server. So to fix this, we will disable password based authentication and setup ssh keys. These ssh keys will be stored in the local machine and the server. After this whenever we try to ssh into our server, it will analyse the keys and give access. So, setting up ssh keys for authentication in the local machine in home directory. Hit enter for default actions –

```bash
ssh-keygen -t rsa #generating keys
ssh-copy-id user_name@your_ip_here #coping the keys to the server
logout
```

Now you can ssh login without password for the new user –

```bash
ssh user_name@your_ip_here
```

Change configuration in `/etc/ssh/sshd_config`, thereby making our server more secure –

```none
PermitRootLogin no
PasswordAuthentication no
```

```bash
sudo nano /etc/ssh/sshd_config
sudo systemctl restart sshd
```

Up next – [Deploy Django Applications on Centos](https://dev.to/sayam753/deploy-django-4k0d)
Thanks for reading!
Blsog to FOLLOW
Published: 2020-08-15 14:35:02

Just great Blogs to check out and follow, they are constantly updated and will keep you with the latest material. These one are my personal favorites.
Ray Wenderlich
CSS-Tricks
The Crazy Programmer
My Programming Blog (MPB)
David Walsh Blog
Coding Horror
Zero To Mastery
W3Schools
NSHipster
CodeSnail
Scotch
Over Reacted
Site Point
Medium
Stack Abuse
Scott Hanselman's Blog
Coding Alpha
Programming | Reddit
Co Drops
CSS Custom Properties (Variables)
Tags: html, css, javascript
Published: 2020-08-15 14:20:45

CSS Custom Properties or CSS variables allow us to declare variables in our CSS files and use them inside our scope of choice. In this post I will go over some basic use cases for CSS custom properties and finish with an example that combines CSS custom properties and HTML custom attributes.

### Declare

A CSS variable is made out of a property name and value:

```css
:root{
  --primary-color: dodgerblue;
}
```

Be sure to use the  `--`  prefix before the property name.

### Scope

Declaring CSS custom properties on the pseudo  `:root`  class is considered a best practice. But you can also declare and use custom properties inside an element of your choice:

```css
:root {
  --gallery-grid-columns: 3;
  --gallery-grid-gap: 15px;
}

.container {
  --primary-color: dodgerblue;
}
```

### The  `var()`  Function

In order to use a CSS custom property we have to use the CSS  `var()`  function:

```css
:root {
  --gallery-grid-columns: 3;
  --gallery-grid-gap: 15px;
}

#gallery-container {
  margin: auto;
  display: grid;
  grid-template-columns: repeat(var(--gallery-grid-columns), 1fr);
  grid-gap: var(--gallery-grid-gap);
  padding: 15px;
}

.container {
  --primary-color: dodgerblue;
}

.container p {
  color: var(--primary-color);
}
```
✍ More posts about HTML, CSS, JS and more  on my blog:
[https://yossiabramov.com/](https://yossiabramov.com/)
[Tutorial Linux] Terminal: Corrigindo pacotes quebrados
Tags: linux, terminal, fix, womakerscode
Published: 2020-08-15 14:07:26

No terminal digite:

```
$ sudo apt install -f
```

- **$** indica que você deve usar o **usuário comum** para fazer essa operação.

- **sudo** serve para pedir permissões de administrador temporariamente.

- **apt** do inglês, *Advanced Package Tool*, em português, Ferramenta de Empacotamento Avançada; é a ferramenta que nos ajuda na instalação, atualização e desinstalação de programas, entre outras funções.

- **install** é o comando de instalar, indicando ao apt o que fazer.

- **-f** do inglês, *fix*, para arrumar os pacotes que estão quebrados.

Caso haja algo que precise de reparo, será mostrado na tela, pedindo a confirmação do usuário.
I'm Live on Twitch building a Discord bot!
Tags: discord, twitch, livecoding, javascript
Published: 2020-08-15 13:53:41

---
title: I'm Live on Twitch building a Discord bot!
published: true
description: 
tags: discord, twitch, livecoding, javascript
//cover_image: https://direct_url_to_image.jpg
---
# Hi All!
I'm going live over at [Twitch](https://twitch.tv/iamflowz) working on a discord bot called HelpMeLFG. I'm building it with discord.js
How to build a blog with Gatsby and AWS - Part 2
Tags: aws, gatsby, webdev
Published: 2020-08-15 13:52:56

Hello everyone, this is the second part of the 'Build A Blog with Gatsby and AWS' where we publish our blog so that it's publically accessible. Sounds cool eh! Let's jump right in!

## Demo 📑
Here is the link to the project that we will end up with: [https://gatsby-starter-julia.netlify.app/](https://gatsby-starter-julia.netlify.app/)

## Video

{% youtube 9yeiu8eKZck %}

Hope you guys liked it! 
Subscribe to my [YT channel](https://www.youtube.com/c/rishabkumar7) | Follow me on [Twitter](https://twitter.com/rishabk7)
Daily Challenge #282 - Car License Plate Calculator
Tags: challenge
Published: 2020-08-15 13:52:32

---
title: Daily Challenge #282 - Car License Plate Calculator
published: true
series: Daily Challenge
description: The car registering system of a city N assigns license plates to all drivers. Help them figure out how to do it!
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---
The car registering system of a city assigns two types of numbers:

The Customer ID - it's a natural number between 0 and 17558423 inclusively, which is assigned to the car buyers in the following order: the first customer receives ID 0, the second customer receives ID 1, the third customer receives ID 2, and so on.

Number Plate - assigned to the car and contains the series ( three Latin letters from ‘a’ to ‘z’) and the serial number (three digits from 0 to 9).
Example: aaa001. Each Number Plate is related to the given Customer ID. For example: Number Plate `aaa000` is related to Customer ID 0; Number Plate `aaa001` is related to Customer ID 1, and so on.

Write a function `findPlate` which takes the Customer ID as an argument, calculates the Number Plate corresponding to this ID and returns it as a string, considering the following:

The serial numbers start at 001, end at 999.

The series change once the serial number hits 999. The left letter changes first, alphabetically:
```
aaa001...aaa999, 
baa001...baa999,
...... , 
zaa001...zaa999
```
As soon as the left letter reaches z and the series z** has moved through all the serial numbers the middle letter changes alphabetically as follows:
```
aba001...aba999, 
bba001... bba999, 
cba001...cba999, 
......, 
zba001...zba999, 
aca001...aca999, 
bca001...bca999,
```

As soon as the middle letter and the left letter both reaches z and the series zz* has moved through all its serial numbers, the right letter changes alphabetically as follows:
```
aab001...aab999, 
bab001...bab999, 
cab001...cab999, 
......, 
zab001...zab999, 
abb001...abb999, 
bbb001...bbb999, 
cbb001...cbb999, 
......,
zbb001...zbb999, 
acb001...acb999, 
......, 
zzz001...zzz999
```
When all the possible series and their serial numbers are exhausted the last Number Plate will be zzz999.

**Notes:**
- No spaces are allowed between the characters in the returned string. So 'abc123' is valid, but 'a b c 1 2 3' is not.
- If the serial number has less than 3 digits, the missing places should be filled with zeroes.
Example: serial number '12' should equal '012'; serial number '4' should equal '004'.
Customer IDs starts with 0.

###Tests
findPlate(3)
findPlate(1487)
findplate(17558423)
findPlate(234567)

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5f25f475420f1b002412bb1f) comes from William_2004 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Add Developer Quotes to your GitHub Profile Readme
Tags: showdev, serverless, github, node
Published: 2020-08-15 13:41:47

Hi 🖐,
Recently, GitHub launched Profile ReadMe and everyone started making their unique Profile Readme.

Developers made some cool tools to decorate their Profile READMEs. So after taking some inspiration from [Anurag Hazra's](https://github.com/anuraghazra) [GitHub Readme Stats](https://github.com/anuraghazra/github-readme-stats), I too built something.

## GitHub Readme Quotes
{% github piyushsuthar/github-readme-quotes %}Do star ⭐ the repo 😁

## Usage
You may just copy-paste the markdown below,
```md
[![Readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)
```
You may have noticed only a single parameter in the URL, type. I will be adding more options soon.

| Options 	| default    	| Available            	|
|---------	|------------	|----------------------	|
| type    	| vertical 	| horizontal, vertical 	|

## Preview
#### Vertical (Default)
>You don't need to add _?type=vertical_ to the URL.
```md
[![Readme Quotes](https://quotes-github-readme.vercel.app/api)](https://github.com/piyushsuthar/github-readme-quotes)
```
![Vertical Github Readme Quotes](https://dev-to-uploads.s3.amazonaws.com/i/kxofj7bwzn28h2d4v5ai.png)

#### Horizontal
>You need to add _?type=horizontal_ to the URL.
```md
[![Readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)
```
![Horizontal Readme Quotes](https://dev-to-uploads.s3.amazonaws.com/i/qiv04q9a2wfqjkq7rb18.png)

## Customization
No options for customization yet, but will be there soon. If you wish to contribute, I'll be very happy.

## Extra

![PiyushSuthar's GitHub Profle](https://dev-to-uploads.s3.amazonaws.com/i/mjjl9b531tjzcdjx8dlk.png)

Some extra stuff to help you make an awesome GitHub Profile Readme.

Curated [list of GitHub READMEs and Tools](https://github.com/abhisheknaiidu/awesome-github-profile-readme) by [Abhishek Naidu](https://github.com/abhisheknaiidu)
{% github abhisheknaiidu/awesome-github-profile-readme no-readme %}

[GitHub Readme Stats](https://github.com/anuraghazra/github-readme-stats) by [Anurag Hazra](https://github.com/anuraghazra)
{% github anuraghazra/github-readme-stats no-readme %}

## In the end,
I would like to thank you for reading this article. Your Contribution to the project is appreciated. Do follow me on [GitHub](https://github.com/piyushsuthar) and [Twitter](https://twitter.com/piyushsthr)
How to create simple component in React
Tags: react, component, beginners
Published: 2020-08-15 13:38:50

React is a javascript library which makes it easy to create an awesome ui.

Component is a basic building block of a every react project. Let's understand how we can create a simple hello world component in react.

###Component can be created in two ways in react.
1. Functional component
2. Class component

Let's first understand how to create a component using class.

#### Class component

* Every react component start with simple import statement.
```
Import React from react
```

* We have to create a class and have to extends React.component into it.
```
class HelloWorld extends React.component {

}
```

**Note:** First letter of the component in react should be capital letter.

* We have to implement render function to render ui into Dom(document object model).
```
render() {
  return <h1>Hello world</h1>;
}
```
* To render a component in dom we have to import `react-dom`
```
import ReactDOM from 'react-dom'
```
* Complete code:
```
Import React from 'react';
import ReactDOM from 'react-dom';

class HelloWorld extends React.component {
 render() {
  return <h1>Hello world</h1>;
 }
}
ReactDOM.render(<HelloWorld />, document.getElementById("root"));
```

#### Functional component

* Every react component start with simple import statement.
```
Import React from react
```

* We have to create a function
```
function HelloWorld {

}
```
* We have to return from the function to render ui into Dom(document object model).
```
return <h1>Hello world</h1>;
```
* To render a component in dom we have to import `react-dom`
```
import ReactDOM from 'react-dom'
```
* Complete code:
```
Import React from 'react';
import ReactDOM from 'react-dom';

class HelloWorld {
  return <h1>Hello world</h1>;
}
ReactDOM.render(<HelloWorld />, document.getElementById("root"));
```
Hope this will be helpful for all of you.
Keep Learning.
Confusion Matrix
Tags: datascience, machinelearning, statistics, probability
Published: 2020-08-15 13:28:31

Today we are going to discuss some of the metrics in classification.

Let us first look at the confusion matrix.

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

The Accuracy is calculated as:-

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

The False Positive rate is calculated as given:-

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

Here;
>
TP:- True Positive
TN:- True Negative
FP:- False Positive
FN:- False Negative

Consider a dataset with 1000 records of people who smoke and who do not smoke, which has the output as a binary classification. i.e., yes or no.

If the record has around 500 yes, 500 no or 600 yes, 400 no, we can consider it as a balanced dataset. But consider we have around 900 people who are smokers i.e., yes and only 100 people who are non-smokers i.e., no. It is a completely imbalanced dataset and predicted accuracy won't be matching with the actual value.

Due to this imbalanced dataset, the ML algorithms will become biased. In this case, we go for the usage of recall, precision and F-Beta to predict the accuracy.

Let us look what is precision, recall and F-Beta score now.

### **Precision**:-
Precision refers to the percentage of results which are relevant. In simpler words, it tells us, "out of the outputs which were predicted as positive, how many were actually positive."

A real case scenario where precision can be used is when a patient who does not have a disease is predicted as an infected person (i.e., False Positive value). Hence, in this case, our aim should be to minimize the value of FP. So, we use precision when False Positive value is important for our analysis.

### **Recall**:-
Recall refers to the percentage of total relevant results which were correctly classified by our algorithm. That is, out of the total positive values, how many were predicted as positive.

An example of this is when an infected person's test result is negative, which can lead to harmful consequences in a real-world scenario. Thus, here the False Negative value holds higher prominence and we should try to decrease this value. So we use recall when we have FN value as important.

### **F-Beta Score**:-
Given below is the formula to calculate the F-Beta score.

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


Here the β value is selected based on whether the False Positive or False Negative value plays a major role in our data. If both are equally important, we consider β as 1.

If False Positive value has greater importance, β value is selected between 0 to 1 and if False Negative value has a greater importance β value ranges from 1 to 10.

The F-Beta score reaches its optimum value when β=1 and hence we generally hear people refer to it as F1-score instead of F-Beta score.

Feel free to give your feedback on what topics you want in the upcoming posts. Please do share if you liked this post.
Using Vim for Go Development
Tags: go, vim, ides
Published: 2020-08-15 13:23:44

As a programmer, you spend a lot of time using text editors, IDEs, etc to code. So it is important what and how you use it. I recently moved to Vim for Go development and I am totally loving it. Initially, I was using VSCode with Go extension and after that, I used GoLand for a while. [Visual Studio Code](https://github.com/microsoft/vscode) and [GoLand](https://www.jetbrains.com/go/) both are totally awesome, I loved using them too. It definitely takes some time to learn using vim but it is worth the learning. It is totally up to you what works better for you. Do not use vim just because others are using it. I am very much a beginner to vim and things I am going to explain in this is what I learned after I started using it. I would be really glad if you are a long time Vim user and have some good advice/suggestions. You can put them in the comment section of this post. If you are a beginner, I will put some good resources for learning vim at the bottom of this post.

**NOTE**: This post is originally posted on [https://jogendra.dev](https://jogendra.dev/using-vim-for-go-development).

Read Full Blog here: [https://jogendra.dev/using-vim-for-go-development](https://jogendra.dev/using-vim-for-go-development)