teleren/devto huggingface dataset:
Writing ffmpeg filter complex in python
Tags: python, beginners, programming
Published: 2021-12-15 10:53:54

I am new to ffmpeg. I am trying to learn to convert ffmpeg command line of multiple audio merge to ffmpeg-python format.

'ffmpeg -i first.mka -i second.mka -i third.mka -i fourth.mka -filter_complex "[1]adelay=104000|104000[b]; [2]adelay=260000|260000[c]; [3]adelay=362000|362000[d]; [0][b][c][d]amix=4" merged.mka

Can anyone help me learn full transformation syntax? Specifically i want to know how to represent filter complex in ffmpeg-python This is what i have tried so far

[lk = [60,120] # delay time in seconds
    audios = []
    for k, i in enumerate(audio_file):
            audio = ffmpeg.input(i['src'], select_streams='a')
            if audio['streams'] and i['muted'] == False:
                a = (audio.filter('adelay', f"{i[lk] * 1000}| 
   {i[lk] * 1000}"))
            audios.append(a)
    mix_audios = ffmpeg.filter_(audios, 'amix') if len(audios) > 1 
    else audios[0]]
Let's try C++20 | Erase elements in a container with std::erase()
Tags: cpp, programming, todayilearned
Published: 2021-12-15 10:51:33

Imagine you have a vector of integers and you want to remove all zeros. It sounds like a simple task, right? Well, before C++20, it wasn't that obvious. Let's see how C++20 makes things easier.

## Before

Since the beginning of C++, there is a [free function named `std::remove()`](https://en.cppreference.com/w/cpp/algorithm/remove). Young padawans may naively use it like this:

```cpp
#include <iostream>
#include <vector>

int main() {
    std::vector data{12, 0, 654, 0, 4587, 0, 42};
    for (const auto& e: data) {
        std::cout << e << '\t';
    }

    std::cout << '\n';
    std::remove(data.begin(), data.end(), 0);

    for (const auto& e: data) {
        std::cout << e << '\t';
    }
}
```

They would get this weird result:

```
12      0       654     0       4587    0       42
12      654     4587    42      4587    0       42
```

If we get a closer look at [the description of the function on cppreference](https://en.cppreference.com/w/cpp/algorithm/remove), we see:

> A call to remove is typically followed by a call to a container's `erase` method, which erases the unspecified values and reduces the _physical size_ of the container to match its new _logical size_.

Hence, the correct way to erase elements prior to C++20 is:

```cpp
int main() {
    std::vector data{12, 0, 654, 0, 4587, 0, 42};
    for (const auto& e: data) {
        std::cout << e << '\t';
    }

    std::cout << '\n';
    const auto logicalEnd = std::remove(data.begin(), data.end(), 0);
    data.erase(logicalEnd, data.end());

    for (const auto& e: data) {
        std::cout << e << '\t';
    }
}

```

The result is correct this time:

```
12      0       654     0       4587    0       42
12      654     4587    42
```

This technique is know as the [_Erase–remove idiom_](https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom).

## Now

C++20 includes proposals [P1209r0](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1209r0.html) and [P1115r3](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1115r3.pdf). We now have [free functions called `std::erase()`](https://en.cppreference.com/w/cpp/container/vector/erase2) that are overloaded for the containers of the STL. They perform the remove-erase idiom.

To erase elements in a vector, you can now simply do:

```cpp
#include <iostream>
#include <vector>

int main() {
    std::vector data{12, 0, 654, 0, 4587, 0, 42};
    for (const auto& e: data) {
        std::cout << e << '\t';
    }

    std::cout << '\n';
    const auto count = std::erase(data, 0);
    std::cout << count << " elements erased\n";

    for (const auto& e: data) {
        std::cout << e << '\t';
    }
}
```

Much simpler, right?
ICO Development Company | How to Launch Your ICO? | ICO Fundraising Platform | Developcoins
Tags: nft, solanatoken, token, beginners
Published: 2021-12-15 10:50:24

**ICO Development Company**

Introduction:
ICO is a kind of decentralized fundraising platform. Also occasionally referred to as crowd sale, ICO is an event through which a cryptocurrency company releases and sells its tokens with the purpose to raise funds. The company announces a new crypto token and sells its future tokens to interested buyers and investors in exchange for fiat currency, Bitcoins, Ethereum, or any other cryptocurrency.

**How to Launch Your ICO?**

- Business Logic Plan & Idea
- Make a Good ICO Team
- Market Research  
- Company Registration  
- Create Your Token
- Prepare your Whitepaper  
- Launch ICO Website
- Preparing Offer and Terms For Investors  
- ICO Launch  Successfully

**How to Find Investors For ICO?**

- Easy way to find Out Investor, then follow the Below ICO Strategies ,
- Social Media promotion
- Quora & Reddit
- Promotion on the crypto Forums
- Email newsletters
- Slack & Telegram
- ICO calendars
- Advertising text: articles, blogs, news, etc.
- Adding project to various ICO tracker sites

**Benefits of Our ICO Development,**

- No set criteria for investors.
- No third-party inclusion or direct deals are offered
- An open ICO-based platform is accessible for each investor.
- Gives an extraordinary chance for investors across the globe
- Helps an organization to develop cryptocurrency with token/coin sales in the initial stage of fundraising.
- The return rate for the expected investment and token sales for the investors.
- An expansion in the worth of circulated tokens/Coins leads to a higher profit return in the future. 

**Why Did You Choose Developcoins For ICO Development? **

Developcoins is a leading provider of [ICO Development Company](https://www.developcoins.com/ico-development) as well as  White Paper Creation and Digital Marketing services so all three services in one place so don't wait. Our Expert Developers have been working in the field for over 10+ years so we Delivered your project On time with Smart Contract. Nowadays many Business people choose ICO Fund Raising because it's rising up investors’ interest. We have Successfully launch your Tokens/Coins within less than ONE minute using different Blockchain networks for clients’ ICOs, we will take care of everything that’s associated with your ICO.
We provides,
24/7 Technical support
Skillful blockchain developers
Multiple token standards
Increased security
Quality assessment
Visit - [https://www.developcoins.com/ico-development](https://www.developcoins.com/ico-development)

Book A Free Consultation via #Call: +91 9843555651

Telegram - https://t.me/Developcoins

Skype - live:Tech Innovate

Email id - sales@developcoins.com

Need help setting up your ICO campaign? Hire professional ICO developers  at Developcoins.

[Book For FREE Demo Here!](https://www.developcoins.com/ico-development)
Share your Coding Playlist 🎷
Tags: watercooler, motivation, music, discuss
Published: 2021-12-15 10:36:01

On twitter, we've asked about everyone's favorite music to listen to while coding/working. Did you have a particular highlight in 2021?

We would love to hear it! Share in the comments or reply to our tweet (hopefully you can also find some inspiration there).

{% twitter 1471064587583770630 %}

We hope y'all have a relaxing and peaceful end of the year and some time off!❤️
Python bmi calcultor
Tags: beginners, programming, tutorial, python
Published: 2021-12-15 10:29:55

wrote a quick bmi calculator for imperial and metric it might not be perfect but i wanna know how can i make it better

```
m_or_i = int(input("Enter 1 for metric and 2 for imperial: "))

if m_or_i == 1:
    h1 = float(input("Enter your height in cm: "))
    h = h1 / 100
    w = float(input("Enter your weight in kgs: "))
    an = w / h ** 2
    if an < 18.4:
        print"Your bmi is:", (round(an, 1)), "which means you are under weight"
    elif 18.5 <= an <= 24.9:
        print"Your bmi is:", (round(an, 1)), "which means you are normal weight"
    elif 25 <= an <= 29.9:
        print"Your bmi is:", (round(an, 1)), "which means you are over weight"
    elif 30 <= an <= 34.9:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 1"
    elif 35 <= an <= 39.9:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 2"
    elif an >= 40:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 3"

elif m_or_i == 2:
    h1 = float(input("Enter your height in feet: "))
    h2 = float(input("Enter the inches: "))
    h = h1 * 12 + h2
    w = float(input("Enter your weight in pounds: "))
    an = w * 703 / h ** 2
    if an < 18.4:
        print"Your bmi is:", (round(an, 1)), "which means you are under weight"
    elif 18.5 <= an <= 24.9:
        print"Your bmi is:", (round(an, 1)), "which means you are normal weight"
    elif 25 <= an <= 29.9:
        print"Your bmi is:", (round(an, 1)), "which means you are over weight"
    elif 30 <= an <= 34.9:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 1"
    elif 35 <= an <= 39.9:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 2"
    elif an >= 40:
        print"Your bmi is:", (round(an, 1)), "which means you are obese class 3"

```
How to Fix Quicken Error CC-889?
Tags: quicken
Published: 2021-12-15 10:24:05

You will get a **[Quicken Error CC-889](https://accountantsquad.com/quicken-error-cc-889/)** mistake message when the monetary foundation you are endeavoring to interface with no longer backings Express Web Connect as an association type for Quicken.

Subsequent to receiving a CC-889 message, you may likewise get a CC-888 blunder for quite some time before the assistance is totally stopped.

To keep the mistake from coming up each time One Step Update is played out, all records with the monetary foundation detailing this blunder should be deactivated for online administrations.

The monetary foundation might have changed their technique for conveyance to Direct Connect, or gave elective strategies to download your monetary data, like Web Connect (QFX). You should contact your monetary establishment's internet banking support group with any inquiries in regards to changes to their download choices.

**More Blog**

**[Quicken Error CC-800](https://accountantsquad.com/quicken-error-cc-800/)**

**[Quicken Error CC-585](https://accountantsquad.com/quicken-error-cc-585/)**
night mode website
Tags: codepen, nightmode, darkmode, mode
Published: 2021-12-15 10:18:05

<p>simple night mode project website using js and css and html
when you click on the icon on the right you will see the effect.</p>

## CODEPEN LINK

{% codepen https://codepen.io/Abhi7raj/pen/eYGvNLx %}

for any query comment guys.
Number Scrolling Preloader In HTML CSS
Tags: css, html, webdev, codenewbie
Published: 2021-12-15 10:07:59

Loader is mostly used in websites to load background content. So here we made a number scrolling loader in HTML and CSS.

Also Read:- [Copy Text From Input To Clipboard Javascript With Bootstrap 5](https://w3hubs.com/copy-text-from-input-to-clipboard-javascript-with-bootstrap-5/)

Also here we used javascript for number scroll in 1-100 scrolling format. This is a responsive modal for mobile and tablet views.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source code](https://w3hubs.com/number-scrolling-preloader-in-html-css/)
Default value in a struct
Tags: go
Published: 2021-12-15 10:06:09

```go
/*
	set default values for a struct being Unmarshaled from json
*/
package main

import (
	"encoding/json"
	"fmt"
)

type Out struct {
	A string `json:"a"`
	B string `json:"b"`
	C string `json:"c"`
	D int    `json:"d"`
}

func main() {
	in := []byte(`{"a":"1"}`)
	out := Out{
		A: "defaultA",
		B: "defaultC",
		C: "defaultD",
		D: 99,
	}
	json.Unmarshal(in, &out)
	fmt.Printf("%+v\n ", out)
}


```
📜 I wrote a lightweight markup language (unhappy with markdown)
Tags: html, markdown, go, webdev
Published: 2021-12-15 10:01:57

## Try It Online

http://touchlabs.io/play

## Open Source on GitHub

https://github.com/touchmarine/to (MIT License)

## My Problems With Markdown

I write tons of documentation for my projects and in the past I used mostly markdown. It was ok most of the time but quickly got painful for some even very basic things.

Want to change the image size? Sorry, you will have to use something else.
Want to add a simple comment? Better luck next time.
Want to add a simple attribute? No go.

## Solution - Touch

To solve my problems and pain points I made Touch and I want to share it with you.

Touch has syntax similar to markdown so it's familiar and easy to use. It comes with comments and attributes by default. It also comes with other basic elements: numbered headings, notes, description lists, subtitles, and captions.

### Configurable & Extendable

Touch comes with a rich set of common elements that work everywhere (unlike some markdown elements that work only in some flavors). But maybe your team needs extra elements and you don't want to switch to yet another less readable language?

Touch is also configurable & extendable via JSON. You can add new elements or configure templates with a simple JSON file!

### Auto-Formattable

And then there's my favorite feature: auto-formatting. It's just like prettier for JS or gofmt for Go. You can auto-format Touch source code so you and your teammates can easily share documents.

## Thoughts

What do you think? Are you also unhappy with markdown sometimes? Would Touch be useful to you?
Data Science Course in Chennai
Tags: datascience
Published: 2021-12-15 09:54:55

Learning data science can be a daunting challenge for many people, especially in a period when databases are storing an increasing amount of data. [Data Science Online Course](https://www.fitaacademy.in/data-science-course/) at [FITA Academy](https://www.fitaacademy.in/) offers personalized one-on-one training in data science.
Tags: [Data Science Course in Chennai](https://www.fitaacademy.in/data-science-training-chennai/) | [Data Science Courses in Bangalore](https://www.fitaacademy.in/data-science-course-in-bangalore/)
Why Medium is not good for developers
Tags: webdev, motivation, productivity, beginners
Published: 2021-12-15 09:17:16

Actually, i didn't even started to discover the dev.to website and i immediately wanted to write a post. Because being in a developer community makes me want to be creative. I was looking for a website like this for a long time. 

Medium was not a bad choice but clickbate is take over the control in Medium. Because people are earning money in Medium and they're trying their best to earn more. 

## Medium is a big problem for developers

Developers have to manage their time properly. Because we have to reach the informations and solutions as quick as possible. Otherwise, our focus is not going to stay still. Major percent of the developers have focus problems. Because there's so much thing to think about in this profession. Only experienced developers doing priority arrangements properly. 

So, the people that are not experienced much shouldn't start reading articles in Medium. Because they're not going to learn anything that changes their life.

## Headings are promising but the contents are not

I spend so many times in Medium but i can't remember that changed my thoughts about anything. But when i see the front page of Medium, it feels like "Holy crap, my life is about to change. I'm going to become a better developer/person". 

Probably you also feel that too. Reading so many "how i become a web developer", "12 important X every x should know", "how i got my first job on X", "how i earn my first $100.000 with my SaaS" is not going to help you to have a clear vision. 

## Conclusion

As i said before, people are earning money on Medium and they're trying their best to earn more and using clickbate headings to achive it. Their content are not meant to be the best. They just needs your clicks. If you're not an experienced developer, probably you're going to click all the interesting headings and got head confuse about the things that you already knew. Plus, so many times that wasted.
Luos Get Started: tuto #3
Tags: tutorial, opensource, embedded, luos
Published: 2021-12-15 09:08:17

After the tutorials #1 and #2 of the Luos Get Started (https://youtu.be/VcK-LJ-gnDo). Here is the final one → https://youtu.be/3NsDadp1IYM

Luos is an open-source and real-time orchestrator for distributed architectures, to easily design, test and deploy embedded applications (like Tesla, SpaceX and Dyson do!).

If you have questions, join the Community: https://www.luos.io

{% youtube 3NsDadp1IYM %}
Integration of SAP WM with Barcode Scanners | Speranza IoT Blog
Tags: sap, barcode, integration, scanner
Published: 2021-12-15 08:51:14

1. Overview of SAP

SAP is the shorthand of Systems Applications and Products in Data Processing and is a [software solution](https://www.speranzainc.com) of the ERP (Enterprise Resource Planning).

2. What is SAP WM?

SAP WM is an SAP ERP warehousing management application tool that provides crucial informational analytical reporting data of inventory management such as good issue and good receipt, batch and quality management in the warehouse, types of movement in the warehouse, and so on. It helps control and manage the movement and storage of goods and raw materials within a warehouse with great trajectories.
 
3. What is a barcode?

A barcode is a machine-readable representation of digits and letters made up of bars and spaces. Stripes on the packaging of items sold in supermarkets, convenience shops, and other businesses are becoming commonplace. Barcodes are what they’re called. A barcode is made up of different width bars and gaps that may be read by an optical barcode scanner.

4. How Do Barcode Scanners Work?

You’ve probably seen cashiers using scanners to read the barcode on the item. We know that when a flashing red light passes over a barcode, some kind of intelligent process occurs.

5. Integration of SAP WM with barcode scanners

Scanners are connected online with SAP ERP, enabling for dynamic implementation of activities in the system. Those tasks can be collecting pallets for release delivery, organizing products in the warehouse, and so on. A suitable translator is necessary to enable the connection between the scanner and the system. When combining barcode scanners with SAP WM, we may select between two technologies: SAPConsole and ITS Mobile.

[Read More](https://www.speranzainc.com/integration-of-sap-wm-with-barcode-scanners/)
Intuition of reinforcement learning
Tags: watercooler
Published: 2021-12-15 08:02:01

Reinforcement learning (RL) is an area of machine learning inspired by behavioral psychology. The concept of reinforcement learning is based on cumulative rewards or penalties for the actions that are taken by an agent in a dynamic environment.

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

Think about a young dog growing up. The dog is the agent in an environment that is our home. When we want the dog to sit, we usually say, “Sit.” The dog doesn’t understand English, so we might nudge it by lightly pushing down on its hindquarters.

After it sits, we pet the dog or give it a treat. This process will need to be repeated several times, and we would have positively reinforced the idea of sitting. The trigger in the environment is saying “Sit”; the behavior learned is sitting; and the reward is treats.

Where supervised learning uses labeled data to make predictions and classifications, and unsupervised learning uses unlabeled data to find clusters and trends, RL uses feedback from actions performed to learn what actions are most beneficial in different scenarios toward a goal.

Learn more about reinforcement learning in Grokking AI Algorithms with Manning Publications: [http://bit.ly/gaia-book](http://bit.ly/gaia-book), consider following me - [@RishalHurbans](https://twitter.com/RishalHurbans), or join my mailing list for infrequent knowledge drops: [https://rhurbans.com/subscribe](https://rhurbans.com/subscribe).
Creating markdown blog or docs generator with js (serverless).
Tags: javascript, markdown, html, webdev
Published: 2021-12-15 07:55:20


Hey there everyone ,
If you've created blog on dev.to , you're might be familiar with blog generator with md.
I'll share how you can create that type of generator with only js.
## libraries to use.
- [Showdown.js](https://github.com/showdownjs/showdown) @showdownjs
- [Markdown.css by sindresorhus](https://sgi-capp-at2.github.io/) @markdown-css

## showdown.js
<p align="center">
<img alt="showdownjs-image"src="https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png"/>
</p>
Showdownjs is a library which converts markdown code into HTML code.
From
```md
# header
**Bold**
_italic_
```
To
```html
<h1>header</h1>
<strong>bold</strong>
<em>italic</em>
```
### How to use showdown.js
You should visit to [official docs](https://github.com/showdownjs/showdown) for advanced level tools of library.
I'll show you how you can convert the md into html with GitHub flavour of markdown.
```js
var my_markdown_input = document.querySelector("#mdinput") , converter = new showdown.converter();
var converted_text = converter.makeHtml(my_markdown_input);
// converted_text will be variable having html code 
```
## Markdown css
The style created by sindresorhus which looks like github markdown body.
### How to use markdown css ?
The markdown css by sindresorhus is very simple to use. You just have to add classname "markdown-body" and it will convert html into GitHub like markdown styled html.
```html
<div class="markdown-body"></div>
```
<p align="right"><a href="https://sgi-capp-at2.github.io/blogs/Creating%20markdown%20blog%20or%20docs%20generator%20with%20js%20(serverless)./#how-to-use-markdown-css-">..Read More</a></p>

`to get notified about latest webdev news join us on `[`discord`](https://codebysgi.netlify.app/e.d/)