teleren/devto huggingface dataset:
Unlocking E-commerce Potential with AI-Driven Solutions and WhatsApp
Tags: devchallenge, twiliochallenge, ai, twiliohackathon
Published: 2024-06-19 15:17:52

*This is a submission for [Twilio Challenge v24.06.12](https://dev.to/challenges/twilio)*

## What I Built
For this challenge, I developed an AI-powered eCommerce chatbot that integrates seamlessly with WhatsApp to enhance the shopping experience for users. Leveraging the capabilities of Twilio's API, my solution allows customers to easily inquire about products, receive detailed information, and be directed to relevant purchasing pages, all through a simple and intuitive chat interface on WhatsApp.

## Demo
<!-- Share a link to your app and include some screenshots here. -->

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

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



## Twilio and AI
My solution leverages Twilio's robust API to facilitate communication between the AI agent and users on WhatsApp. Here’s how Twilio and AI work together in this project:

1. WhatsApp Integration: Using Twilio's API, the chatbot is integrated with WhatsApp, allowing it to send and receive messages from users. Ensuring a smooth and reliable communication channel.
 
2. AI-Powered Responses: The chatbot uses the Llama3-70b model running on the Groq inference engine to understand user queries and provide fast, accurate and contextually relevant responses.
 
3. Real-Time Product Information: The AI agent accesses the eCommerce database in real time to fetch up-to-date product information, ensuring users always get the latest details. It can read directly from the database to look for the customer’s requested items, providing accurate and timely responses. It can also read extra contextual documents provided by the retailing company to answer any question asked about the company 
 
4. User Engagement: Twilio’s API ensures that messages are delivered promptly and reliably, enhancing user engagement and satisfaction.

## Additional Prize Categories

Additional Prize Categories
My submission qualifies for the following additional prize categories:

- Twilio Times Two: By utilizing both Twilio's WhatsApp and AI capabilities, my solution demonstrates a powerful and innovative use of Twilio’s services.

- Impactful Innovators: This chatbot has the potential to significantly impact the eCommerce industry by simplifying the shopping process and enhancing customer experience.


Credits to my team members:https://dev.to/johnmuinde

[Link to the code](https://github.com/wayneotemah/Mpesa-AI-Agent.git)

Thanks for participating!
CoinMarketCap Launches Exciting New Project
Published: 2024-06-19 15:17:10

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

**New Project by CoinMarketCap Launching Today**

Be part of the exciting new launch by CoinMarketCap. Invest early, secure your tokens, and maximize your potential returns in the rapidly evolving crypto market.

Visit Presale: https://cmctoken.net/

Project Roadmap
2024
Conceptualization and Market Research



Conduct comprehensive market research to conceptualize the CoinMarketCap Token.
Develop a detailed whitepaper outlining the tokenomics and technical architecture.
Team and Partnerships

Assemble a core team and advisory board.
Establish partnerships with exchanges and wallet providers.
Development and Community Building

Develop the smart contract on a scalable blockchain.
Initiate community building through social media and forums.
Funding and Security

Conduct private and pre-sale funding rounds.
Perform security audits and launch a beta test of the token.
2025
Public Sale and Listings



Execute the public sale of the CoinMarketCap Token.
List the token on major cryptocurrency exchanges.
Ecosystem and Growth

Launch the CoinMarketCap ecosystem platform, featuring staking and rewards.
Expand the team to support growth.
Form strategic partnerships to enhance the ecosystem.
Governance and Accessibility

Implement token governance features.
Release a mobile app for platform access.
Scalability and Marketing

Scale infrastructure to accommodate higher transaction volumes and users.
Initiate a global marketing campaign.
Innovation and Competitiveness

Incorporate new blockchain features to maintain a competitive edge.


Presale Link: https://cmctoken.net/
CoinMarketCap Launches Exciting New Project
Published: 2024-06-19 15:15:33

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

**New Project by CoinMarketCap Launching Today**

Be part of the exciting new launch by CoinMarketCap. Invest early, secure your tokens, and maximize your potential returns in the rapidly evolving crypto market.

Visit Presale: https://cmctoken.net/

Project Roadmap
2024
Conceptualization and Market Research



Conduct comprehensive market research to conceptualize the CoinMarketCap Token.
Develop a detailed whitepaper outlining the tokenomics and technical architecture.
Team and Partnerships

Assemble a core team and advisory board.
Establish partnerships with exchanges and wallet providers.
Development and Community Building

Develop the smart contract on a scalable blockchain.
Initiate community building through social media and forums.
Funding and Security

Conduct private and pre-sale funding rounds.
Perform security audits and launch a beta test of the token.
2025
Public Sale and Listings



Execute the public sale of the CoinMarketCap Token.
List the token on major cryptocurrency exchanges.
Ecosystem and Growth

Launch the CoinMarketCap ecosystem platform, featuring staking and rewards.
Expand the team to support growth.
Form strategic partnerships to enhance the ecosystem.
Governance and Accessibility

Implement token governance features.
Release a mobile app for platform access.
Scalability and Marketing

Scale infrastructure to accommodate higher transaction volumes and users.
Initiate a global marketing campaign.
Innovation and Competitiveness

Incorporate new blockchain features to maintain a competitive edge.


Presale Link: https://cmctoken.net/
Quantum Computing: Simply Explained
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-19 15:14:57

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

---

## Explainer

Imagine a magic coin that can be heads, tails, or both at once. Quantum computers use these magic coins to solve super hard puzzles really fast. They help create better medicines, fun games, and find new stars, much quicker than regular computers.

<!-- Explain a computer science concept in 256 characters or less. -->

---

## Additional Context

* This explainer uses a simple, concise analogy to make the complex concept of quantum computing accessible to all.
* The cover image also takes a fun approach to explain quantum computing.
* The "magic coin" represents a quantum bit (qubit) that can exist in multiple states simultaneously, unlike regular bits which are either 0 or 1.
* This unique property allows quantum computers to solve extremely difficult problems much faster than traditional computers.
* By highlighting real-world applications like creating better medicines, designing fun games, and exploring new stars, the explainer connects advanced technology to exciting and relatable outcomes for the mass audience.
* The creative comparison to magic coins made the concept engaging and easier to understand.
* It took exactly 247 characters to explain the topic.  



<!-- Please share any additional context you think the judges should take into consideration as it relates to your One Byte Explainer. -->

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image to your post (if you want). -->
<!-- Thanks for participating! -->
Mastering Multi-Stage Builds in Docker 🚀
Tags: docker, kubernetes, containers, cka
Published: 2024-06-19 15:13:07

### Recap of Previous Days

- **Day 1**: We explored Docker fundamentals, the issues before containers, how Docker solves these problems, the differences between Docker and virtual machines, and an overview of Docker's workflow and architecture.
- **Day 2**: We dockerized a sample application, installed Docker Desktop, cloned an application, wrote a Dockerfile, and explored Docker commands like build, tag, push, pull, and run.

## Today's Focus: Docker Multi-Stage Builds
Previously, we faced challenges with our Dockerfile, which resulted in an image size of over 200 MB, even with a lightweight Alpine image. Today, we'll use Docker multi-stage builds to significantly reduce that image size.


![Docker animated image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w586gjk44jj6yx6cftv0.jpeg)

#### Step-by-Step Guide to Multi-Stage Builds

1. Clone the Application:

```
git clone https://github.com/docker/getting-started-app.git
cd getting-started-app
```
2. Create a Dockerfile:

```
touch Dockerfile
vi Dockerfile
```
3. Write the Dockerfile:
```
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM nginx:latest AS deployer
COPY --from=builder /app/build /usr/share/nginx/html
```
4. Build the Docker Image:

```
docker build -t multi-stage .
```

5. Run the Docker Container:

```
docker run -p 3000:80 multi-stage
```

## Key Benefits of Multi-Stage Builds

- **Reduced Image Size**: By only copying necessary files from the builder stage to the final image.
- **Improved Performance**: Smaller images mean faster deployment times and reduced resource consumption.
- **Enhanced Security**: Only the essential files are included in the final image, reducing the attack surface.

## Conclusion
Multi-stage builds are a best practice for creating efficient, secure, and high-performance Docker images. They help in isolating different build stages and only including the necessary artefacts in the final image. This approach not only reduces the image size but also enhances the overall performance and security of the Docker containers.

Thank you for reading, and stay tuned for the next entry in our CKA series. Happy learning!
Open-Source, Let's Talk About it
Tags: discuss, opensource, beginners, devops
Published: 2024-06-19 15:05:04

### Would you open your code?

Open-source software has become a crucial part of the technology ecosystem. Sharing your code with the world can bring numerous benefits, but it also comes with certain risks.

We opened our project, it's called [Litlyx](https://github.com/Litlyx/litlyx) (please leave a star on github if you like it! It means a lot for us!) and is a **One-Line Code Analytics Solution** for traking more than 10 KPIs for your website & web apps. It comes with a dashboard, an AI data analyst integrated to help you navigate your data collected with **Lit**.

I want to leave some question to you and i would love to engage in the comments below!

#### Questions to consider:
- Would you open your code?
- What are the risks involved, in your opinion?

Let's discuss! Comment down below.
FastAPI Beyond CRUD Part 11 - JWT Authentication (Renew User Access Using Refresh Token Token)
Tags: fastapi, python, apid, programming
Published: 2024-06-19 14:48:30

In this video, we enhance our authentication system to enable users to renew their access using refresh tokens. Additionally, we refactor our code to implement checks for access and refresh tokens on their respective endpoints.

{%youtube JitVZm8rfks%}
Callback function
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-19 14:47:40

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

<!-- Explain a computer science concept in 256 characters or less. -->

Imagine you hire a helper (callback function) to do a task (your code). You tell them (call them) when you're done with your part (argument). They do their thing (execute), then let you know (return value) when they are finished.  

## Additional Context

<!-- Please share any additional context you think the judges should take into consideration as it relates to your One Byte Explainer. -->
The callback function helps to make code more concise and easier to understand by breaking complex tasks into simpler functions. When you call a function with a callback argument, you tell the main program to execute the callback function after it finishes its task. This way, your code becomes more organized and easier to follow.

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image to your post (if you want). -->

<!-- Thanks for participating! -->
To Add a new header in second line of the existing file and 3 rd. column should be sum of the records
Tags: help
Published: 2024-06-19 14:37:40



In source i am getting below data in csv format 
Comp 	CAD	Amount
2135	CAD	 156.56 
2135	CAD	 171.33 
2135	CAD	 156.56 
2135	CAD	 156.56 
2135	CAD	 137.15 

I need to add need header in Bottum of the old header  
example 
orignal header--->Comp 	    CAD	                      Amount
added_new header->Customer  second_hader(with empty) sum(Amount)

Sum(amount) data will show like this

Comp code	 CAD	Amount
Customer Invoice         778.16 
2135	         CAD	 156.56 
2135	         CAD	 171.33 
2135	         CAD	 156.56 
2135	         CAD	 156.56 
2135	         CAD	 137.15 

How I write the code in shell script and save the data in existing file
سایت معرفی دنس بت
Published: 2024-06-19 14:36:50

سایت شرط بندی [دنس بت](dancebet.pro) یکی از قدیمیترین سایت های شرط بندی در ایران می باشد دقت داشته باشید که سایت شرط بندی دنس بت انواع بازی ها را در زمینه های مختلف به کاربران خود ارائه میکند لازم به ذکر است که این سایت توسط نازنین همدانی مدیریت میشود و از این جهت میتوانید به این سایت برای واریزی ها و برداشت های خود به صورت کامل اطمینان کنید در واقع سایت شرط بندی دنس بت را میتوانید یکی از گزینه های اصلی و معتبر بدانید و بهترین و چشم نوازترین قسمت این سایت پشتیبانی همیشه آنلاین آن است که کمتر از چند دقیقه میتوانید جواب سوالات خود را دریافت کنید و تجربه ای جذاب از یک سایت شرط بندی ایرانی داشته باشید.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jlh6qu6wiuyqoj51uue.jpg)
Best software training institute in Indore For IT Training
Tags: it, training, ittrainingindore, javascript
Published: 2024-06-19 14:22:46

If you want to learn more about our courses and batch details, checkout It Training Indore and learn the best [software training institute in indore](https://www.ittrainingindore.in/).

Enroll Today 

Take the first step towards a successful career in software development with IT Training Indore. Visit our [web development coures](https://www.ittrainingindore.in/course-category/web-development-course-details/) to learn more about our courses and enroll today. With our expert training and support, you can achieve your career goals and excel in the dynamic field of software development. Your future starts here!
Create a Circular progress bar using HTML, CSS and JS.
Tags: javascript, html, css, animation
Published: 2024-06-19 14:09:38

I am going to give you a easy way to create a circular progress bar using html, css and javascript.

![Final Result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhv2qwj4abx7lheg9ll4.gif)

**HTML:**
Create two div, with .outer and .inner class name.

```html
<div class="outer">
    <div class="inner">0%</div>
</div>
```
**CSS:**
I am using flex box to center the inner div and content of div.
1- for .outer div

```css
.outer{
    width: 100px;
    height: 100px;
    margin: 10px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(red 180deg, rgb(255, 255, 255) 0deg);
    box-shadow: -5px -3px 14px 1px #000000, 0px 1px 14px 0px #ffffff;
}

```

2- For .inner div

```css
.inner{
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0px 0px 4px 0px black;
    font-weight: bolder;
    font-size: 1rem;
    
}
```
**Note:**
_I am using background as conic-gradient for OUTER div to make progress bar and INNER div will have same background as root background to blend in._
`background: conic-gradient(red 180deg, rgb(255, 255, 255) 0deg);`

Once done you will get this result as we have given 180deg.

![Without js result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0witzq8qwc2g0jhrh0t.png)

**Now we want to make it dynamic.**
So to make it dynamic or to add animation feel we will use below javascript code.

I have added comments to know the definition of each line.

```js
//get the refrence of div in js using query selector for both inner and outer div
const progressbar= document.querySelector(".outer");
const innerbar= document.querySelector(".inner");

//make initial value as 0
var currentdeg=0;

//define a interval which will run with the interval of 15 milisecond [increase or decrease the value of
//timer as slow or fast you what your progress bar to be]
const myInterval= setInterval(()=>{
    //increment degree with the value of 1 each time function is called
    currentdeg=currentdeg+1;

    //convert the degree to the percentage so that you can update value in html
    var deg= (currentdeg/360)*100;

    //increment the degree value
    progressbar.style=`background:conic-gradient(red ${currentdeg}deg, rgb(255, 255, 255) 0deg);`;

    //update the inner div value as percentage
    innerbar.innerHTML=`${Math.floor(deg)}%`;

    //stop or clear interval at particular value here i am using 60 % as max value
    //after which our interval will stop
    if(deg>60)
    {
        clearInterval(myInterval);
    }
    },
15);
```

Thank you.
Please feel free if you have any queries.
Learn CSS with these Games
Tags: webdev, css, beginners, learning
Published: 2024-06-19 14:16:33

CSS can be frustrating to learn, but what is better than learning by playing fun and enjoyable games? That's why I want to share games that helped me in my CSS journey and others that you might find useful.

## [CSS Diner](https://flukeout.github.io/)
CSS Diner will help you master every CSS selector by selecting various items on the table. The game provides multiple use cases for each selector, allowing you to experiment and understand where to apply them. Additionally, it includes helpful hints if you get stuck.

## [Flexbox Zombies](https://mastery.games/flexboxzombies/)
In Flexbox Zombies, you activate your crossbow using the power of Flexbox to kill zombies. Following the instructions of your teacher, you'll learn Flexbox properties and techniques. This game combines engaging storytelling with practical Flexbox exercises to enhance your learning experience.

## [Flexbox Froggy](https://flexboxfroggy.com/)
Flexbox Froggy teaches Flexbox by having you help Froggy and his friends reach the lilypad using only flex properties. Each level presents a new challenge, requiring you to apply different Flexbox concepts. The game's progressive difficulty ensures that you build a solid understanding of Flexbox as you advance.

## [Knights of the Flexbox Table](https://knightsoftheflexboxtable.com/)
Knights of the Flexbox Table helps you learn Flexbox layout and Tailwind CSS by writing Tailwind classes to move knights to their proper chests from the dungeon. The game presents a medieval fantasy theme, making learning both Flexbox and Tailwind CSS enjoyable and immersive.

## [CSS Grid Garden](https://cssgridgarden.com/)
CSS Grid Garden is similar to Flexbox Froggy but focuses on CSS Grid. In this game, you help water the garden by using CSS Grid properties. Each level introduces new grid concepts, gradually increasing in complexity, ensuring that you gain a comprehensive understanding of CSS Grid layout.


---
Don't forget to share with us the games you know in the comment section 🙂
Angular Material Tabs with components inside the tabs
Published: 2024-06-19 14:01:07

My use case was to render components inside the Angular Material Tabs component. Despite searching online, I couldn't find any relevant resources, so I had to figure it out myself.

Below is the structure we want to use to define the components that should be displayed inside the tabs:

```
 tabs = <Tab[]>[
    {
      label: 'Tab Component',
      component: TabComponent,
      data: {
        title: 'Tab 1 Import information',
        content: `Donec lacinia condimentum efficitur. Phasellus tempor est in luctus
        facilisis.`,
      },
    },
    {
      label: 'Random component',
      component: RandomComponent,
      data: {
        text: 'Text passed on from the random component',
      },
    },
  ];
```
## Component

Here's the complete code snippet for the component that renders the components inside the tab container.

```
type Tab = {
  label: string;
  component: Type<any>;
  data: Record<string, any>;
};

@Component({
  selector: 'app-tabcontainer',
  standalone: true,
  imports: [MatTabsModule],
  templateUrl: './tabcontainer.component.html',
  styleUrl: './tabcontainer.component.css',
})
export class TabcontainerComponent {
  viewContainerRef = inject(ViewContainerRef);
  tabs = <Tab[]>[
    {
      label: 'Tab Component',
      component: TabComponent,
      data: {
        title: 'Tab 1 Import information',
        content: `Donec lacinia condimentum efficitur. Phasellus tempor est in luctus
        facilisis.`,
      },
    },
    {
      label: 'Random component',
      component: RandomComponent,
      data: {
        text: 'Text passed on from the random component',
      },
    },
  ];

  ngOnInit() {
    this.loadComponent(this.tabs[0]);
  }

  loadComponent(tab: Tab) {
    this.viewContainerRef.clear();
    const ref = this.viewContainerRef.createComponent<any>(tab.component);

    // Pass on the props
    for (const prop in tab.data) {
      if (Object.prototype.hasOwnProperty.call(ref.instance, prop)) {
        ref.instance[prop] = tab.data[prop];
      }
    }
  }

  onTabSelected(index: number) {
    this.loadComponent(this.tabs[index]);
  }
}
```

## Caching the tabs

I conducted performance testing to see if caching the component references and loading them from the cache upon request would improve render time. However, there was no improvement in render time.

## Angular signals

The code doesn't work with `input()` signals yet.

## Demo

[Try the stackblitz](https://stackblitz.com/edit/stackblitz-starters-wpgfma?file=src%2Fapp%2Ftabcontainer%2Ftabcontainer.component.ts)
Are we really using Google because it is better?
Published: 2024-06-19 13:56:24

Hey guys.

I started to find Google searches a bit biased, not finding old news that I know I've already seen. Sometimes news that is trending in some countries related to my country does not appear, but when I go through other search engines it appears.

I think Google has an incredible ecosystem that integrates between Email (Gmail), Video (Youtube), Search Engine (Google), Office (Docs), Browser (Chrome), Adsense (Adds), Blogs (blogger)

But recently I started to value my privacy more and started discovering other very good services! Like Proton mail, DuckduckGo, OnlyOffice...

Are we really using Google because it is better?