teleren/devto huggingface dataset:
Free AWS 100% coupon inside.
Tags: cloudskills, cloud, devops, aws
Published: 2023-03-01 19:51:24


Are you interested in building your cloud architecting skills and preparing for a Solutions Architect role? If so, then you won't want to miss out on the latest opportunity to enroll in a new course that comes with a free digital badge and a 100% discount voucher for AWS SAA certification (limited to the first 1000 participants).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewo9mw8b8z5xbyucg0oc.jpg)
Here are the steps to take advantage of this opportunity:

Step 1: Enroll and take the free "Solutions Architect Learning Plan" course.

Step 2: Complete the online assessment that is part of the course to earn the "Architecting" badge, and then share your achievement on LinkedIn to showcase your newly acquired skills.

Step 3: Be one of the first 1000 participants to receive a 100% discount voucher for AWS SAA certification, which can help you advance your career in cloud architecting.

To register for the course and take advantage of this opportunity, simply visit the following link: https://bit.ly/newarch23

Don't miss out on this amazing opportunity to upskill yourself and build your cloud architecting skills. Share this information with friends and colleagues who may also be interested in taking advantage of this offer.

Make sure to follow the course instructor, [me, I myself](https://www.linkedin.com/in/kanav-preet-singh/) , for more cloud materials, demos, and training opportunities in the future. Stay ahead of the curve and become an expert in cloud architecting today!
Storing Pulumi State on IPFS with Filebase
Tags: web3, ipfs
Published: 2023-03-01 19:36:18

---
title: Storing Pulumi State on IPFS with Filebase
published: true
tags: web3, ipfs 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hm0n2e1pxsmnobnu78l8.jpg
---

I played around with my favourite infrastructure tool Pulumi and asked myself if I could use IPFS as storage backend the deployment state of my projects. 

Pulumi is open source and allows to self-host your storage backend. Could be interesting to have your state publicly available on IPFS, and since the state doesn't include the deployment credentials it wouldn't leak anything critical.

Filebase is a file hosting provider which offers a Amazon S3 compatible API to store files that are then pinned to IPFS. Since Pulumi comes out-of-the-box with a S3 connector, I gave it a try.

## Prerequistes

[A Filebase account](https://console.filebase.com/users/sign_in). It comes with a free tier that doesn't require a credit card.

[A Node.js installation.](https://nodejs.org/en/)

## Setup

First, we create a S3 bucket on Filebase. Hop on the [Filebase Console](https://console.filebase.com/buckets), click on "Create Bucket", name it "deployments", chose IPFS, and hit "Create Bucket".

Next, get the Filebase credentials [here](https://console.filebase.com/keys). We will need them later.

Then install Pulumi:

    $ curl -fsSL https://get.pulumi.com | sh

This might require a restart of the terminal so the `pulumi` command works.

And finally logging into the Filebase S3 bucket with Pulumi, but replace the keys.

    $ export AWS_REGION='us-east-1' && \
      export AWS_ACCESS_KEY_ID='<FILEBASE_KEY>' && \
      export AWS_SECRET_ACCESS_KEY='<FILEBASE_SECRET>' && \
      pulumi login 's3://deployments?endpoint=s3.filebase.com&s3ForcePathStyle=true'

Aaaand we're good to go.

## Testing Everything

Let's create a Pulumi project. This will automatically upload a empty state to Filebase.

    $ mkdir my-project && cd my-project
    $ pulumi new aws-typescript

After this, we can find the state in `dev.json` in the bucket we created [here](https://console.filebase.com/object/deployments/.pulumi/stacks/dev.json). This page will also show the "IPFS Gateway URL" with the CID of our file, so we can open it in the browser.
Prevent re-loading
Tags: react, javascript, beginners
Published: 2023-03-01 19:16:44

If you are doing a react page and you have to submit a form or have to do an onClick function and wants to prevent the reload of the page you can do the following.

Let`s say to have the following button with an onClick function.

```js
<div>
 <button onClick={(e) => setState(e)}/>
</div>
```

It will make the page to reload and if we want to avoid that in a clean way we should use e.preventDefault() function.

```js
const mainComponent = () => {
 const [state, setState] = useState();
 const preventReload = (e) => {
  e.preventDefault()
  setState(e)
}
 return(
 <div>
  <button onClick={(e) => preventReload(e)}/>
 </div>
)
}
```

This way we are preventing a default reload on the page and avoid to just reload.

Hope someone found it helpful.

Lautaro
Webscraping using pandas
Tags: python, pandas, webscraping, datascience
Published: 2023-03-01 18:38:12

Web scraping refers to the process of extracting data from websites using automated tools and scripts. Web scraping can be used for a variety of purposes, such as market research, competitor analysis, and data analysis.

Pandas is a popular data analysis library in Python that provides powerful tools for working with structured data. In this article, we will explore how to use Pandas for web scraping and how it can make the process easier and more efficient.

**The Pandas `read_html()` Function**

One of the key features of Pandas for web scraping is the `read_html()` function. This function allows you to read HTML tables from web pages and convert them into Pandas DataFrames. The `read_html()` function takes a URL as input and returns a list of all HTML tables found on the page.

Here's an example of how to use `read_html()` to scrape a table from a web page:

```
import pandas as pd
import matplotlib.pyplot as plt

# Wikipedia page for total wealth data
url = 'https://en.wikipedia.org/wiki/List_of_countries_by_total_wealth'

# read HTML tables from URL
tables = pd.read_html(url)

# extract the first table (which contains the wealth data)
wealth_table = tables[0]

```

In this example, we first import the Pandas library and specify the URL of the web page we want to scrape. We then call the `read_html()` function with the URL as input, which returns a list of all tables found on the page. We extract the first table from the list by indexing it with [0].

**Data Cleaning and Manipulation with Pandas**

Once you have scraped the data from a web page into a Pandas DataFrame, you can use the full power of Pandas to clean, manipulate, and analyze the data.

Here's an example of how to clean and manipulate data in a scraped DataFrame:

```
wealth_table["Total wealth (USD bn)"] = wealth_table['Total wealth (USD bn)'].replace("—",pd.NA)

# remove unnecessary columns

wealth_table = wealth_table[['Country (or area)', 'Total wealth (USD bn)']]

# remove rows with missing values
wealth_table = wealth_table.dropna()

top10 = wealth_table.head(10)

# plot a bar chart of the top 10 countries by total wealth
plt.bar(top10['Country (or area)'], top10['Total wealth (USD bn)'])
plt.xticks(rotation=90)
plt.ylabel('Total wealth (USD bn)')
plt.title('Top 10 Countries by Total Wealth')
plt.show()
```

Note that the `read_html()` function may not work for all web pages, especially those with complex or dynamic HTML structures.

**Conclusion**

Web scraping with Pandas can be a powerful tool for extracting and analyzing data from web pages. The `read_html()` function provides an easy way to scrape HTML tables, and Pandas provides a wide range of tools for cleaning, manipulating, and analyzing the data. However, it's important to be mindful of the legal and ethical implications of web scraping, as some websites may prohibit or restrict scraping activities. 

Github link:https://gist.github.com/ksn-developer/bb541c1aa2c13b423cdef188b2444661
Docker Compose Access A Mounted Volume Inside a Container
Tags: docker, devops, linux
Published: 2023-03-01 18:21:44

Problem: Using a container to build my project but I can't access the mounted volume due to permission issues.

Assumptions: This tutorial assumes you are working on a reasonably up to date Linux box with Docker and Docker Compose installed, and that you have a basic familiarity with the Linux command line.

A mounted volume is when you mount a directory from your filesystem inside a container. This allows you to access files which were not available when you built the container. Also, you have access to the build artifacts outside the container after building inside the containter.

Docker Compose File:

```yaml
version: '3.8'
services:
  gcc:
    image: "gcc"
    command: /bin/bash
    group_add:
        - $GID
    volumes:
      - ${PWD}/fullbuild:/root/fullbuild
```

This file will pull the official gcc Docker container. It expects the group user id to be $GID and the source code to build to be at fullbuild.

We usually make the $GID the same as the default group for the user who is currently running docker-compose on the host system.

If we do not have the fullbuild directory make it:

```sh
    mkdir -p fullbuild
```

The copy any source code in.

Before we run the function, we need to ensure that our default group has access to both fullbuild and its subdirs:

```sh
find fullbuild -type d -exec chmod g+rwx {} +
```

Finally, when we run and enter the container, ensure that $GID is set:

```sh
GID=`id -g` docker-compose run gcc
```

That's it. After we run the last command, we'll be inside a Docker container with access to gcc as well as having access to all the source code inside the container. Source code is in /root/fullbuild. Build artifacts will be available in fullbuild outside of the container.
JavaScript Tutorial Series: Nodes and elements
Published: 2023-03-01 18:25:03

The distinction between a `node` and an `element` can occasionally be difficult to make.
The word `node` is a general term that refers to any object in the `DOM tree`.  The document is just one example of a native `DOM element`. It's also possible to use another HTML tag, like `<div>` or `<p>`. 
A node of the particular node type `Node.ELEMENT_NODE` has a value of 1.

![Node tree](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2c9vw899qsknc235306.png)

### Some node types

|Node Type|	Description|
|---------|:--------------:|
|Element|	Represents HTML or XML elements such as `<div>`, `<p>`, `<a>`, or `<img>`.|
|Text|	Represents the text content of an HTML element.|
|Comment |	Represents comments in an HTML document.|
|Attribute|	Represents attributes of an HTML element.|

As well as having child nodes like text or other element nodes, element nodes can also contain attributes. In an HTML element, text nodes represent the text content. To add comments to the document, we use the `<!-- -->` tags around the comment nodes. Elements in HTML that have attributes are represented by attribute nodes.

Here's an example:

```HTML
<!DOCTYPE html>
<html>
  <head>
    <title>Node Types</title>
  </head>
  <body>
    <div id="main">
      <h1>Node Types</h1>
      <p>Main types of nodes in the DOM:</p>
      <ul>
        <li>Element Nodes</li>
        <li>Text Nodes</li>
        <li>Comment Nodes</li>
        <li>Attribute Nodes</li>
      </ul>
    </div>
  </body>
</html>
```
The element nodes in this example are `<html>`, `<head>`, `<title>`, `<body>`, `<div>`, `<h1>`, `<p>`, `<ul>`, and `<li>`. The text contained in the `<title>`, `<h1>`,`<p>`, and `<li>` elements is included in text nodes. The `id` attribute of the div element is one of the attribute nodes.

In the next post we're going to learn how to select elements.
OpenAI announces ChatGPT and Whisper APIs
Tags: news, openai, whisper, chatgpt
Published: 2023-03-01 18:18:04

Openai just made [a big announcement](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) regarding its API.

From the post:

> ChatGPT and Whisper models are now available on our API, giving developers access to cutting-edge language (not just chat!) and speech-to-text capabilities. Through a series of system-wide optimizations, we’ve achieved 90% cost reduction for ChatGPT since December; we’re now passing through those savings to API users. Developers can now use our open-source Whisper large-v2 model in the API with much faster and cost-effective results. ChatGPT API users can expect continuous model improvements and the option to choose dedicated capacity for deeper control over the models. We’ve also listened closely to feedback from our developers and refined our API terms of service to better meet their needs.

Any new announcements related to this technology are notable _because_ of the demonstrations we've seen on this technology so far. Evolutions on how developers can access this functionality is where we might see the most substantial impacts.

{% embed https://twitter.com/OfficialLoganK/status/1630992346249658384 %}

## Links to the documentation

### [Chat completions](https://platform.openai.com/docs/guides/chat)

### [Speech to text](https://platform.openai.com/docs/guides/speech-to-text)

***

These are technologies which may have a profound effect on our ecosystems. **What are your thoughts on these advancements? Leave a comment!**

## Generative AI on DEV

You can follow some of these tags if you want to keep up:

{% embed https://dev.to/t/openai %}
{% embed https://dev.to/t/chatgpt %}
{% embed https://dev.to/t/whisper %}

***

I will also remind you that [we have policies in place against the publication of unchecked AI-published](https://dev.to/devteam/guidelines-for-ai-assisted-articles-on-dev-17n6) posts on our community. If you publish here using assistive tools, you must check and verify your work. Using these tools to publish flawed information are things our admins, mods, and moderation tooling, are on the lookout for.


Happy coding! ❤️
The Alarming Rise of Social Engineering Attacks in the Financial Sector
Tags: cybersecurity, security, infosec, beginners
Published: 2023-03-01 18:15:57

Gone are the days of masks and guns for bank and financial institutions robberies. Criminals have shifted to more sophisticated methods to get funds and data. They have shifted from masks and guns to social engineering attacks for scripts and ransomware. From the past few years, there is a drastic increase in the rate of attempted social engineering attacks and hacks in the financial sector.

It is crucial to provide quality customer service for the financial services industry, but there are many potential pitfalls when your employees go above and beyond for your customers. There is a huge number of sensitive assets that banks or any other financial institution rely on every day to conduct business. These include social security numbers, credit information, PINs, cardholder data, mailing addresses, email addresses, account balances, and more. All these assets are available and accessible to employees, which means that it is susceptible to being compromised by a malicious hacker. Because of these reasons, it is important to focus on social engineering training for financial sector employees. This will educate them on how to identify and report social engineering attempts.

You must be wondering what social engineering is? What are common types of social engineering attacks in the financial sector? How can the financial sector mitigate the risks of these attacks? No worries! This blog has answers to all your questions.

To learn more click here:(https://sennovate.com/the-alarming-rise-of-social-engineering-attacks-in-the-financial-sector/)
Encryption Part 1: Introduction to Encryption
Tags: python, encryption, cryptography
Published: 2023-03-01 18:05:20


# Intro

This will be a series on Encryption.

It was my turn to give presentation to my work colleagues at our weekly meetings. Instead of talking about the usual webdev / JavaScript / Framework of the week, I spoke about the fundamentals of cryptography (it made me nostalgic for grad school). I think it's good and important to have an understanding of the basics of how our wonderful internet operates. 

This will be split up into several posts. This first one is just an introduction on the topic. 


# What is encryption?

Scrambling a message so that only the people who _should_ read a message _can_ read a message. 

Or if you want the Google definition:

en•cryp•tion /inˈkripSH(ə)n,enˈkripSH(ə)n/
noun
the process of converting information or data into a code, especially to prevent unauthorized access.
"I use encryption to protect sensitive information transmitted online"


That's about it.

# When was encryption first used?

The first known use of encryption was during Roman times. It's claimed that Julius Caesar used a shift cipher (now known as a Caesar Cipher) with a shift of 3 to encode significant military messages. 

# How does a Caesar (Shift) cipher work?

All we do is shift the letters the number of the encryption key. So if our shift was 4, each letter on the top row of the chart of your message would get replaced by the letter on the bottom.

|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|A|B|C|D|

The message "i like python" would get encrypted to "M PMOI TCXLSR". It's even easier to do with a [printable encryption wheel.](https://www.perkley.com/cipher-wheel/)

There are **TONS** of tutorials on [how to write a Caesar Cipher](https://dev.to/bharadwaj6262/caesar-cipher-in-python-3j09) in various languages on Dev, so I don't feel a need to do it. We'll get into code in Part 2.

# Security
Is a Caesar Cipher secure?

NO.

Don't use it unless you're just passing notes in class (even then it may not be a good idea. A Caesar Cipher can be cracked by a basic linguistic statistical analysis. Meaning look for the letters in the encrypted message that are used the most and they most likely correspond to the letters that are most commonly used in a given language ("a" and "e" in English). 

Another way is to just do a brute force attack. You could write a program that tries all 26 shifts and see which one isn't gibberish.

# Symmetric Ciphers & Asymmetric Ciphers

A Caesar Cipher is known as a symmetric cipher because the key to unlocking it is the same as the key to unlocking it. Also, both parties need to know the key before using it. There are plenty of other examples of Symmetric Ciphers-- the most famous (infamous?) of which was the enigma machine that the Germans used during WWII and was cracked by Alan Turing. 

Asymmetric ciphers are a whole 'nother can of worms. Look out for part 2!
The Top 5 Social Media Platforms to Watch in 2023: A Look at the Evolving Landscape of Online Communication and Connectivity
Published: 2023-03-01 18:04:12

Social media has transformed the way we communicate, connect, and consume information. In 2023, the social media landscape is expected to evolve and adapt to changing trends and user needs. As we approach the future, it's essential to explore the top 5 social media platforms to watch in 2023.

1.TikTok

TikTok is a video-sharing app that has taken the world by storm. It was launched in 2016 by Chinese tech company ByteDance and has since then become one of the most downloaded apps globally. TikTok's short-form video content has been praised for its ability to engage and entertain users. In 2023, TikTok is expected to continue its growth and expand its advertising capabilities.


2.Clubhouse

Clubhouse is an invite-only audio social media platform that allows users to join and participate in live discussions. It was launched in 2020 and has since then become a popular platform for networking and sharing knowledge. Clubhouse's real-time audio chat rooms have been praised for their ability to connect people from all around the world. In 2023, Clubhouse is expected to continue its growth and expand its user base.

3.Instagram

Instagram has been one of the most popular social media platforms since its launch in 2010. It's known for its visual storytelling capabilities and has become a platform for influencers and businesses to promote their brands. In 2023, Instagram is expected to continue its growth and add new features that cater to user needs, such as e-commerce and augmented reality.

4.LinkedIn

LinkedIn is a professional networking platform that connects individuals and businesses. It was launched in 2002 and has since then become a platform for job seekers and recruiters. LinkedIn's focus on professional networking sets it apart from other social media platforms. In 2023, LinkedIn is expected to expand its capabilities and add new features that cater to businesses and individuals.

5.Twitter

Twitter is a microblogging platform that allows users to share short messages called tweets. It was launched in 2006 and has since then become a platform for real-time news and information sharing. Twitter's unique features, such as hashtags and retweets, have made it a popular platform for journalists and politicians. In 2023, Twitter is expected to continue its growth and adapt to changing user needs.


Conclusion

The social media landscape is constantly evolving, and the top 5 social media platforms to watch in 2023 are TikTok, Clubhouse, Instagram, LinkedIn, and Twitter. These platforms offer unique features and capabilities that cater to different needs and interests. As we approach the future, it's essential to stay up-to-date on the latest trends and changes in the social media world.
Create a Stunning Restaurant Website from Scratch with HTML, CSS, and JavaScript
Tags: webdev, programming, tutorial, beginners
Published: 2023-03-01 18:03:27

In this tutorial, we'll walk you through the process of creating a stunning and responsive restaurant 

website from scratch, using HTML, CSS, and JavaScript. Whether you're a web developer, designer, 

or simply looking to learn new skills, this tutorial is perfect for you! 

We'll cover everything from designing the layout of your website, to styling it with CSS, and adding 

interactivity with JavaScript. We'll also provide some tips and tricks along the way to help you 

optimize your website for search engines, improve your website's accessibility, and enhance the 

user experience. 

🔔 Subscribe for more! 

https://www.youtube.com/channel/UCHI9Mo7HCSlqum1UMP2APFQ

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

🔗 Source code 

https://upfiles.com/HI2cnHF

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

☝ Start developing the project (base files + images) 

- Click on the UpFiles link 

- Click the green button (code) 

- Click Download ZIP 

- Extract the project to the desired location

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

🔥 Follow me! 

Facebook 

https://bit.ly/3IMfk04

 Instagram 

https://bit.ly/3GHoQyT

 Twitter 

https://bit.ly/3IOBEqc

 Linkedin 

https://bit.ly/3INnwNY

 By the end of this tutorial, you'll have a beautiful restaurant website that is both engaging and functional, 

and sure to impress your customers. 

Tags: 

#responsiverestaurant #restaurant #htmlcssjs #webmonster #html #css #javascript #webdesign #website #react r

estaurant website, HTML, CSS, JavaScript, web development, responsive design, accessibility, user experience, tutorial. 

So, whether you're building a website for your own restaurant or for a client, this tutorial will help you create a website that stands out from the crowd. Make sure to like this video and subscribe to our channel for more web development tutorials and tips!



Link Of The Video :

→ https://youtu.be/9noXN4IWv4Y

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