teleren/devto huggingface dataset:
What was your win this week?
Tags: discuss, weeklyretro
Published: 2019-09-06 15:22:40

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

👋👋👋👋

Looking back on your week -- what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄

![weekend-plans](https://media.giphy.com/media/jTOlzdqrsVlZlxWqP5/giphy.gif)
One Of The Most Underrated Javascript Method
Tags: javascript, productivity
Published: 2019-09-06 15:19:26

---
title: One Of The Most Underrated Javascript Method
published: true
description: 
tags: javascript , productivity 
---

`some()` returns a boolean value. It checks whether at least one element in the array passes the test condition supplied to callback function. 

Now lets say you have an array of dishes  

```js
const buffet = [
 { dish: 'butter chicken' , type: 'non-veg' },
 { dish: 'mutton curry' , type: 'non-veg' },
 { dish: 'meat balls' , type: 'non-veg' },
 { dish: 'butter paneer' , type: 'veg' },
 { dish: 'mutton curry' , type: 'non-veg' },
 { dish: 'meat balls' , type: 'non-veg' },
 { dish: 'mutton curry' , type: 'non-veg' },
 { dish: 'meat balls' , type: 'non-veg' },
 { dish: 'butter paneer' , type: 'veg' },
]
```

Now let's say you want to check if the buffet has a veg item. Most of the time I have seen people doing something like (including me ... until I came across this method)

```js
let containsVegItem;
buffet.forEach((dish) => {
	if (dish.type === 'veg') {
	 containsVegItem = true;
         return
	}
})
```

Which can be simply done by one line using `some()` which also gives added performance benefits 
 

```js
buffet.some((dish) => dish.type === 'veg')

```

Following are some performance benchmarks 


```js

console.time('P1');
let containsVegItem;
buffet.forEach((dish) => {
	if (dish.type === 'veg') {
	 containsVegItem = true;
         return
	}
})
console.timeEnd('P1')

```

`>>> P1: 0.052978515625ms`



```js

console.time('P2');
buffet.some((dish) => dish.type === 'veg')
console.timeEnd('P2');


```

`P2: 0.0400390625ms`



Thanks for reading the post so far. 
No , there's no promotion at bottom 🤣 ... if you find it useful feel free to hit a like ... and it's ok if you are shy and don't want to 😂


References :- 

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
What i think about dev.to?
Tags: discuss, review, thoughts, experience
Published: 2019-09-06 15:14:05

This is in general and applies to many but the response and feedback i received at dev.to, truly amazing!

To learn is to be free, to learn is to grow. Learning can be viewed as finding new data to be stored in an organ known as the brain. Once the new data resides, time makes good useful information out of it. This process of converting data into information is not far fetched, as it is the initial building block of a marvel, we know as a computer today. The transformed information has many variations ranging from experience, skills, knowledge and being instructed. To think about, man has been around for about 200,000 years and to survive such a time lapse is quite an achievement for us. The secret to this immortality, i think is collaboration. Collaboration is the course of nature, as same species have a likely chance in achieving the same, similar or overlapping  goals. Therefore, collaboration was discovered, to work together to complete a common task. Now, when species collaborate in the process of learning, they reduce the time to produce the result and increase their horizon in finding ways to complete their tasks and this is what progress looks like.

Dev.to has used the internet as the basis of creating an online collaborative learning experience. To write your thoughts and have instant feedback on them is truly powerful. The instant feedback allows any individual to see how similar they are to others and in the same way how their thoughts can be seen in a different perspective. This process of comparing similarities and growing on differences is what I would call a discussion forum. You create, you answer, you reply and you promote, what a wonderful concept brought to reality. This lays the foundations of an increase in participation which are not bound by time. I would say it has a time of its own which when needed can be stopped and when required started. You are in a world where you are in control of your time. 

Now for me to experience it, is like opening gates that I never knew I had keys to. The traditional learning system seems so limited as it promised to achieve much but it gave so little. People and education when they become stagnant, they become a disease. Its infectious, it spreads and it destroys. Everything wants to live, so to learn is to live and to live is to grow.
Bitcoin Doesn’t Care About Your Identity, Only Your Knowledge
Tags: bitcoin, passwords, security, crypto
Published: 2019-09-06 14:53:28

---
title: Bitcoin Doesn’t Care About Your Identity, Only Your Knowledge
published: true
tags: Bitcoin,Passwords,Security,crypto
canonical_url: https://qvault.io/2019/09/06/bitcoin-doesnt-care-about-your-identity-only-your-knowledge/
---

When you make a withdrawal at a bank, pay taxes, or get a license you must prove who you are. The process of proving who you are is a very “human” process. The authority checks your ID and ensures the picture looks like you, which allows them to trust that you are the person who’s name is on the ID.

Bitcoin on the other hand, doesn’t care who holds the private keys to a wallet. Whoever has knowledge of those keys, which is just some numbers, is technically an owner of those coins. For this reason, we go to great lengths to ensure that we are the only ones who have knowledge of our keys.

![](https://qvault.io/wp-content/uploads/2019/09/C3hzoDiUcAAMvb3.jpg)

With Bitcoin many aren’t accustomed to the fact that there is no authority that can help recover keys if they are lost. If you lose your online bank account password, you can just go to the bank and have them reset it. If you lose your Bitcoin keys, you no longer own those Bitcoins.

## Why not use Biometrics?

I’ve had people ask me, why can’t we use fingerprints or eye scanners as the keys? This would solve the problem of people forgetting their keys.

![](https://qvault.io/wp-content/uploads/2019/09/multimodal-biometrics.jpg)

The biggest problem here is that if it can be digitized then it can be copied. By turning a fingerprint into a digital permanent Bitcoin key, if someone else takes a picture of your finger they can not only steal your Bitcoin, but also potentially every coin you earn in the future.

## The Best Answer Right Now is Education and Tools

For now, the best we can do is educate everyone on good key storage techniques, and build tools to make secure storage easier. That is our #1 goal with [Qvault](https://qvault.io), and the project is becoming more secure and easier to use every day.

By Lane Wagner [@wagslane](https://twitter.com/wagslane)

Download Qvault: [https://qvault.io](https://qvault.io/)

Star our Github: [https://github.com/q-vault/qvault](https://github.com/q-vault/qvault)

The post [Bitcoin Doesn’t Care About Your Identity, Only Your Knowledge](https://qvault.io/2019/09/06/bitcoin-doesnt-care-about-your-identity-only-your-knowledge/) appeared first on [Qvault](https://qvault.io).
Computer generated art with Python
Tags: python
Published: 2019-09-06 14:44:52

A computer can be used to generate art. Earliest attempts can be seen in old screensavers or demos. The most modern form of art generation uses AI/Machine Learning/Deep Learning.

## Create Art with Python

Even with <a href="https://pythonbasics.org/">basic Python</a> knowledge you can computer generate art. For instance, we can make the computer generate random numbers and use that random data to form a picture of bubbles.

![Computer Art](https://thepracticaldev.s3.amazonaws.com/i/u11glbdspcddbigwhyn5.png)

### The Code 

The modules numpy and <a href="https://pythonbasics.org/matplotlib-bar-chart/">matplotlib</a> will be used

    #!/usr/bin/python3
    import numpy as np
    import matplotlib.pyplot as plt

Then a main function
 
    if __name__ =="__main__":

where random data is created (x,y). Random colors are also created.

        N = 100
        x = np.zeros(N)
        y = np.zeros(N)
        for i in range(N):
            x[i] = np.random.rand()
            y[i] = np.random.rand()
        colors = np.random.rand(N)

Then we plot the picture

        area = (30 * np.random.rand(N))**2  
        ax = plt.subplot(111)
        ax.scatter(x, y, s=area, c=colors, alpha=0.6)
        ax.spines['top'].set_visible(False)
        ax.spines['right'].set_visible(False)
        ax.spines['bottom'].set_visible(False)
        ax.spines['left'].set_visible(False)
        plt.axis('off')
        plt.show()
      
Related links:

* <a href="https://www.artsy.net/article/artsy-editorial-hard-painting-made-computer-human">Human vs Computer Art</a>
* <a href="https://deepart.io/latest/">Examples of AI art</a>
* <a href="https://pythonbasics.org/">Learn Python</a>
How to Add Existing Project to AWS CodeCommit
Tags: aws, codecommit, git
Published: 2019-09-06 14:43:09

## 1. Add Required Permission to User
Attach `AWSCodeCommitFullAccess` permission to user. If current user has not proper permission to do changes to CodeCommit

## 2. Create Repository At CodeCommit
Simply create new repository by clicking **Create repository**, add repository name and description(optional) and click **Create**.

## 3. Check Existing SSH Key
1. Open Terminal
2. Enter following to see is there existing SSH keys:
   ```
   ls -al ~/.ssh
   ```
3. Check the listing for existing SSH key. By default, public keys are one of the following:
   - id_dsa.pub
   - id_ecdsa.pub
   - id_ed25519.pub
   - id_rsa.pub

## 4. Generate New SSH Key 
Create new SSH key if there is not existing key:
1. Open Terminal
2. Enter following to generate SSH key:
   ```
   ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
   ```
   I prefer to set SSH key location to save as default and passphrase is optional as you can set additional security layer.
   You can find newly generated SSH private and public keys under ~/.ssh folder.

## 5. Add SSH Public Key to AWS IAM User
1. Copy SSH Public Key to Clipboard:  
   Let's say **id_rsa.pub** public SSH key is already existing. Copy 
   this to clipboard by following terminal command:
   ```
   pbcopy < ~/.ssh/id_rsa.pub
   ```
2. Upload SSH Public Key to IAM User  
   Add copied public SSH key to **SSH keys for AWS CodeCommit** under **Security credential** tab.
3. Copy SSH Key ID of added SSH key
   This SSH Key ID will be added to `~/.ssh/config`.

## 6. Add/Edit SSH Config file
Create `config` file under `~/.ssh` if it's not created yet and add following lines:
```
Host git-codecommit.*.amazonaws.com
  User APKA5R243QHS7VQYN7O2
  IdentityFile ~/.ssh/codecommit_rsa
```

## 7. Init Existing Project as Git
1. Open Terminal
2. Initialize existing project directory as a git repository, add files in the directory and commit:
   ```
   git init
   git add .
   git commit -m "First commit"
   ```
3. Add remote repository URL and push:
   ```
   git remote add origin <remote_repository_url>
   git push -u origin master
   ```

Check created CodeCommit repository and existing local project files should be found.
Floating Terms(What it is)???
Tags: idea
Published: 2019-09-06 14:41:30

So,being into proper web development for last one year,I come across a number of floating terms(headless CMS,static generator,bundler and so on) that make it more intimidating for newbies to grab the concepts. I learned most of the terms the hard way.
Won't it be helping anyone if we make a common GitHub repo where anyone can explain these terms in a layman way through pull requests and then whosoever is writing a technical post,can include those jargons as a link to the GitHub repo. If the reader need to know more,they can visit the site,else an experienced reader can go and finish reading the article.
Thoughts please(or clarity if we are already having some service like this).
One small process improvement we made lately at DEV
Tags: productivity, remote
Published: 2019-09-06 14:37:46

# Thank u, next

We try to keep our meetings quick and productive, so we have a couple weekly meetings structured such that folks submit their key talking points in Slack and then we run through them in order.

In order to alleviate the awkward **"not sure if you're finished talking"** silence of group calls, we have instituted a policy of saying **"thank u, next"** to pass the mic, so to speak. It also seems to cut off necessary rambling because folks know how to cut themselves off. And it all has a positive intonation by default.

The results have been great (at least I think so). It is a small thing, but it matters for a distributed organization.

Do you have any similar practices at your org?

Happy coding.
Vue PWA: A Progressive Web Application Example With Nuxt
Tags: jamstack, javascript, vue, nuxt
Published: 2019-09-06 17:39:03

---
title: Vue PWA: A Progressive Web Application Example With Nuxt
published: true
tags: jamstack, javascript, vuejs, nuxtjs
canonical_url: https://snipcart.com/blog/vue-pwa
---

![Vue PWA: A Progressive Web Application Example With Nuxt](https://snipcart.com/media/204678/pwa-og.jpg)

Has anyone ever asked you:

“Hey there, kid, want some free money?”

Probably not—if anyone did, you’d probably run away screaming “stranger danger”.

And you’d be right to be skeptical. It’s like my dad always told me, “If something seems too good to be true, it probably is.”

Well I hate to break it to you pops, but you’re finally wrong about something. Because using Progressive Web Apps is exactly like someone offering you free money. No strings attached (ok, one string attached… but we’ll get to that).

That’s why today we’ll be building a Vue PWA and looking at how they can get you more traffic, more engagements, and high conversions. All it takes is a bit of legwork upfront and from then on, like I said, it’s free money.

Now for some of our more attentive readers, you may be thinking, “Wait, didn’t you guys just run a post on PWA’s with a Gatsby store?” Yes, yes we did (and thanks for reading that, btw). But it’s nearly impossible to cover all the benefits of PWAs in just one post. Truth be told, we merely scratched the surface. 

So this post will go into more detail about why you’d be crazy not to develop a PWA for your site. More specifically, we’ll look at:

* A quick review of Progressive Web Applications
* Statistics showing the benefits of PWAs
* Why we’re building a Vue PWA this time around
* How to create your own Vue PWA

  

→ Read the full post [here](https://snipcart.com/blog/vue-pwa)
Help needed teaching someone web design.
Tags: design, frontend, code
Published: 2019-09-06 13:08:06

---
title: Help needed teaching someone web design.
published: true
description: My wife is interested in Web Design, I'm a Software Engineer that has done mostly work with C#, RESTful APIs, and mostly back end code. I need some help with resources to teach her Front end web design. 
tags: design, front end, code
---

So my wife recently got interested in web design, and I wanted to help her get started. So I'm looking for some helpful resources or courses that start from ground zero. (She has no experience in anything software engineering related)

Thanks in advance!
Postgres. Search Array type columns
Tags: postgres
Published: 2019-09-06 13:56:37

Say we have a table with a column of an [array type](https://www.postgresql.org/docs/11/arrays.html). At some point, we want to be able to select records with a specific value(s) which the array column may have.

Here are three ways to do different kinds of searches.

1) Use ANY operator when searching with one value:
```
SELECT * FROM mytable WHERE 'first_type' = ANY(types_column);
```

2) Go with the ["contains" operator](https://www.postgresql.org/docs/current/functions-array.html) (“@>”) when you look for a specific set of values (the order of values doesn’t matter):
```
SELECT * FROM mytable WHERE types_column @> '{"first_type", "second_type"}';
```
The values `“first_type”` and `“second_type"` must be in the `types_column` column for a record to be selected.

3) Whenever you need to search any values that a column may have - use the ["overlap" operator](https://www.postgresql.org/docs/current/functions-array.html) (“&&”)
```
SELECT * FROM mytable WHERE types_column && '{"first_type", "second_type"}';
```
One of the values `“first_type”` or `“second_type"` must be in the `types_column` column for a record to be selected.
Daily Challenge #59 - Snail Sort
Tags: challenge
Published: 2019-09-06 13:38:41

---
title: Daily Challenge #59 - Snail Sort
published: true
series: Daily Challenge
description: Traverse a 2-D array in a snailshell pattern
tags: challenge
---
<pre>
array = [[1,2,3],
         [4,5,6],
         [7,8,9]]
snail(array) #=> [1,2,3,6,9,8,7,4,5]
</pre>
Given an array of `n * x`, return the array elements arranged from outermost elements to the middle element, traveling clockwise. Do not sort the elements from lowest to highest, instead traverse the 2-D array in a clockwise, snailshell pattern. 

These examples will clarify the challenge:
<pre>
array = [[1,2,3],
         [8,9,4],
         [7,6,5]]
snail(array) #=> [1,2,3,4,5,6,7,8,9]
</pre>

![](https://i.imgur.com/n52ozXn.png)

An empty matrix would be represented as [[]].

Below are some matrices to test your code on. Good luck, have fun!
<pre>
(snail([[]]));

(snail([[1]]));

(snail([[1, 2, 3], 
        [4, 5, 6], 
        [7, 8, 9]));

(snail([[1, 2, 3, 4, 5], 
        [6, 7, 8, 9, 10], 
        [11, 12, 13, 14, 15], 
        [16, 17, 18, 19, 20], 
        [21, 22, 23, 24, 25]]));

(snail([[1, 2, 3, 4, 5, 6],
        [20, 21, 22, 23, 24, 7], 
        [19, 32, 33, 34, 25, 8], 
        [18, 31, 36, 35, 26, 9], 
        [17, 30, 29, 28, 27, 10], 
        [16, 15, 14, 13, 12, 11]]));
</pre>

***
_Today's challenge comes from stevenbarragan 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!_
CSS Transform/Detransform
Tags: css
Published: 2019-09-06 13:25:19

---
title: CSS Transform/Detransform
published: true
description: This shows a technique how you can apply CSS transforms and also how to negate them using CSS variables.
tags: css
---
When you only want the transform on the parent element you'll want to apply the negative transform on the child.
This is especially useful for `skew` and `rotate`.
```css 
.container {
    transform: skewX(15deg)
}
.container > * {
    transform: skewX(-15deg);
}
```
```html
<div class="container">
    <div class="content">
        This content is not transformed
    </div>
</div>
``` 

Now with CSS variables. This uses `calc()` to negate the value.
```css
:root {
    --value: 15deg;
}
.container {
    transform: skewX(var(--value))
}
.container > * {
    transform: skewX(calc(-1 * var(--value)));
}
```

Adding media-queries to handle different screen sizes with different values (rotating an element can make it really big depending on its width).
```css
:root {
    --value: 15deg;
}

@media screen and (min-width: 1440px) {
    :root {
        --value: 5deg;
    }
}

.container {
    transform: skewX(var(--value))
}
.container > * {
    transform: skewX(calc(-1 * var(--value)));
}
```

{% codepen https://codepen.io/kaos1910/pen/dybJjdG %}

Another example using SkewY on a full-width container
{% codepen https://codepen.io/kaos1910/pen/OJLzobw %}
FrontEnd Development Challenge – Introduction
Tags: career, selfimprovement, frontenddevelopment
Published: 2019-09-06 13:20:41

---
title: FrontEnd Development Challenge – Introduction
published: true
description: I am going to start a personal challenge where I'll learn different parts of front end development
tags: Career, self-improvement, front end development
cover_image: https://gustavomonteiro.pt/wp-content/uploads/2019/09/oskar-yildiz-cOkpTiJMGzA-unsplash.jpg
---
<p>I am going to start a personal challenge where I'll learn different parts of front end development.</p>

<p>This post will help me to not give up on this challenge and keep moving forward.</p>

<p>I have a goal to become a professional front end developer. I am missing some core knowledge at the moment and I want to fix that.</p>

<p>So I am going to learn from the basics and I'll share my learnings and provide some insights about topics that I will be learning.</p>

<p>I'll use Frontend Developer Roadmap as my guide. You can <a href="https://roadmap.sh/frontend" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">check it out here </a>and I definitely recommend you to read it.</p>

<p>I am really excited to do this!</p>

<p>Wish me luck :)</p>

<p>

Photo by&nbsp;<a href="https://unsplash.com/@oskaryil?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Oskar Yildiz</a>&nbsp;on&nbsp;<a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p>
Pitch a project to Hacktoberfest 🎉
Tags: help, discuss, hacktoberfest
Published: 2019-09-06 12:33:34

Hello everyone, 

I love participating on Hacktoberfest, and as I once had my first participation at this amazing event, every year is the first time to someone 😊

This year, I decided to make a post helping newcomers to find your project of ❤

But there is no fun if is only me recommending the projects...

So, I'm asking you to help me to create an awesome community based hacktoberfest warmup post \o/

The Idea is simple, make you pitch at the comments of this post presenting your recommended opensource project.

**UPDATE:** You don't need to be the owner of the project, you can pitch for your project of ❤️

The pitch rules:

- Only one project per person
- The project must have a contributing guide
- The project must have beginner friendly issues
- The pitch must be one paragraph only (please try to be brief as a tweet 🐦)

The post will be published 16 September 2019 here at dev.to (linked with this post) with your recommendations, so please post yours until 13 September 2019.

Hope you all enjoy it and Happy Friday 🎉

**UPDATE:** Hacktoberfest post published at https://dev.to/humrochagf/contribute-to-open-source-on-hacktoberfest-29m1