teleren/devto huggingface dataset:
An easy approach to contribute to Open Source Projects
Tags: opensource, ruby, rails, programming
Published: 2019-06-01 21:22:22

---
title: An easy approach to contribute to Open Source Projects
published: true
description: Contribute to open source is easy, quit the fear👻
tags: opensource, ruby, rails, programming
---

![](https://thepracticaldev.s3.amazonaws.com/i/glr9qvx89fwtj0l00n3a.jpg)

---

Some years ago, when I heard people contributing to an open source project, I was always afraid 😥. I thought one had to know a whole stack perfectly before contributing. Little did I know that was a fallacy.

*A common misconception about contributing to open source is that you need to contribute code. 👻*

There are lots of projects you can contribute to on Github without knowing anything about code. Let's be aware that it is not only Software Developers that contribute to open source projects. My first contribution to a project was fixing a typological error in the README file of a project. I was so happy when it was merged.

Open source improves your existing skills, help you meet lots of people, teach people, review codes and mentor beginners.

*Steps to start contributing to Open Source*

These steps have worked for me severely and I know it will help you make your first contribution if you don't have any. To contribute, you have to look through issues of different projects on Github, there are lots of open source projects you can contribute to, Javascript libraries, Gatsby, Npm Packages, Ruby Gems and some others.


Click on the issues, then click on the labels and filter by `beginner friendly` or `good first issue`, you will see lots of bugs that are easy to get you started and raise a Pull request in a few minutes. 
You can also search for typos in the README file and raise a PR to correct it, doing this will make you contribute to the project and you might even be added as a contributor to the project and grow your profile. Since I made my first contributions, I'm no longer afraid to contribute to a different project or solve issues on Github.
After seeing an issue or problem to tackle, fork the project on Github and create a new branch to solve the issue, after that raise a pull request. Hurray🎉🎉, You have made your first contribution.


---

I will be a bit bias here as I am a Ruby on Rails Developer. If you are a Rails developer and want to contribute to open source, check out this [website](http://www.opensourcerails.com/) to see the trending Rails Open source project. There is one network I'll like you to consider joining, that is Agile Ventures. In [Agile Ventures](https://agileventures.org), you contribute to lots of projects ranging from Rails to popular Javascript framework like Vue and React.

Agile Ventures make you feel at home, you see lots of newbies, have lots of pairing session to unblock you and collaborate with developers from all over the world.
Don't be afraid to contribute to open source projects, fixing a typo or adding one line of code. Everything counts 💪🏻.

*Thanks for reading.* 👻
I am [Danielshow](https://github.com/Danielshow).
How do you find the duplicate number on a given integer array?
Tags: python
Published: 2019-06-01 21:18:21

This five line code will sort-out the duplicate and non duplicate elements from the given list of number

```python
input = [10,20,30,11,10]

duplicate_list, non_duplicate_list = [],[]
for el in input:
  duplicate_list.append(el) if(el in non_duplicate_list) else non_duplicate_list.append(el)

print(duplicate_list, non_duplicate_list)
```

and the output is

```
([10], [10, 20, 30, 11])
```

Thanks to https://simpleprogrammer.com/programming-interview-questions/ to post the question
CI/CD of JHipster Spring Boot + React Application using AWS CodePipeline
Tags: aws
Published: 2019-06-01 18:33:20

Recently, I worked on creating a CI/CD for a JHipster application. For all the folks out there who are new to JHipster, it's a development tool to generate a Spring Boot + React/Angular/Vue web application (https://www.jhipster.tech/). The tool also auto-generates a bunch of configuration for different DBs along with CI/CD scripts and Sonar configuration for static analysis.

Now, if your company has all its infra on AWS, you would like to have the CI/CD also part of the AWS infra for obvious reasons like security! duh!.
In AWS, we have AWS CodePipeline, which may not be as extensible like Jenkins but solves our need as it integrates well with AWS Services. 

Our application needed to have Dev, QA and Prod environment in the same pipeline with multiple stages and approvals which I will go over in a minute or so. Now, I will go through each stage to provide more info.

Source
The first stage that pulls code from the GitHub repo. You must select the webhook when creating this stage to have the pipeline triggered from GitHub with every merges.

Build
For building the codebase, I used AWS CodeBuild. The artifact of this stage was the war file from the JHipster application. The war needed to be deployed to an Elastic Beanstalk with tomcat configuration.
The Tomcat configuration for the beanstalk is a bit tricky. One need to ZIP the war and the configuration files for successful deployment.

Deploy
Once the war is zipped in the build stage, it sits in S3 with Server Side Encryption enabled. This ZIP is then pushed to Elastic Beanstalk for deployment.

Integration Testing
This stage runs a bunch of Selenium tests configured for the complete Web application. 

QA
Here we have a manual approval step which emails the folks for approval. Once approved, it will deploy to the QA environment.

One can replicate the same QA stage multiple times for Staging or Production environments as well.
What is subgrid?
Tags: discuss, css
Published: 2019-06-01 18:15:18

I hear the buzzword everywhere lately. I would really like to know the use case from actual developers.

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Can anybody explain to me what subgrid is? <a href="https://twitter.com/hashtag/CSS?src=hash&amp;ref_src=twsrc%5Etfw">#CSS</a> <a href="https://twitter.com/hashtag/DevDiscuss?src=hash&amp;ref_src=twsrc%5Etfw">#DevDiscuss</a> <a href="https://twitter.com/hashtag/DeveloperCommunity?src=hash&amp;ref_src=twsrc%5Etfw">#DeveloperCommunity</a></p>&mdash; ✨✨ Steffen ✨✨ (@mrsteffenp) <a href="https://twitter.com/mrsteffenp/status/1134475367195000832?ref_src=twsrc%5Etfw">May 31, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Hi community
Published: 2019-06-01 17:50:17

Hey everyone, I just reach out this page while reading comments on Twitter and I'm pretty excited to share with all of you my recent knowledge on Machine Learning.
I just start a new project a couple of weeks ago, deciding to leave my last job to accomplish that objective. Taking advantage of that situation, I resolved to use this platform to write what I've been founding out there, posting errors with quantifier documentation, share code and try to help and be helped by all of you.
Also, English is not my mother language, so surely you'll become aware of some errors.
"Good For The World Is Not Good For Facebook" - a rap song about social media
Tags: showdev, programming, culture
Published: 2019-06-01 17:46:41

---
title: "Good For The World Is Not Good For Facebook" - a rap song about social media
published: true
description: https://www.youtube.com/watch?v=6zJSmiimxoQ
tags: #showdev, #programming, #culture
---

Song url: https://www.youtube.com/watch?v=6zJSmiimxoQ

Quick background on the project: I'm a full time programmer and I love making rap music. I see a lot of humor (and sometimes seriousness) in the profession/industry, and thought it would be fun to combine the two.

I'm always open to feedback and collaboration (currently in CO, would love to work with a videographer to make a music video)!
Demystifying NLP concepts in simple words—101
Tags: nlp, ai, beginners, machinelearning
Published: 2019-06-01 16:56:47

When someone talks about NLU or even AI in the context of chatbots or conversational apps, they probably mean either one of these concepts: ASR, NLP, NLU, NLG or TTS.

These are probably the most confusing concepts when it comes to understanding the inner concepts of conversational apps. Let’s quickly demystify them (with really simple words):

1. **ASR** or **Automatic Speech Recognition** is the process of taking the speech (voice) signal as an input and then finding out the words that were actually spoken.

2. **NLP** or **Natural Language Processing** is an umbrella term that describes the ability of the machine to manipulate (syntactic parsing, text categorization...etc) the human language (English, French…etc).

3. **NLU** or **Natural Language Understanding** is a subset of NLP that is responsible for the semantic parsing and analysis, entities extracting…etc. NLU tries to structure the input data so it can easily be understood by the machine.

4. **NLG** or **Natural Language Generation** is the step when the machine tries to transform the structured (from NLU) data into human-readable language.

5. **TTS** or **Text-to-Speech Synthesis**, put simply, takes the generated text from the NLG and converts it to speech.

That's all you need to know to get started building your next conversational app.

<hr/>

Follow me at [@manekinekko](https://twitter.com/manekinekko) to learn more about chatbots and conversational apps.
How to local validation Circle CI Config file
Tags: circleci, ci, homebrew
Published: 2019-06-01 15:18:46

---
title: How to local validation Circle CI Config file
published: true
description: How to local validation Circle CI COnfig file
tags: CircleCI, CI, HomeBrew
---

# Step1 Install Circle CI CLI Tool.

Circle CI has CLI Tool, and that installable at HomeBrew.
Execute this command and install Circle CI CLI Tool.

```
brew install circleci
```

# Step2 Execute Validation Command.

validation local config file in a Circle CI CLI Tool.

```
circleci config validate
```

## Successfull output

```
Config file at .circleci/config.yml is valid.
```
Reversing Array In Place
Tags: algorithms, datastructures, computerscience
Published: 2019-06-01 15:05:55

---
title: Reversing Array In Place
published: true
description: 
tags: Algorithms, Data Structures, Computer Science
---

Hey, hey, hey this is my first article. Gonna keep it really short. Began learning data structures and algorithms from today. I had this thought whether is there a way to reverse an array in place without using additional space (i.e. like a new array). You guessed it right, we do have a way. This is the idea:

![](https://thepracticaldev.s3.amazonaws.com/i/kw3b8c3kc5xvk6t0vwm8.png)

We are going to iterate for (N/2) times (N = length of the array) and swap the first half of the array with the second half. We are only iterating n/2 times. How cool is that, let me know what you guys think.

The Code:

```
class Array:
  def __init__(self):
    self.array = []
    self.length = 0
  
  def reverse(self):
    for i in range(len(self.array)/2):
      current_position = i
      swap_position = len(self.array) - (i + 1)
      
      temp = self.array[swap_position]
      current_value = self.array[current_position]
      self.array[swap_position] = current_value
      self.array[current_position] = temp
    
    return self.array
  

array = Array()
array.append(1)
array.append(2)
array.append(3)
array.append(4)
array.append(5)
array.append(6)
array.append(7)
print array.reverse() 
```
I made a visual code organiser for THREE.JS
Tags: vue, threejs, svg, javascript
Published: 2019-06-01 14:25:07

---
title: I made a visual code organiser for THREE.JS
published: true
description: I love vue-cli builder target for library
tags: vuejs, threejs, svg, javascript

cover_image: https://thepracticaldev.s3.amazonaws.com/i/afknopdn387o6p0upwdb.png
---

here's the github project
https://github.com/EffectNode/en-node-graph-gui

The editor engine is open sourced and the backend only stores data but is in private source due to security reasons.

Vuejs is so awesome...

1. it can help me make a SVG graph easily without other UI library.
2. it can help me to build the execution envrionment code for the iframe easily so that i can put the user logic within iframe to make things safer.

Three.js is awesome...

1. It can help me use a scene graph to compose a tree structures of items.
2. It can help me focus on coding the graphics not the structure setup..


My little software is awesome... XD lol hahahahahaha

https://igraph.effectnode.com/

1. It can help me reduce effort for setting up stuff like resize handler, how should things be structured and organised.

2. It can help me organise content with the same strcutrue of scene graph.

3. It can help me input human values such as timeline timing easily.

4. It can help me to make life easier by storing code online so that i can share them easily.


Thank you so much for reading my post.... :D

![](https://thepracticaldev.s3.amazonaws.com/i/1gxfweweim2fk5uziwep.png)
Count how many paragraphs in vim
Tags: vim, nvim
Published: 2019-06-01 13:23:51

---
title: Count how many paragraphs in vim
published: true
description: Easy way to count paragraphs in vim
tags: vim, nvim
---

The best way to count paragraphs in my opinion is counting all blank lines that appears after each paragraph. so, let's remove consecuteve blank lines

```viml
:g/^\_$\n\_^$/d
``` 

The above code finds an empty line start followed by another empty line start and deletes it.

If the last line is not empty let's add a blank line after the last paragraph - (using the put command, adding a black hole register)

```viml
:$put_
```

We can test if the current line is empty

```
if getline('.') == ''
    echo "empty line"
endif
```

Hence we can automate the adding of a blank line at the last line of the file based on that condition:

```viml
" if the last line '$' is not '!=' empty ''
if getline('$') != ''
    :$put _
endif
```

Now lets count how many blank lines. 

```viml
:%s,^$,,gn
```

The secret to the above command is that it does not do anything, because of the flag "n", it just shows you how many substitutions it would had done if the "n" flag were not be used. 

The regular expression...

```
^$
```

...corresponds to empty lines, therefore we are actually counting how many blank lines we have "after each paragraph".

Of course, if you want you can define a function with all of this 

```viml
function! CountParagraphs()
    echom "Number of paragraphs: "
    silent! g/^\_$\n\_^$/d
    if getline('$') != ''
        $put _
    endif
    %s,^$,,gn
endfun
```

We have used "silent!" on the global command so that you can see just the paragraphs count

In order to test this function beforeg deciding to put it on your vimrc, or just savin the code in another place you can just run:

```viml
:@+
```

Then you can call the function by its name:

```viml
:call CountParagraphs()
```

When I was writing this post I made some typos and I have corrected what I saw was wrong, but my English is far from perfect, so, feel free to comment and suggest a better solution in vim or an alternative solution using other tools.
Completed my first web stack
Tags: python, django
Published: 2019-06-01 13:07:28

Update: http://142.93.204.153/

Its up there everyone! my code is being referenced by guincorn and urls are being reverse proxied to by Nginx. The domain is next

Hi Everyone, I want to introduce myself. I'm Wes a full stack Python developer. I'm onto a second Django project and just got done migrating to a server and configuring guincorn. Wow, its been a journey and I'm almost there! Nginx is coming next to wrap it up. Here she is: https://www.youtube.com/watch?v=X8L4XqrR-NM&t=2s when I have a proper link instead of serving it over port 8000 I'll drop it here. Thanks for reading and checking out my project!
R Language : Read CSV files In R
Tags: rdatascience, datascience, rlanguage, excel
Published: 2019-06-01 01:59:10

---
title: R Language : Read CSV files In R
published: true
description: Learn how to read CSV files in R. 
tags: #rdatascience #datascience #rlanguage #excel
---

Let's discuss how to read CSV files from R. Most of the office users still depend on CSV files and Excel files for storing the raw data. Though a lot of people have moved to the cloud storage of different types. 

But the export options in most of the cloud data collection platforms often have CSV file as an option. So we are likely to encounter a lot of CSV files when we wish to read data as a R programmer. 

So here we are going to take see simple tutorial to achieve this task. If you wish to watch the video instruction of this tutorial, check out [How to Read CSV files in R](https://www.youtube.com/watch?v=lEddKmImD9I). 

{% youtube lEddKmImD9I  %}

Let's assume that we have file named mydata.csv. This has data something like this. 

    Item,Cost,Sold,Profit
    Keyboard,$10.00,$16.00,$6.00
    Monitor,$80.00,$120.00,$40.00
    Mouse,$5.00,$7.00,$2.00

Now that we have some sample file to deal with, let's try to read this file with R. In R we can make use of the read.csv() function and read our file so it looks something like this. 

    dt = read.csv("mydata.csv")

To output the data on the console you can simply call the dt now. 

    dt

This should produce the output that looks something like this. 

    Item,Cost,Sold,Profit
    Keyboard,$10.00,$16.00,$6.00
    Monitor,$80.00,$120.00,$40.00
    Mouse,$5.00,$7.00,$2.00

You can also use the head() function with the dt and try to get much better view of the data that is properly spaced. 

That's it. This is pretty simple way to read the CSV files. There are few other functions too that can help you manipulate and write the new CSV file which I will cover in another post. 

I hope this helps you with reading the CSV file for your data.
recomendation algorithms: how can you recommend songs based on a user's past listening history?
Tags: help
Published: 2019-06-01 12:31:45

---
title: recomendation algorithms: how can you recommend songs based on a user's past listening history?
published: true
tags: help
---

I'm interested in getting a user's past listening history from Spotify and being able to suggest songs from the Charts that a user may be interested in listening too. 

It's clear that you could use Genre to support this type of algorithm, the more times a user listenes to a genere, it has a higher likelihood of being suggested from the Charts. 

I'd like to focus on the activity of a single user and not necessarily other users using the system (content based filtering)

How can this be done in practice? Anybody have any examples of algorithms or tutorials anywhere?
I recently left my role as Technical Director of a premium UK agency to self fund my IndieHacker goals, Ask Me Anything!
Tags: ama
Published: 2019-06-01 12:18:23

I spent years working my way up the ranks of agencies in the UK. For the last 4 years I've been working remotely and landed my dream role of Technical Director of an agency working with huge brands such as Glenfiddich Whisky and Bundesliga. 

I recently left that role and I'm living off savings whilst I go back to my development roots and my real passion of building custom products and services in the hope of building passive (ish) revenue streams.

My first marginally successful product is a WooCommerce payment gateway plugin for a Hungarian bank. I am now working on my first major SaaS product which will be ready for launch in ~3 weeks.

Never done an AMA before and thought it could be interesting and self-reflective. Ask me anything!
MAD: Game DevLog #0
Tags: gamedev, unity3d, csharp
Published: 2019-06-01 12:07:15

---
title: MAD: Game DevLog #0
published: true
description: MAD: Our first game dev log.
tags: gamedev, unity, csharp
cover_image: 
 https://thepracticaldev.s3.amazonaws.com/i/heiz50o6ujad8t586jf0.gif
series: MAD Game DevLog
---

It's been a while since I wrote an article and this one is a bit different. I joked one day with a two other friends to make a game, and somehow the idea was very well received, we teamed up and started pitching game ideas. We are three friends. Me and Andrei are good with coding and Max is good with arts.

The problem was that me and Andrei aren't video game developers, the only thing that we're both experts at is to write hello world in many different programming languages. 

After analyzing what engine should we use for our game we decided to go with Unity. We spend the last 3 weeks making concept art, doing Unity tutorials and brainstorming ideas for our game. After gathering some ideas we decided to make an old style game, inspired by the classical NES Bomberman.

![](https://thepracticaldev.s3.amazonaws.com/i/xfqkhsg9bwj9vm9cu74m.jpg)

![](https://thepracticaldev.s3.amazonaws.com/i/073q3woesoa8gml4zgr9.jpg)

Me and Andrei were learning Unity while Max, our artist continued to draw and make assets for the game.

So far, we got to the point where we completed the player movement part, the camera part, and somewhat the world part. The other stuff is still in development. This is our very first time we collaborate and it is also our first attempt in making a game. I'm curious what the future will bring us and how the project will continue to develop.

After finishing the game we'd like to release it for PC, Android and Xbox.

Lastly, I'm glad that Max ([@maximilianbtw](https://www.instagram.com/maximilianbtw/)) has decided to chose Pixel Art for the game, I think it looks great and it brings back lots of memories from games that we've grown up with.

![](https://thepracticaldev.s3.amazonaws.com/i/f21f1xnhfbhmiqzeotbb.png)

Thanks for reading!
Does a CS degree from Africa (especially Cameroon) is enough to land a tech job in any country ? Like USA, UK, or others.
Tags: career
Published: 2019-06-01 11:18:37

---
title: Does a CS degree from Africa (especially Cameroon) is enough to land a tech job in any country ? Like USA, UK, or others.
published: true
description: 
tags: career
---
From a user perspective, what annoys you the most about websites today?
Tags: discuss
Published: 2019-06-01 11:02:10

I see lots of discussion about developer experience, frameworks and paradigms but not so much about the user experience on the web. I would love to hear about the problems you face on the web as I first and developer second.

Additionally, what do you think we can do improve the user experience on the web? Ready? Go!
Encrypt file PDF
Tags: flask, encryptiontool, pypdf2
Published: 2019-06-01 10:57:07

---
title: Encrypt file PDF
published: true
description: API encrypt file PDF with Python  
tags: flask, encryption-tool, pypdf2
---

If you want to encrypt file PDF When user open file you want show dialog to confirm a password for security.

When you say `yes` 🎉

I provide container on Docker Hub 🐳


![](https://thepracticaldev.s3.amazonaws.com/i/y9xzm97p3mux02a4mqk2.png)


[Docker Hub](https://hub.docker.com/r/20scoops/encrypt-file-pdf)
I'm thinking to use a new distro from Linux
Tags: linux, distro, web, developer
Published: 2019-06-01 10:55:55

---
title: I'm thinking to use a new distro from Linux
published: true
description: 
tags: linux, distro, web, developer
---
Hi, I'm thinking to use a new distro from linux, I'm a junior web developer and i want to switch from another distro, I tryed ubuntu 18.04, linux mint, linux lite.
Any suggest?