teleren/devto huggingface dataset:
My AWS Cloud Practitioner Exam Experience.
Tags: aws, cloud
Published: 2023-07-12 20:39:08


 So I failed when I took the first AWS Cloud Practitioner exam in December 2021. Yes, I blew it!
 Immediately you hit the submit button, the exam result pops up on your screen.
 Oh, I felt so sad!
 It was a time to pause and think. Indeed, my preparation was not sufficient, so what did I expect?

 Let me share a quick story.
 I was undergoing my first internship in tech, a colleague shared with me the Aws cloud practitioner training with a free Voucher link.
 Then, I had little experience in customer service, networking, and IT support. I wasn't sure but I knew I wanted to learn an IT skill.

I didn’t start the course till it was three weeks before the exam I had scheduled.
I started with the AWS training and certification course content, and it was quite interesting with a quiz after each module. The modules come with explanations for each quiz, so you get to view the answers and explanations.

For me, the module was quite easy to comprehend, but for the exam, you need a lot of practice, especially if you are just switching into tech, with no prior tech background.
So back to when I did my exam and I failed, my result breakdown was sent to my mail, showing my score of about 600+ and with feedback on areas I did well and also areas to improve on.

So basically the modules talked about topics like Global infrastructure, EC2 instances, Networks and Security, Billing, Identity Management, and a lot more.
You might need to signup for this free training course and also research more materials online.

For the second attempt, I ensure I had a study road map and prepared two months before the exam, studying for at least an average of two hours on the course content.
I watched tutorials on youtube to understand some topics better, and I also practiced questions a lot, I got a link to practice questions from another colleague, which aided my confidence to retake the exam.

I registered again and I did my exam at home, on exam day, the proctor checked the usuals such as the exam space I was using, including my valid Id, and after all the protocol was observed, I started the exam.
I read each question carefully while also being conscious of my time. This time I was confident as opposed to being tensed in my previous exam, I had multiple choice questions and multiple answer questions.

After about 45 minutes, I was done.
 I clicked submit and in less than a minute, my result was out!
 I passed!!!
For anyone looking to take the Aws Cloud practitioner exam, just take your time to understand the basic concepts, revise and practice well.
I wouldn't be able to drop links to resources I used because they were random links, but it's advisable to start with course content on AWS website.
Here is a link to AWS free training:http://bit.ly/44LJ5WR

Thank you for reading.
Vue learning path
Tags: vue, nuxt
Published: 2023-07-12 19:57:47

TL;DR - Should I spend tens of hours learning vue or should I do a crash course and move into Nuxt? 
--------
Hey, I've been thinking of starting to learn Vue/Nuxt for a while so I can work on my own project. I have some limited React knowledge (have done a couple of small projects with Remix), but Vue/Nuxt seems much better from a developer experience pov.

I have went through several reddit posts and I've been googling around. There's plenty of resources, VueMastery, VueSchool, The Net Ninja, Boris' Masterclass. 

I see that opinions are divided between VueMastery and VueSchool, and TNN's course on Udemy hasn't been updated in almost two years now. That's why I figured I could try Boris' course which seems pretty good.

However, my objective is to end up working with Nuxt, and I know I shouldn't skip learning Vue, but I was thinking if spending 40 hours doing the masterclass is worth it given that Nuxt takes care of a lot of stuff when developing an app.

Any help choosing a path would be amazing. I am a visual learner, but I can go through the docs if that would be the best way. 

Thanks for reading my post!
Koopman operator - Implementing the network described in this paper
Tags: machinelearning
Published: 2023-07-12 19:50:49

[This is the link](https://www.nature.com/articles/s41467-018-07210-0) of the paper I mentioned in the title. I tried to replicate it, however things do not work, the matrix K is always the identity matrix during  the training and of course the variables do not evolve. The code is [in this GIT](https://github.com/alemll/Koopman) (in MYNET.ipynb, with all the details about the theory and the code), and the dataset too. Please, if you are interested in helping me, contact me, I am desperate
#DEVDiscuss: Contributing to OSS
Tags: devdiscuss, discuss, meta, os
Published: 2023-07-12 19:48:38

---
title: #DEVDiscuss: Contributing to OSS
published: true
description: 
tags: devdiscuss, discuss, meta, OS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29b09yso4zqwnj49u8wq.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-07-12 19:38 +0000
---

*image created by [Margaux Peltat](https://www.patreon.com/margauxpeltat) for the [Chilled Cow YouTube channel](https://www.youtube.com/watch?v=lTRiuFIWV54)*

Time for #DEVDiscuss — right here on DEV 😎

{% embed https://dev.to/opensauced/how-i-got-hired-contributing-to-open-source-projects-546i %}

Inspired by @og_dev's Top 7 post, tonight’s topic is... contributing to Open Source Software!

### Questions:
- **What was one of your first experiences contributing to OSS?**
- **Where would you recommend getting started if you were offering advice to a newbie?**
- **Maintainers, anything to add? What tips or tricks have helped you keep track of your codebases, especially while new folks are contributing**
- **Any triumphs, fails, or other stories you'd like to share on this topic?**
The Magic of Empty Git Commit
Tags: git, opensource, beginners, programming
Published: 2023-07-12 19:48:29

Empty commits play a significant role in enhancing version control workflows. Although seemingly counterintuitive, they offer valuable benefits for documentation, triggering automation. In this short guide, we'll demonstrate how to create and push an empty commit using Git.

Step 1: Initialize a Git Repository
If you haven't already, navigate to your project directory and initialize a Git repository with the following command:

```bash
$ git init
```

Step 2: Create the Empty Commit
To create an empty commit, use the following command:

```bash
$ git commit --allow-empty -m "Empty commit"
```
The `--allow-empty` flag allows an empty commit, and the `-m` flag is used to specify a commit message. Feel free to replace "Empty commit" with a meaningful message describing the purpose of the commit.

Step 3: Push the Empty Commit
To push the empty commit to the remote repository, use the command:

```bash
$ git push origin <branch-name>
```
Replace `<branch-name>` with the name of the branch you want to push the commit to, such as "main" or "develop."



Conclusion:
Empty commits might seem unusual, but they offer significant advantages in managing version control. By documenting milestones, triggering automation processes, and maintaining codebase stability, empty commits can improve collaboration and project management. It is important to note that empty commits should be used specifically in Pull Requests/Merge Requests to avoid cluttering the commit history of the main/production branch.
Constraint fails to prevent the insertion. Do you know why?
Tags: help, mariadb
Published: 2023-07-12 19:44:00

Can you help me with that?

https://dba.stackexchange.com/q/329226/118215

What I want to do is to check that insertion must happen if either:

1. Death date is null
1. Death date is greater than birth date

But is seems that constraint does not prevent the insertion of:

```
INSERT INTO spies (name,surname,birth_date,death_date)
      VALUES ('Namae','Myoji','1980-12-01','1970-12-03');
```

At this table:

```
CREATE TABLE `spies` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `agency` varchar(255) NOT NULL DEFAULT 'NO-AGENCY',
  `country_of_operation` varchar(255) DEFAULT NULL,
  `birth_date` date NOT NULL,
  `death_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_spy` (`name`,`surname`,`agency`,`birth_date`),
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

```

Do you know why?
Is anyone still out there?
Published: 2023-07-12 19:42:48

Well hi...it's been a while...

I lost access to my @javascriptcoff1 account around 2 years ago and went off to try and become a vet.

I'll be honest with you, I haven't made much progress.

It's incredibly competitive and I've been bombarded at every turn by people telling me I can't physically do it.

So I'm rethinking.

I miss my nerdy friends

How are you?
Part 2. URL Routing with Spring Boot and Flask
Tags: webdev, python, java, programming
Published: 2023-07-12 18:57:01

URL routing is a way by which HTTP requests are handled by different parts of an application based on the URL patterns. This means that the URL routing allows the application to execute different code for different URL paths. This allows the application to have multiple pages or functional parts. 

## **Flask**
In Flask, routes are defined using Python decorators:

```python
@app.route('/')
def home():
    return "This is the home page."
```

```python
@app.route('/about')
def about():
    return "About page."
```
@app.route('/') and @app.route('/about') are decorators that tell Flask what URLs should trigger the associated function. The string that the function returns is what will be displayed on the webpage at that URL. Here, visiting 'www.dev.com/' would display "This is the home page," and 'www.dev.com/about' would display "About Page."

## **Spring Boot**
Spring Boot uses annotations for URL routing:

```java
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PageController{

   @RequestMapping("/")
   public String home(){
       return "This is the home page.";

  }

@RequestMapping("/about")
   public String about(){
       return "About Page";

   }


}

```

The @RequestMapping("/") and @RequestMapping("/about") annotations tell Spring Boot that the 'home()' and 'about()' methods should handle requests for the root URL and '/about' URL respectively. Again, the string returned by the method is what will be displayed on the webpage at that URL. 

URL routing facilitates the creation of diverse pages or functions within a web application. In the Flask framework, this is accomplished with decorators that associate URL paths to specific functions, whereas in the Spring Boot framework, annotations are used to link URLs to certain methods. In both cases, the return string from the associated function or method is displayed on the corresponding webpage.
Anybody taking advantage of Amazon Prime Day deals?
Tags: watercooler
Published: 2023-07-12 18:56:20

Calling all consumers, [Amazon Prime Day](https://www.amazon.com/primeday) is underway.

![A pile of cardoard boxes opening up endlessly and stacking on top of each other, a little bit like Russian dolls. Finally, a cardboard box person pops out of the top of the stack and then their head opens up and the video seamlessly transitions to the beginning where the boxes start to endlessly stack up again.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otxxz4ob7mh6kx9plhne.gif)

I'm such a sucker for a good bargain. 😅

Anybody else taking advantage of any Prime Day deals? If so, what are you picking up?
Building a community for my Open Source project - Sharkio
Tags: opensource, community, contributorswanted, programming
Published: 2023-07-12 18:49:34

So far Sharkio has:
14 stars 
11 forks on Github
14 users On the discord server
9 developers contributed code

I recommend anyone that is looking for contributors to share their project in this [series](https://dev.to/opensauced/whos-looking-for-open-source-contributors-week-48-4a5n) of posts by OpenSauced.

Can't wait to see this community grow :)

If you are interested in contributing to an api development tool.

Checkout https://github.com/idodav/sharkio
Replacing a substring in a string with another string using python without built-in function
Tags: python, pythonfunction, replacestringalgorithm
Published: 2023-07-12 18:43:15

"""
suppose a text **_txt_** is given. we want to replace the first occurrence of the pattern **_P1_** by another pattern **_P2_**.
**REPLACE(txt, P1, P2)**
"""

```
def REPLACE(txt, p1, p2):
    if p1 not in txt:
        return "Pattern not found"

    # getting index of the pattern
    idx = txt.find(p1)

    # initialize variables to store new string
    temp_txt = ""
    new_txt = ""


    # deleting substring from the text
    for i in range(len(txt)):
        if i < idx or i >= idx + len(p1):
            temp_txt += txt[i]
    

    # adding p2 in txt as replacement
    for i in range(len(temp_txt)):
        if i == idx-1:
            new_txt += temp_txt[i]

            for j in range(len(p2)):
                new_txt += p2[j]

        else:
            new_txt += temp_txt[i]
    

    return new_txt
```
ACOS.games – Middleware platform for ReactJS multiplayer web games
Tags: webdev, react, gamedev, javascript
Published: 2023-07-12 18:32:36

Hi Devs, 

I engineered this platform to support building multiplayer games for competitive gamers. Game development uses JavaScript for both client and server, and focuses on Trivia and Board game genres, but all played in real-time.

The platform manages all the functionalities outside of your gameplay and user interface, which includes: networking, matchmaking, rankings, timing, replays, deployment, and many other features.

There is an SDK and Simulator that helps speed up development tremendously, but you as a developer will remain focused on authoring gameplay via the JSON game state and displaying the changes to that state on the browser.

Many hours were spent ensuring the website is supported on most devices, with tough resiliency to ensure users can get back into matches when traveling on degraded cell service. This will allow perhaps having a battle royale with 100s of people playing in a single match of a trivia game. It always bothered me how online trivia games only allowed up to like 8 or 16 players.

I'm about halfway on my roadmap, but the core foundation of the platform is settling in. Now, its time to expand into the more community focused features.

That is where you can help, by pushing the limits of my systems. Break things, enhance things, all is welcome.

The platform behind the website will be open-sourced in the near future, but you can access the ACOS simulator and existing games on GitHub.

Play or develop a game on: https://acos.games

Read the documentation at: https://sdk.acos.games

Learning to code? We can help you build your first game. Simply join us on Discord. https://discord.gg/ydHkCcNgHD

Happy Coding!
Spring Boot v Flask. Part 1-Frameworks
Tags: webdev, java, python, programming
Published: 2023-07-12 18:14:14

Spring Boot and Flask may seem very different at first glance. After all, they're written in different languages—Java and Python, respectively. One might argue that Java requires more syntax to convey the same concepts, while Python appears to be easier to read.

This series will delve into the similarities and differences between Spring Boot and Flask, two popular web development frameworks.

Our starting point: both Spring Boot and Flask are indeed frameworks.

Wikipedia defines a web framework as a 'software framework that is designed to support the development of web applications including web services, web resources, and web APIs.' In simpler terms, web frameworks are sets of tools and resources that simplify the life of a developer when building web applications. Think of a framework as a scaffold for constructing your web application. This scaffold offers a structured, systematic approach to building web apps, mitigating the complexity of web development by managing common tasks like URL routing, handling HTTP requests and responses, and facilitating interaction with databases."

There's A LOT that goes into making web applications work as expected. If you had to manually code everything from scratch every time you created a web application, you would need to understand and implement many complex, and often repetitive tasks!

A web framework simplifies this by providing pre-built components for these tasks (examples above and below). During this series, we'll be looking at URL Routing, Handling HTTP Requests and Responses, Interacting with Databases, and avoiding common security mistakes.
Patrón de diseño Adapter en JavaScript
Tags: javascript, beginners, spanish
Published: 2023-07-12 18:06:15

Los patrones de diseño son unas de las mejores prácticas que puedes hacer dentro de tu código, y esto tiene que ver porque puedes reutilizarlo además lo puedes ocupar no solo para un solo proyecto sino para múltiples. El día de hoy vamos a ver el patrón de diseño Adapter en JavaScript.

El patrón adapter lo podemos entender como una capa intermedia que nos ayuda a agregar funcionalidades a objetos que no la tienen sin modificar la clase original. Vamos a revisar un ejemplo para que quede un poco mas claro.El patrón adapter lo podemos entender como una capa intermedia que nos ayuda a agregar funcionalidades a objetos que no la tienen sin modificar la clase original. Vamos a revisar un ejemplo para que quede un poco mas claro.

Vamos a crear un adaptador que va a recibir un objeto de tipo Date y lo va formatear dependiente de ciertos casos, por ejemplo obtener la fecha con el formato local o también el formato en base de datos, como se muestra a continuación.


![Clase adapter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/881kfjghv3s6ot1b10vm.png)

Veamos como es que funciona.


![Ocupando el adapter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9wmmxmjxpfo4r101g2y.png)

De esta manera tenemos una clase que nos ayuda a agregar funcionalidad sin modificar a las otras clases que la ocupen, hay que verlo como legos que vamos a ir juntando para ir construyendo algo mas grande, además las funcionalidades solo se agregan en un solo lugar.

Por lo tanto mantener el código se volverá más sencillo a largo plazo. Si este articulo te gusto o aprendiste algo nuevo te agradecería que me apoyaras con una recomendación y compartieras para que mas personas puedan aprender de esto. Gracias.
How to add powershell in terminal in SprintToolSuite(STS) IDE?
Tags: java, sts, springboot, springsecurity
Published: 2023-07-12 18:00:48

Hello everyone, I will teach you how to add the powershell executable in the IDE spring tool suite (STS) or Eclipse

1 - Open IDE eclispe/Spring tools suite

2 - Windows >> Preferences >> Pesquise por "Terminal"



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

3 - Click in Add


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

4 - in add External Executable :

- Name: PowerShell (Name of your choice)
- Path: Path of the powershell executable on your machine


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

Copy the full path
Exmplo: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe


And add in the path

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




- Arguments: (Optional)
- Icon: (Optional)
- Checkbox: Translate Backslashes on Past(Optional)

5 - Click in ADD


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

6 - Apply >> Apply and Close

7 - And finally, open the powershell terminal.

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


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

Thank you.
Full Calendar Bootstrap 4
Tags: calendar, fullcalendar, javascript, bootstrap
Published: 2023-07-12 17:07:59


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

### Preview Link

https://codepen.io/ankithingarajiya/full/jQBWEz
Creating a Query Tree, Connecting to the Remote Server, and Plan Tree Creation in FDW
Tags: apacheage, postgres
Published: 2023-07-12 17:07:23

## 1. Creating a Query Tree:
During query analysis, the analyzer/analyser constructs the query tree based on the input SQL statement. To build the query tree for FDW, the definitions of the foreign tables are utilized. These definitions are stored in the pg_catalog.pg_class and pg_catalog.pg_foreign_table catalogs, which are populated using commands like CREATE FOREIGN TABLE or IMPORT FOREIGN SCHEMA.

## 2. Connecting to the Remote Server:
To establish a connection with the remote server, the planner (or executor) relies on specific libraries designed for connecting to the respective database servers. For instance, when connecting to a remote PostgreSQL server, the postgres_fdw extension utilizes the libpq library. On the other hand, mysql_fdw, developed by EnterpriseDB, employs the libmysqlclient library for connecting to MySQL servers. The connection parameters, including the username, server's IP address, and port number, are stored in the pg_catalog.pg_user_mapping and pg_catalog.pg_foreign_server catalogs using commands like CREATE USER MAPPING and CREATE SERVER.

## 3. Creating a Plan Tree Using EXPLAIN Commands (Optional):
PostgreSQL's FDW provides support for obtaining statistics of foreign tables, which are utilized to estimate the plan tree of a query. Some FDW extensions, such as postgres_fdw, mysql_fdw, tds_fdw, and jdbc2_fdw, make use of this feature. If the use_remote_estimate option is enabled for a server using the ALTER SERVER command, the planner can query the cost of plans from the remote server by executing the EXPLAIN command. By default, embedded constant values are used for estimation. Here's an example of enabling the use_remote_estimate option:
```sql
ALTER SERVER remote_server_name OPTIONS (use_remote_estimate 'on');
```
It's important to note that while some FDW extensions can reflect the results of the EXPLAIN command (such as postgres_fdw), other extensions may not be able to utilize the EXPLAIN results for planning. For instance, the EXPLAIN command in MySQL only returns the estimated number of rows, which may not provide enough information for PostgreSQL's planner to estimate the cost accurately, as explained in Chapter 3.

When using FDW in PostgreSQL, the process involves creating a query tree, establishing a connection to the remote server using specific libraries, and optionally utilizing EXPLAIN commands to estimate the plan tree of a query. These steps allow PostgreSQL to seamlessly interact with foreign tables on remote servers, expanding the capabilities and flexibility of your database environment.