teleren/devto huggingface dataset:
Days_14 Rock, Paper, Scissors
Published: 2023-03-25 04:52:51

Today, you are going to build a rock, paper, scissors game.

Start with this code below to ensure that whenever you use input, each player cannot see what the other player typed in
`from getpass import getpass as input`

```
#Rock, Paper, Scissors = 
#
#22 MARCH 2023

from getpass import getpass as input

class suit():
  def __init__(self,player1,player2):
    self.player1 = player1
    self.player2 = player2

  def methode(self):
    if self.player1 == "r":
      if self.player2 =="s":
        print("player1, You Winnn!!!!...")
        print("player2, You loseee!!!!...")
      elif self.player2=="p":
        print("player1,You Losee!!!!...")
        print("player2,You Winnnn!!!!...")
      else:
        print("player1, player2,You seri!!!!...")
    elif self.player1 =="p":
      if self.player2=="r":
        print("player1, You Winnn!!!!...")
        print("player2, You loseee!!!!...")
      elif self.player2=="s":
        print("player1,You Losee!!!!...")
        print("player2,You Winnnn!!!!...")
      else:
        print("player1, player2,You seri!!!!...")
    else:
      if self.player2 =="r":
        print("player1,You Losee!!!!...")
        print("player2,You Winnnn!!!!...")
      elif self.player2 =="p":
        print("player1,You Winnn!!!!...")
        print("player2,You loseee!!!!...")
      else:
         print("player1,player2,You seri!!!!...")
        
def call():
  while True:
    player1 = input("Masukan Pilihan player 1: ")
    player2 = input("masukan pilihan player 2: ")
    t = suit(player1, player2)
    t.methode()
call()
```
Google Cloud Crash Course
Tags: webdev, beginners, tutorial, gcp
Published: 2023-03-25 04:23:39

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/KDkVKu3O2vU)](http://www.youtube.com/watch?v=KDkVKu3O2vU)

Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, Google Drive, and YouTube.[2][disputed – discuss] Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning.[3] Registration requires a credit card or bank account details.[4]

Google Cloud Platform provides infrastructure as a service, platform as a service, and serverless computing environments.

In April 2008, Google announced App Engine, a platform for developing and hosting web applications in Google-managed data centers, which was the first cloud computing service from the company. The service became generally available in November 2011. Since the announcement of App Engine, Google added multiple cloud services to the platform.

Google Cloud Platform is a part[5] of Google Cloud, which includes the Google Cloud Platform public cloud infrastructure, as well as Google Workspace (G Suite), enterprise versions of Android and ChromeOS, and application programming interfaces (APIs) for machine learning and enterprise mapping services.
Git & GitHub Crash Course 2023
Tags: webdev, gitthub, beginners, tutorial
Published: 2023-03-25 04:18:17

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/2kKug1Qm_EA/0.jpg)](http://www.youtube.com/watch?v=2kKug1Qm_EA)


GitHub, Inc. is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project.
How to Use Variables | Interpolation and Condition method in Terraform
Tags: terraform, webdev, beginners, tutorial
Published: 2023-03-25 04:11:24

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/quNOFIp3UK0/0.jpg)](http://www.youtube.com/watch?v=quNOFIp3UK0)

Input Variables
Hands-on: Try the Customize Terraform Configuration with Variables tutorial.

Input variables let you customize aspects of Terraform modules without altering the module's own source code. This functionality allows you to share modules across different Terraform configurations, making your module composable and reusable.

When you declare variables in the root module of your configuration, you can set their values using CLI options and environment variables. When you declare them in child modules, the calling module should pass values in the module block.

If you're familiar with traditional programming languages, it can be useful to compare Terraform modules to function definitions:

Input variables are like function arguments.
Output values are like function return values.
Local values are like a function's temporary local variables.
How to Install Boto 3 with Python 3 on Windows 10 | Boto 3 Python Tutorial
Published: 2023-03-25 04:05:07

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/kNB1yTMIJJ4/0.jpg)](http://www.youtube.com/watch?v=kNB1yTMIJJ4)

Permission sets are stored in IAM Identity Center and define the level of access that users and groups have to an AWS account. Perform the following steps to create a permission set that grants administrative permissions.

Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password.

Open the IAM Identity Center console.

In the IAM Identity Center navigation pane, under Multi-account permissions, choose Permission sets.

Choose Create permission set.

For Step 1: Select permission set type, on the Select permission set type page, keep the default settings and choose Next. The default settings grant full access to AWS services and resources using the AdministratorAccess predefined permission set.
Introducing AWS Telco Network Builder
Tags: aws, webdev, beginners, tutorial
Published: 2023-03-25 04:00:23

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/0m8op3YyxJM/0.jpg)](http://www.youtube.com/watch?v=0m8op3YyxJM)

This guide provides instructions to create a new AWS account and set up your first administrative user in AWS IAM Identity Center (successor to AWS Single Sign-On) following the latest security best practices.

An AWS account is required to access AWS services and serves as two basic functions:

Container – An AWS account is a container for all the AWS resources you can create as an AWS customer. When you create an Amazon Simple Storage Service (Amazon S3) bucket or Amazon Relational Database Service (Amazon RDS) database to store your data, or an Amazon Elastic Compute Cloud (Amazon EC2) instance to process your data, you are creating a resource in your account. Every resource is uniquely identified by an Amazon Resource Name (ARN) that includes the account ID of the account that contains or owns the resource.

Security boundary – An AWS account is the basic security boundary for your AWS resources. Resources that you create in your account are available only to users who have credentials for that same account.

Among the key resources you can create in your account are identities, such as IAM users and roles, and federated identities, such as users from your enterprise user directory, a web identity provider, the IAM Identity Center directory, or any other user that accesses AWS services by using credentials provided through an identity source. These identities have credentials that someone can use to sign in, or authenticate to AWS. Identities also have permission policies that specify what the person who signed in is authorized to do with the resources in the account.
Making of Among Us in Discord - DEVBLOG 5 - Start Screen (2/3)
Tags: 100daysofcode, python, discord, gamedev
Published: 2023-03-25 03:56:38

{% embed https://twitter.com/MrStiK101/status/1639473505325465603?s=20 %}

Heya, you know me, this is my 6th blog and you **WILL** know me (newbies, I'm Mr.StiK)

So, as you cans see... yes, I coded till 1:20 AM and my mom got tired and slept after shouting to me to 'Close that dang Computer!!!' and I got the advantage for extra coding time :)

I only slept for 5 hours, but anything for a sussy bot XD.

So, I got players list working! Now whoever presses it, can join with no problem!!! No '2-Players-with-same-name' thing, etc.

But I need to figure out more on this embed, though...

I need to edit the embed, make the lifetime of the embed a bit long because for some reason, only 1 person can interact with it...

And unfortunately, no code for today, because the code is spaghetti and it's still not complete to show you guys... but luckily, I can tell you how I did the Players list management...

You see, the structure of the code is like this, that the Start Button/UI Class (for that embed's Buttons) is above that of the embed message, and I can't do anything on it, because it's the official way, for some reason...

Now, I also did a small change for the thing I'm working on, which is edit embed... so I made the whole `start_embed` (the embed message for the start screen) to be *above* the Start UI Class, and the command and sending functions belove the class. Somewhat looks like this:

`start_embed`
`Button stuff`
`Sending the embed`


so yeah, that's how it works... I might figure this out, but I have to ask discord.py, my heaven, to give me the   `U L T I M A T E    S O L U T I O N` (XD)

so, that's it!

Toodles!
Terraform on Google Cloud
Tags: terraform, webdev, beginners, tutorial
Published: 2023-03-25 03:55:20

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/o4yCt8dJS4U/0.jpg)](http://www.youtube.com/watch?v=o4yCt8dJS4U)


Complete all prerequisites to begin using the AWS SAM CLI with your Terraform projects.

Install Python 3.6 or newer
Python 3.6 or newer is required for use with the AWS SAM CLI. For installation instructions, see Downloading Python in Python's Beginners Guide.

Verify that Python 3.6 or newer is added to your machine path by running:


python --version
The output should display a version of Python that is 3.6 or newer.

Install or upgrade the AWS SAM CLI
To check if you have the AWS SAM CLI installed, run the following:


sam --version
If the AWS SAM CLI is already installed, the output will display a version. To upgrade to the newest version, see Upgrading the AWS SAM CLI.

For instructions on installing the AWS SAM CLI along with all of its prerequisites, see Installing the AWS SAM CLI.

Install Terraform
To check if you have Terraform installed, run the following:


terraform -version
To install Terraform, see Install Terraform in Terraform's Developer Documentation.

Install Docker for local testing
The AWS SAM CLI requires Docker for local testing. To install Docker, see Installing Docker to use with the AWS SAM CLI.

Install the make tool (Windows only)
Make is a package manager and installer for Windows. To install using Chocolatey, see Using Chocolatey in How to Install and Use "Make" in Windows.

Next steps
You're now ready to begin using the AWS SAM CLI with your Terraform projects. To learn more, see:

Better together: AWS SAM CLI and HashiCorp Terraform – Tutorial on using the AWS SAM CLI with Terraform.

Using the AWS SAM CLI with Terraform for local debugging and testing – Documentation on using the AWS SAM CLI with Terraform.
Live DevOps Project for Resume - Microservice live Project | DevOps Project
Tags: devops, webdev, tutorial, aws
Published: 2023-03-25 03:52:15

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/7qnywuzFins/0.jpg)](http://www.youtube.com/watch?v=7qnywuzFins)


Today more than ever, enterprises are embarking on their digital transformation journey to build deeper connections with their customers to achieve sustainable and enduring business value. Organizations of all shapes and sizes are disrupting their competitors and entering new markets by innovating more quickly than ever before. For these organizations, it is important to focus on innovation and software disruption, making it critical to streamline their software delivery. Organizations that shorten their time from idea to production making speed and agility a priority could be tomorrow's disruptors.

While there are several factors to consider in becoming the next digital disruptor, this whitepaper focuses on DevOps, and the services and features in the AWS platform that will help increase an organization's ability to deliver applications and services at a high velocity.
Ansible Crash Course: Automate Your Infrastructure Like a Pro!
Tags: ansible, automate
Published: 2023-03-25 03:41:22


[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/nbTzpKYZtTA0.jpg)](http://www.youtube.com/watch?v=nbTzpKYZtTA)

Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.
Jenkins for DevOps: A Crash Course in Continuous Integration
Tags: jenkins
Published: 2023-03-25 03:36:35



[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/fuxtDCEjcPg/0.jpg)](http://www.youtube.com/watch?v=fuxtDCEjcPg)


To configure your Jenkins pipeline to automate the build and deployment of your AWS SAM application, your Jenkinsfile must contain lines that do the following:

Reference a build container image with the necessary runtime from the available images. The following example uses the public.ecr.aws/sam/build-nodejs14.x build container image.

Configure the pipeline stages to run the necessary AWS SAM command line interface (CLI) commands. The following example runs two AWS SAM CLI commands: sam build and sam deploy (with necessary options).

This example assumes that you have declared all functions and layers in your AWS SAM template file with runtime: nodejs14.x.


pipeline {
    agent { docker { image 'public.ecr.aws/sam/build-nodejs14.x' } }
    stages {
        stage('build') {
            steps {
                sh 'sam build'
                sh 'sam deploy --no-confirm-changeset --no-fail-on-empty-changeset'
            }
        }
    }
}
For a list of available Amazon Elastic Container Registry (Amazon ECR) build container images for different runtimes, see Image repositories.
AWS S3 Master Class | What is AWS S3 | AWS S3 Tutorial For Beginners | S3CloudHUB
Tags: aws, s3
Published: 2023-03-25 03:31:22


[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/VJGQezoeKwI/0.jpg)](http://www.youtube.com/watch?v=VJGQezoeKwI)

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. Customers of all sizes and industries can use Amazon S3 to store and protect any amount of data for a range of use cases, such as data lakes, websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides management features so that you can optimize, organize, and configure access to your data to meet your specific business, organizational, and compliance requirements.

Topics

Features of Amazon S3
How Amazon S3 works
Amazon S3 data consistency model
Related services
Accessing Amazon S3
Paying for Amazon S3
PCI DSS compliance
AWS S3 Master Classes | AWS S3 Bucket Policy | AWS S3 Tutorial | S3CloudHub
Tags: aws, s3
Published: 2023-03-25 03:25:58

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/C81uDkSM_7Y/0.jpg)](http://www.youtube.com/watch?v=C81uDkSM_7Y)

With Amazon S3 bucket policies, you can secure access to objects in your buckets, so that only users with the appropriate permissions can access them. You can even prevent authenticated users without the appropriate permissions from accessing your Amazon S3 resources.

This section presents examples of typical use cases for bucket policies. These sample policies use DOC-EXAMPLE-BUCKET as the resource value. To test these policies, replace the user input placeholders with your own information (such as your bucket name).

To grant or deny permissions to a set of objects, you can use wildcard characters (*) in Amazon Resource Names (ARNs) and other values. For example, you can control access to groups of objects that begin with a common prefix or end with a given extension, such as .html.

For information about bucket policies, see Using bucket policies. For more information about AWS Identity and Access Management (IAM) policy language, see
How to host a website for FREE using AWS? | Static Website Hosting with S3
Tags: aws, amazon, s3
Published: 2023-03-25 03:16:43


[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/ZNj6Cmr4tcs/0.jpg)](http://www.youtube.com/watch?v=ZNj6Cmr4tcs)


You can use Amazon S3 to host a static website. On a static website, individual webpages include static content. They might also contain client-side scripts.

By contrast, a dynamic website relies on server-side processing, including server-side scripts, such as PHP, JSP, or ASP.NET. Amazon S3 does not support server-side scripting, but AWS has other resources for hosting dynamic websites. To learn more about website hosting on AWS
What Software Engineers don't realize...
Tags: problemsolving, comics
Published: 2023-03-25 03:13:50



![What most Software Engineers Don't Realize](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u7w846et8dtrjwoa5c7l.jpg)


What they get hired for.


It's not about writing code. It's about solving business problems.

You can solve business problems with perfectly DRY and tested code - or with a spreadsheet and some macros.


While I would prefer the former, I've also done the latter. If that's what it took to deliver value.


I always thrived when I could make somebody's job easier with the software I wrote.
Mejoras en los formularios
Tags: filamentphp, laravel
Published: 2023-03-25 03:01:37

## Probador de enlaces para cambios URL 

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

Filamentphp permite agregar contenido delante o detrás de los inputs en forma sencilla 
```php
use Filament\Forms\Components\Actions\Action as ActionComp;

... 
    Forms\Components\TextInput::make('url')
                    ->required()
                    ->suffixAction(fn (?string $state): ActionComp =>
                ActionComp::make('visitar')
                    ->icon('heroicon-s-external-link')
                    ->url(
                        filled($state) ? "$state" : null,
                        shouldOpenInNewTab: true,
                    ),
```
 Lo único importante es declarar al inicio del script el uso de ActionComp
2316. Leetcode Solution in cpp
Tags: cpp
Published: 2023-03-25 02:45:42

```cpp
class Solution {
public:
  long long countPairs(int n, vector<vector<int>>& edges) {
    vector<vector<int>> g(n);
    for (const auto& e : edges) {
      g[e[0]].push_back(e[1]);
      g[e[1]].push_back(e[0]);
    }
    vector<int> seen(n);
    long long cur = 0;
    
    function<void(int)> dfs = [&](int u) {
      ++cur;
      for (int v : g[u])
        if (seen[v]++ == 0) dfs(v);      
    };
    long long ans = 0;    
    for (int i = 0; i < n; ++i) {
      if (seen[i]++) continue;
      cur = 0;
      dfs(i);
      ans += (n - cur) * cur;
    }
    return ans / 2;
  }
};
```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/count-unreachable-pairs-of-nodes-in-an-undirected-graph/
Undoing a Git Push: How to Revert Changes Made by a Push
Published: 2023-03-25 02:30:30

Git is a powerful version control system used by developers to manage their codebase. One of the key features of Git is the ability to push changes to a remote repository, making it easy to collaborate with others. However, sometimes we may accidentally push changes that we didn't intend to. In such cases, it becomes necessary to undo the push and revert back to the previous state. In this article, we will discuss the steps involved in undoing a Git push with all the changes made by the push.

Step 1: Identify the commit to revert

The first step in undoing a Git push is to identify the commit that you want to revert back to. This can be done using the git log command, which displays a list of all the commits in your repository. You can use the arrow keys to navigate through the list, and press q to exit the log view.

Alternatively, you can use a Git client such as GitKraken, Sourcetree, or GitHub Desktop to view your commit history in a graphical interface.

Step 2: Revert the commit

Once you have identified the commit that you want to revert back to, the next step is to revert the commit. This can be done using the git revert command. The git revert command creates a new commit that undoes the changes made by the previous commit. The syntax for the git revert command is as follows:

```
git revert <commit>
```

git revert <commit>
Replace <commit> with the hash of the commit that you want to revert.

Step 3: Push the revert commit

After you have reverted the commit, the next step is to push the revert commit to the remote repository. This can be done using the git push command. The syntax for the git push command is as follows:


```
git push <remote> <branch>
```
Replace <remote> with the name of the remote repository, and <branch> with the name of the branch that you want to push to.

Step 4: Verify the revert

Once you have pushed the revert commit to the remote repository, the final step is to verify that the revert was successful. You can do this by checking the commit history on the remote repository, or by pulling the changes to your local repository and checking the files.

By following these steps, you can easily revert back to a previous state and undo any unintended changes. It is important to note that undoing a Git push can have consequences if other developers have already pulled the changes. Therefore, it is recommended to communicate with your team before reverting any changes.
Why I think TailwindCSS is overhyped
Published: 2023-03-25 02:25:38

These days, I have been seeing a lot of posts promoting Tailwind and how amazing it is, etc. To be honest, I was thinking the same thing because I am not in love with design and TailwindCSS makes my life easier. But is it really true?

I started working on a big ecommerce website alone, without anyone to consult, and I chose Tailwind. I loved how it looked with the Indigo color, so I started working on it. It started out okay, and everything was nice, like my button:

`<button class="bg-indigo-600 hover:bg-indigo-700 py-2 px-4 rounded-lg text-white font-sm leading-wide">Click me</button>`

I continued to work and make the first and second components, and everything was good. But at some point, I got some partners to discuss the color scheme because our targets changed, and we decided to go with blue. Now all the indigo elements in multiple files (components) need to be converted to blue, but that's not all - elements with hover, active, ring, border, and all similar things need to be converted too. Instead of looking in the CSS and going to the .btn class, I needed to go to each component file and look for classes with indigo to switch them to blue.

What I learned is this: **Don't follow the masses without using your brain.** 
I switched to beautiful Sass and with super simple tricks, got much better results with even better control over my style.

`$r: 8px;
$pc: #ff23ed; //primary color
$pch:  darken($pc, 5%); //primary color hover
.btn {
    color: white;
    border-radius: calc($r * 1.5);
    background-color: $pc;
    &:hover {
        background-color: $pch;
    }
}
`


With this kind of code, I can easily change the color (you don't need to declare variables in each component, you can have global ones). When you change $pc once, all your colors automatically adjust, even for the hover state. If you want to get a triad color scheme, it's easy:

`$secolor: adjust-hue($pc, 120deg);
$thcolor: adjust-hue($pc, -120deg);`

It uses the color wheel with degrees. If your primary color is red, $secolor will be 0+120, which is equal to 120 and is green on the color wheel. $thcolor will be 0-120, which is 240 on the color wheel and is blue. 

I still think tailwind is nice for small projects but if you plan to use it on big one think twice is it really smart move.

I think that's all for now. Thank you for reading, and if you have any questions, feel free to ask.