teleren/devto huggingface dataset:
How to download YouTube Videos using Python
Tags: python, beginners, programming, tutorial
Published: 2021-12-21 04:48:34

#Intro
Hello everyone I hope you are doing well.
In this post, as you read the title we are going to make a **YouTube video downloader in Python** it is a very simple and fun project to build.

#Modules needed :-
1) pytube :- it is an module which lets us access YouTube content from python 
##Installation :-
`pip install pytube`

#Let's Code

First we will import the module which we installed
```python
#Importing the required modules
import pytube
```
Now we will ask the user for entering the link of the video and a path where he/she has to save the video
```python
#Asking for the link
link = input("Enter the link:\n ")

#Asking for the save location
save_path = input("Enter the path to save the video: ")
```
Now we will download the video and save it to the provided location
```python
#Downloading the video with .mp4 extension to the save location
yt = pytube.YouTube(link)
stream = yt.streams.filter(file_extension='mp4').first()
stream.download(save_path)
```
In the line `yt.streams.filter(file_extension='mp4').first()` we can define in which format we want to save the file, so in most cases .mp4 extension is the best.

And with that done we have successfully created our project.
I hope you all enjoyed the post.
Stay safe and do take very good care of yourselves!

Feel free to ask doubts or suggest me something that I can build in next post or anything I can add in this project.

#Happy Coding !
Intro to Data Science
Published: 2021-12-21 04:42:47

### What is Data Science? 
Data science utilizes skills from statistics, scientific methods, artificial intelligence/machine learning, and data analysis in order to gain some sort of value from data. Data scientists also prepare the data. They do this by cleaning data of any unwanted variables. They aggregate and manipulate data to run machine learning algorithms against it. These machine learning algorithms use AI technology to figure things out from data. Companies are able to use data science to turn data into actionable intelligence for refining products and services. For example, through data science medical tests have been improved and are now able to diagnose diseases earlier and therefore improve treatments. 

### Data Science Process
* **Business Understanding**
     * Define a project and what its purpose is.
          * Types of questions a data scientists asks are: How much? Which category? Which group? Is this different? What would someone prefer?
* **Data Mining/Sourcing**
     * If needed, collect data with varying methods.
* **Data Cleaning**
     * Fix inconsistencies within data.
     * Handle missing values and placement holding values.
* **Data Exploration**
     * Generate visualizations to better understand data.
     * Use information gained to develop a hypotheses.
* **Feature Engineering**
     * Decide which feature are worth using.
     * Optimize data to make it more meaningful that original data.
* **Predictive Modeling**
     * Train models.
     * Evaluate how well those models performs.
     * Generate predictions.
* **Data Visualization**
     * Use predictions to generate visualizations.
     * Use visualizations to communicate with key stakeholders.
How to Work with the React ComboBox Component
Tags: reactnative, react, webdev, webcomponents
Published: 2021-12-21 04:05:54

Learn how easily you can create and configure the Syncfusion [React ComboBox component](https://www.syncfusion.com/react-ui-components/react-combobox) using the create-react-app command. This video also explains how to configure a few of the control’s basic features like binding list and remote data and customizing pop-up height and width.

Download an example from GitHub: https://github.com/SyncfusionExamples...

Refer to the following documentation for the Syncfusion ComboBox component: https://ej2.syncfusion.com/react/docu... 

Check out this online example of the React ComboBox component: https://ej2.syncfusion.com/react/demo...

{% youtube o77F7gewC40 %}
The Concept of Database Normalization
Tags: database, webdev, ruby, beginners
Published: 2021-12-21 03:45:55

### 1. What is data redundancy? 
- Data redundancy is a repetition of data increases the size of database. It creates the issues such as insert, delete and update the data. 

![Employee database](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3yf6k73vho4zi83oj3i.PNG)
- **Insertion Anomaly** is adding redundant data for every new row. For example, every time we want to add a new employee, we have to repeat the department's data (Dept., Head of Dept., Phone Number). If we add 100 more employees, it will insert redundant data for every new row. 
- **Deletion Anomaly** is a lost related dataset when some other dataset is deleted. For instance, when we delete the employee row, we also delete the department's data simultaneously. Until we reach the last row, we lose the department dataset entirely.
- **Update Anomaly** when the finance department head resigns, we need to update a new department head information. We have to update every single row where Dept. is finance.  

### 2. How Normalization will solve the issues?   
- Normalization is a technique of organizing the data into multiple related tables to minimize data redundancy.

- We break the above Employee table into two new different tables and name Employee table and Dept. table.
       1. Employee table will contain employees information.

![Employee table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcy5xo24961skmbviwdt.PNG)
       2. Dept. table will contain Dept. information.   

![Dep. table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1460nfr4lza6lilpe1z.PNG)

- **Solving Data Anomaly**
   1. When we insert a new employee, We do not eliminate the data redundancy. However, we minimize it by only adding which department the employee works. 
   2. When we delete employees data, it will not affect the department dataset. 
   3. When we have a new department head, we just need to update department table. It will not affect the employee table.  
- Normalization resolve the problems by dividing the data into separated independent entities and relating them using a key or a unique name (in this case is Dept.). Less redundancy means fewer problems in inserting, deleting and updating the data.
 
### 3. Type of Normalization  
- There are three basics normal forms in data normalization. 
    1. 1st Normal Form.
    2. 2nd Normal Form.
    3. 3rd Normal Form.
- BCNF is an advance normalization technique
Stacks
Tags: javascript, algorithms, webdev, programming
Published: 2021-12-21 03:38:33

## What is a stack?

A LIFO data structure

LIFO (Last in first out)

The last element added to the stack will be the first element removed from the stack.

Think about it like a pile of books. You can only add books on top, and you can only remove the book on top.

we are going to create stack that has only two methods

1. Push() : Method to add data to the stack
2. Pop()  : Method to remove data from the stack

we can do this in different ways, In this article we are going to implement with JavaScript es6 classes.

## JavaScript Stack Implementation


```
class Node {
    constructor(val) {
        this.val = val
        this.next = null
    }
}

class Stack {

    constructor() {

        this.first = null;
        this.last = null;
        this.size = 0

    }

    push(val) {
        let newNode = new Node(val)
        if (!this.first) {
            this.first = newNode;
            this.last = newNode;
        }
        else {
            let temp = this.first;
            this.first = newNode;
            this.first.next = temp;
        }
        return ++this.size;
    }

    pop() {
        if (!this.first) return null;

        let temp = this.first;
        if (this.size === 1) {
            this.last = null;
        }
        this.first = this.first.next
        this.size--;
        return temp.value
    }
}


const stack = new Stack()

stack.push(1)
stack.push(2)
stack.push(3)
stack.pop()
stack.pop()
stack.pop()
stack.pop()

```

## Where stacks are used

- Managing function invocations
- Undo/Redo
- Routing (History Object)

## BIG O of Stacks

  Insertion - O(1)
  Removal - O(1)
  Searching - O(n)
  Access - O(n)
How to create off-canvas menu in WordPress (plus plugin to download)
Tags: wordpress, webdev, tutorial, beginners
Published: 2021-12-21 03:18:51

Hi folks! I found this useful article and want to share with you. I think we should share interesting and useful things! The better part is that the guy that created the article makes available a ready plugin to download. Hope this helps someone here that is needing this kind of feature! 

https://thementorwp.com/plugins/how-to-create-an-off-canvas-menu-with-wordpress/
angular material tree: fix auto collapse tree each time data updated
Tags: angular, materialdesign, fix
Published: 2021-12-21 03:15:21

## Problem
- Each time angular material tree refresh or update data source => tree auto collapse all row

## Solution
- Save tree expanded state before update data

```js
  expandedNodeSet = new Set<any>();

  private saveExpandedNode(): void {
    const mExpandedNode =
      this.treeControl?.dataNodes
        ?.filter((node) => {
          return this.treeControl.isExpanded(node);
        })
        .map((node) => node.id) || [];
    this.expandedNodeSet = new Set(mExpandedNode);
  }

  private restoreExpandedNode(): void {
    this.treeControl.dataNodes.forEach((node) => {
      const id = node.id;
      const result = this.expandedNodeSet.has(id);
      if (result) {
        this.treeControl.expand(node);
      }
    });
  }
```
Launched PandaDoc Tech Blog 
Tags: programming, tutorial, writing, api
Published: 2021-12-21 02:28:32

---
title: Launched PandaDoc Tech Blog 
published: true
description: We're super happy to announce that Pandadoc Tech blog is launched 🎉 
tags: programming, tutorial, writing, api
---
Just 3 months ago, we launched PandaDoc for Developers. Since then, many developers have created their sandbox accounts and started exploring our API for free. 

We carefully collected all the feedback and feature requests that we received and have been working to continuously improve our API capabilities. 

And today, the first update is available! We are happy to announce the launch of 8 long-awaited API features to speed up and simplify your workflow: https://medium.com/the-pandadoc-tech-blog/pandadoc-api-enhancements-4978006ae205 

To get updates from our team in the future, please, follow our Medium publication!
Trial Periods... Are they really worth it?
Published: 2021-12-21 02:21:57

**There is no SaaS without a Trial!**

Many indie devs are into SaaS nowadays and their monetization strategy normally falls into two categories:

* A fully paid product with different tiers
* A freemium model

Quite often in either of these methods, the creators offer free trials. A way for users to actually try the paid version without credit card is needed! (got to have these last magic words)

**Feedback**

I have been really enjoying writing my thoughts both here and on indie hackers and from [yesterday's post]((https://dev.to/wbepodcast/why-companies-should-support-their-employees-side-projects-lm5)) I got a few Devs visiting my [virtual co-working space for entrepreneurs](https://wannabe-entrepreneur.com/coworking/) and asking me if they could try it for free...

*I had already considered a trial in the past but I have always rejected the idea*

My product is a paid community and I have been lucky enough to have found really cool and active first members 💪

It somehow seemed odd to allow strangers to come into our virtual office just to disappear a few days after (much like my father... 😿). Plus it's a **4 euros subscription that can be canceled at any time...** 

*If people are not willing to pay that then they probably never will...* - Tiago thinking to himself

I explained my reasons to this user and then got convinced by the explanation... 😱

*Is not about the money but the fact of giving my credit card info and committing to a product without actually knowing if it works...* - user

I realized that the problem was not losing the 4 euros but rather being tricked by a sketchy podcaster with possibly an empty slack channel!

I decided then to give it a shot! Here is what I have done...

1- Get a coffee ofc... ☕

2- Asked the community members if they were ok with it and like always they were super supportive!

3- Create a [new extra in the buymeacoffee platform](https://www.buymeacoffee.com/tiagorbf/e/50962) for a value of ZERO euros and use [zapier](https://zapier.com/) to store the new user data together with the expiration date into [Airtable](https://airtable.com/). #NoCode4TheWinBROOOO

4- Change the landing page to this beauty...

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

It's amazing because since I implemented the trial a grand total of **ZERO new members have joined!!!** So I was right!

Or maybe is still too soon to tell... XD I will wait a couple more days to take my conclusions and I will keep you posted! (btw if you prefer listening to these adventures in an audio format you should [checkout my podcast](https://wannabe-entrepreneur.com/episodes/))

I hope you found this entertaining and I would love to know what are your thoughts on trial periods... Have they been working out for you?
The best way to dual boot a PC
Published: 2021-12-21 01:21:33

There are several reasons why one would want to dual boot his PC. Most times, we find ourselves in hoes where our hooves need to fit in and in that case we have to. Dual booting can become a stressful task especially when you have not made up your mind on what your requirements are. There are several alternatives to not dual booting like using a virtual machine. But when it comes to performance, you just don’t have any option than installing that second OS to utilize the full capacity of the hardware individually.

## 1. Partition your hard drive
A good example of dual booting your PC would be to partition your hard drive into two and install the second OS, lets say Linux on the other partition, that’s a good take. But what are the advantages and disadvantages this method present to us? 

### Advantages
* One fair advantage would be that, you don’t have to worry about getting a second storage drive, 

* hings always remain in one place. Well, that’s fair enough if you might say but lets also consider another aspect of it.

### Disadvantages
* Let's be honest here, what if the entire drive crashes and you cannot save the other partition? Cases like this happen and all your data is wiped off, even when you partition the hard drive. 

* Sometimes, things could get messy installing a second OS like Linux on a partition after Windows has already been living on that storage drive. 

> Let’s be honest, Windows is a kind of selfish OS.

It assumes that it’s the only OS in the world when installed on a PC hence it takes over the BIOS when installed first on storage drive and if proper care is not taken may not boot again when you try installing a second OS on the same system hence Linux will always warn you when trying to install it as a second OS through the same system. There are precautions to avoid this too.

## 2. Install the second OS on a different drive.

This could be an external hard drive. Installing your OS on an external drive that uses a cable to attach to the storage mechanism isn’t a safe one to say, as the storage drive will never be stationary. Your storage drive could corrupt at a slight provocation, especially when that friend of yours comes around to tease you and mistakenly touches to connecting cable, hence unmounting the drive from the PC.

Another option one would prefer through the external storage approach in this case would be to obtain a flash drive which does not easily detach when slightly tempered with by an external agent. This is very secure as flash drives can be easily carried around without duress and even fit in your pocket hole. This means you’re carrying around an entire PC on your neck. Hurray!! This is a win win for penetration testers and system administrators who may want to get their work done anywhere they are without necessarily carrying around their system; like a plug and play OS.
Intro to Python Libraries for Data Science
Tags: datascience, python, beginners
Published: 2021-12-21 01:06:01

Python is used as one of most popular and widely used programming languages. It is used by most data scientists. Python is easy to learn, very comprehensive when it comes to debugging, used by many different experts and has some very powerful libraries.

The Libraries I touch on are:
* [NumPy](https://numpy.org/)
* [Pandas](https://pandas.pydata.org/pandas-docs/stable/#)
* [Matplotlib](https://matplotlib.org/stable/index.html) 
* [SciKit-Learn](https://scikit-learn.org/stable/index.html)

### NumPy

NumPy, or Numerical Python, is the fundamental package with its powerful N-dimenional array object. It provides high performance tools to work with theses arrays and allows for efficient operations. NumPy also forms the base for libraries such as SciKit-Learn.

### Pandas

If you are a aspiring to be a data scientist, you will find Pandas to be your bestfriend. Its the most popular Python library for data analysis. It comes with many capabilities including being able to easily clean and manipulate data with its data frames. 

### Matplotlib

Matplotlib is another very powerful tool that is used to create beautiful visualizations. You are able to use it to find correlation between variables. Matplotlib allows the visualization of the distribution of data in order to gain new insights into the data.

### SciKit-Learn

SciKit-Learn is known as the library full of machine learning algorithms. If you plan to use data science for a predictive matter, you will find yourself combing through the many model selections this library has to offer.
100 días de código: 46, 47, y 48 versión exprés de reto
Tags: spanish, 100daysofcode, webdev
Published: 2021-12-21 01:00:13

Foto de [Andy Holmes](https://unsplash.com/@andyjh07?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) en [Unsplash](https://unsplash.com/s/photos/navidad?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
  

¡Hey hey hey!

Bienvenidos a este resumen exprés de lo que fue el fin de semana codificando, como sabrán los que normalmente leen estos blogs siempre se me complica el fin de semana y este fue aun mas fuerte ya que afecto incluso hasta este lunes.

Hare una versión express simplemente contándoles los logros </a>de mi fin de semana ya que no son demasiados.

Eso me hace recordar una sabia frase que escuche no se donde...

Lo importante no es que tan rápido caminas mientras que no te detengas y si lo haces no dudes en continuar.

### Fin de semana:
- Como estaba aprendiendo cosas que ya había consultado anteriormente decidí saltarme a la sección de Nodejs en The Odin Project aunque se que tarde que temprano volveré a las lecciones anteriores. 
- Practique 20 min de Touch Typing todos los días.
- Comencé a diseñar algunas secciones nuevas de mi pagina personal porque no terminaba de convencerme.
- Hice algunos ejercicios en Hacker rank.
- Y sobre todo aprendí un montón en la universidad de MongoDB.

Ha sido un fin de semana complicado y ahora que estoy tocando temas como bases de datos NoSQL me siento mas activo mentalmente. 

Los retos siempre vienen bien.

Espero que tengan un excelente inicio de semana y mucho éxito con sus proyectos.

Adiós mundo!
Disecting Complexity With the Mikado Method
Published: 2022-01-31 20:34:04

---
title: Disecting Complexity With the Mikado Method
published: true
date: 2021-12-21 00:00:00 UTC
tags: 
canonical_url: https://jhall.io/archive/2021/12/21/disecting-complexity-with-the-mikado-method/
---

Ola Ellnestam, along with co-author Daniel Brolund, wrote the book The Mikado Method, which describes an incremental approach to code refactoring, as well as project management. In this interview Ola discusses the application of the technique, common pitfalls and objections to it, and provides insight into how the technique can be used to help communicate technical debt and dependencies with non-technical stakeholders.

[Listen](https://share.transistor.fm/s/06576a5f),[watch](https://youtu.be/HbjWOvxJjms), or[read the transcript](https://share.transistor.fm/s/06576a5f/transcript)  
[![](https://jhall.io/images/icon-podcast-512_hudba6b7b089bf867fab369dd7c8de54ef_15339_0x100_resize_q85_box_3.png)](https://share.transistor.fm/s/06576a5f)  [![](https://jhall.io/images/icon-youtube-512_hu472b17e2e29474aa989a586bfaf501e7_5679_0x100_resize_q85_box_3.png)](https://youtu.be/HbjWOvxJjmss)  [![](https://jhall.io/images/icon-transcript-512_hu61121fb4158683053abb5347949e43dd_14667_0x100_resize_q85_box_3.png)](https://share.transistor.fm/s/06576a5f/transcript)
* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Anybody know how to publish React APP to Github Pages?
Tags: react
Published: 2021-12-20 23:53:34

I've been followed the tutorial on[creact-react-app](https://create-react-app.dev/docs/deployment#step-3-deploy-the-site-by-running-npm-run-deploy), but it has missed the forth step to configurate the github page.

I've tried below:

1.set home page as the github's address

2.Set Github Page as: ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xo9jmqanuqx52msxrlb9.png)
 
But still, it is still the static path problem(404 issue).

I've read the github pages's and creat react app's docs.

Still can't make it.

Anybody can help?

Thanks a lot.
Create foo.a using Pure Perl and Archive::Ar
Tags: perl, c, cpp, cpan
Published: 2021-12-20 23:31:00

I'm searching for the way to create static library such as "foo.a".

I found <a href="https://metacpan.org/pod/Archive::Ar">Archive::Ar</a> on CPAN.

```
use Archive::Ar;
 
my $ar = Archive::Ar->new;
 
$ar->read('./foo.ar');
$ar->extract;
 
$ar->add_files('./bar.tar.gz', 'bat.pl')
$ar->add_data('newfile.txt','Some contents');
 
$ar->chmod('file1', 0644);
$ar->chown('file1', $uid, $gid);
 
$ar->remove('file1', 'file2');
 
my $filehash = $ar->get_content('bar.tar.gz');
my $data = $ar->get_data('bar.tar.gz');
my $handle = $ar->get_handle('bar.tar.gz');
 
my @files = $ar->list_files();
 
my $archive = $ar->write;
my $size = $ar->write('outbound.ar');
 
$ar->error();
```

I'm working to create <a href="https://github.com/yuki-kimoto/SPVM">SPVM</a>.

SPVM has C/C++ binding tools.
Solving day 20 of Advent of Code 2021 in JavaScript
Tags: challenge, adventofcode, javascript, video
Published: 2021-12-20 23:04:58

---
title: Solving day 20 of Advent of Code 2021 in JavaScript
published: true
description: JavaScript walkthrough of Advent of Code 2021 (day 20)
tags: challenge, AdventOfCode, javascript, video
series: Advent of Code 2021 in Javascript
---

{% youtube 1GrRShOr82Y %}