teleren/devto huggingface dataset:
Using .NET 5 split Method to split strings in PowerShell 7.1+
Tags: powershell, scripting, coding, dotnet
Published: 2021-06-09 17:50:49

I started using Powershell in version 5, which is built on .NET 4.

Powershell 7 (well 7.1 and up anyway) is built on .NET 5. 7.1+ has implemented a ton of awesome features. As with any change, 


I use a mixture of .NET methods when I code in Powershell. One method I often use is Split. I was working on a project where I was matching culture to a region that a game supported to automagically identify a default Country Code for my end users. My goal was to get the country from the Display Name in `Get-Culture` In PowerShell 5, this might be how I do this:

```powershell
Get-Culture | Select-Object -ExpandProperty DisplayName
English (United States)
$SplitArray = (Get-Culture | Select-Object -ExpandProperty DisplayName).Split("()")
$SplitArray
English
United States
$SplitArray[1]
United States
```
Let's do the same command in PowerShell 7.1.3:

```powershell
Get-Culture | Select-Object -ExpandProperty DisplayName
English (United States)
$SplitArray = (Get-Culture | Select-Object -ExpandProperty DisplayName).Split("()")
$SplitArray
English (United States)
$SplitArray[1]
```
Wait, what happened in 7.1.3? The split didn't work, so the last item in the array wasn't returned.

Let's walk through it. We used the cmdlet `Get-Culture` to grab some basic information. When we use the split method on two characters, `(` and `)`. PowerShell 5 sees we are trying to split a string, but automatically converts it to split on the characters, `(` and `)`. In .NET 4, the string class only had methods that took characters as parameter types. PowerShell sees this and automagically converts it, to make life a little easier on you. Note there's an implied 'OR' (`|`) here as it's an array of characters.

Why is PowerShell 7 behaving differently? In .NET 5, the string class has some additional parameters that accept strings. PowerShell 7 does not take any automatic action.  To really Illustrate the difference here, I'll split on strings instead of characters using our `Get-Culture` from above to get the same output. Note this is an ugly way of doing it but it's for demo purposes:

```powershell
$SplitArray = (((Get-Culture | Select-Object -ExpandProperty DisplayName).Split("English ("))[1].Split(')'))[0]
$SplitArray
United States
```
Ok neat, but that's a little ugly. We're splitting twice. What might be a better way? We can use a character typecast array!

```powershell
$SplitArray = ((Get-Culture | Select-Object -ExpandProperty DisplayName).Split([char[]]"()"))[1]
$SplitArray
United States
```

Happy coding!
NodeJS - Run your app with multiple versions of Node
Tags: docker, webdev, node
Published: 2021-06-09 17:09:44

{% youtube RWgYby_u68s %}

As newer version of [NodeJS](https://nodejs.org/) is released, it brings with it - performance improvements, speed, security, new features and more. If you have a nodejs based web application and plan to upgrade the version of nodejs, then of course it becomes important to test the application on the new version to ensure its sanity.

In this post we will explore how can we use Docker to run our nodejs based application with two (or more) versions of nodejs.

Lets explore the directory structure to understand how the files have been organized.

```javascript
vishalr@ubuntu ~> tree multi-node-app
multi-node-app/
├── app
│   ├── index.js
│   └── package.json
├── docker-compose.yml
├── node14.Dockerfile
├── node16.Dockerfile
└── proxy
    └── nginx.conf

2 directories, 6 files
vishalr@ubuntu ~> 
```
The main app resides inside the `app` folder. The files `node14.Dockerfile` and `node16.Dockerfile` contain instructions to build docker image, to run app with Node v14.x and v16.x. The file `docker-compose.yml` is a wrapper over the two docker files and adds Nginx as proxy over two docker containers. The file `proxy/nginx.conf` contains the barebones configuration to use nginx as proxy for our application.

Additionally we also need to make the following entry in the file `/etc/hosts`.

```bash
127.0.0.1  node16.myapp.local  node14.myapp.local
```

To start all the containers execute the following command - 

```bash
vishalr@ubuntu ~> docker-compose up
```

Once all the containers (nginx, node16 and node14) are up, you can use the urls `http://node16.myapp.local` and `http://node14.myapp.local` in your local browser to test your application running with Node v16.x and Node v14.x respectively. 

You can find this project at my [Github repository](https://github.com/vishalraj82/multi-node-app)
3 Components of Reviewing a Pull Request
Tags: python, machinelearning, datascience, github
Published: 2021-06-09 17:46:12

Scikit-learn is the machine learning library for Python.  [Thomas Fan](https://www.linkedin.com/in/thomasjpfan/), a core developer for scikit-learn, gives a presentation on how to review pull requests.  Specifically, the 3 components are:
1. The mechanics of code review on GitHub.
2. The social aspects of code review and how to effectively give feedback.
3. The technical aspects of reviewing a pull request.

It's an informative video, with a great Q&A session at the end.
[Thomas Fan:  Reviewing Pull Requests](https://youtu.be/dyxS9KKCNzA)
Fusuma, multi-touch gestures for Linux, updated to v2!
Tags: linux, ubuntu, ruby
Published: 2021-06-09 17:45:20

---
title: Fusuma, multi-touch gestures for Linux, updated to v2!
published: true
description: 
tags: linux,ubuntu,ruby
cover_image: https://repository-images.githubusercontent.com/69813387/60879a00-166c-11ea-9875-3bf0818c62ec
---

## Fusuma v2 is released! 🎉

{% github iberianpig/fusuma %}


There are a lot of updates in Fusuma v2.

* Performance improvements with multiprocessing and IO multiplexing.
* Real-time continuation gestures
* Contextual switching of gesture settings
and other enhancements!


## Update Fusuma

You can update Fusuma with the gem command.
No need to use `sudo` if you haven't installed it using system-wide Ruby.

```sh
$ sudo gem update fusuma
```

If you have any installed Fusuma plugins, update them all.

### List fusuma plugins

```sh
$ sudo gem list fusuma-plugin-
fusuma-plugin-keypress (0.4.1)
fusuma-plugin-sendkey (0.6.2)
fusuma-plugin-wmctrl (0.4.3)
```

### Update fusuma plugins
```sh
$ sudo gem update fusuma-plugin-sendkey fusuma-plugin-wmctrl fusuma-plugin-keypress
```

## More powerful tweaks with Fusuma v2!🦾

Some useful features have been available using the v2 API.

* App-specific gesture settings ([iberianpig/fusuma-plugin-appmatcher](https://github.com/iberianpig/fusuma-plugin-appmatcher))
* Mac OS style three-finger drag
* Windows-style 3-finger swipe to switch windows
* Swipe/rotate to adjust volume and change brightness.

I will write a series of articles about these configuration details.

↓ BTW, I realized that three-finger drag was really useful after I implemented it.
{% twitter 1364924640125014021 %}

## Watch Fusuma Wiki🤓
Some configs have already been added to the [fusuma Wiki](https://github.com/iberianpig/fusuma/wiki).

Anyone can edit this Fusuma Wiki.
It also contains settings for various distributions or WM(Ubuntu, Linux Mint, Pop!_OS, KDE, i3...). If you find any valuable configurations, please share them on Fusuma Wiki. I look forward to seeing new tips.

## Next Articles

{% post https://dev.to/iberianpig/configure-application-specific-gestures-in-fusuma-v2-43p6 %}
React Portfolio Project
Tags: react, javascript, webdev, portfolio
Published: 2021-06-09 17:43:57


![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vxq3hwbhzl6q9j32de6k.png)
  
## Watch On YouTube: [Watch Now][youtubelink]

## Source Code: [Github](https://github.com/ShaifArfan/AYANs-portfolio)

## Live Preview: [Open Link][preview]

Coded by - [shaif Arfan](http://instagram.com/shaifarfan08) | [web cifar](http://webcifar.com)

<hr>

## Project Details

A portfolio for a web designer. We used React js to make this portfolio. A clean design with full responsiveness. You will find this portfolio very professional. Also, we added smooth scroll in the portfolio which will make the scroll experience really elegant.

This is a beginner-friendly react js project. There will be a full free step-by-step tutorial on [YouTube][youtubelink]. This project is made for education purposes by the Team [web cifar][webcifarwebsite]. We are going to learn so many things through this project especially how to work with React Js. React Js is one of the hottest techs for web dev. Through this project, we will have a good understanding of react js. Besides React js we are going to use many other techs. Also, there will be a full project tutorial playlist on [YouTube][youtubelink] so that you can get the step-by-step guide to make this portfolio.

## Project Requirement

1. HTML, CSS
1. JavaScript
1. React Basic (optional)

## What we are going to Use/learn

- React
- React Hooks
- Styled Components
- Swiper js
- React Transition Group
- Smooth Scrollbar
- React Icons
- React Router Dom
- More...

## Starter Files

For the starter files, we created a `branch` in this repository named `starter_files`. You need to change the branch in the top corner of the repo then you will get the starter files and now you can clone the repo or `download` it.

## Getting Started

The recommended way to get started with the project is Follow the [YouTube tutorial][youtubelink]. You will find all the step-by-step guides for free. Or you Can start the project on your own by following the guide below.

After getting the starter files, you need to go the file directory and run

```shell
npm install
```

and after that start the live server.

```shell
npm start
```

# If you like the tutorial, please share this with others.

[preview]: https://ayans-portfolio.netlify.app/
[youtubelink]: https://www.youtube.com/playlist?list=PLRv_Gd5w9e7mO-lGxKkNSWiAlsiZHnQYY
[webcifarwebsite]: https://webcifar.com
Real Time Face Mask Detection || Tensorflow || OpenCV
Tags: deeplearning, machinelearning, devops, github
Published: 2021-06-09 17:41:13

Hello, Devs! Worked on CNN model to detect a masked face. The model is currently working with an accuracy of 98.537%. Working on it to improve its accuracy further.

𝐍𝐞𝐭𝐰𝐨𝐫𝐤 𝐮𝐬𝐞𝐝 : 𝐂𝐨𝐧𝐯𝐨𝐥𝐮𝐭𝐢𝐨𝐧𝐚𝐥 𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤
𝐅𝐚𝐜𝐞 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧: 𝐇𝐚𝐚𝐫-𝐜𝐚𝐬𝐜𝐚𝐝𝐞
𝐅𝐫𝐚𝐦𝐞𝐰𝐨𝐫𝐤 𝐮𝐬𝐞𝐝: 𝐓𝐞𝐧𝐬𝐨𝐫𝐟𝐥𝐨𝐰
𝐀𝐏𝐈 𝐮𝐬𝐞𝐝: 𝐊𝐞𝐫𝐚𝐬
𝐂𝐨𝐦𝐩𝐮𝐭𝐞𝐫 𝐕𝐢𝐬𝐢𝐨𝐧 𝐥𝐢𝐛𝐫𝐚𝐫𝐲 𝐮𝐬𝐞𝐝 : 𝐎𝐩𝐞𝐧𝐂𝐕 
𝐓𝐞𝐬𝐭𝐢𝐧𝐠 𝐕𝐢𝐝𝐞𝐨: https://lnkd.in/dk7ad9a

<a href="https://github.com/GauravSingh9356/Computer-Vision/tree/master/Face%20Mask%20Detection">GitHub</a>
Nuxt.js and Being an Open-Source Maintainer w/ Alexander Lichter | Podcast
Tags: opensource, vue, javascript, podcast
Published: 2021-06-09 17:34:49

{% spotify spotify:episode:55DkTbi5QpUKbpFGQvMIms %}

## What is HTML All The Things

HTML All The Things is a [web development podcast](https://podcast.htmlallthethings.com/) and [discord community](https://discord.com/invite/jweMCx9) which was started by Matt and Mike, developers based in Ontario, Canada. 

The podcast speaks to web development topics as well as running a small business, self-employment and time management. You can join them for both their successes and their struggles as they try to manage expanding their Web Development business without stretching themselves too thin.

## What's This One About?

In this episode, Matt and Mike sat down with Alex Lichter to discuss Vue.js, Nuxt.js, and maintaining an open-source project. Nuxt.js is a very popular framework that works on top of one of Mike's specialties, Vue.js. While Vue.js is already a framework on top of JavaScript, Nuxt.js acts as another layer that helps make the developer's experiences even easier than with just Vue.js. Beyond the Vue.js talk, the guys discuss Alex's open-source experience, learning all about his role as a maintainer on Nuxt.js, and discussing open-source projects at length.

## Guest Introduction

Alexander Lichter is a self-taught developer who now runs his own [web development consulting company](https://www.lichter.io/). He’s also a core maintainer of [Nuxt.js](https://nuxtjs.org/), one of the largest Vue.js frameworks for server-side rendering and static site generation. When not working on open-source frameworks Alexander is giving talks, writing blog posts and helping other companies with regard to web development. 

[Alex's Twitter (@TheAlexLichter)](https://twitter.com/TheAlexLichter)
[lichter.io](https://www.lichter.io/)

## Show Notes

####Nuxt.js
4:19 - Why use Nuxt.js instead of just plain Vue?
6:45 - Server-Side Rendering vs Static Site Generation
9:30 - When to use Nuxt?
12:35 - Which portion of the Nuxt do you maintain? 
14:38 - What's the future of Nuxt.js hold?

####Maintaining an Open-Source Project
20:13 - How did you become a core maintainer for an awesome framework like Nuxt.js?
34:30 - What's the day to day like?
39:55 - Is there any monetary compensation for being a maintainer?
42:45 - Is there anything different you have to consider when coding for an open-source project vs closed source?

##Key Takeaways

* Nuxt.js makes creating traditional web pages easier by making state management and routing as simple as static sites.

##Social Links

You can find us on all the podcast platforms out there as well as

[Instagram (@htmlallthethings)](https://www.instagram.com/htmlallthethings/)
[Twitter (@htmleverything)](https://twitter.com/htmleverything)
[TikTok (Html All The Things)](https://www.tiktok.com/@htmlallthethings)
Rock Paper Scissors in React vs JavaScript (video)
Tags: react, javascript, tutorial
Published: 2021-06-09 17:33:27

{% youtube TIefmKAWMTo %}

Video Sponsors: Get 70% off NordPass at https://nordpass.com/aniakubow or use the code aniakubow for the SummerKickOff Sale. Plus, you get an additional month for FREE!

In this video I show you how to code Rock Paper Scissors in React! This is a continuation from my '3 ways to code Rock Paper Scissors in JavaScript' video. 

You can find the final code here: https://github.com/kubowania

___
⭐ In most videos I use Tabnine as my A.I autocompletion tool. You can download it for free here: http://bit.ly/tabnine-top-tool

⭐ You can get a blockchain domain with my affiliate link here: http://bit.ly/get-a-crypto-domain

⭐ If you would like to buy me a coffee, well thank you very much that is mega kind! : https://www.buymeacoffee.com/aniakubow

⭐ Sign up for weekly coding tips from my newsletter partnership: https://bit.ly/JS-tips

You can also find me on:
* Twitter: https://twitter.com/ania_kubow
* Instagram: https://instagram.com/aniakubow
Using Swift, Vapor, and MongoDB for applications
Tags: swift, mongodb
Published: 2021-06-09 17:31:41

TLDR: We recently released a new, small library that helps Swift developers using Vapor integrate with MongoDB. To help get started, we also have included an example application to tinker with.

## Links
* [mongodb-vapor library](https://github.com/mongodb/mongodb-vapor) 
* [example application](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample)
* [Documentation](https://mongodb.github.io/mongodb-vapor/current/index.html)

## Essential Details
The new library works with Swift 5.2+, Vapor4, the MongoDB Swift driver, and supports Linux and MacOS usage. It requires Mac 10.15+.

##  The Application
Our example application is fully async and uses [SwiftNIO](https://github.com/apple/swift-nio), and has a REST API interface. 

It's fairly simple. You can store a list of kittens and details about them (name, favorite food, whatever). Please check it out and give us your feedback!

And if you're interested in other examples (Kitura or Perfect), you can find those [here](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples)
How to Generate QR Code in PHP Laravel
Tags: laravel
Published: 2021-06-09 17:30:38

Hi Dev,

In this example, i will show you how to generate qr code in laravel 8. In this article, we will implement a laravel 8 qr code example. In this article, we will implement a how to create qr code in laravel 8. if you want to see example of how to make qr code in laravel 8 then you are a right place.

simple-qrcode is a composer package for generate qr code in your laravel 8 application. simple-qrcode provide to send sms and email with generated qr code. you can create qr code for geo, phoneNumber, birthdate using simple qrcode package.

after generating qr code, we might be require to write code for scan code using jquery. if you same requirement for scan qr code using jquery then you can follow my this tutorial: qr code scanner using instascan js.

Here, i write example step by step to generate qr code in your laravel 5 admin panel. so let's follow few steps to get this example:

[How to Generate QR Code in PHP Laravel](https://www.codecheef.org/article/how-to-generate-qr-code-in-php-laravel)
Confidence Interval Understanding
Tags: aipool, ai, machinelearning, datascience
Published: 2021-06-09 17:12:20

### Introduction
Suppose you are looking for a particular value of a characteristic of a population, firstly data is obtained from a sample of that population(could be the mean), and the parameter is guessed from the sampled data. Due to not using the whole population, one may ask if the sampled data is a reliable estimation of the whole population. This is where confidence interval comes in.

### Confidence Interval 
As earlier mentioned, the **range of values** that you expect your estimate to lie within, within a certain level of confidence is the confidence interval.  For instance, if you say you have a 90% confidence level, it means you are **very confident that 90% of the time**, your estimate falls between the lower and upper bounds which are specified by that confidence interval.

There's a value called the **alpha value**, which indicates a threshold, for instance, an alpha of 0.1, which means that there's a less than 10% chance that the test could have occurred under the null hypothesis. Coming back to our confidence level, the desired confidence level is normally 1 minus this alpha value used in the statistical testing.

![img](https://files.ai-pool.com/a/78fcb62f6ed4096377bfb01d63fb30b8.png)

Therefore, if an **alpha value of p < 0.1** is chosen for statistical significance, then the confidence level would ultimately be **1-0.1= 0.9 or 90%**.

Confidence intervals are used for various statistical estimates such as 

* Proportions
* Mean of a population
* Differences that exist  between the mean and proportions of a population
* the variation estimates among groups

As the same suggests, these are all estimates of a number and do not give valuable information around that number, but the confidence interval is a good way to know more information about the variations of the number.

You can find more in the following article [Confidence Interval Understanding](https://ai-pool.com/a/s/confidence-interval-understanding)

### Other Resources
* [Bias-Variance Tradeoff in Machine Learning](https://ai-pool.com/a/s/bias-variance-tradeoff-in-machine-learning)
* [Understanding of Probability Distribution and Normal Distribution](https://ai-pool.com/a/s/understanding-of-probability-distribution-and-normal-distribution)
* [Recommendation Systems by Matrix Factorization and Collaborative Filtering](https://ai-pool.com/a/s/recommendation-systems-by-matrix-factorization-and-collaborative-filtering)
* [Understanding of Regularization in Neural Networks](https://ai-pool.com/a/s/understanding-of-regularization-in-neural-networks)
Are there any awesome light themes for vscode
Tags: vscode, watercooler, healthydebate, themes
Published: 2021-06-09 17:08:36

I've been seeing people do a lot of debate around dark mode vs night mode. I don't know the facts if there really much of impact with respect to battery savings & blue lights etc.

I'm an out & out dark theme guy for last 5+years. I've tried vscode's default light & quiet light themes & found them too hard on my spectacled eyes.

Can someone recommend me some light themes for vscode? 

Thanks in advance 🎉🎉🎉
5 Top Secret Gems Of Python Libraries Untold To The Data Science World
Tags: machinelearning, datascience, python, opensource
Published: 2021-06-09 16:58:57

One of the most incredible things about practicing Python is its continuity of open-source libraries. There is a library for fundamentally anything. If you have studied some of my preceding blogs, you may have remarked that I’m a big supporter of low-code libraries. That’s not because I’m procrastinating to type code but because I fancy investing my time operating on a project with values.

Here is the link to the article: 5 Top Secret Gems Of Python Libraries Untold To The Data Science World

#datascience #python #coding #education #opensource #datavisualisation #libraries #pythonlearning #pythonprogramming 

https://modularml.blogspot.com/2021/06/5-top-secret-gems-of-python-libraries.html
AWS Workshop: CICD-pipeline-cfn-ecs-fargate-bluegreen
Published: 2021-06-09 16:52:05

# About
In this workshop we learn how to build a CI/CD pipeline to develop, containerize and deploy a web-based application on AWS Fargate using lambda for blue/green deployment.
Read more: https://workshops.aws/card/CICD-Pipeline-Cfn-ECS-Fargate-BlueGreen

# Cloud9

Cloud9 environment was setup in us-east-1.
Environment: AWS-Workshop
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3dd7hch4wfnhq8v8s77.PNG)

# Github Token

Github access token was setup.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpdfaq72kvzqlvnv8f7y.PNG)

# CI/CD Pipeline built

FORK THE REPO
CLONE THE REPO
SWITCH TO FARGATE BRANCH
RUN SCRIPT (IAC)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zsbgfwfrc0lttlxuphin.PNG)

# Inputs

S3 Bucket: jicoing-aws-bucket
CloudFormation Stack Name: Workshop-stack-jicoing 
GitHubUser: jicoing
GitHubToken: *************
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07z3ohhrc3zzsweyg83f.PNG)

# Stack

`Workshop-stack-jicoing`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m4af7uaffenq3qefswj.PNG)

# Deployment Pipeline

Deployment pipeline is built using Cloudformation.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/br22i9v6t5p6yn23kdgq.PNG)

# Deploy Approve

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

# Load balancer URL

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

# Output

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5surifsuiy4pa2uvfxi1.PNG)

# Target groups

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mdojgdtqdcazbic1diy.PNG)

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

#ECS Cluster

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

# Commit new code - index.php modified

The index.php file is edited to give a new background colour #b03043. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5j4f65f88n0gaun3q8nm.PNG)

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

# Blue/Green swap approval - CodePipeline

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

# Output

New background is red

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h5gcsdw33h5ebv01g7x6.PNG)
CloudStick Team Feature is Live
Published: 2021-06-09 16:40:57

Hi,

https://cloudstick.io/

Teamwork is the most critical and effective strategy for any business. Assign team members to the right projects and work with multiple collaborative teammates.

This is let you know that CloudStick released the team feature and it is available for Pro and Basic Users.

No Extra Cost for Team.

Create Teams
Setup Privileges
Add Servers
Add Members