teleren/devto huggingface dataset:
AWS Solutions Architect Professional Exam Preparation Guide
Tags: aws, architecture, cloudskills, cloud
Published: 2022-12-10 07:14:04

This blog post will cover:

- Brief overview of AWS Solutions Architect Professional Exam
- Who should take this exam?
- Some useful tips & Resources to crack the exam (based on experience)

Let's get started...

##Overview
This is a professional level exam and it is considered as the toughest of all the AWS Certifications. It needs extensive knowledge and abilities in offering complicated solutions to complex problems in order to maximize security, cost, and performance, and automate manual procedures.

Exam will include 75 questions, either multiple choice or multiple response to be completed in 180 minutes.

##Who Should take this exam?
This exam is intended for individuals with two or more years of hands-on experience on AWS to design and deploy cloud architecture to provide better solutions to complex problems.

You would need a deeper understanding of the AWS services in terms of how these services work together along with their best practices and useful benefits over one another in order to choose the best option for the given use case.

##Some useful tips & resources to crack this exam
I recently took this exam and was able to crack it by following below practices. Hope they help you too.
- **Do hands-on labs**
Take any good Course available on Udemy, Whizlabs, CloudAcademy etc. 
I took [Cloud Academy course](https://cloudacademy.com/learning-paths/solutions-architect-professional-certification-preparation-for-aws-2019-377/) that helped me alot.

- **Mock test series**
Make sure to atleast take 2 mock tests in a week for practice. I used Mock test series by Stephane on [Udemy](https://www.udemy.com/course/practice-exam-aws-certified-solutions-architect-professional/).

- **Read AWS Services FAQs and Whitepapers**
Many times the questions come from the FAQs and whitepapers as these resources includes how to best implement the AWS services, and how one service is different from the other one in a particular use-case. So, I would highly suggest you to go through them at-least once.

- **Learn about AWS Services best practices**

- **Practice Time and Focus Management**
This is crucial to crack the exam. One thing that absolutely helped me in cracking this exam was the daily routine that I created for this exam's preparation. 
You need to ensure that you block your calendar or put a reminder to dedicate some focused time only for exam preparation such as for doing mock tests, reading through whitepapers etc. To know more, check out [this](https://youtu.be/KoAztvttZwM) video.

That's all for now. Thanks!
What are Microservices | Microservices Architecture Training
Tags: microservices, beginners, architecture, aws
Published: 2022-12-10 06:57:20


Have you ever wondered, "What are Microservices and how do scaling industries integrate with them while building applications to meet the expectations of their clients?"
To get an idea, consider how a monolithic application is broken down into small, tiny micro applications that are packaged and deployed independently.

{% embed https://www.youtube.com/watch?v=gfWr2_H39N0 %}
This week’s newsletter is out! (10-12-2022) - Fear and Loathing in the Multiverse
Tags: javascript, tech, webdev, discuss
Published: 2022-12-10 06:36:22

---
title: This week’s newsletter is out! (10-12-2022) - Fear and Loathing in the Multiverse
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Fear and Loathing in the Multiverse

https://markjgsmith.substack.com/p/mark-smiths-newsletter-10-12-2022

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Find the Factorial of a Number(JS AND Golang)
Published: 2022-12-10 06:26:01

factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. example:

`5! = 5 * 4 * 3 * 2 * 1 = 120`

simple method: 1(**JS**)

```
function factorial(number) {
  let result = 1;

  for (let i = 2; i <= number; i += 1) {
    result *= i;
  }

  return result;
}
console.log(factorial(5))
```
simple method: 1(**Golang**)

```
var factVal uint64 = 1 // uint64 is the set of all unsigned 64-bit integers. 
var i int = 1
var n int

func factorial(n int) uint64 {   
    if(n < 0){
        fmt.Print("Factorial of negative number doesn't exist.")    
    }else{        
        for i:=1; i<=n; i++ {
            factVal *= uint64(i) 
        }   
    }    
    return factVal 
}
```
method:(**Using Recursion in JS**)

```
function factorialRecursive(number) {
  return number > 1 ? number * factorialRecursive(number - 1) : 1;
}
console.log(factorialRecursive(5))
```
method:(**Using Recursion in Golang**)

```

```
Day 10: GitHub Actions CI for the rdf-kv Ruby Gem
Tags: ruby, opensource, programming, devops
Published: 2022-12-10 06:25:00

---
title: Day 10: GitHub Actions CI for the rdf-kv Ruby Gem
published: true
description: It is quite easy to add CI to a ruby project of the code works...
tags: ruby, opensource, programming, devops
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2022-12-10 06:25 +0000
canonical_url: https://code-maven.com/ci-for-rdf-kv-ruby
series: ci-2022-12
---

Finally I managed to set up CI for a Ruby Gem.
ere [were some errors](https://github.com/doriantaylor/p5-rdf-kv/issues/2) that stopped me from doing the regular steps.

A few days ago I sent a pull-request with a CI configuration to the [RDF::KV module in Perl](https://code-maven.com/ci-for-rdf-kv-perl).
I was not very happy with the solution, but sent the [pull-request](https://github.com/doriantaylor/p5-rdf-kv/pull/3) anyway.
The author of the module was very responsive and soon pointed me to the step I missed, but also pointed at the [Ruby port of rdf-kv](https://github.com/doriantaylor/rb-rdf-kv).

Today finally I had the time to update the CI I wrote for the Perl version. (See the [PR](https://github.com/doriantaylor/p5-rdf-kv/pull/3)) and also to add the GitHub Actions configuration to the Ruby implementation and send the [pull-request](https://github.com/doriantaylor/rb-rdf-kv/pull/1)

```yaml
name: CI

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '42 5 * * *'

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '3.1' ]

    runs-on: ubuntu-latest
    name: Ruby ${{matrix.ruby}}
    container: ruby:${{matrix.ruby}}

    steps:
    - uses: actions/checkout@v3

    - name: Show Ruby Version
      run: ruby -v

    - name: Install dependencies
      run: bundle install

    - name: Run tests
      run: bundle exec rake
```


## Conclusion

Maybe the earlier failures to set up CI for Ruby Gems wasn't even my fault. Maybe they really had failing tests.
NodeJS virtual environment in Fedora Toolbox
Tags: tutorial, devops, linux, javascript
Published: 2022-12-10 06:08:15

__Fedora Toolbox__ is used to create isolated development environment with container technologies(podman).

__Why Fedora Toolbox__
1.It is tailor made and built-in fedora.
2.By utilizing a Fedora base image, it can install cross language and dependencies environment.
3.As Toolbox is mutable environment and docker environment is immutable; Docker is usually for software deployment and this is for software development

## Hands-on Example
So let's start with creating nodeJS development environment inside Fedora.
```zsh
toolbox create node
toolbox enter node
sudo dnf install nodejs

# Install Yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo dnf install yarn
```
__Output for Fedora Toolbox__
1. Create a fedora container, named node
```shell
Created Container: Node
# ... Other logs downloading and setting up container

```
![Dump Screen for create environment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxlhtf6mpz9aiaaeuz7a.png)
2. Entering virtual environment
![Environment name changed from fedora to toolbox](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ni9fwiwg2cq3ghzkzhwi.png)

## Manage Environemnts | Containers
1. List Containers
```shell
toolbox list
```
![Containers Detail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmr7txzqnz3axch6o4qu.png)

2. Remove Containers
```shell
toolbox rm node
# No Output for this Command
```

## Reference
To understand the container technology behind Fedora toolbox, you can visit this [essay](https://dev.to/bureado/a-quick-guide-to-podman-and-toolbox-in-debian-5672)
Usage of backward slash (\) in Python
Tags: python, programming, beginners
Published: 2022-12-10 05:55:53

In Python, the backslash (\\) character is used for several purposes, such as:

- To specify escape sequences, like `\n` for a newline, `\t` for a tab, etc.
- To escape special characters - the backward slash is used to escape special characters such as quotation marks and newline characters in strings. For example:

```python
# escaping special characters in a string

my_string = "This is a string with a \"quotation mark\" and a newline character \n in it"
print(my_string)

```
- To split a string into multiple lines by using the \ character at the end of each line. For example, the following code will print hello world on two lines:

```python
# continuing a line of code

print("This is a very long line of code that cannot fit on one line" \
      "so we are using the backward slash to continue it on the next line")
```

It's important to note that in Python, the backslash character is used for escaping characters, and it is not the same as the forward slash (/) character, which is used for division. For example, the following code will print 5.0:

```python
print(10 / 2)
```

You may further be interested in:
- [Usage of forward slash (/) in Python](https://blog.soumendrak.com/usage-of-forward-slash-in-python)
- [5 usages of an asterisk (*) in Python](https://blog.soumendrak.com/5-usages-of-an-asterisk-in-python)
- [Usage of the Underscore(_) in Python](https://blog.soumendrak.com/usage-of-the-underscore-in-python)
Personal action plan
Tags: influence, power, relationship, performance
Published: 2022-12-10 05:48:58

As I was taking an online course on achieving personal and professional success at Warton online, I completed an assessment of my current influence behaviours. Based on this assessment, below is my action plan for improving my influence.

One influence tactic I would like to use more effectively is Pathos, which is the emotion of the audience, according to Aristotle’s Rhetoric three means of persuasion. I can convey messages with emotional resonance. A leader's job is not as a rational argument, but as an emotional framing job. If I can get other people to reveal their problems, pain and unmet objectives, I can get people to take action by selling them a vision of their problem as the perfect solution. Know the emotional drivers and I can frame the benefits of any actions in language that will resonate.

I have not been using this already because I focus too much on logos, which is the logic of the idea, according to Aristotle’s Rhetoric three means of persuasion. My education is mostly on training skills like analytics, instead of creating passion in others and leading them in that way. It is not the most effective way to persuade others using logical reasoning, expertise and data. Usually, my goal is to find and uses concrete examples to present my case, instead of telling a story that moves an audience emotionally. The barrier has been the way that it's not easy to make the audience experience the same emotion that I experienced at the moment about to be described in a story.

One concrete step I can take soon that will show improvement in this area is to use stories to help make my points and find ways of communicating that arouse emotion. Successful people rarely become better leaders because they know more. They become better leaders because they follow through, which requires a willingness to feel the feelings that come when we take risks and break old patterns. That courage is essential in finding interesting ways to present information or ideas, and thinking about how to say things, not just what to say. I don't learn it by listening to lectures. The best way is to practice in my next presentation and tailors communication content and style to the specific audience to influence their emotions.
🌀 Iterator and Generator
Tags: javascript
Published: 2022-12-10 05:48:09

## 💎 Iterator
iterator is function which has `next function` which returns object `{done, value}`
```javascript
function genIterator(num) {
  return {
    next: function() { // ⭐ next!!
      return {
        done: true / false, // ⭐ done!!
        value: some value // ⭐ value!!
      }
    }
  }
}
```

For example??
```javascript
function genIterator(num) {
  let i = 0

  return {
    next: function() {
      return {
        done: false,
        value: i
      }
    }
  }
}

const it = genIterator()
```

↓ How to use it ??
```javascript
console.log(it.next()) // 0
console.log(it.next()) // 1
console.log(it.next()) // 2
console.log(it.next()) // 3
```

(By the way this is used basic style of **closure**)
{%link https://dev.to/kaziusan/javascript-closure-i-think-you-can-get-what-it-is-finally-after-reading-this-14d6 %}

↓ How to set max value?
```javascript
function genIterator(num) {
  let i = 0

  return {
    next: function() {
      if(i >= num) {
        return {
          done: true// ⭐ here!!
        }
      } else {
        return {
          done: false,
          value: i
        }
      }
    }
  }
}

const it = genIterator(10)

let one = it.next()
while(!one.done) {
  console.log(one.value)
  one = it.next()
}
// 0 1 2 3 4 5 6 7 8 9
```

## 💎 Generator
generator is function to create iterator
> Actually it's just simple version of iterator 🤗🤗 

```javascript
function* generator() { //⭐ asterisk !!
  if(loop continue) {
    yield value; //⭐ keyword "yield" 
  } else {
    return value;
  }
}
```

> function* ← 🤔 what is this asterisk??
😎 it defines this function is GENERATOR !!!

> yield ← 🤔 what is this??
😎 it returns {value, done}, like iterator

▼ Let's make simple example
```javascript
function* generator() {
  yield 1
  yield 2
  return 3
}

const it = generator()
// ⭐ return {value, done} like iterator !!
console.log(it.next()) // {value: 1, done: false}
console.log(it.next()) // {value: 2, done: false}
console.log(it.next()) // {value: 3, done: true}
console.log(it.next()) // {value: undefined, done: true}
```

▼ Let's transform counter function (genIterator function) by generator
```javascript
function* genIterator(num = 10) {
  let i = 0
  while(i < num) {
    yield i++
  }
}

const it = genIterator(10)

let one = it.next()// ⭐ execute by next() like itarator !!!
while(!one.done) {
  console.log(one.value)
  one = it.next()
}
// 0 1 2 3 4 5 6 7 8 9
```

### Generators are also iterable
```javascript
function* alphabets() {
  yield 'a'
  yield 'b'
  yield 'c'
}

for(let letter of alphabets()) {
  console.log(letter)
}

// a b c
```
11 Must Have Skills For a Top Automation Tester | Automation Testing Tutorial
Tags: webdev, beginners, programming, tutorial
Published: 2022-12-10 05:36:50

In this video, I am going to discuss about the 11 Must Have Skills For a Top Automation Tester. This is is a part of the series, Automation Testing Tutorial.

Automation testing is a Software testing technique to test and compare the actual outcome with the expected outcome. This can be achieved by writing test scripts or using any automation testing tool. Test automation is used to automate repetitive tasks and other testing tasks which are difficult to perform manually

{% embed https://youtu.be/Mv9CTuGWPUQ %}
-----------------------------------------------------
👪 Join our Community - http://bit.ly/learntesting2019

✅ Automation Community - https://thetestingacademy.com

🐦Follow us on Twitter  - https://twitter.com/itstechmode

📖 Like us on Facebook - https://www.facebook.com/scrolltest

🎤  Listen to our Podcast - https://anchor.fm/thetestingacademy

------------------------------------------------------

#automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest

-~-~~-~~~-~~-~-
Please watch: "Cypress Tutorial For Beginners : Part 2
https://youtu.be/XS1iyb5ZT2Y
-~-~~-~~~-~~-~-

🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅Selenium Training and Certification -
https://scrolltest.com/go/edureka


✅Learn Jenkins for QA -
https://bit.ly/learnjenkins-p1


✅Programming Java -
https://bit.ly/learnjava2020-p1


✅Test Automation - 
https://bit.ly/learnautomation2020


✅API Testing - 
https://www.learnapitesting.com


✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com
Markdown Cheatsheet
Tags: markdown, tutorial, quickstartnote, beginners
Published: 2022-12-10 05:34:10

1. First we've to save the file in `.md` extension
---
2. Heading 
```markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```
Preview:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

***
3. Italic
```markdown
_Italic_
```
Preview:
_Italic_
***
4. strong/ bold
```md
**strong/bond**
```
Preview: **strong/bond**
***
5. Strikethrough 
```md
~~strikethrough~~ 
```
Preview: ~~strikethrough~~
***
6. Links
```md
[Visit This Link](https://www.youtube.com/watch?v=bpdvNwvEeSE "Hover Title")
```
Preview: [Visit This Link](https://www.youtube.com/watch?v=bpdvNwvEeSE "Hover Title")
***
7. Images
```md
![Image Link](https://learncodeonline.in/gittwo.png "Hover Title")
```
Preview: ![Image Link](https://learncodeonline.in/gittwo.png "Hover Title")
***
8. Highlight Code Part.
```md
Print with this `Console.log('something')`
```
Preview: Print with this `Console.log('something')`
***
9. Hight code block(remove star signs)
```md
 *```js
    var age=30
    console.log(age)
 *```
```
Preview:  
```js
    var age=30
    console.log(age)
 ```
***
 10. Tables
 ```md
 |Name|Age|Salary|
 |---|---|---|
 |Nayeem|30|999999|
```
Preview: 
 |Name|Age|Salary|
 |---|---|---|
 |Nayeem|30|999999|

 11. Blockquote 

 ```md
 > Never Settle
 ```
 Preview: 
 > Never Settle

12. Unordered and Ordered List. Put Two Spaces for Tab space.
```md
- One
- Two
1. One
2. Two
    1. One
    2. Two
```
preview:
- One
- Two
1. One
2. Two
    1. One
    2. Two
***

13. Horizontal Line (all 3 will work)
```bash
***
---
___
```
Preview: 
***
---
___
14. Task list
```md
<!-- Task List -->
* [x] Task 1
* [x] Task 2
* [ ] Task 3
```
Preview:
<!-- Task List -->
* [x] Task 1
* [x] Task 2
* [ ] Task 3


# Acknowledgement
- [YT video](https://youtu.be/bpdvNwvEeSE 'Hitesh')
- [Github gist](https://gist.github.com/bradtraversy/547a7bbf35ffba1561706e161a50b05a)
Modifying an SVG path with CSS
Tags: css, webdev, beginners
Published: 2022-12-10 05:32:21

In the [previous article](https://daily-dev-tips.com/posts/animate-an-svg-path-with-css/), we learned that we could animate a CSS path, which led me to discover something even more mind-blowing!

We can modify the CSS path! (only supported in Chromium browsers).

Let's check this out and see how it works.

## Modifying SVG path with CSS

To start, we'll need an essential SVG element again. I started with this curved line.

```html
<svg viewBox="0 0 7 9">
  <path d="M1,3 C1,6 6,6 6,3" />
</svg>
```

Which would result in something like this:

![SVG Path](https://cdn.hashnode.com/res/hashnode/image/upload/v1669874220096/iPBShXlfO.png)

So how can we modify the path now?
And you'll be surprised, but it's accessible with CSS like this.

```css
svg:hover path {
  d: path('M1,6 C1,3 6,3 6,6');
}
```

It looks familiar, right? We can modify the path there. In my instance, I changed it to become the opposite angle of the curve, so it turned upside down.

I also added a transition effect on the path so it will animate smoothly.

```css
svg path {
  fill: transparent;
  stroke: indigo;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: 0.2s;
}
```

And now we're able to hover it and see the path change!
This blew my mind and is so cool.

You can see its effect here.

![SVG animation on hover](https://cdn.hashnode.com/res/hashnode/image/upload/v1669874548554/T_toH11sx.gif)

Or if you are on Chromium, check it out on [this CodePen](https://codepen.io/rebelchris/pen/vYrzqwe).

Let's hope this gets better browser support, as it's fantastic to have this ability.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
wait for a server to respond in python
Tags: python, tutorial
Published: 2022-12-10 05:00:00

When starting a python application, our application may wait for a server to respond. 

This article introduce a common technique to wait for a server to be available using `socket` from python stdlib. A script may wait for a database to start or for an API to become available.

I have written ``wait_port``, the following function, for the open source library [``fixtup``](https://github.com/FabienArcellier/fixtup). ``fixtup`` starts containers so that a test can run. There is a need to wait before returning control or executing migration code until the container is operational. The ``wait_port`` helper allows you to wait in a hook before returning control to pytest.

```python
# wait postgresql to start until 5 seconds or raise Timeout exception
wait_port(5432, timeout=5000) 
```

here is the snippet you can reuse in your project

```python
def wait_port(port: int, host: str = 'localhost', timeout: Optional[int] = None, attempt_every: int = 100) -> None:
    """
    wait until a port would be open, for example the port 5432 for postgresql
    before going further

    >>> fixtup.helper.wait_port(5432, timeout=5000)

    :param port: port that has to be open
    :param remote_ip: host on which the port has to be open. It will be localhost by default
    :param timeout: timeout in ms before raising TimeoutError.
    :param attempt_every: time in ms between each attempt to check if the port is responding
    """
    start = monotonic()
    connected = False
    while not connected:
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
            try:
                s.connect((host, port))
                connected = True
            except ConnectionRefusedError:
                if timeout is not None and monotonic() - start > (timeout / 1000):
                    raise TimeoutError()

        sleep(attempt_every / 1000)
```

We can go further with the principle of this snippet. It can be used to verify that a database is ready for use by checking for the existence of a table or by executing a `SELECT 1 + 1` query instead of connecting with a socket.

If you had to write resilient code to wait for a server, share your experience with us in the comments.
Resolve error that occur when importing image file in React with TypeScript
Published: 2022-12-10 04:32:10

## Overview
When using TypeScript on React, an error occur when trying to import an image.
So, fix the error that occurs when importing images in React.
<br>
## What should I do ?
Create a type definition for the image to be used
<br><br>

## #1 Install React with TypeScript
```
npx create-react-app my-app --template typescript
```

## #2 Directory structure

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


## #3 Place the image to be used



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




## #4 Create a type definition

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

```typescript
declare module "*.jpg";
```

## #5 import type definition file

```TypeScript
import "./App.css";
import "./types/image.d.ts";
import sample_image from "./assets/sample.jpg";

function App() {
  return <img src={sample_image} alt="sample"/>;
}

export default App;
```
<br><br>
done.