teleren/devto huggingface dataset:
🤔Emoji Commit Save's Time
Tags: git, programming, versioning, documenting
Published: 2021-10-23 14:28:33

For Programmer🧑‍💻 Committing message💬 are most irritating😫 and thinking🤔 for good✨ commit message💬 is like dodo🦤 bird.

[Emoji](https://search-emoji-react.vercel.app/) make it look👀 easy and having a quick look👀 over commit message💬 is enough for knowing what kind of changes has been done✔️.

###Format for using Commit with emoji's :
Emoji followed by message💬 where message💬 should contain at least two2️⃣ parts explaining what❓ and why:interrobang: of code like `😉 Add Emoji Commit`, While telling🗣️ how is super🦸 cool like `😎 Add sum(a, b) where a and b are integer and method return addition of a and b in integer type` or `🆒 Add sum(int, int)int method sum return addition of two integers`.

### How to get emoji
- **Windows** <kbd>Win</kbd>+<kbd>.</kbd> 
- **MacOS** <kbd>ctrl</kbd>+<kbd>⌘</kbd>+<kbd>space</kbd>
-  [Emoji Search](https://search-emoji-react.vercel.app/)

### If you agree with me
If you👉 agree with me🙂 , then only task✔️ is to choose a emoji for commit . And this more hard🪨 than finding🔎 dinosaur's🦖.


## Emoji Commit Guide
Commit Type | Emoji's | Example
------------|-------|--------
Initial Commit | 🎉 `:tada:` | :tada: Initial Commit
Configure | ⚙ `:gear:` | :gear: Config path
Add | ⚽`:soccer:` ⚾`:baseball:` 🥎`:softball:` 🏀`:softball:` 🏐`:softball:` 🏈`:softball:` 🏉`:rugby_football:` 🎾`:tennis:` 🎳`:bowling:` 🏏`:cricket_game:` 🏑`:field_hockey:` 🥍`:lacrosse:` 🏓`:ping_pong:` 🎱`:8ball:` 🥌`:curling_stone:` ⛳`:golf:` 🎿`:ski:` 🛶`:canoe:` ⛸️`:ice_skate:` 🛷`:sled:` 🥏`:tennis:` 🏸`:badminton:` 🪁`:kite:` 🥊`:boxing_glove:` 🏒`:ice_hockey:` 🛼`:roller_skate:` 🛹`:skateboard:` **be creative** | :game_die: Add Random() for generating random float value
Refactor |♻️`:recycle:`| :recycle: Refactor variable x for readability
Update |🆙`:up:` ⏫`:arrow_double_up:` 🔺`:small_red_triangle:`| :arrow_double_up: Update reverse() to reverseFirstTen()
Remove |🗑️`:wastebasket:` 🚮`:put_litter_in_its_place:` 💢`:anger:` 🕳️ `:hole:`| :put_litter_in_its_place: Remove deprecated methods
Release |🟢`:green_circle:` 💚`:green_heart:` 🍏`:green_apple:`| :green_heart: Release version 7.6.8
Merge |💕`:two_hearts:` 👬`:men_holding_hands:` 👭`:two_women_holding_hands:` 👩‍❤️‍👩`:couple_with_heart_woman_woman:`| :two_women_holding_hands: Merge feature/side-panel with feature/footer
Testing | ✅`:white_check_mark:` ☑️`:ballot_box_with_check:` ✔️`:heavy_check_mark:` 🧪`:test_tube:` | :test_tube: Test TestRandom() covering set of test cases
Docker |🐋`:whale2:` 🐳`:whale:` | :whale: Dockerfile FROM alpine
Package | 📦 `:package:` | :package: Include npm module for uuid
Revert | 🔙 `:back:` | :back: Revert for adding new feature
Bug Fix | 🐛`:bug: ` 🐞`:beetle:` 🛠️`:hammer_and_wrench:` 🔨`:hammer:` ⛏️`:pick:` | :hammer_and_wrench: Fix variable x size overflow
Comment | 📚`:books:` 💬`:message:` 📝`:memo:` | :books: Documentation Random function


Its all about our Imagination, while sticking with few Emoji and using same emoji for specific action gives a visual understanding and thanks for reading to the end.
How to find OSS projects for your first contribution
Tags: opensource, beginners, challenge, github
Published: 2021-10-23 15:07:04

Contributing to OSS projects is a great activity to improve your programming skill, but you might have no idea which projects you can contribute.

On Github, there is a label `good first issues` for issues that are easy to start contributing for the first time.

I found a few websites that summarize these issues, so let me introduce them to help you make your first contribution.

---

## :star: Recommend #1

https://good-first-issues.page

- Easy to use
- Many selectable languages

---

## :star: Recommend #2

https://goodfirstissue.dev

- Easy to use
- Design is good

---

## :star: Recommend #3

http://github-help-wanted.com

- Summarize issues with `help wanted`
- Searching by other labels is also possible

---

That's it!
Hope you can find good projects to make your great contribution!
Can Robots also do Teamwork with Humans ?
Published: 2021-10-23 14:33:28

As human interaction with robots and artificial intelligence increases exponentially in areas like healthcare, manufacturing, transportation, space exploration, defence technologies, information about how humans and autonomous systems i.e robots work within teams remains scarce.

Recent findings from research demonstrate that human-autonomy teaming comes with interaction limitations that can leave these teams less efficient than all-human teams.

Existing knowledge about teamwork primarily is based on human-to-human or human-to-automation interaction, which positions humans as supervisors of automated partners.

But as autonomy has increasingly developed decision-making skills based on spontaneous situation assessments, it can become a teammate rather than a servant. These shared decision interactions are identified as human-autonomy teaming, or HAT.

Nancy Cooke a cognitive psychologist and professor of human systems engineering at Arizona State University (ASU). She explored how an artificial intelligence agent can contribute to team communications failure, and how it can improve those interactions, in her discussion at the annual meeting of the American Association for the Advancement of Science (AAAS).

"One of the key aspects of being on a team is interacting with team members, and a lot of that on human teams happens by communicating in natural language, which is a bit of a sticking point for AI and robots," Cooke said.

Her discussion addressed a study in which teams of two humans and an AI, or "synthetic teammate," fly an unmanned aerial vehicle (UAV). The AI was the pilot, while the people served as a sensor operator and navigator.

The AI, developed by the Air Force Research Laboratory, communicated with the people via text chat.

"The team could function pretty well with the agent as long as nothing went wrong. As soon as things get tough or the team has to be a little adaptive, things start falling apart, because the agent isn't a very good team member."

The AI was unable to anticipate its teammates' needs the way humans do. As a result, it didn't provide critical information until asked—it doesn't give a "heads up."

"The whole team kind of fell apart," Cooke said. "The humans would say, 'OK, you aren't going to give me any information proactively, I'm not going to give you any either.' It's everybody for themselves."

This was what Professor Cookie said and she made a bit clear that Robots can be a Ideal Teammate unless and until a long breaking mishaps occur.

And even I do think Robots can be Good Team Partner supposingly we give instructions and calibrate them perfectly.

What you people think ? Do let me know in the Comment Section.

Till then,
Happy Learning !!!
3 Different Approaches for Train/Test Splitting of a Pandas Dataframe
Tags: python, programming, machinelearning, ai
Published: 2021-10-23 14:32:24

Usually, the Train/Test Splitting process is one of the Machine Learning tasks taken for granted. In fact, data scientists focus more on Data Preprocessing or Feature Engineering, delegating the process of dividing the dataset into a line of code.

In this short article, I describe three train/test splitting techniques, exploiting three different Python libraries:
* `scikit-learn`
* `pandas`
* `numPy`

In this tutorial, I assume that the whole dataset is available as a CSV file, which is loaded as a Pandas Dataframe. I consider the heart.csv dataset, which has 303 rows and 14 columns:

```
import pandas as pd
df = pd.read_csv('source/heart.csv')
```

The output column corresponds to the target column and all the remaining ones correspond to the input features:

```
Y_col = 'output'
X_cols = df.loc[:, df.columns != Y_col].columns
```

# 1 Scikit-learn
Scikit-learn provides a function, named `train_test_split()`, which automatically splits a dataset into a training and test set. As input parameters of the function either lists or Pandas Dataframes can be passed.
```
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(df[X_cols], df[Y_col],test_size=0.2, random_state=42)
```

Other input parameters include:
* `test_size`: the proportion of the dataset to be included in the test dataset.
* `random_state`: the seed number to be passed to the shuffle operation, thus making the experiment reproducible.

The original dataset contains 303 records, the `train_test_split()` function with `test_size=0.20` assigns 242 records to the training set and 61 to the test set.

# 2 Pandas
Pandas provide a Dataframe function, named `sample()`, which can be used to split a Dataframe into train and test sets. The function receives as input the frac parameter, which corresponds to the proportion of the dataset to be included in the result. Similarly to the scikit-learn `train_test_split()`, also the `sample()` function provides the random_state input parameter.

Continue Reading on [Towards AI](https://pub.towardsai.net/3-different-approaches-for-train-test-splitting-of-a-pandas-dataframe-d5e544a5316)
Is it easy to learn Python?
Tags: python, programming, datascience, node
Published: 2021-10-23 13:54:27

It is not easy to start programming in Python, but it is worth the effort. Some people say that Python is easier to learn than other programming languages because it has less syntactic distinctions.

You can compare Python with other programming languages, but the readability of its code makes it easier for beginners to start their journey in coding. It also has a well-documented syntax that makes it easier for learners to understand the language.You can start learning python from [Pythonscholar.com](https://pythonscholar.com) they explain each topic with multiple examples.

Python is one of the most popular programming languages that can be learnt by anyone. It is especially popular for scientific computing and data science due to its simplicity.

Python was created in 1991 by Guido von Rossum. It has an easy syntax with which you can write up to 100 lines of code without needing to use curly brackets {} at the end of each line.For more dept about python history you guys can refer this artical in [what is python](https://pythonscholar.com/python-programming/what-is-python/).

The environment for Python is cross-platform, so if you are working on Linux or Windows, you will find Python coding very similar to what you are used to. The downside is that it takes longer than other languages like C++ or Java, but once you learn it, Python will become your favorite language because it's flexible and able to solve many problems that many other languages cannot.

—

Python is a very powerful and popular programming language. It is used in websites, games, and even the International Space Station!

Python is easy to learn for beginners because it has a simple syntax and gets rid of the need for semicolons. Python also doesn't require any import statements when writing programs.
MDN "marking up a letter" project... review and write your opinion :)
Tags: webdev, beginners, html, discuss
Published: 2021-10-23 13:46:32

Just started to learn HTML on MDN website, I did  my first assessment... I would like to hear what you think about my code. Any suggestion and advice are good. Thanks in a advance.
Link to a codePen:
{% codepen https://codepen.io/sasa95/pen/OJjWboM %}
Link to a assessment on MDN website:
https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Marking_up_a_letter
Queueing up Laravel Fortify email verification for better performance
Tags: laravel, php
Published: 2021-10-23 13:41:38

After a long break from laravel (last time I used it was around version 5.7), I recently got back into because of more free time. 

I noticed there was a relatively new package called Fortify which allows you to scaffold the authentication process, it seemed pretty useful; however after diving deep into it, I realized that after registering a new user and sending an email verification there would be blocking request for a few seconds so it was obvious to me that the email verification was in fact not being queued.

#Queuing up the email verification

I'm gonna start with a clean laravel 8 project and add fortify to it

#### Installing fortify

`composer require laravel/fortify`


#### Overriding the email verification notification and making it a job that we can queue

If we go into the user model there's a method called `sendEmailVerificationNotification()` which we can actually override to modify how fortify sends the email verification notification.

In order to override we first have to make a new notification that will implement the `ShouldQueue` Interface, and extend the `VerifyEmail` notification that is provided by Fortify.

#### Creating the notification and modifying it to our needs

To create a new notification we can just use laravel's built in php artisan helper.

`php artisan make:notification VerifyEmailQueued`

After creating the notification we should make it extend `VerifyEmail` and implement the `ShouldQueue`.

The notification class should look like this:
`VerifyEmailQueued.php`
```
<?php

namespace App\Notifications;

use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class VerifyEmailQueued extends VerifyEmail implements ShouldQueue
{
    use Queueable;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }


    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }
}

``` 

#### Overriding the `sendEmailVerificationNotification()` in the User model

Now there's one more thing left to do and it's overriding the `sendEmailVerificationNotification()` method in the User model

Go to `User.php` and add the following method:
```
public function sendEmailVerificationNotification()
    {
        $this->notify(new VerifyEmailQueued);
    }
```

Now there's one more thing left to do and it's running the artisan command to listen for jobs and queue them up.

`php artisan queue:work`

If everything is working correctly you should see that the VerifyEmailQueued notification should be processed and an email should be sent to the User. It will look something like this in the terminal:
[Terminal image](https://ibb.co/vPhbMz0)
ElixirConf 2021 - Chris McCord - The Future of Full-stack - Summarize
Tags: elixir, phoenix, javascript, webdev
Published: 2021-10-23 13:34:38

{% youtube Of1phFsC4ZI %}

A quick summarize of Chris McCord video of the future of full stack.

Based on this video, I just do a quick summarized of all the things that Chris McCord is talking about, hopefully not missing anything. Feel free to comment below if you do find it. 

# Table of contents with timestamps

* 4:48 New changes for Phoenix
* 12:00 Allow hooks for LiveView lifecycle
* 16:08 HEEx ( previously Surface UI )
* 21:32 Current problem with LiveComponent, how HEEx solves that
* 28:35 Component slots
* 33:31 Capture phx events using JS module
* 42:14 Event for live_patch
* 51:00 LiveView roadmap
* 55:03 Influence by LiveView, aka LiveApps
* 1:01:00 Conclusion

# LiveView changes, merging changes from Heex

- Allow function to be `on_mount` hooks on LiveView lifecycle, essentially bringing React hooks kind of feature to LiveView

- Allow direct attributes without the needs for eex template string in component attribute. So before is like:
```
<input id="<%= @id =>" required="<%= @required %>" />
```
Now:
```
<input id={@id} required={@required} />
```
Really similar to JS. If you take a look at [Heex documentation page](https://surface-ui.org/template_syntax), you can take a closer look at these examples. 

With Heex:
- LiveComponent shorthand using `.`
- Slots using `:`
- `let` keyword allow for passing down parameter in form
- Using JS.dispatch to allow binding of phx- prefix event to use the events without the need for Alpine related syntax. These events are also DOM-patch aware. 
- The JS.dispatch are actually an Elixir way to declare event and event chaining which eventually compiled into JS.
- This allow for event phx-event capture and the control of how the front end is being patched on the client side.

LiveView roadmap:
- Declarative assigns
- Intelligent collections
- Unified LiveView/component messaging
- Stashed transport data
- Re-imagined form API
Click to copy post url in @dsabyte.com
Published: 2021-10-23 13:01:06

I have used `copy-to-clipboard` library to copy text to clipboard.

Go [here](https://dsabyte.com/posts/blog/Publishing-a-post-on-dsabyte/6172a87cf383201ed5427513) and scroll down. At the bottom, you'll see a share icon. On clicking on that icon, you'll see copy icon.

## Implemention
```js
import copy from "copy-to-clipboard";
const copyUrl = (url) => {
    let copied = copy(url);
    if (copied) {
       // show message
    }
};
```
# Thanku
7 GitHub projects to supercharge your Docker practices 🚀🧑‍💻
Tags: devops, docker, kubernetes, cloud
Published: 2021-10-23 12:46:10

Docker is an open-source container management platform used to build, run and package applications for deployment. It is an essential tool in every developer's toolkit.

Here's a list of 7 GitHub projects which can make your Docker workflow better.😎

## 1. [Docker Labs](https://github.com/docker/labs)
>⭐️ GitHub stars: 10.1k

This repo contains Docker labs and tutorials authored both by Docker, and by members of the community. We welcome contributions and want to grow the repo. 
{% github docker/labs %}

## 2. [Minify Docker Container image by 30x](https://github.com/docker-slim/docker-slim)
>⭐️ GitHub stars: 10.8k

This repo can be used to optimize and secure containers, and the author also claims that you can minify your Docker images by 30x.
{% github docker-slim/docker-slim %}

## 3. [Dockerfiles for popular Apps](https://github.com/jessfraz/dockerfiles)
>⭐️ GitHub stars: 11.3k

Author Jessie Frazelle has built Docker images of popular applications to run on desktop.
{% github jessfraz/dockerfiles %}

## 4. [Dockerfile best practices](https://github.com/hexops/dockerfile)
>⭐️ GitHub stars: 3.3k

This repository has best-practices for writing Dockerfiles.
{% github hexops/dockerfile %}

## 5. [Distroless Docker images](https://github.com/GoogleContainerTools/distroless)
>⭐️ GitHub stars: 11k

This repo has language focused docker images that contains only the applications and its runtime dependencies.
{% github GoogleContainerTools/distroless %}

## 6. [WatchTower](https://github.com/containrrr/watchtower)
>⭐️ GitHub stars: 9.1k

This GitHub repo can be used to automate Docker container base image updates.
{% github containrrr/watchtower %}

## 7. [Docker bench for security](https://github.com/docker/docker-bench-security)
>⭐️ GitHub stars: 7.1k

The Docker Bench for Security is a script that checks for dozens of common best-practices around deploying Docker containers in production.

---

I hope you enjoyed this list!

---
We are currently building [SigNoz](https://bit.ly/3A6k4an) - a full-stack open-source application performance monitoring tool. SigNoz is built to give SaaS like user experience combined with the perks of open-source software.

If interested, do check out our GitHub repo👇

{% github signoz/signoz %}
---
Rainbow Progress Bar
Tags: codepen
Published: 2021-10-23 12:43:47

---
title: Rainbow Progress Bar
published: true
tags: codepen
---

<p>Pure CSS and HTML progress bar, using the repeating-linear-gradient found in <a href="https://css-tricks.com/stripes-css/" target="_blank">https://css-tricks.com/stripes-css/</a> for the pattern.</p>

{% codepen https://codepen.io/internette/pen/QNOeLo %}
Weekly Challenge 135
Tags: perl, theweeklychallenge
Published: 2021-10-23 12:39:48

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-135/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-135/sgreen)

## TASK #1 › Middle 3-digits

### Task

You are given an integer.

Write a script find out the middle 3-digits of the given integer, if possible otherwise throw sensible error.

### My solution

This task was pretty straight forward.

* Check the an integer was provided.
* If it is negative, make it positive with the `abs` function.
* Display an error if it contains an even number of digits, or one digit
* The first character we want to show can be calculated by `(length - 3) ÷ 2`. Use this value with `substr` to display the middle three digit

### Examples

```
$ ./ch-1.pl 1234567
345

$ ./ch-1.pl -123
123

$ ./ch-1.pl 1
too short

$ ./ch-1.pl 10
even numbers of digits
```

## TASK #2 › Validate SEDOL

### Task

You are given 7-characters alphanumeric [SEDOL](https://en.wikipedia.org/wiki/SEDOL).

Write a script to validate the given SEDOL. Print 1 if it is a valid SEDOL otherwise 0.

### My solution

The first thing that I need to do is check if the input is valid. I use the regular expression `^[B-DF-HJ-NP-TV-Z0-9]{6}[0-9]$` to perform this. According to the specification, vowels are not valid. Did anyone else sing the [alphabet song](https://en.wikipedia.org/wiki/Alphabet_song) when generating the regular expression? :)

I set the value of `$sum` to the last digit. I then go through the other digits. I work out the value of the digit in the position (0-9 if it is is a number, 10-35 if it is a letter) and multiple the weight.

If the resulting sum is divisible by 10, I return 1 (a valid SEDOL value), otherwise I return 0.

### Examples

```
$ ./ch-2.pl 2936921
1

$ ./ch-2.pl 1234567
0

$ ./ch-2.pl B0YBKL9
1
```
Top 5 Visual Studio Code Extensions for Programmers (2021)
Tags: vscode, beginners, programming, productivity
Published: 2021-10-23 12:30:58

One of the best code editors in the developer community is Visual Studio Code. The numerous extensions that speed up the development process are one of the reasons behind VS Code's popularity.

This post will cover Top 5 Vs Code extensions for developers in 2021 which will help improve productivity and speed up development processes.

Let get Started;

1. Prettier
Prettier is a code formatter popularly used by several developers. It supports so many languages like JavaScript, JSX, Angular, Vue and many more. When working with other developers, having uniform formatting and styling across your code can save a lot of time.

2. Live Share
Live Share enables you to quickly collaborate with a friend, classmate, or professor on the same code without the need to sync code or to configure the same development tools, settings, or environment.

3. Live Server
Launch a development local Server with live reload feature for static & dynamic pages, this extension will help instantly reflect changes in browser each time you save your code which improve productivity and make it easier to do some quick experiment with your code.

4. ES6 Snippets
This extension contains code snippets for JavaScript in ES6 syntax for Vs Code editor (supports both JavaScript and TypeScript).

5. Debugger for chrome
A VS Code extension to debug your JavaScript code in the Google Chrome browser, or other targets that support the Chrome DevTools Protocol.