teleren/devto huggingface dataset:
#OpenCV – Replace background with video in camera feed 🎦 (Black Adam ⚡)
Tags: englishpost, codesample, opencv
Published: 2022-06-13 13:29:44

---
title: #OpenCV – Replace background with video in camera feed 🎦 (Black Adam ⚡)
published: true
date: 2022-06-13 12:00:00 UTC
tags: EnglishPost,CodeSample,EnglishPost,OpenCV
canonical_url: 
---

Hi !

A new twist on these days demos, based on a request from an online friend. Let’s remove and replace the background from our camera feed using a video. For this demo, I’m using the “[Black Adam – Official Trailer 1](https://www.youtube.com/watch?v=X0tOpBuYasI&ab_channel=WarnerBros.Pictures)“. And the output is kind of funny.

![OpenCV Cam with VideoFile 01](https://brunocapuano.files.wordpress.com/2022/06/opencv-cam-with-videofile-01.gif?w=350)

Hey, funny scenario, and if you don’t want to deal with OBS, this maybe a nice to trick to have!

And the sample code:

{% gist https://gist.github.com/elbruno/26962e71296d4ef4caf7d60d711cf029 %}

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
This Week in Apache Pulsar - 13 June 2022
Published: 2022-06-20 13:01:28

---
title: This Week in Apache Pulsar - 13 June 2022
published: true
date: 2022-06-13 12:56:00 UTC
tags: 
canonical_url: 
---

[ https://www.linkedin.com/pulse/june-2nd-week-2022-tim-spann/](https://www.linkedin.com/pulse/june-2nd-week-2022-tim-spann/%20)

#ApachePulsar
Minimum Remove to Make Valid Parentheses
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 12:30:41

Given a string s of `'('` , `')'` and lowercase English characters.

Your task is to remove the minimum number of parentheses ( `'('` or `')'`, in any positions ) so that the resulting _parentheses string_ is valid and return **any** valid string.

Formally, a _parentheses string_ is valid if and only if:

*   It is the empty string, contains only lowercase characters, or
*   It can be written as `AB` (`A` concatenated with `B`), where `A` and `B` are valid strings, or
*   It can be written as `(A)`, where `A` is a valid string.

**Example 1:**

**Input:** s = "lee(t(c)o)de)"
**Output:** "lee(t(c)o)de"
**Explanation:** "lee(t(co)de)" , "lee(t(c)ode)" would also be accepted.

**Example 2:**

**Input:** s = "a)b(c)d"
**Output:** "ab(c)d"

**Example 3:**

**Input:** s = "))(("
**Output:** ""
**Explanation:** An empty string is also valid.

**Constraints:**

*   `1 <= s.length <= 105`
*   `s[i]` is either`'('` , `')'`, or lowercase English letter`.`

**SOLUTION:**

    class Solution:
        def minRemoveToMakeValid(self, s: str) -> str:
            op = set()
            n = len(s)
            stack = []
            for i in range(n):
                if s[i] == '(':
                    stack.append(i)
                    op.add(i)
                elif s[i] == ')':
                    if len(stack) > 0:
                        stack.pop()
                        op.add(i)
                else:
                    op.add(i)
            for i in stack:
                if i in op:
                    op.remove(i)
            return "".join(s[i] for i in sorted(op))
My 1st portfolio website
Tags: portfolio, discuss, rate, beginners
Published: 2022-06-13 12:28:35

## Portfolio URL
https://shammisharma.netlify.app

**Design Idea**
So after 5 years I decided to built my portfolio website and share it. I went with minimalism approach where goal was to keep it simple and gave it a look of typical resume.

**Pages**
It has 3 pages including profile page and two different portfolio pages. 
Profile page includes Brief, Work History, Roles, Skills & resume(pdf file) to download. For portfolio I decided to built 2 different pages to showcase some of my best works in web UI designing / development and graphics designing.

**Deployment**
For deployment I used my github profile to create page and then deployed it over Netlify.

**Goal**
My goal here is to take suggestions from you guys on how can I improve my website more to showcase my abilities and make best impression on recruiters.

Thanks for reading. Kindly rate & let me know how can I improve.
Managing a dev team, whats your best advice?
Tags: management, webdev, discuss, help
Published: 2022-06-13 12:14:32

I have taken a position as Web Manager which I will be starting shortly. I have some dev experience but my knowledge is mostly commercial and analytics based. In my new role I will be tasked as like a gatekeeper for the dev team and project managing what they are working on.

**What I want to know, what are the best experiences you have had with managers, supervisors etc in how they create an environment or culture for you to do your best work?**

On the flip side, what are your worst experiences and stuff that I should look to avoid or be aware of?
Here's What Over 100 Creatives on Twitter Taught Me About Overcoming Creative Block
Published: 2022-06-13 12:11:40

Creative block is something I struggle with quite often as a creative.

Almost like clockwork every couple of months I run out of creative inspiration. I find it hard to string a few sentences together to write an article let alone design something like a Twitter graphic. 

When this slump hits, I feel like I'll never get my creative mojo back. Then when I eventually recover, I just zoom along until the next block happens and I'm back to square one.

I needed a way to mitigate the worst effects of creative block when it inevitably hits.

So, I took to Twitter and researched how other creatives overcome their own creative block. I ended up looking at over 100 creatives during this process and most of them had these 5 tactics in common:

## 1 Go Outside For A Walk In Nature

It's simple and it works; not just for creative block but also for stress and anxiety. There's something about being outside near green trees and grass that does something to your mind and body to promote creativity. 

Even if there's no greenery where you are, the act of changing your attention to something else like being outside for 10 - 15 minutes works wonders for unclogging your mind.

## 2 Switch To Pen & Paper

When you work in a design tool, for instance, you often get bogged down with how the tool itself works as opposed to what you want to create. 

Taking a step back and working with pen and paper removes this friction and allows you to get clear on what you want to do. Once you've figured it out on paper you can go back to your design tool and knock it out.

## 3 Take A Break & Work On Something Else

Switching your attention to something less creatively demanding for a while helps to unclog your thinking. It gives your brain time to work in the background while you're doing something else.

When you return to the original creative work, you'll find you have an abundance of ideas that immediately come to mind.

## 4  Ask For Advice

An underrated but effective tactic. Ask for advice or help from peers, coworkers, or even your Twitter community.

For instance, plenty of creatives ask their audience for videos they should make when they can't think of any. Or you could share your idea with a coworker to get some advice on how to proceed.

## 5 Break Your Routine 

Shock your system by doing something completely different. Go to a coffee shop or a library to do your work for a change, work outside for a few hours, or work in a different room of your house.

This will stimulate your mind and do a fantastic job of getting your creative juices flowing.

---

Is there anything particularly original here? 

No. But, plenty of other people agree these tactics work. 

Try them out and keep the ones that work in your creative arsenal for the next time you hit that creative block.

This article was originally published over on my website: [Here's What Over 100 Creatives on Twitter Taught Me About Overcoming Creative Block](https://www.mishacreatrix.com/essay-overcome-creative-block)
CI/CD for Cumulocity IoT, virtual event recording
Tags: cumulocity, iot, iotplatform
Published: 2022-06-14 09:28:19

---
title: CI/CD for Cumulocity IoT, virtual event recording
published: true
date: 2022-06-13 12:09:33 UTC
tags: Cumulocity, IoT, IoTPlatform
canonical_url: https://tech.forums.softwareag.com/t/ci-cd-for-cumulocity-iot-virtual-event-recording/258249
---

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/un6snw36i3m9matsp0l0.png)
 

## Overview

Continuous Integration (CI) & Continuous Deployment (CD) are important practices for implementing IoT Projects with Cumulocity IoT.

This event will give an overview of what CI/CD means for Cumulocity IoT projects on a concept level and show practical examples with tooling implementing your CI/CD pipeline.

> [Visit the event page](https://groups.softwareag.com/events/details/software-ag-iot-developers-presents-cicd-for-cumulocity-iot/)


> Interested in attending future IoT Developer events?  
> Join the [Cumulocity IoT Developers group](https://groups.softwareag.com/cumulocity-iot-developers/) and get notified of the events that are coming up!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aha58xrumdjckc55190r.png) 
[https://www.youtube.com/embed/3R3s-WSD96A](https://www.youtube.com/embed/3R3s-WSD96A?autoplay=1&feature=oembed&wmode=opaque)


[Visit original post](https://tech.forums.softwareag.com/t/ci-cd-for-cumulocity-iot-virtual-event-recording/258249)
Software AG Developer Center
Tags: general
Published: 2022-06-13 12:09:33

---
title: Software AG Developer Center
published: true
date: 2022-06-13 12:09:33 UTC
tags: general
canonical_url: https://developer.softwareag.com/en.html
---

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m1h7tuwrie58epm4xf6d.png)
Building a Solution? Then the brand-new [Software AG Developer center](https://developer.softwareag.com/en.html) is the place for you! Regardless of your experience, here you will find everything that can help you make the most of the Software AG platforms, all in one place. 

 

> In the [Software AG Developer Center](https://developer.softwareag.com/en.html) you can:

- Learn more about our products, and try them for free!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zde23ji6jgtszr37gnn7.png)
 

- From videos to open source projects, from articles and troubleshooting guides to courses... [Discover all our education options](https://developer.softwareag.com/en/learning-resources.html) matching your taste, preference, and level of experience. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3kd2nrh40t1osft008bc.png)
 

- Strengthen your skills, share ideas, provide solutions, and connect with community experts to get the answers you need.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g4npdu1qyst5ug7bytir.png)
 
 

- Get to know of any [upcoming developer events](https://developer.softwareag.com/en/community.html).
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0g66uxhjvuf2xanemjz.png)
 
Visit the [Software AG Developer Center](https://developer.softwareag.com/en.html), the one place for you to discover all the developer related information.
Handle errors centrally in Node.js
Published: 2022-06-13 11:55:49

A very important spice to cook a healthy app, "Handle errors centrally. Not within middlewares".  Here is a simple implementation that might help new developers.



**Rules:** 
https://github.com/goldbergyoni/nodebestpractices/blob/master/sections/errorhandling/centralizedhandling.md



**Implementation:** 
https://github.com/despider001/handle-error-centrally
How To Create A Payment Gateway App Like PayPal?
Tags: paypal, paypalclon, webdev, productivity
Published: 2022-06-13 11:48:18

An app like PayPal has entered the P2P market today and is a known leader in this domain. Various businesses across the globe are using PayPal as the best payment service provider. So PayPal is uniquely designed for better performance. It depends on the merchant’s account as well as how transactions are done on the app. 

There are partnerships with stores and restaurants. In the area, we can find different options and know about how to pay for different products, petrol, or food. Even the app shows a list of all vendors that are easily available nearby. 

The [PayPal clone](https://allinonecluster.com/paypal-clone) application gives users the freedom to transact the online payments effortlessly. The apps make it easy for businesses to take payments from customers for the products purchased. The users also transfer money via credit/ debit cards, bank accounts, e-wallets etc. 

Our app like PayPal assists entrepreneurs and business owners. It also already is focused on the growth of the fintech business so that it can generate revenue. Even the Paypal clone script is a must launch that awaits customizations and in turn, helps the payment gateway app.
BUILDING A FANCY CALCULATOR WITH JAVASCRIPT
Tags: webdev, javascript, beginners, programming
Published: 2022-06-13 11:44:48



Thank you for visiting, 

I hope you had a good weekend, mine wasn't. I intended to reach out to 50 companies with cold emails about how I would make a great web developer intern or full-time employee because I know I am ready to take my programming skills to the next level .... Haven't started yet but should be finished by the end of the week. Before I go back to my cold email template, let me share a few things I did with JavaScript this week.
        Javascript is easy for most people, but for me, I'm taking it one step at a time. earlier this year, i created a funny calculator, see below. Initially, I was excited, but when I realized there were other ways to do it, the functionality was far better than what I had done in the beginning 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/km1jqyww75z9u5maef0u.png)





With this code above i can only change the numbers in my  VScode lol , no random numbers but the symbols(+,-,/,*) worked which i was excited for. See the result below 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/isrs8uxhsectlt50t5e0.png)


basic-calculator-mzallison.vercel.app



Funny yeah , However after watching so many youtube videos like you , i stumbled on the below calculator and decided to replicate it because it looked way better than what i had done in the past and i created the below and i felt fulfilled and asked for an extra caoffee at the cafe i was practicing this.

The difference between the first and second was CONDITIONAL STATEMENTS
In JavaScript we have the following conditional statements:

Use if to specify a block of code to be executed, if a specified condition is true
Use else to specify a block of code to be executed, if the same condition is false
Use else if to specify a new condition to test, if the first condition is false.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mws1199nc8bsw9xagg6p.png)
















Viola !! the result below. Practice make perfect 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q39bgj7pbzfaxmn1a0uf.png)


Lastly, you can switch from light to dark mode. I prefer Dark mode for all my Apps .
fancy-calculator.vercel.app
fancy-calculator-git-main-mzallison.vercel.app


Thank you very much for your attention!!!
SETTING UP A VIRTUAL ENVIRONMENT
Tags: python, programming
Published: 2022-06-13 11:41:37

It is a fact that as we engage in various kinds of projects in python, we'll come across dependencies. These dependencies are a general phrase in software engineering that refers to when one piece of software depends on another or, simply put, a set of other people's code that we can install and utilize instead of having to rewrite it ourselves. When we come across these dependencies, having a virtual environment then comes in handy.[To continue reading](https://oyedeletioluwani.hashnode.dev/setting-up-a-virtual-environment)
Live Logs for Servers
Tags: unrealengine, pixelstreaming, metaverse
Published: 2022-06-13 11:39:02

---
title: Live Logs for Servers
published: true
description: Debug issues with live logs direct from your servers.
tags: unrealengine, pixelstreaming, metaverse
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9gq126uqo6574itgs4f.jpg
canonical_url: https://make.live/blog/unreal-engine-live-server-logs
---
As we strive to make our developer experience best in class, one thing the team has been working hard on is to ensure that you can get the information you need when things don’t quite work out when deploying an Unreal Engine Pixel Streaming application.

We are super happy to announce two new additions to our developer experience available today on the Make Live platform.

## Live Logs from Servers

As of today you can now view your active servers and view live logs from your Unreal Engine servers as they start up and run. No need to refresh, you can keep your browser window open and logs will update as and when they are output from your Unreal Engine application in near real-time.

Not only that, the Make Live platform will parse the logs so that they are presented within Make Live as a readable and easy to search format. Making finding and resolving problems a much easier task than ever before.

![Make Live server logs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f146z4cybcazvnpc8vrh.png)

**Note:**

We recommend to package your project with “Development” mode selected whilst you are in your early stages of building your Unreal Engine Pixel Streaming application as “Shipping” mode will not output logs as you might expect.

## A New “Error” Status for Servers

![Make Live server error statuses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fuf02g829q2b28rr2njs.png)
 
Another great addition that ties in with the live server logs announcement is that we now handle any Unreal Engine startup or crashes in a much more graceful way. We will now move any server that could not startup or experiences a crash into an error state that can be seen in your “Server Live View”. From here you can simply check out the logs and see what went wrong and look to resolve, package and re-deploy.

We hope with these two new additions it provides a fantastic insight to troubleshoot and help get your Unreal Engine Pixel Streaming applications deployed for everyone to use.

Of course the Make Live team is always here to help, please do get in touch if you have any feedback or questions.

We’d love to hear from you on Live Chat or Twitter at [@MakeLiveHQ](https://twitter.com/makelivehq).
Maximum Nesting Depth of the Parentheses
Tags: leetcode, dsa, theabbie
Published: 2022-06-13 11:30:39

A string is a **valid parentheses string** (denoted **VPS**) if it meets one of the following:

*   It is an empty string `""`, or a single character not equal to `"("` or `")"`,
*   It can be written as `AB` (`A` concatenated with `B`), where `A` and `B` are **VPS**'s, or
*   It can be written as `(A)`, where `A` is a **VPS**.

We can similarly define the **nesting depth** `depth(S)` of any VPS `S` as follows:

*   `depth("") = 0`
*   `depth(C) = 0`, where `C` is a string with a single character not equal to `"("` or `")"`.
*   `depth(A + B) = max(depth(A), depth(B))`, where `A` and `B` are **VPS**'s.
*   `depth("(" + A + ")") = 1 + depth(A)`, where `A` is a **VPS**.

For example, `""`, `"()()"`, and `"()(()())"` are **VPS**'s (with nesting depths 0, 1, and 2), and `")("` and `"(()"` are not **VPS**'s.

Given a **VPS** represented as string `s`, return _the **nesting depth** of_ `s`.

**Example 1:**

**Input:** s = "(1+(2\*3)+((8)/4))+1"
**Output:** 3
**Explanation:** Digit 8 is inside of 3 nested parentheses in the string.

**Example 2:**

**Input:** s = "(1)+((2))+(((3)))"
**Output:** 3

**Constraints:**

*   `1 <= s.length <= 100`
*   `s` consists of digits `0-9` and characters `'+'`, `'-'`, `'*'`, `'/'`, `'('`, and `')'`.
*   It is guaranteed that parentheses expression `s` is a **VPS**.

**SOLUTION:**

    class Solution:
        def maxDepth(self, s: str) -> int:
            depth = 0
            mdepth = 0
            for c in s:
                if c == "(":
                    depth += 1
                if c == ")":
                    depth -= 1
                mdepth = max(mdepth, depth)
            return mdepth
Working with the Node.js File System
Tags: node, javascript
Published: 2022-06-13 11:21:29

---
title: Working with the Node.js File System
published: true
description: Simple steps to get up and running with Node.js file system
tags: node,js
cover_image: https://res.cloudinary.com/dlwivxwf8/image/upload/v1655119187/Blog/Working%20with%20Node.js%20File%20System/_Blue_White_Modern_Marketing_Strategy_Blog_Banner.png
# Use a ratio of 100:42 for best results.
---
Firstly, we'll import the file system core module
` const fs = require('fs'); `

Next, Let's read data from a file
```javascript
fs.readFile('./notes.md', (err, data) => {
  if (err) {
    console.log(err);
  }
  console.log(data.toString());
});
```

Great, we'll see how to write to files next, this code will create a new file if the referenced one does not exist
```javascript
fs.writeFile('./note.md', 'I am a new file', () => {
    console.log('created a new file succesfully')
})
```

Awesome, now let's delete the file if it already exists, or create it if it does not
```javascript
if (fs.existsSync('./note.md')) {
  fs.unlink('./note.md', (err) => {
    if (err) {
      console.log(err);
    } else {
      console.log('file deleted');
    }
  });
} else {
  fs.writeFile('./note.md', 'I am a new file', () => {
    console.log('file created');
  });
}
```

Next, let's work with directories. We'll see how to create a new directory or delete it if it already exists.
```javascript
if (fs.existsSync('./new-folder')) {
  fs.rmdir('./new-folder', (err) => {
    if (err) {
      console.log(err);
    } else {
      console.log('folder deleted');
    }
  });
} else {
  fs.mkdir('./new-folder', (err) => {
    if (err) {
      console.log(err);
    } else {
      console.log('folder deleted');
    }
  });
}
```

> Did you find this article helpful? Help spread the word so more people can learn how to work with the file system in Node.js. [Follow me on Twitter](https://twitter.com/umuks_) and tell me how you found this useful.