teleren/devto huggingface dataset:
P3 - Personal Porting Project
Tags: personal, project, docker, productivity
Published: 2020-08-16 08:38:55

![Password Strength - XKCD comic](https://imgs.xkcd.com/comics/password_strength.png)

##What
It's a small idea based on the [Password Strength - XKCD comic](https://xkcd.com/936/) to create a *simple* application that will generate a *random* password from a collection of nouns and then recreate it in other programming languages.

##Why
I like to take on new challenges and learn at the same time. I felt this is a great way to be able to learn new skills and techniques - and different Programming Languages - but also reinforce what I already know.

##How
To keep it simple and quick to be able to test and run locally, I've used Docker Compose. This allows me to bring up multiple containers for the various Programming Languages and keep them separate.

I started with Python, as that's what I'm most comfortable with, and was able to get a skeleton/template to implemented in the other languages.

##Progress
I've started to make some progress and recreated the application in Go and Node.

**Go** presented me with the challenge of being entirely new to me. The Syntax was somewhat familiar to Python but with the added Static Typing, needed use of Scanners to read files and needing to make Random Random(!?). It was more verbose with needed Error Handling but I have to say I liked it.
Additionally, building the binary at the end and being able to shrink the Docker Image from 300MB+ to 13MB using Multi-Stage Building was satisfying.

**Node**, again was entirely new to me as well. I originally intended for it to be Deno for TypeScript but came across no official Docker Image for Deno. So to support long term use, defaulted to Node. The use of CallBacks and Async totally threw me and I gave up and tried Rust - that didn't work out.
Then returned after thinking it through and reading more examples and documentation. The Syntax caught me out a few times but I managed to work my way through by going back to the skeleton/template to simplify my way of thinking.

##Future Plans
Going to aim to get add in Ballerina, Ruby & Rust. Possibly, add more but I feel that's a good range of different languages and styles to start with. Next moving onto refactoring and making the applications *suited* to the languages.

Tests will need to be added as you always **need** tests.

Finally, adding use of HTML and CSS to create a UI and making the Docker Images as small as possible.

{% github tomowatt/P3 no-readme %}
Which side project(s) currently you're working on? Share thoughts 💭 👀 😊
Tags: react, javascript, sideprojects, reactnative
Published: 2020-08-16 08:36:51

I was thinking to start working on some side projects beside normal day job works, just for inspiration which side project you are currently working on share your project. What inspired you to get started with your project, web based project, react native projects or any other projects. 😊🔥
Fitness as a developer before and after Covid-19 (Indie vacation #2)
Tags: health, fitness, lifestyle
Published: 2020-08-16 08:32:56

Issue number 2 is all about getting fat while being a developer and sitting a lot in front of monitors and what to do about it.
I was pretty fit all my life. Then Covid-19 hit hard and I gained some kilos. Enough to gain as much belly fat that you will not recognize me as fit anymore. What a shitty feeling. This needs to change as soon as possible. But how? I tried to gain weight all my life. My butrition was always set up so that I had to eat more than I wanted. So when I want to loose weight now, I'm in a position that I didn't encounter ever before. But do I really want to loose weight? Not really. I'm comfortable with my current body weight. More mass means more force in general. And I really feel stronger (but my 1rep maxes are the lowest ever). So what I really want is keeping my weight and loosing all my belly fat while getting stronger at my key lifts. That's basically what everybody wants. Some say it's not possible others say it is. I will finally find out!

#### Here is the plan:

- Intermittent fasting with a rough look at calories. Not really counting, just eyeballing. Adjust fasting frame until completely dialed in.

- Heavy weights with low volume. I want to get strong as fuck. Focus on key lifts(bench press, overhead press, deadlifts, squats, weighted pullups). Sprinkle in some isolation exercises with high volume.

- One or two cardio sessions per week. Those will mostly be playing football with friends or some runs. Perhaps a little freeletics workout here and there too see how my general fitness improves. Nothing too fancy and nothing too demanding.

Everything I do will be tracked with with gymConsole, a workout tracker/life optimizer I'm currently building that can measure any kind of metric. So I will be tracking a lot of other metrics like alcohol consumption and perhaps sleep. This will allow me to see where I'm sabotaging my progress and how I could possibly fix it.

I will post regular updates about my fitness level and what helped me increase it. If you are into fitness too, I'd love to connect. My DMs on twitter are always open. https://twitter.com/RalliPi
A gallery of homeless toys built with VueJS
Published: 2020-08-16 08:18:05

Hello every one, long time no see!

Today I want introduce my new created website: [Homeless Toys](https://homeless-toys.netlify.app) to you.

Yesterday, I was exploring the Sina Weibo and found a post showing 9 images of homeless toys, every one of them is adorable and cute and also pitiful.

![](https://cdn.buymeacoffee.com/uploads/project_updates/2020/08/070f757ec6cf7860b8c7d0a754d08a76.png)


We all have some toys from childhood to nowadays, they brought us so many happy times, we should always not abandon them.

So I create a website to collect all(hopefully, as much as possible) homeless toys to remind each of us how adorable they are and we should not abandon them like a trash :-(

The gallery image style is based on [this one at codepen](https://codepen.io/kathykato/pen/KRQOKY), thanks about that.

And I use [vue-infinite-scroll](https://github.com/ElemeFE/vue-infinite-scroll) to do a pagination loading of images for better user experience.

All the images are collected from internet, I'd like to invite you to submit such images you found or took to make this website great.

You can visit [Homeless Toys](https://homeless-toys.netlify.app) to see the website and [this page](https://homeless-toys.netlify.app/#/thanks-for-submit) to submit a new image.

Hope you love your toys than this website ❤️。

See you in my next post.
Parameters and Arguments
Tags: javascript, beginners, programming
Published: 2020-08-16 08:07:52

---
title: Parameters and Arguments
published: true
description: This post is for beginners who are just making entry to the programming field
tags: #javascript #beginners #programming
//cover_image: https://direct_url_to_image.jpg
---
Yeah!! this post is regarding parameters and argument

Parameters are variables in the declaration of the function.
Arguments are the actual value of the variable that's getting passed to the function.

For example:
* The below function does not take any parameters and called as parameterless function or function with no parameter

```javascript
function ShowNameinConsole ()
{
    console.log("My name is : xyz")
}
//all you need to do is call the function to see the printed message
ShowNameinConsole()
```

* Function with parameters: One can provide as many numbers of parameters required for the function

```javascript
function SingleParam(Param1) //Here Param1 is parameter, 
// SingleParam function takes single parameter
{
    console.log("My name is :" + Param1)
}
// again do not forget to call the function
SingleParam("xyz") // here "xyz" is called as argument
```

```javascript
// javascript provides flexibility to pass arguments to a non-parametric function
function ShowNameinConsole ()
{
    for (let i = 0; i < arguments.length; i++) 
    {
        console.log(arguments[i]);
    }
}
// however this is not a recommended way of programming as other languages do not provide such freedom
```
Here my post ends :smile:
Implemented GitHub Actions to a Django (Python) repository.
Tags: actionshackathon, heroku, django, devops
Published: 2020-08-16 08:07:45

***Greetings DEVs*** :wave:,
I heard about this ***#ActionsHackathon*** through a twitter post by DEV community and was very keen to make an action on GitHub. The first ever time I've dealt with GitHub actions and found it so useful. It sounds great when it allows us to automate and customize our software development workflows.:metal:

### **My Workflow**
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)
* Triggering_Actions : The action is a part of Django_tests workflow which basically does a job to install all the dependencies for project, setting-up respective python versions, runs tests and migrations to the Django project and hence, deploying all these changes to Heroku.:v:


### **Submission Category** 

* DIY Deployments


### **Yaml File or Link to Code**
{% github parthpandyappp/Mail-Me %}

### **Link to Heroku App**
* **[Click here to fetch the link](https://emailman.herokuapp.com)**

Learning new things everyday, glad to contest ***#ActionsHackathon !***
*Happy DEVopsifying & Coding* :smile:
Some of the most common operators used in filter() method SQLAlchemy
Tags: sql, postgres, database, python
Published: 2020-08-16 07:57:24

SQLAlchemy query with OR/AND/like common filters
Some of the most common operators used in filter() method SQLAlchemy

equals:
query.filter(User.name == 'leela')
not equals:
query.filter(User.name != 'leela')
LIKE:
query.filter(User.name.like('%leela%'))
IN:
query.filter(User.name.in_(['leela', 'akshay', 'santanu']))

# works with query objects too:

query.filter(User.name.in_(session.query(User.name).filter(User.name.like('%santanu%'))))
NOT IN:
query.filter(~User.name.in_(['lee', 'sonal', 'akshay']))
IS NULL:
filter(User.name == None)
IS NOT NULL:
filter(User.name != None)
AND:
from sqlalchemy import and_
filter(and_(User.name == 'leela', User.fullname == 'leela dharan'))

#or, default without and_ method comma separated list of conditions are AND

filter(User.name == 'leela', User.fullname == 'leela dharan')

# or call filter()/filter_by() multiple times

filter(User.name == 'leela').filter(User.fullname == 'leela dharan')
OR:
from sqlalchemy import or_
filter(or_(User.name == 'leela', User.name == 'akshay'))
match:
query.filter(User.name.match('leela'))
How to use AWS SSM in offline mode for daily development.
Tags: dotenv, aws, ssm, devops
Published: 2020-08-16 07:50:45

Nowadays lots of teams use AWS SSM to keep their secrets safe, But some times you need to run your app in local development machine without connecting to the AWS SSM. 
In this Article I will try to Explain a simple solution to use  your secrets in offline mode. 

one of the common solution to use AWS SSM is injecting the secrets as environment variable in docker OS. Application can easily access to all variable and secrets which it needs. [ssm-env](https://github.com/remind101/ssm-env).

### Solution: 
AWS CLI  has a nice feature to fetch all secrets recursively (**--recursive --with-decryption**). we use it to fetch All secrets in our local development as a dotenv file. 

```bash
#!/bin/sh

REGION=eu-west-1
PROFILE=default
            
AWS_SECRET_PATH="/secrets/service/TESTAPP/eu/staging/"         
SECRET_FILE_PATH="secrets/eu-staging.env"
            
currentDate=`date`
            
echo "# Last update = $currentDate" > $SECRET_FILE_PATH
            
            
(export AWS_REGION="$REGION"; export AWS_DEFAULT_REGION="$REGION"; aws --profile $PROFILE ssm get-parameters-by-path --path "${AWS_SECRET_PATH}" \
             --recursive --with-decryption \
             --output text --query "Parameters[].[Name,Version,Value]"  \
            | while read key version value  ; do echo "# version $version " >> $SECRET_FILE_PATH ; echo "${key##*/}=$value" >> $SECRET_FILE_PATH ;  done)

```

The result would be the **eu-staging.env** file 

```bash
# Last update = Di 28 Jul 2020 17:26:08 CEST

# version 1 
DB_PASSWORD=Xrttrsdfseww
# version 2 
API_PASS=sdfsdflklhfs
```

The Date time on top of file shown you the last Update. 

to run your app you could use [dotenv-cli](https://www.npmjs.com/package/dotenv-cli) 

```bash
dotenv -e secrets/eu-staging.env yarn start
``` 

you could easily extend this script to fetch all environment secrets based on your needs.

[Aliakbar Salehi](https://salehi186.github.io/)
What is a virtual DOM, and why do we utilize it so frequently when building modern single page applications? 
Tags: react
Published: 2020-08-16 06:53:54



**What is a DOM?**
Let’s start with the basics. A Document Object Mode, or DOM, is a programming interface through which HTML and XML can interact with programming languages like Javascript. It represents the document as a collection of nodes and objects, allowing object oriented languages to interact with it. It is what it says on the can. 

**What is a virtual DOM?**
A virtual DOM (VDOM Henceforth) is also what it says on the can. It is an abstraction of the DOM, detached from a browser specific interface, where changes in state can be made without changes to the actual user interface.

**Why is a VDOM helpful? How is it any different if it's just a representation of a DOM?**
 A traditional HTML DOM is arranged as a tree, with tags acting as objects. Nested tags are children of the enclosing tags. Inner text is also an object and is a child of its tags. This arrangement means that after an update a tag and all of its children must be re-rendered, which is costly, particularly for large apps with enormous trees. 
	A VDOM works similarly to a DOM. When elements are changed in the UI a VDOM is created as a tree, with each element represented as a node. If the state of an element changes, a new VDOM tree is created. The VDOM trees are then compared, and the optimal method to make changes in the DOM calculated. At this point the DOM is re-rendered. 
	Pre-planning changes to the DOM avoids the expensive operations of needlessly re-rendering elements in the DOM tree. This is the primary advantage of the VDOM over the DOM. Think of it like going to the grocery store. You could just wander around, throwing things you need into your cart, but it would be slow. If you instead made a detailed list, pre-determined the locations of the list items in the grocery store, and calculated an optimal route ahead of time, you’d be done shopping much faster. That’s the VDOM. It’s the faster way of doing things.
Weekend Tip: Microsoft Node.js Docs
Tags: node, tutorial
Published: 2020-08-16 06:43:40

Hey guys,

Not the be lazy, but this is such an amazing content library I just had to share it with you!

Microsoft wrote a complete article set on Node.js, and it's really good.

As a developer, you can help people so far, but companies like Microsoft have way more budget to write and make demo's for us, so let's all take advantage of it.

The best part: It's Free! 💸

What you'll learn:

- Node.js basics
- Starting our first Node project
- Debugging Node.js
- Visual Studio tips
- Building an API

As mentioned, that is golden content right there!

You can find these docs here:

[Microsoft Node.js DOCS](https://docs.microsoft.com/en-gb/learn/paths/build-javascript-applications-nodejs/)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
My Website about Terraform examples
Tags: aws, terraform
Published: 2020-08-16 06:39:41



I recently created the following web page, instead of posting on DEV.

https://www.learningcloudinfra.tokyo/en/aws/

I built various AWS resources using Terraform for my own learning and summarized what I built in each posts. 
Each code is available under the MIT license on my Github repository.
Some of the code examples are simply to launch EC2 and RDS or to launch the Go application with Fargate.
I will continue to update this website with articles like EKS  and other AWS resources.

By the way, this site was created using Hugo and Netlify.
It's easy for me to build a website because I can write articles in Markdown and deploy them just pushing Github ;)
The Easiest Way To Install PHP Composer On Apple Mac OSX
Tags: tutorial, php, webdev, devops
Published: 2020-08-16 06:06:49

Since writing this article, I have updated it with new information. You can find the updated version [here](https://nixx.dev/blog/what-is-php-composer-and-how-to-install-it-on-older-mac-os)

In this quick tutorial, I am going to show you the easiest way to install PHP Composer on Apple mac OSX in four easy steps. 

## What is PHP Composer?
Composer is a dependency manager for PHP language, similar to NPM (Node Package Manager) for JavaScript programming language.

## Step 1. Download
Head over to the Composer <a href="https://getcomposer.org/download" target="_blank">download page</a> and scroll down to the **Manual download** section. Click the link to download the latest <a href="https://getcomposer.org/composer-stable.phar" target="_blank">stable version</a>.

## Step 2. Move The Downloaded File
A file named composer.phar will be downloaded and saved to your computer (usually in the **Downloads** folder).  Move it to the **bin** directory. Type the following command in your Terminal.
```
mv Downloads/composer.phar /usr/local/bin/
```
![Step 1 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/oroaox6loiz3ja15gmnx.png)

## Step 3. Edit Bash Profile
Type `ls -la` to see if the .bash_profile file already exists. If it doesn't exist, create one. To create, type `touch .bash_profile` and hit the <kbd>return/enter</kbd> key. Edit the .bash_profile file in your terminal, type `nano .bash_profile`, and hit the <kbd>return/enter</kbd> key. Enter the following line `alias composer="php /usr/local/bin/composer.phar"
` and press <kbd>control</kbd> + <kbd>x</kbd> and then, <kbd>Y</kbd> key, hit the <kbd>return/enter</kbd> key to save. Run `source .bash_profile` after.
![Step 2 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/oyn4hafrxefci3n34hw5.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wr7x4launxtsu0l1kwqt.png)

## Step 4. Check 
Well done! You have PHP Composer successfully installed on your Apple machine. Type `composer --version` to verify.
![Step 4 Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/td03urol3uayeh4c3dob.png)

I hope I was helpful. Thanks.🙏
Compile LaTeX Documents and Upload to Google Drive
Tags: actionshackathon, github, opensource, googlecloud
Published: 2020-08-16 06:06:03


### My Workflow
I wrote this workflow to keep a history of a latex document I was working on. I also wanted the document to be synced with my Google drive without me having to manually upload it every time I made a change.

#### Prerequisites
* A Google [service account](https://cloud.google.com/iam/docs/service-accounts)
* An encryption tool such as `gpg`
* Google drive file ID (The file must be shared with the email associated with the service account)

GitHub suggests using tools such as `gpg` to store large secrets. I used `gpg` to encrypt the json file for the service account and included the encrypted file in the repository. I saved the passphrase as a GitHub secret.    
I also uploaded the first version of my pdf on to Google drive to get a file ID, which I saved as a GitHub secret, as well. I shared this file with the email associated with that service account.

#### Workflow Steps
1. Install `texlive` (`latexmk` included)
2. Compile and typeset the pdf document
3. Save the generated pdf as an artifact
4. Decrypt the encrypted service account JSON file
5. Install [`google-api-python-client`](https://pypi.org/project/google-api-python-client/) python library
5. Upload the new version of the pdf onto Google Drive

#### Possible Improvements
This was my first experience with GitHub Actions so there is still room for improvement, for example:

* The steps 1, 4, and 5 only need be done once. Therefore, it is possible to use GitHub's [cache action](https://github.com/actions/cache) and generate the dependencies and cache them. Then on the consequent runs, the runner can use the cached version to improve speed.  

* Also, I am looking to be able to get `tlmgr` working so that I can customize my LaTeX installation.

Update: I was able to use a docker image to get this working.

* As a next step, it may be possible to separate this workflow into two workflows: one for compiling and saving, and the other for uploading onto Google drive.

Update: I split these two into separate actions.

However, it should be good enough to get the job done.

### Submission Category: 
Wacky Wildcards


### Link to Code
{% github https://github.com/ssinad/devto-actions-hackathon %}


### Additional Resources / Info

1. https://cloud.google.com/iam/docs/service-accounts  
2. https://github.com/actions/cache  
3. https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#limits-for-secrets
4. https://pypi.org/project/google-api-python-client
What is a Web Application Firewall? Explained with Example
Tags: tutorial, waf, codenewbie, security
Published: 2020-08-16 06:04:22

{%youtube nDFLdmIUZCo %}
In this video, We will discuss what is a Web application firewall with example. 


------------------------------SOCIAL------------------------------
Github: https://github.com/codingx01
Twitter: https://twitter.com/TechParida
Linkedin: https://www.linkedin.com/company/codingx/
Facebook: https://www.facebook.com/codingx
Instagram: https://www.instagram.com/coding.x/

Leave any questions in the comments section and don't forget to subscribe to be notified of new content! :)
Introduction to Outlier Detection in Data Science
Tags: datascience, machinelearning, 100daysofcode, asquero
Published: 2020-08-16 06:02:02

You have some data, and you love playing with it, you love finding patterns in it.

But during your data analysis, you found that some data points do not follow the pattern followed by others.

What to do? Are they Outliers? And if they are outliers, how do I handle them?

Below given is a series of tutorials, for detecting and removing outliers from the data. It is advised to go step by step.

What are Outliers & What is Outlier Detection? - https://www.asquero.com/article/what-are-outliers-what-is-outlier-detection

Detecting and Filtering Outliers from Data - https://www.asquero.com/article/detecting-and-filtering-outliers-from-data

Outlier Detection using Supervised Learning Technique - https://www.asquero.com/article/outlier-detection-using-supervised-learning-technique

Outlier Detection using Unsupervised Learning Technique - https://www.asquero.com/article/outlier-detection-using-unsupervised-learning-technique
Github Actions and gh-pages
Tags: actionshackathon
Published: 2020-08-16 05:35:27

### My Workflow
Deploy Action


### Submission Category: 
DIY Deployments


### Yaml File or Link to Code
https://github.com/Maskedman99/maskedman99.github.io/blob/dev/.github/workflows/main.yml


### Additional Resources / Info
Use Github actions and gh-pages to automatically deploy your static React website.

@maskedman99