teleren/devto huggingface dataset:
How to Install the AWS CLI v2
Tags: cloud, learning
Published: 2023-05-13 15:47:26


CLI - Command Line Interface is very very useful in the world of DevOps. For the Windows users swipe from Windows to Linux is one of major steps to learn CLI and use it every day in the tasks, projects and personal configuration. 

Benefits of AWS CLI are: 

- EFFICIENCY 

- REMOTE ACCESS (very often DevOps need to access remote services in AWS, which is more faster than do it manually)

- TROUBLESHOOTING (in less time is possible checking problems with network, ports..)

- EASY INSTALLATION (steps are below)
- SAVES TIME
- AUTOMATE PROCESSES
- SUPPORTS ALL AMAZON WEB SERVICES (s3, ec2, iam ..)


AWS CLI provides direct access to AWS services public APIs, a lot of work can be done only through AWS CLI but with a less effort. 

To update your current installation of AWS CLI, download a new installer each time you update to overwrite previous versions. 
     
        curl "https://awscli.amazonaws.com/awscli-exe-linux- 
        x86_64.zip" -o "awscliv2.zip"
        unzip awscliv2.zip
        sudo ./aws/install


![curl-cli-v2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce1l2zo3spuvb8mkvvg0.png)

**To update your current installation of the AWS CLI,** add your existing symlink and installer information to construct the install command with the --update parameter.

       sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update

**UNZIP INSTALLER**

        unzip awscliv2.zip

![unzip-cli](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m80pqht58pg2j279ojeu.png)

**RUN THE INSTALL PROGRAM**

Run the install program. The installation command uses a file named install in the newly unzipped aws directory. By default, the files are all installed to /usr/local/aws-cli, and a symbolic link is created in /usr/local/bin. The command includes sudo to grant write permissions to those directories.

        sudo ./aws/install

**CONFIRM INSTALLATION**

        aws --version


![sudo-aws-version-cli](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkuku6nqqzjhivv0mzy4.png)

How to check does user have configured profile on laptop?

       aws configure list-profiles

If you don't have it, then you need to setup using command **aws configure**. 

TESTING configuration: 

       aws s3 ls 

If you get list of your buckets, then your CLI is configured correctly. 

**HOW TO CHECK which account of AWS is connected on our CLI?**

One of the useful command to check this is: 

       $ aws sts get-caller-identity 


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


Source for install CLI v2 : [AWS Documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

Source for check the profiles and setup more profiles on [AWS Documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
Open AI API with Docker
Tags: ai, python, docker, openai
Published: 2023-05-13 16:59:43

So we are gonna have some Python script to use the
Open AI library and make some prompts. On my first intent
I was having some issues regarding Python not finding the
libraries concerning the lessons I was taking.

So, since I have a lots of problems with Python versioning
and library installing on my m1 because I have a lot of
versions of Python installed in it and I'm too lazy
(have tons of work) to fix them, I created a docker file
to run everything without the sweat.

## Setup

First we create a **Dockerfile** and a **requirements.txt**:

### requirements.txt

```txt
openai
IPython
python-dotenv
```

### Dockerfile

```Dockerfile
FROM python:3.11.3

WORKDIR /app

COPY requirements.txt .

RUN pip install --upgrade pip setuptools

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "app.py"]
```

Step by step:

1. Get the Python version that you need (use at least 3.11)
2. Tell Docker that it is gonna work on the _app_ directory,
   this will create a directory of the same name in the container.
3. Copy a requirements.txt file (it contains a list of libraries to install)
4. Install _pip_ and _setuptools_ at it's latest vertions
5. Install the required libraries (remember the file on 3)

Now that we have this two, let's build the image but first
let's create a **docker-compose.yml** file to also launch our container:

### docker-compose.yml

```yml
version: "3"
services:
  openai:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      - OPENAI_API_KEY=YOUR_OPEN_AI_API_KEY
```

Step by step:

1. Declare the version
2. Declare a services
3. Create the openai service
4. Declare a build pointing to the Dockerfile
5. Declare the environment variables
   I'm declaring SCRIPT as an environment variable to make
   posible to change the script when launching the container.

## Prompt script

Let's create an script to test the Open AI API:

### app.py

```python
# imports is self describing
import os
from io import StringIO
import openai
from IPython.display import display, HTML
from dotenv import load_dotenv

# get the OPENAI_API_KEY from the environment (docker-compose.yml)
openai.api_key = os.environ.get( 'OPENAI_API_KEY' )

# create a function to get propmt AI response
def get_completion(user_prompt, model="gpt-3.5-turbo"):
    messages = [{"role": "user", "content": user_prompt}]
    ai_response = openai.ChatCompletion.create(
            model=model,
            messages=messages,
            temperature=0,
            )
    return ai_response.choices[0].message["content"]

promp="Name five reasons to become a developer"
```

## Launch the container

```sh
docker-compose up --build
```

## Use --build only the first time launching

That's it now you can have a service to get response
from the AI, you can use it to prompt from a chatbot
you build.

Happy prompting!
How to get Udemy Free courses' 2023?
Tags: webdev, free, learning, programming
Published: 2023-05-13 16:50:54

How to get Udemy's premium courses for free? Get UDEMY paid courses for free with certificates. All Udemy courses at no cost

Udemy Is An Online, For-Profit Learning Platform That Makes Learning How To Develop Websites, Apps, Programs, And Much More A Simple Affair. The Platform Has Been Designed For Professionals Who Are Looking To Learn Something New Or Refresh Their Skills. From Basic Introductory Courses To Professional Certifications, Udemy Has You Covered.

We also Provide alot [free seo tools world](https://freeseotoolsworld.com/) like [WordHero AI review](https://freeseotoolsworld.com/WordHero-ai-login/) [Ubersuggest Premium account free](https://freeseotoolsworld.com/ubersuggest-premium-account/) and many more
I don't support Agile Manifesto. Niether should you.
Tags: programming, agile, projectmanagement
Published: 2023-05-13 16:42:59

As an ex-Scrum Master, I'm here to tell you that Agile isn't all it's cracked up to be. In fact, sometimes Agile can be downright bad.


In this video, we are going to discuss the Agile methodology and why it can be bad, from the perspective of an ex-Scrum Master. The Agile Manifesto was created in 2001, and it has been implemented in various industries ever since. It is a methodology that values collaboration, flexibility, and adaptability over rigid planning. However, despite its popularity, Agile can also have some downsides.

As an ex-Scrum Master, I have seen the potential negatives of Agile firsthand. In this video, I will discuss some of the reasons why Agile can be bad. We will explore the potential downsides of Agile, such as its over-reliance on teamwork, its lack of structure, and its tendency to cause burnout. 

Let's take a step back and look at the Agile Manifesto. It is often referenced as "source of truth" but is it actually any good? 

When it comes to certain types of projects, a more traditional software methodology, such as waterfall, might actually be a better choice. Sometimes, the rigidity of a waterfall approach can be just what a project needs to ensure success. 

So next time you hear someone singing the praises of Agile, take a moment to consider whether it's truly the best fit for your project. And if you're still not sure, consult with an experienced software professional who can help you weigh the pros and cons of different methodologies. 

In summary, this video provides a thought-provoking perspective on the Agile methodology and why it can be bad. It is an informative video for anyone interested in learning more about Agile and its potential downsides.

Don't forget to like and subscribe to our channel for more informative content on Agile and other digital marketing strategies.


{% embed https://youtu.be/0ntS2pGNWWQ %}
🚀 Help Shape the Future of Open Source contributions - I Need Your Input!
Tags: opensource, help, discuss, survey
Published: 2023-05-13 16:40:29

Hello, fellow devs! 😄

I'm on a mission! I'm trying to understand the challenges and hurdles that might be stopping us from diving deep into the fantastic world of Open Source. And guess what? I need your help!

We've all been there, right? Wanting to contribute to Open Source but feeling held back for one reason or another. Is it finding the time? Feeling like you lack the necessary skills? Or is it simply not knowing which project to choose? 🤔

That's where you come in. I've put together a short survey - it'll only take a few minutes, promise! Your input could help shape the future of Open Source contribution, making it more accessible and welcoming for everyone.

Here's the link to the survey: https://surveymonkey.com/r/W7F377Y

And hey, we're all about community here, right? So, if you know someone else who's got insights to share on this, please feel free to pass the survey along.

Thanks a ton in advance! You're awesome! 🎸 Let's continue to make the dev community one of the best places to learn and grow!
Post 3
Published: 2023-05-13 16:30:58

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pellentesque massa condimentum eros feugiat vestibulum. Cras venenatis augue non eros dictum blandit. Nunc euismod at tellus vitae sagittis. Cras non placerat nunc, eu tempor ipsum. Nulla sodales molestie tortor vitae fringilla. Morbi porta tortor id dui malesuada, sed porta dolor elementum. Sed tempor luctus erat, a lobortis felis vehicula eu. Suspendisse pulvinar eros fermentum, aliquet neque at, gravida massa. Ut non pretium eros. Ut vel cursus sem. Cras condimentum accumsan ligula, vitae elementum arcu aliquet a. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suspendisse lacus tellus, auctor eget quam a, accumsan fringilla sem. Maecenas eleifend nisi vel bibendum pulvinar. Mauris fermentum est quis odio pharetra fringilla. Suspendisse nec pharetra odio. Nulla quis libero sodales, faucibus purus ac, porta lacus. Ut lacinia sit amet ipsum nec eleifend. Pellentesque mauris diam, scelerisque ac mattis vel, iaculis ut eros. Pellentesque fringilla, ligula at viverra bibendum, ex tellus laoreet nunc, vitae ultricies elit magna sed metus. Donec et fermentum justo. Nulla facilisi. Maecenas pulvinar suscipit pulvinar. Fusce imperdiet aliquet ullamcorper. In hac habitasse platea dictumst.

Donec pellentesque mi at eros consectetur condimentum. Nullam lobortis, nulla sed tincidunt fringilla, ex orci dignissim nunc, sed tincidunt mauris dui a nulla. Maecenas at pellentesque magna, nec facilisis ligula. Etiam felis est, ultrices quis egestas sit amet, suscipit sed turpis. Integer ut turpis ullamcorper, porttitor sem eu, ultricies orci. Maecenas id urna quam. Nam gravida urna sed justo blandit, eu euismod neque lacinia. Duis vulputate diam eget efficitur lacinia. Fusce rutrum, tortor et rutrum porta, orci nibh lacinia lacus, sed bibendum orci leo dictum justo. Quisque metus arcu, elementum eget vulputate at, tristique eu est.

Aliquam viverra orci id augue ornare, nec facilisis arcu maximus. Etiam et lorem sed magna porta dictum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus lorem diam, fringilla id ligula nec, ultricies ultricies eros. Aliquam aliquet ligula nec interdum ultricies. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse sollicitudin, sapien a bibendum venenatis, turpis lacus molestie nulla, at dignissim ante mauris ac diam. Nam justo tellus, efficitur nec mattis nec, pretium ut turpis.

Pellentesque aliquet commodo massa. Aenean eget nisl vestibulum, imperdiet eros in, lacinia nisl. Sed laoreet cursus nibh eget fringilla. Praesent elit dolor, vestibulum eu faucibus at, mollis mollis purus. Cras consectetur, sem vulputate congue sollicitudin, quam augue venenatis massa, at sodales lorem ex sed dolor. Nunc id risus ligula. Praesent vitae risus in dui blandit dictum.
According to BuiltWith Trends, there are 3,825,799 websites that use Ruby on Rails
Tags: ruby, webdev, internet, statistics
Published: 2023-05-13 16:24:31

Just played with that Bard AI and he said this: 
“According to BuiltWith Trends, there are 3,825,799 websites that use Ruby on Rails. This number includes both live websites and websites that have been taken down. Of these websites, 661,621 are live and 3,164,178 have been taken down”

Some of the most well-known websites that use Ruby on Rails include:

- Airbnb
- GitHub
- Shopify
- Twitch
- Zendesk
Ruby on Rails is a popular web development framework that is known for its speed, flexibility, and ease of use. It is a good choice for developers who want to create high-quality websites quickly and easily.

Interesting data hopefully this is correct number. If it is then hmm. Ruby declined so much.
Post 02
Published: 2023-05-13 16:22:56

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pellentesque massa condimentum eros feugiat vestibulum. Cras venenatis augue non eros dictum blandit. Nunc euismod at tellus vitae sagittis. Cras non placerat nunc, eu tempor ipsum. Nulla sodales molestie tortor vitae fringilla. Morbi porta tortor id dui malesuada, sed porta dolor elementum. Sed tempor luctus erat, a lobortis felis vehicula eu. Suspendisse pulvinar eros fermentum, aliquet neque at, gravida massa. Ut non pretium eros. Ut vel cursus sem. Cras condimentum accumsan ligula, vitae elementum arcu aliquet a. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suspendisse lacus tellus, auctor eget quam a, accumsan fringilla sem. Maecenas eleifend nisi vel bibendum pulvinar. Mauris fermentum est quis odio pharetra fringilla. Suspendisse nec pharetra odio. Nulla quis libero sodales, faucibus purus ac, porta lacus. Ut lacinia sit amet ipsum nec eleifend. Pellentesque mauris diam, scelerisque ac mattis vel, iaculis ut eros. Pellentesque fringilla, ligula at viverra bibendum, ex tellus laoreet nunc, vitae ultricies elit magna sed metus. Donec et fermentum justo. Nulla facilisi. Maecenas pulvinar suscipit pulvinar. Fusce imperdiet aliquet ullamcorper. In hac habitasse platea dictumst.

Donec pellentesque mi at eros consectetur condimentum. Nullam lobortis, nulla sed tincidunt fringilla, ex orci dignissim nunc, sed tincidunt mauris dui a nulla. Maecenas at pellentesque magna, nec facilisis ligula. Etiam felis est, ultrices quis egestas sit amet, suscipit sed turpis. Integer ut turpis ullamcorper, porttitor sem eu, ultricies orci. Maecenas id urna quam. Nam gravida urna sed justo blandit, eu euismod neque lacinia. Duis vulputate diam eget efficitur lacinia. Fusce rutrum, tortor et rutrum porta, orci nibh lacinia lacus, sed bibendum orci leo dictum justo. Quisque metus arcu, elementum eget vulputate at, tristique eu est.

Aliquam viverra orci id augue ornare, nec facilisis arcu maximus. Etiam et lorem sed magna porta dictum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus lorem diam, fringilla id ligula nec, ultricies ultricies eros. Aliquam aliquet ligula nec interdum ultricies. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse sollicitudin, sapien a bibendum venenatis, turpis lacus molestie nulla, at dignissim ante mauris ac diam. Nam justo tellus, efficitur nec mattis nec, pretium ut turpis.

Pellentesque aliquet commodo massa. Aenean eget nisl vestibulum, imperdiet eros in, lacinia nisl. Sed laoreet cursus nibh eget fringilla. Praesent elit dolor, vestibulum eu faucibus at, mollis mollis purus. Cras consectetur, sem vulputate congue sollicitudin, quam augue venenatis massa, at sodales lorem ex sed dolor. Nunc id risus ligula. Praesent vitae risus in dui blandit dictum.
How to use multiple GitHub account on same device?
Tags: github, beginners, programming, tutorial
Published: 2023-05-13 16:17:23

Many people use GitHub for both personal and professional projects. However, if you have multiple GitHub accounts, you may be wondering how to use them on the same device.

There are a few different ways to do this. One way is to use different SSH keys for each account.

**Using SSH keys**

To use SSH keys, you will need to generate a new key pair for each account. You can do this by following these steps:

1. Open a terminal window.
2. Run the following command to generate a new key pair:

```
ssh-keygen -t ed25519 -C "my-email@gmail.com"
```

3. When prompted, enter a file in which to save the key. Enter "id_personal", "id_work" or leave empty if you want to save as default file name .
4. When prompted, enter a passphrase for your key pair. Leave empty if you want.
5. The key pair will be generated in the `~/.ssh` directory.
6. Repeat same process for second account.

Once you have generated a key pair for each account, you will need to add the public key to each account. You can do this by following these steps:

1. Go to the settings page for your account.
2. Click on the "SSH and GPG keys" tab.
3. Click on the "New SSH key" button.
4. Copy the key by running below command 
 ```
Macos: pbcopy < ~/.ssh/id_personal.pub
Windows: clip < ~/.ssh/id_personal.pub
```
5. In the "Key" field, paste the public key for the account.
6. Click on the "Add key" button.

Once you have added the public key to each account, you need to create a config file under `~/.ssh/` directory by running the following command:
```
touch ~/.ssh/config
```

Now when the config file is created, open with vscode or any code editor and replace below code.
```
#work account
Host github.com-work
	HostName github.com
	User git
	IdentityFile ~/.ssh/id_work

#Personal account
Host github.com
	HostName github.com
	User git
	IdentityFile ~/.ssh/id_personal 
```

Save the file and run below command
``` eval "$(ssh-agent -s)"  ``` or ``` ssh-agent reload  ```


Now use the SSH key to connect to each account. You can do this by following these steps:

1. Open a terminal window.
2. Change to the directory where you want to clone the repository.
3. Run the following command to clone the work repository:
```
git clone git@github.com-work/repository.git
```

4. Run the following command to clone the personal repository:
```
git clone git@github.com-work/repository.git
```

**Conclusion**

Using multiple GitHub accounts on the same device can be a bit tricky, but it is definitely possible. By following the steps in this article, you will be able to use multiple GitHub accounts on the same device without any problems.
Post 01
Published: 2023-05-13 16:15:09

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pellentesque massa condimentum eros feugiat vestibulum. Cras venenatis augue non eros dictum blandit. Nunc euismod at tellus vitae sagittis. Cras non placerat nunc, eu tempor ipsum. Nulla sodales molestie tortor vitae fringilla. Morbi porta tortor id dui malesuada, sed porta dolor elementum. Sed tempor luctus erat, a lobortis felis vehicula eu. Suspendisse pulvinar eros fermentum, aliquet neque at, gravida massa. Ut non pretium eros. Ut vel cursus sem. Cras condimentum accumsan ligula, vitae elementum arcu aliquet a. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suspendisse lacus tellus, auctor eget quam a, accumsan fringilla sem. Maecenas eleifend nisi vel bibendum pulvinar. Mauris fermentum est quis odio pharetra fringilla. Suspendisse nec pharetra odio. Nulla quis libero sodales, faucibus purus ac, porta lacus. Ut lacinia sit amet ipsum nec eleifend. Pellentesque mauris diam, scelerisque ac mattis vel, iaculis ut eros. Pellentesque fringilla, ligula at viverra bibendum, ex tellus laoreet nunc, vitae ultricies elit magna sed metus. Donec et fermentum justo. Nulla facilisi. Maecenas pulvinar suscipit pulvinar. Fusce imperdiet aliquet ullamcorper. In hac habitasse platea dictumst.

Donec pellentesque mi at eros consectetur condimentum. Nullam lobortis, nulla sed tincidunt fringilla, ex orci dignissim nunc, sed tincidunt mauris dui a nulla. Maecenas at pellentesque magna, nec facilisis ligula. Etiam felis est, ultrices quis egestas sit amet, suscipit sed turpis. Integer ut turpis ullamcorper, porttitor sem eu, ultricies orci. Maecenas id urna quam. Nam gravida urna sed justo blandit, eu euismod neque lacinia. Duis vulputate diam eget efficitur lacinia. Fusce rutrum, tortor et rutrum porta, orci nibh lacinia lacus, sed bibendum orci leo dictum justo. Quisque metus arcu, elementum eget vulputate at, tristique eu est.

Aliquam viverra orci id augue ornare, nec facilisis arcu maximus. Etiam et lorem sed magna porta dictum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus lorem diam, fringilla id ligula nec, ultricies ultricies eros. Aliquam aliquet ligula nec interdum ultricies. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse sollicitudin, sapien a bibendum venenatis, turpis lacus molestie nulla, at dignissim ante mauris ac diam. Nam justo tellus, efficitur nec mattis nec, pretium ut turpis.

Pellentesque aliquet commodo massa. Aenean eget nisl vestibulum, imperdiet eros in, lacinia nisl. Sed laoreet cursus nibh eget fringilla. Praesent elit dolor, vestibulum eu faucibus at, mollis mollis purus. Cras consectetur, sem vulputate congue sollicitudin, quam augue venenatis massa, at sodales lorem ex sed dolor. Nunc id risus ligula. Praesent vitae risus in dui blandit dictum.