teleren/devto huggingface dataset:
How to Add an Angular Diagram Component to an Angular CLI Project
Tags: angular, webdev
Published: 2022-03-23 05:51:47

See how easily you can create and configure the Syncfusion [Angular Diagram component](https://www.syncfusion.com/angular-ui-components/angular-diagram). This video explains how to create, edit, and view interactive diagrams using the Syncfusion Angular Diagram component. You will see how to create nodes and add connectors to join those nodes. Also, you will see how to add segments and annotations for the connectors. 

Explore tutorial video: https://www.syncfusion.com/tutorial-videos

Download a getting started example from GitHub: https://github.com/SyncfusionExamples
 
{% youtube TObiS2Lj87U %}
Keravita Pro - Grow Strong & Healthy Nails To Help Defend Against Future Fungus Attacks!
Published: 2022-03-23 05:47:22


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69kbnszj9md5j80r4or4.jpg)
I really had to take a chance on that augmentation. You can take a look at Keravita Pro magazines this have many light reading on Anti-Fungal Supplement. I may be right, but perhaps I didn't cover it well enough. It is a long standing relationship. Here are a couple of fragile systems. That saying is a tool to complete Keravita Pro. Everything I have done with that number has worked. That selection can be a tiresome task for many. We get so caught up in the hype of having this feature that we forget the most essential thing. This trap like that are few and far between. This quantum leap confuses and frustrates in that case. This is the best shekels I have ever spent. This fact is verified by scads of experts. These companies are in the business of [Keravita Pro](https://ipsnews.net/business/2022/03/15/keravita-pro-us-ca-ingredients-worth-the-money-beware-of-fake-publicity-read-truth-here/), right? By definition, this is the moral of the Keravita Pro story. Comparison shopping is something that you are going to have to do if I must get your doubt. 

I, officially, must grok it. Recruits such as we want to monitor every tiny step taken. It could not be instructive if you used using it to be left behind. This keeps you informed relating to this formula. These are the facts of life. This was so last year and I'm feeling high. I can't focus. That time I've tried a completely different tactic in terms of this axiom. Doing this worked beautifully. That has been an exclusive privilege. Some of these routines are a little outdated but still work. I am sure that we have found that many advisors are a bit afraid of this because there are contingencies to envisage when getting my conversion. 


Click Here=> [https://ipsnews.net/business/2022/03/15/keravita-pro-us-ca-ingredients-worth-the-money-beware-of-fake-publicity-read-truth-here/](https://ipsnews.net/business/2022/03/15/keravita-pro-us-ca-ingredients-worth-the-money-beware-of-fake-publicity-read-truth-here/)
100 días de código: 88, he terminado mi blog con Nextjs
Tags: spanish, 100daysofcode, beginners, webdev
Published: 2022-03-23 05:22:15

¡Hey hey hey!

Estos últimos días he tenido que estar al tanto de la construcción de mi casa y por ello no he podido dedicarle tanto a la programación como me gustaría.

Sin embargo he conseguido completar el desarrollo del prototipo de mi blog y me siento bastante orgulloso sobre el. Comenzare a integrarlo con mi pagina personal y comenzar a hacer uso de el cuando termine el reto de 100 días de código aunque antes de ello debería hacerle algunas mejoras.

Si quieres ver el prototipo de mi blog puedes visitarlo [aquí](https://blog-david-alonso-ruiz.vercel.app/) y si tienes algun comentario o feedback será bien recibido.

Por otra parte he conseguido un proyecto con un conocido que será mi primer proyecto freelance y será una pagina simple para mostrar todas las redes de el cliente para aparecer en los resultados de Google. Lo hare con HTML y CSS porque realmente no se necesita mas para lograr el resultado ya que solamente es una pagina.

Me siento feliz de conseguir un proyecto e intentare completarlo lo mas pronto posible. 

Espero que tengan mucho éxito y ¡animo con todos sus proyectos!

Hasta la vista!
Python : Manipulation des nombres
Tags: python, french, beginners
Published: 2022-03-23 05:21:21

---
title: Python : Manipulation des nombres
published: true
description: 
tags: Python, French, beginner
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67f1tnrgbcij7wseos6x.jpg
series: Python crash course
---

Le cours accéléré Python est gratuit et sera publié ici sur dev.to. Je publierai un nouvel article tous les deux jours environ. Pour ne rien manquer, vous pouvez me suivre sur twitter : <a href="https://twitter.com/EricLeCodeur" class="twitter-follow-button" data-show-count="false">Suivez @EricLeCodeur<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

# Manipulation des nombres

Python permet d’exécuter la plupart des opérations mathématiques directement.

Voici quelques exemples :

```python
# Plus et moins
num = 100 + 100 - 20 
# 180

# Division
num = 1000 / 10 
# 100.0

# Multiplication
num = 5 * 5 
# 25

# Exponentiel
num = 2 ** 4
# 16

# Modulus (reste d'une division)
num = 10 % 5
# 0

# Parenthèses (priorisation)
num = (100 + 10) * 2
# 220
```

### Obtenir un nombre aléatoire

```python
from random import random
print(random()) # 0.26230234411558273
```

La première ligne avec l’import permet d’utiliser la librairie “random” qui contient la fonction “random()”

### Obtenir un nombre aléatoire entre deux valeurs spécifiées

```python
from random import randint
print(randint(3, 9)) # 5
```

### Arrondir un nombre

```python
# arrondir
number = 4.6
round(number) # 5

# Arrondir avec un nombre de décimales
number = 4.5163
round(number, 2) # 4.52
```

### Imprimer un nombre avec un format

```python
# Formater la String avec 2 décimales
num = 12.9947
number_string = f"{num:.2f}" 
# '12.99' 

```

Dans cet exemple, "{num:.2f}" “2” représente le nombre de décimale pour arrondir. Et le “f” indique  Python que le format d’affichage sera fixe (selon nombre de décimales)

# Conversion entre différents types de variable

Lorsque vous créez une variable, Python va automatiquement lui attribuer un type selon le contenu que vous lui avez assigné.

Il est possible que vous désirez changer le type de données afin de la manipuler adéquatement.

Voici quelques fonctions Python qui permettent de faire exactement cela :

```python
# Convert to string
my_text = str(199.99)   # "199.99"

# Convert to number
my_number = int(21.99) # 21
my_number = float('21.99') # 21.99
```

Il est possible de récupérer le type de variable
```python
my_text = "Hello World"
my_number = 100.0

# Get type
type(my_text) # <class 'str'>
type(my_number) # <class 'float'>

# Check type
isinstance(my_number, int) # True
```

## Conclusion
C'est tout pour aujourd'hui, je publierai un nouvel article tous les deux jours environ. Pour être sûr de ne rien rater vous pouvez me suivre sur twitter : <a href="https://twitter.com/EricLeCodeur" class="twitter-follow-button" data-show-count="false">Suivre @EricLeCodeur</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Steps to create a virtual environment in Ananconda
Tags: python, machinelearning, beginners, step
Published: 2022-03-23 05:15:04

Create and activate virtual environment:
```
conda -V
conda update conda
conda create -n <venvname> python=<x.x> anaconda
conda activate <venvname>
conda deactivate
```
Install package in your venv:
```
conda install -n <venvname> <package>
```
Automation — Dynamic sitemap generation with Golang API
Tags: go, sitemap, website
Published: 2022-03-23 04:35:26

If you are publishing website, then it is necessary to reach out it to users.  

Most search engines like google and bing crawls website pages using sitemaps. Sitemap contains all static and dynamic routes of webpages. 

Sitemap generation is part of our development process. We can create it using external libraries in our frontend frameworks like Vue or React. 

But sometimes libraries are not compatible with latest versions and it becomes hard to generate [sitemap](https://gist.github.com/cp-sumi-k) for dynamic routes and automate it without using any library.

In this article, You will learn how to create sitemap for all static and dynamic routes and also automate this process at a time of building frontend app to save your precious time.

You can read full article here [https://blog.canopas.com/automation-dynamic-sitemap-generation-with-golang-api-584f6c53ea9c](https://blog.canopas.com/automation-dynamic-sitemap-generation-with-golang-api-584f6c53ea9c)
Hello
Published: 2022-03-23 03:56:35

print("Hello World")
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8by69xdt3mczv23agrc.jpeg)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msxfkkge2uaix5f5842f.jpg)
Help! I need To do A BreadCrumb With React.
Tags: react, breadcrumb, javascript, webdev
Published: 2022-03-23 03:42:55

Hello, I know I'm new here, but I just received an assignment and I don’t know how to even start. I'm completely new to react. I took an advanced course. but that was last week and I Hello, I know I'm new here, but I just received an assignment and I don’t know how to even start. I'm completely new to react. I took an advanced course. but that was last week and I don’t think everything stuck on me so if anyone can help me with these, I'll appreciate it, here is the problem:                                 
*Create a breadcrumb component
*The Component must be reusable 
*The Component must be dynamic, that is, it must be possible to pass the history of routes and configurations of each route to the component
The component must be able to take the user back effectively, always considering that if the previous page had any filter, sort, or pagination settings, the breadcrumb component must be able to return to the previous view taking into account all those app state settings and their respective components
Python's Dict Union Operator | Pep 584
Tags: python
Published: 2022-03-23 03:34:46

---
canonical_url: https://waylonwalker.com/til/python-pep-584/
series: til
published: true
tags:
- python
title: Python's Dict Union Operator | Pep 584
---

Today I was watching the python web conf 2022 and saw [@davidbujic](https://twitter.com/davidvujic) use the new Dict Union Operator Live on stage during his [Functional Programming](https://2022.pythonwebconf.com/presentations/functional-python) talk.  This operator was first introduced into python 3.9 with [pep584](https://peps.python.org/pep-0584/).

## Merge Dicts

I've long updated dicts through the use of unpacking.  Note that the last item always wins.  It makes it pretty easy to make user overrides to default configurations.  With pep584 landing in python 3.9 we can now leverage the `|` operator to achieve the same result.

``` python
default_config = {
    'url': 'https://example.com',
    'assets_dir': 'static'
} 
user_config = {'url': 'https://waylonwalker.com'}

# **unpacking goes back much further than 3.9

config = {**default_config, **user_config} 
print(config)
# {'url': 'https://waylonwalker.com', 'assets_dir': 'static'}


# the same can be achieved through the new to python 3.9 | operator

config = default_config | user_config 
print(config)
# {'url': 'https://waylonwalker.com', 'assets_dir': 'static'}
```



  <div class="onelinelink-wrapper">
      <a class="onelinelink" href="https://waylonwalker.com/python-args-kwargs/">
          <img style="float: right;" align='right' src="https://images.waylonwalker.com/python-args-kwargs-og_250x140.png" alt="article cover for 
 understanding python \*args and \*\*kwargs
"/>
          <p><strong>
 understanding python \*args and \*\*kwargs
</strong></p>
      </a>
  </div>


> More on unpacking in this post.

## Update Dicts

With the release there is also a new update syntax `|=` that you can use to update.  I dont often mutate variables for some reason, so I cant think of a better example for this from my personal use cases. So I will give a similar example to above, except creating a config, then updating it.

``` python
# old python <3.9 way
config = {
    'url': 'https://example.com', 
    'assets_dir': 'static' 
} 
config.update({'url': 'https://waylonwalker.com'})

# new python 3.9+ way
config = {
    'url': 'https://example.com',
    'assets_dir': 'static'
}
config |= {'url': 'https://waylonwalker.com'}

print(config)
# {'url': 'https://waylonwalker.com', 'assets_dir': 'static'}
```

## Should you use it?

Are you writing libraries/applications that are only going to be ran on 3.9? Then ya go for it there is nothing to loose.  If there is any chance someone is going to run your code on 3.8 or older then just use `**`, or `.update`.

## RTFM

This is what comes first to my mind on how to use this new syntax, read [pep584](https://peps.python.org/pep-0584/) for all the gritty details on it.

## Links

* [@davidbujic](https://twitter.com/davidvujic)
* [pep584](https://peps.python.org/pep-0584/)
Azure IaaS, PaaS, and SaaS Concepts
Tags: azure, cloud, serverless
Published: 2022-03-23 03:30:52

#Introduction

The cloud in azure offers three main categories of cloud services. The Infrastructure as a Service(IaaS), Platform as a service (PaaS), and Software as a Service(SaaS).

Each of theses services have different responsibilities as seen on with different responsibilities kind of like a pyramid, as displayed in figure 1.

| ![Cloud Services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/890oueay8s9vk3iwzvjw.png) |
|:--:|
| <b>Figure 1 - Categories of cloud services.</b>|

The higher in the pyramid the lesser the control, the lower in the pyramid the more control one has over the software.

##Infrastructure as a Service(IaaS)

Infrastructure as a service (IaaS) is related to the hardware the system is making use of. Creating an IaaS in azure causes the allocation of a Virtual Machine. In some cases you will be responsible for installing or configuring the Operating system for that Virtual Machine and keeping up with the software updates for that machine.

<div align="center">
| ![Azure VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ump8g5xr3lwxgd2c0yxk.png)|
|:--:|
| <b>Figure 2 - Azure Virtual Machine.</b>|
</div>

##Platform as a Service(PaaS)

Platform as a service (PaaS) azure will provide the Operating System and will handle installing and configuring software on that operating system for the users need.

There are many services available in azure some of these are:

-  Azure Storage
-  Azure Cosmos DB
-  Azure CDN
-  Azure Database for MySQL 


![Azure PaaS Services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmbdmxs80cqmwvhfjztm.png)


##Software as a Service(SaaS)

Software as a service (SaaS) azure will have control of basically everything. This enables users to use out of the box solutions such as:
- Microsoft 365 
- Xbox Live  
- One Drive 
- Power Automate

#References
1. [IaaS](https://azure.microsoft.com/en-us/overview/what-is-iaas/)
2. [PaaS](https://azure.microsoft.com/en-us/overview/what-is-paas/)
3. [SaaS](https://azure.microsoft.com/en-us/overview/what-is-saas/)
VS Code Tip of the Week: Keyboard Shortcuts for Moving Focus
Tags: vscode, productivity, vscodetips
Published: 2022-03-23 03:20:47

This week's tip of the week is all about configuring some shortcuts that allow you to move focus between the editor and the integrated terminal.

By default, <kbd>CTRL</kbd> + <kbd>`</kbd> toggles the integrated terminal. I use this all the time.

I struggled with moving back and forth between the terminal and the current tab in the editor. Toggling the terminal closes the terminal panel, and focus is brought back to the current tab in the editor, but what if you want to toggle between the two without closing the integrated terminal panel?

Thanks to [this post on Stackoverflow](https://stackoverflow.com/a/43012779/77814), I was well on my way to achieving this.

The only problem with this solution was it hijacked how the original intergrated terminal toggle worked with <kbd>CTRL</kbd> + <kbd>`</kbd>.

No problem, just add another keyboard shortcut! What I ended up with was the following for my keyboard shortcuts.

```javascript
{
  ...
  // Toggle between terminal and editor focus
  { "key": "ctrl+`", "command": "workbench.action.terminal.focus" },
  {
    "key": "ctrl+`",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "terminalFocus"
  },
  // Toggle integrated terminal panel
  {
    "key": "ctrl+escape",
    "command": "workbench.action.terminal.toggleTerminal"
  }
}
```

So now, toggling between the editor and integrated terminal can be done using <kbd>CTRL</kbd> + <kbd>`</kbd> and if I want to close the integrated terminal panel, I use <kbd>CTRL</kbd> + <kbd>ESC</kbd>.

If you're new to modifying keyboard shortcuts, check out the [VS Code official documentation](https://code.visualstudio.com/docs/getstarted/keybindings).

Happy VS Coding!
POO - Encapsulamiento
Tags: poo, oop, python, backend
Published: 2022-03-23 03:15:13

Cuando hablamos de encapsulación nos referimos generalmente a definir grados o niveles de acceso y modificación para nuestros métodos y atributos. En Python específicamente no existe como tal una 'protección' real hacía los atributos de una clase, ya que estos se pueden acceder de forma pública simplemente a través de la instancia. Lo que se hace para evitar que estos atributos sean cambiados es usar convenciones ya definidas por Python que nos permiten HACER SABER que esos atributos pueden ser accedidos solamente por la clase en la que se encuentran o por las clases que heredan de la misma:
        
self.__body < de esta forma, con dos guiones bajos, especificamos que únicamente vamos a poder acceder a este atributo estando dentro de la clase en la que se declaró,lo que se conoce como ACCESO PRIVADO
        
self._body < de esta forma, con un guion bajo, especificamos que la propiedad puede ser accedida tanto como la clase en donde fue declarada, como en las que hereden de esta, lo que se conoce como ACCESO PROTEGIDO
 
**¿Por qué en Python no existe como tal una forma real de proteger a estos atributos?**
- Porque en realidad todos estos atributos son de acceso público, ya que podemos acceder a ellos y modificarlos a través de la instancia simplemente llamando a la misma clase:
            
 ```python
post = Post('Titulo del post', 'contenido del post', 'programacion', 'Nahuel')
```
 
*Para el caso donde el acceso sea "PRIVADO" post._Post.__title = 'Cambiando el valor del título'
            
*Para el caso donde el acceso sea "PROTEGIDO" post._Post._title = 'Cambiando el valor de título'

 ```python 
def __init__(self, title, body, hashtags, author):
        self._title = title
        self._body = body
        self._hashtags = hashtags
        self._author = author
    
    def get_name(self): return self._title
    def get_body(self): return self._body
    def get_hashtags(self): return self._hashtags
    def get_author(self): return self._author`
```
StartOf And EndOf Functions Example Of Carbon
Published: 2022-03-23 02:41:17

In this tutorial, I will show you the startOf and endOf functions example of carbon in laravel. In laravel 8 you can change the date format using carbon. Also, you can change the date in PHP.

As you all know carbon provides many functionalities for date setup in laravel, here we will see carbon function example in laravel. startof and endof functions provide different outputs like the start of the day, end of the day, the start of the month, end of the month, etc.

So, let's see carbon startOf and endOf function in laravel.

```
$date = Carbon::create(2022, 1, 1, 12, 0, 0);
echo "startOfDay : ".$date->startOfDay();     
echo "\n";
echo "endOfDay : ".$date->endOfDay();       
echo "\n";
echo "startOfWeek : ".$date->startOfWeek();    
echo "\n";
echo "endOfWeek : ".$date->endOfWeek();
echo "\n";
echo "startOfMonth : ".$date->startOfMonth();   
echo "\n";
echo "endOfMonth : ".$date->endOfMonth();     
echo "\n";
echo "startOfYear : ".$date->startOfYear();    
echo "\n";
echo "endOfYear : ".$date->endOfYear();      
echo "\n";
echo "startOfDecade : ".$date->startOfDecade();  
echo "\n";
echo "endOfDecade : ".$date->endOfDecade();    
echo "\n";
echo "startOfCentury : ".$date->startOfCentury(); 
echo "\n";
echo "endOfCentury : ".$date->endOfCentury();
```

Output :

```
startOfDay : 2022-01-01 00:00:00
endOfDay : 2022-01-01 23:59:59
startOfWeek : 2021-12-27 00:00:00
endOfWeek : 2022-01-02 23:59:59
startOfMonth : 2022-01-01 00:00:00
endOfMonth : 2022-01-31 23:59:59
startOfYear : 2022-01-01 00:00:00
endOfYear : 2022-12-31 23:59:59
startOfDecade : 2020-01-01 00:00:00
endOfDecade : 2029-12-31 23:59:59
startOfCentury : 2001-01-01 00:00:00
endOfCentury : 2100-12-31 23:59:59
```

---

You might also like :

> **_[Read Also : Laravel REST API CRUD Tutorial](https://techsolutionstuff.com/post/laravel-rest-api-crud-tutorial)_**

> **_[Read Also : Carbon Add Months To Date In Laravel](https://techsolutionstuff.com/post/carbon-add-months-to-date-in-laravel)_**

> **_[Read Also : Laravel 8 Yajra Datatable Example Tutorial](https://techsolutionstuff.com/post/laravel-8-yajra-datatable-example-tutorial)_**

> **_[Read Also : How To Check Occupied Disk Space In Laravel](https://techsolutionstuff.com/post/how-to-check-occupied-disk-space-in-laravel)_**
New Years Resolution - Dev Log 25
Tags: webdev, beginners, programming, startup
Published: 2022-03-23 02:08:29

Ayyyyy, number 25, that is pretty good if you ask me.

Lots of things I have got working. For starters, Stripe payment processing is working like a charm. I also got the GitHub action read to go, which purges my DB of any job listings older then 60 days. Need to deploy before it can be tested though. I also added some security to my API routes, the details of which will remain on the down-low, since that is a best security practice.

Right now I am fighting with Vercel to deploy my application. So it will be very exciting when I get this figured out. Every time I deploy I get fetch errors. At first, it was because I was fetching my own API in getStaticProps methods, which apparently is not okay. After I changed that, I still got fetch errors. So I changed the URLs I was trying to reach over to the URL Vercel is trying to provide me with using an environment variable they provide. Still got errors. This time it was a new error though, only "absolute URLs are supported". Easy enough, I prepend the scheme to the URLs. So now they look like this:

`'http://www.' + process.env.VERCEL_URL + '/api/searchJobListings';`

Bam, right back to fetch errors. So I ended up starting a support ticket with Vercel. Then when I saw the response time, I started a pro account free trial and opened up a new ticket, got em.

After they respond, I should be able to get my project deployed. Then I can add the Google reCAPTCHA to the forms, test my GitHub action, take Stripe off of test mode, and integrate "party town" (a third party application that speeds up a site by offloading non UI tasks to web workers). Then I can finally create the MVP video I have been talking about. Hopefully, if all goes well, my job board will be fully released either Monday or Tuesday of next week!

Glory to Ukraine!