teleren/devto huggingface dataset:
Scan over all Regions to find out which EC2 instance is running
Published: 2024-01-11 09:42:53

When using the AWS console, depending on the situation, we may use resources in different regions.

However, using resources in multiple regions can make it difficult to manage. For example, you might start an EC2 instance in us-east-1, but then switch to us-west-2 for your work. Over time, you might forget about the instance you started in us-east-1, which could lead to unexpected billing charges at the end of the month.

To check which EC2 instances are running in a specific region without having to check each region individually, or you don't want to wait until AWS Budget alarm notify you, you can use the following method.

**Idea:**

Step 1: List all regions that support EC2.
Step 2: Use the `describe_regions()` API call to find EC2 instances in each region.
Step 3: Check the status of each instance.

**Code snippet:**

```
import boto3

def get_ec2_instances(type=['pending', 'running', 'shutting-down', 'terminated', 'stopping', 'stopped']):
    ec2 = boto3.client('ec2')

    # List all regions that support EC2
    response = ec2.describe_regions()

    print('Checking EC2 instances ')

    # Loop through each region
    for region in response['Regions']:
        # Print the region name
        print(' -', region['RegionName'])

        # Get all instances in the region
        instances = boto3.resource('ec2', region_name=region['RegionName']).instances.all()

        # Loop through each instance
        for instance in instances:
            # Check the instance status
            if instance.state['Name'] in type:
                print('⚠️ Warning: ', instance.id)

```
**Now, you can try and check did you forget any instance ✨**
🚀 World’s First AI-Powered No-Code PWA App Builder! 📱✨
Tags: webdev, javascript, beginners, programming
Published: 2024-01-11 09:11:04

💸💸 
Turn "Keywords, Websites, eCom Stores, Blogs, & Pages" into iOS & Android Apps in 60 Secs!

💡 Create Unlimited Apps in Any Niche, Monetize effortlessly, No Coding, No Designing! 🌐💰 Your journey to app success starts here. 

🚀🚀 Visit Official Site: https://amaardeals.com/Appz

👩‍💻👨‍💻 #Appz #AppzReview #AppzRevolution #NoCodeMagic #AppzMagic #NoCodeApps #MobileAppRevolution #AIAppBuilder #DigitalInnovation #AppMonetization #InstantApps #AppCreators #UnleashTheFuture #NoBSApps #CodingFree #TechInnovators #MobileSuccess #AppzEmpire #InfinitePossibilities
Appz Review: The World's First No-Code PWA App Builder!
Tags: webdev, javascript, beginners, programming
Published: 2024-01-11 09:09:14

💸💸 Turn "Keywords, Websites, eCom Stores, Blogs, & Pages" into iOS & Android Apps in 60 Secs!

💡 Create Unlimited Apps in Any Niche, Monetize effortlessly, No Coding, No Designing! 🌐💰 Your journey to app success starts here. 

🚀🚀 Visit Official Site: https://amaardeals.com/Appz

👩‍💻👨‍💻 #Appz #AppzReview #AppzRevolution #NoCodeMagic #AppzMagic #NoCodeApps #MobileAppRevolution #AIAppBuilder #DigitalInnovation #AppMonetization #InstantApps #AppCreators #UnleashTheFuture #NoBSApps #CodingFree #TechInnovators #MobileSuccess #AppzEmpire #InfinitePossibilities

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3dv9ksy03dh7cc28605.png)
desert safari package
Published: 2024-01-11 09:04:55

Desert Safari is a popular tourist activity in Dubai, where visitors can experience the beauty of the desert and enjoy various activities. The most popular of all safaris is the Evening Desert Safari, which includes dune bashing, entertainment, and a BBQ buffet dinner. The Morning Desert Safari is perfect for tourists who are short on time and includes dune bashing, quad bikes, sand-boarding, dune buggies, or camel rides. For those who want to spend the night under the stars, the Overnight Desert Safari is the perfect choice. It includes a stay in tents or deluxe rooms in the camp, a BBQ dinner, and a fresh breakfast. If you don’t want to go dune bashing, you can still enjoy the desert experience with the Dinner Only option. The City Tours & Excursions offer a unique opportunity to explore the modern and traditional aspects of Dubai, the mountains of the East, and more.

Deserts are the driest areas on the planet, with very little water and a difficult place for organisms to survive. The moment we hear the word ‘desert’, the first thing that comes to our mind is sand and camels. Camels are majorly found in sandy areas or deserts because they are blessed with such a body structure that can resist heat for long periods of time without water and food. The world’s largest polar desert is Antarctica, and the largest non-polar desert is Sahara. [desert safari dubai](https://www.desertsafaritours.com/)  are places where evaporation is more than the amount of rainfall. Therefore, the scarcity of water is always a matter to be worried about. There are small places of water called oases which are covered with a few trees around them. Oases are formed from underground rivers. Not many animals are found in deserts. Camels are known as the ship of the deserts because they are the only means of transportation to go from one place to another in a desert.

Desert Safari is a sensory journey through the soul-stirring landscapes of the Arabian desert. Our dune bashing experience is a heart-pounding roller coaster ride over the undulating landscapes, offering an adrenaline rush for thrill-seekers and a breathtaking panorama for nature enthusiasts. Travel the desert in a premium vehicle on a 60-min nature safari with an expert conservation guide and spot desert animals like gazelles and Arabian oryx. Visit a beautiful remote lake where you’ll find some rare birds and go to a Ghaf tree forest for some beautiful photographs. Watch a spectacular falconry performance at an exclusive venue. The desert is a fascinating world of extreme conditions and unique adaptations. Deserts are defined by their extreme climate, with high temperatures during the day and low temperatures at night. There are four main types of deserts: hot and dry, semi-arid, coastal, and cold. Plants and animals have adapted to the harsh conditions of the desert in unique ways.
"Learning is the Only Skill."
Published: 2024-01-11 09:03:21



Introduction:
In a world buzzing with the pursuit of skills, there's an unsung hero stealing the spotlight - learning. This isn't just another article on skills; it's a journey into the heart of mastery, where learning reigns supreme. So, buckle up as we unravel the art of learning, the ultimate skill that makes everything else dance to its rhythm.
 - -
**The Wisdom of Sages:**
Socrates once said, "Education is the kindling of a flame, not the filling of a vessel." Those words echo through time, reminding us that skills aren't stagnant pools but flames fueled by curiosity. John Dewey joined the symphony, emphasizing the dance of skills through experiential learning - an active engagement with knowledge that makes skills come alive.
 - -
**The Research Spotlight:**
Imagine having a superpower - adaptability. OECD's research reveals that adaptability is the result of robust learning. It's not just about having skills; it's about being the superhero who can swiftly embrace new talents and navigate the evolving landscape. Neuroscience jumps in, revealing the brain's plasticity - a constant reshaping fueled by the power of continuous learning, making learning more than a skill, but a catalyst for others.
 - -
**The Learning Bowl Extravaganza:**
Envision learning as an ever-expanding bowl, ready to host the grand party of skills. Enter computer science, the dance floor within the bowl. Software engineering? That's the mesmerizing dance orchestrated by learning. It's not just about the beats; it's about the dynamic fusion of learning and skills, creating a symphony that resonates through various disciplines.
 - -
**Legends in the Learning Arena:**
Meet Elon Musk, not just a tech magnate but a maestro of learning. His success story isn't a mere tale of coding; it's a saga of continuous learning, adapting to the ever-evolving tech landscape. Angela Duckworth steps onto the stage as the cheerleader for learning, emphasizing that it's not just about having skills; it's about enduring the marathon of growth and continuous learning.
 - -
**Quotes to Echo Through Time:**
Dr. Carol Dweck, the psychologist with wisdom in her words, reminds us, "Becoming is better than being." It's a mantra that encapsulates the essence of learning - the journey matters, the growth matters, and the continuous pursuit of knowledge is the heartbeat of true skill.
 - -
**The Grand Finale:**
In a world spinning faster than ever, where skills are the currency, remember this: learning isn't just a skill; it's the conductor orchestrating the grand symphony. From the wisdom of sages to research revelations, analogies, and the stories of real-life legends, it's a harmonious celebration where learning takes center stage. Embrace the dance, savor the melody, and let the art of learning be your ultimate skill, making you the virtuoso in the grand concert of life. After all, in a world of skills, learning is the masterpiece that deserves a standing ovation.
Next/SSR "document is not defined" error in console FIX
Tags: webdev, nextjs, programming, tutorial
Published: 2024-01-11 09:00:00

**Problem**
It's a popular problem when working with Next; Let's use the following example: We are trying to create a modal component, but we get stuck on "document is not defined" error in console :(
```
"use client";
import { createPortal } from "react-dom";

interface ModalProps {
  open: boolean;
}

const Modal = ({ open }: ModalProps) => {
  return (
    open &&
    createPortal(
      <>
        <div className="modal-dialog">
          <h1>Modal</h1>
        </div>
        <div className="modal-backdrop"></div>
      </>,
      document.body
    )
  );
};

export default function Home() {
  return <Modal open={true} />;
}
```
**Fix #1**
Should work in any component, both user made, and from any library/UI Kit

```
const ClientOnlyWrapper = ({ children }) => {
  const [isClient, setIsClient] = useState(false);

  useEffect(() => {
    setIsClient(true);
  }, []);

  return <>{isClient ? children : null}</>;
};

const WrappedModal = () => {
  return(
    <ClientOnlyWrapper>
       <Modal />
    <ClientOnlyWrapper/>
  )
}
```

**Fix #2**
Which is included in latest releases of **MDB UI Kits**, which you can check out **[here](https://mdbootstrap.com)**. You don't need to do anything apart from importing it from MDB package:

```
return (
 { 
   <MDBClientOnly>
     <MDBModal />
   </MDBClientOnly>
 }
)
```
Handle Python Packages in Lambda Environment
Tags: pythonpackages, aws, lambda, serverless
Published: 2024-01-11 08:36:08

I was working on a microservice in which I need to make a lambda service for a flask application. And I was like yeah so easy man! but as soon as I dive into the project, I faced problem with managing python packages. So I am here to tell you how to easily cope up with this problem.

Follow these steps:

- 
First of all create a python project using serverless either lambda function or an API gateway or any other. 

- 
Initialize npm in the project by typing command 

```
`npm init`
```

- 
Install the plugin named _serverless-python-requirements_ by command

```
`npm i serverless-python-requirements`
```

- 
Add these lines in your yml file 

![Plugin Configuration in yml file ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lrh5k9pye8cgc7rxcsy.png)

Now, create a virtual environment for installing the packages. If you don't create a virtual environment it will install all the packages in the root directory and your folder structure would be a mess and it is necessary to have a virtual environment.

- 
For creating a virtual environment: 
You can use either of the command. Here i am creating a virtual environment named _"venv"_.
```
virtualenv venv
```
or

```
python -m venv venv
```

for `vitualenv` you should have the pacakage or you can install by using command 
> pip install virtualenv

Now after running this command you will see a venv folder has been created into your directory. 

- 
After creating virtual environment activate the environment by typing the command 
```
venv\Scripts\activate.bat
```

> Additional Info: If you want to be out of the virtual env, type
> `venv\Scripts\deactivate.bat`

when activated, you will see the environment name in the left side of the terminal.

Now in this environment, you can install all the packages needed for your application.

- 
After installing all the packages you have to make a requirments.txt file for listing down all the packages necessary for the application. For this you don't need to list all the packages manually, just type in the command 

```
pip freeze > requirements.txt
```
This will list all the packages with their installed versions.

Now you are almost right there, just one thing is needed.

- 
After doing all the steps you have to install docker in your system and start that in your machine. Importantly don't forget to add these lines into your _yml_ file


![Docker Configuration in yml file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0gy03xva7zwmv4lnh3j.png)

Basically what it will do is to tell the AWS SAM to use docker to install packages in a non-linux environment.

At the time of deployment, It will first look into the requirments.txt file and install all the listed packages which will make them available for the application.

And voila ! you are all set to depend on dependencies.
KeyMasters: Navigating the Digital Dimension with Shortcuts Symphony
Published: 2024-01-11 08:21:41

Embark on a keyboard adventure with "KeyMasters"! Unleashing the magic of [shortcuts Key](https://www.kadvacorp.com/mind-of-manwoman/computer-keyboard-shortcuts-keys/), where every keystroke is a portal to efficiency. Seamlessly traverse tasks with the wizardry of 'Ctrl + C/V,' ensuring copy-paste prowess. Engage 'Alt + Tab' to dance between digital dimensions swiftly. Witness the brilliance of 'Ctrl + S,' safeguarding creations with a stroke. As KeyMasters, we elevate typing to an art form, orchestrating a symphony of shortcuts that transform the mundane into a keyboard ballet. Join the quest for productivity, where keys aren't just buttons—they're gateways to a seamless digital experience! 🚀⌨️ #ShortcutSymphony #KeyMastersJourney
BRC 20 Token | Everything You Need To Know
Tags: brc20token, token, blockchain, beginners
Published: 2024-01-11 08:29:03

Since its launch in 2009, Bitcoin has been at the forefront of the cryptocurrency world. Many businesses started blockchain application development with the popularity of Bitcoin. However, its limited features and absence of smart contract support have presented difficulties for developers in creating new use cases. The emergence of [BRC-20 token development](https://blockchain.oodles.io/dev-blog/brc-20-token-development/?utm_source=devto) on the Bitcoin blockchain came as a solution to Bitcoin challenges. It started a new trend in the cryptocurrency community.

This article will delve into BRC-20 tokens, highlight their distinctions from ERC-20, and examine the significant increase in BRC-20 transactions and mints.

Don’t miss out! Read the full story Blog here — [BRC 20 Token](https://blockchain.oodles.io/blog/brc-20-token/?utm_source=devto)

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — 
📰Unlock exclusive insights : Subscribe to our [newsletter](https://blockchain.oodles.io/marketing-insight/?utm_source=devto).
The Indispensable Role of Physical Therapists in Our Lives
Tags: physical, therapists, essential, healthydebate
Published: 2024-01-11 08:26:33

In the hustle and bustle of our daily lives, it's easy to overlook the importance of maintaining our physical well-being. Amidst the chaos, [physical therapists](http://go.bubbl.us/de4955/9f88?/New-Mind-Map) emerge as unsung heroes, playing a crucial role in helping us achieve and sustain a healthy lifestyle. Their expertise goes beyond mere recovery from injuries; physical therapists are essential partners in our journey toward optimal health and well-being.

One of the primary reasons we need a physical therapist in our lives is their ability to prevent and alleviate pain. Whether it's chronic back pain, sports injuries, or post-surgery recovery, these professionals possess a deep understanding of the human body's mechanics. Through targeted exercises, stretches, and hands-on therapies, physical therapists address the root causes of pain, promoting long-term relief.

Moreover, physical therapists are instrumental in enhancing mobility and flexibility. In an era where sedentary lifestyles are increasingly prevalent, many individuals suffer from stiffness and reduced range of motion. A skilled physical therapist develops personalized plans to improve flexibility, allowing individuals to regain control over their bodies and enjoy a fuller range of movement.

Beyond injury rehabilitation, physical therapists are invaluable in the realm of preventive care. They educate patients on proper body mechanics, posture, and ergonomics, reducing the risk of injuries in the first place. This proactive approach aligns with the philosophy that prevention is as crucial as cure, contributing to an overall healthier society.

Additionally, physical therapists play a pivotal role in the holistic care of individuals with chronic conditions. Whether it's managing arthritis, diabetes, or cardiovascular issues, these professionals collaborate with other healthcare providers to design comprehensive treatment plans. This interdisciplinary approach ensures that patients receive well-rounded care, addressing not only the symptoms but also the underlying causes of their conditions.

**In conclusion**, the presence of a physical therapist in our lives is not just about recovering from injuries; it's about investing in our long-term health and well-being. Their expertise extends far beyond the confines of rehabilitation, encompassing prevention, education, and promoting a healthier lifestyle. As we navigate the challenges of modern living, the guidance and support of a physical therapist become indispensable, contributing to a life of vitality and resilience.
Vue 3's Composition API: Unleashing the Web Developer's Toolbox
Tags: javascript, vue, webdev, programming
Published: 2024-01-11 08:01:48

Vue 3 introduces the Composition API, a game-changer for web developers. Imagine it as a high-tech toolbox that simplifies the process of creating amazing websites. It's like having a set of powerful tools, each with a specific purpose, to craft your website masterpiece effortlessly!

**Building with Tools:**
The Composition API organizes code like assembling tools for specific tasks. Think of it as combining diverse tools that effortlessly shape your website into something extraordinary!

**Powerful Tools – _reactive_:**
One standout tool is the reactive function, managing dynamic elements on a website. It acts like an intelligent overseer, ensuring everything adapts harmoniously.

```
import { reactive } from 'vue';
export default {
  setup() {
    const state = reactive({
      count: 0,
    });
    return { state };
  },
};
```

**Opening and Closing Acts:**
Special commands like **_onMounted_** and **_onUnmounted_** act as stage directors, triggering actions when the show begins and concluding tasks when it ends.


```
import { onMounted, onUnmounted } from 'vue';

export default {
  setup() {
    onMounted(() => {
      cueOpeningLine('Hello, world! The show has started.');
    });

    onUnmounted(() => {
      cueClosingLine('Goodbye! The show is over.');
    });
  },
};
```

**Reusable Scripts:**
Envision the Composition API as a scriptwriting toolkit, allowing developers to create concise scripts for reuse across various website sections.

```
// scriptToolkit.js
import { reactive } from 'vue';

export function useScript() {
  const state = reactive({
    count: 0,
  });

  const executeAction = () => {
    state.count++;
  };

  return { state, executeAction };
}

// MyComponent.vue
import { useScript } from './scriptToolkit';

export default {
  setup() {
    const { state, executeAction } = useScript();

    return { state, executeAction };
  },
};
```

**Orchestrating a Symphony:**
The Composition API lets developers compose code like orchestrating a symphony, with each segment playing a unique role, much like diverse instruments harmonizing in a musical ensemble.

**Conclusion:**
Vue 3's Composition API serves as a dynamic toolbox, simplifying the coding process with powerful tools. It's like having a versatile workshop, allowing developers to effortlessly assemble and fine-tune their web development masterpieces!
Unveiling 'Terraform for Ops': A new e-book
Tags: terraform
Published: 2024-01-11 08:01:00

I've set myself a new target or project for 2024.
I'm going to write a book!

This will be my second book, I wrote "[Developer Relations for Beginners: What to Know and How to Get Started](https://amzn.to/41JWQoM)" at the start of 2022.

But this book will be my first technical book.

## [Terraform for Ops: Automating Infrastructure Tasks](https://www.terraformforops.com)

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

The book is intended to help those with an IT Operations background learn and get to grips with [Infrastructure as Code (IaC)](https://www.techielass.com/infrastructure-as-code-the-benefits-and-the-tools/) and [Terraform](https://www.techielass.com/tag/terraform/).

I am currently in the process of writing the book and hope to have it out in 2024.

You can register for notifications when the book is released at [https://leanpub.com/terraformforops](https://leanpub.com/terraformforops). 

Please do take the time to register and if you have any questions or thoughts about the book please [drop me an email](https://leanpub.com/terraformforops/email_author/new).

I'm excited to embark on this project and hope the community embraces it as well!