teleren/devto huggingface dataset:
Version 2.0 of my Android app is Live!!
Tags: android, mobile, kotlin, tristan
Published: 2023-10-24 17:51:38

### Table of contents
1. [What does the app do](#what)
2. [Current features](#current)
3. [Upcoming features](#up)
4. [Part I am currently working on](#part)
5. [When is the next release?](#next)
6. [Join the Reddit page](#reddit)


### The code
- [GitHub](https://github.com/thePlebDev/Clicker)

### My app on the Google play store
- [The app](https://play.google.com/store/apps/details?id=elliott.software.clicker)


### What does the app do?  <a name="what"></a>
- Its a mobile companion app for [Twitch.tv](https://www.twitch.tv/) built to help moderators on Android have a easier time moderating Twitch chat rooms

### Current features <a name="current"></a>
- Swipe to delete chat message
- Undo bans with one button click
- Ban/timeout/reply
- Normal chat

### Upcoming features <a name="up"></a>
- Bug fixes (lots of these)
- Full Twitch emote integrations and third-party emotes (7TV, BetterTTV (BTTV), and FrankerFaceZ (FFZ) )
- Monitor suspicious users
- Full screen chat mode

### What part am I working on now? <a name="part"></a>
- Currently I am working on testing. I am refactoring a lot of the main code base to make testing easier. This entire week will be dedicated to testing and implementing code refactors.

### When is the next release? <a name="next"></a>
- The next release is scheduled for 2023-10-30. I will be implementing tests and aiming for a test coverage above 70%, improving developer life with code refactors and I will also be releasing the full screen chat feature

### Join the Reddit <a name="reddit"></a>
- If you want to stay up to date with the development, make sure to join the Reddit, [r/modderzz](https://www.reddit.com/r/modderzz/)


### Conclusion
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on [Twitter](https://twitter.com/AndroidTristan)
100 Days To Offload
Tags: 100daystooffload, blog, writing, challenge
Published: 2023-10-24 17:46:09

Now I'm halfway through the challenge, [100 Days To Offload](https://100daystooffload.com/)!

> The whole point of #100DaysToOffload is to challenge you to publish 100 posts on your personal blog in a year.

I have exceeded my expectations in managing the challenge, and it is helpful to revisit this relevant section of their website. 

> Posts don’t need to be long-form, deep, meaningful, or even that well written. If there are spelling and grammar mistakes, or even if there’s no real point to the post, so what? What’s important is that you’re writing about the things you want to write about.

My stats so far on this challenge is summarized below.

* First post **Jun 10 2023**
* It took me almost **140** days to publish 50 posts
* My **most viewed** post so far has been, [ChatGPT Prompt Engineering for Developers](https://dev.to/stefanalfbo/chatgpt-prompt-engineering-for-developers-169i)
* My **least viewed** post so far has been, [Hello spiderfoot](https://dev.to/stefanalfbo/hello-spiderfoot-50be)
* **Longest** blog post, [Bastion host in AWS](https://dev.to/stefanalfbo/bastion-host-in-aws-408k)

Now it's time for the 50 next blog posts!
Building a Retrieval-Augmented Generation (RAG) Chatbot with LangChain, Hugging Face, and AWS
Tags: langchain, huggingface, ai, chatbots
Published: 2023-10-25 06:19:31

---
title: Building a Retrieval-Augmented Generation (RAG) Chatbot with LangChain, Hugging Face, and AWS
published: true
date: 2023-10-24 17:40:34 UTC
tags: langchain,huggingface,ai,chatbots
canonical_url: https://julsimon.medium.com/building-a-retrieval-augmented-generation-rag-chatbot-with-langchain-hugging-face-and-aw-940a06853ac2
---

### Building a Retrieval-Augmented Generation (RAG) Chatbot with LangChain, Hugging Face, and AWS

SIn this video, I’ll guide you through the process of creating a Retrieval-Augmented Generation (RAG) chatbot using open-source tools and AWS services, such as LangChain, Hugging Face, FAISS, Amazon SageMaker, and Amazon TextTract.

{% youtube 7kDaMz3Xnkw %}

We begin by working with PDF files in the Energy domain. Our first step involves leveraging Amazon TextTract to extract valuable information from these PDFs. Following the extraction, we break down the text into smaller, more manageable chunks. These chunks are then enriched using a Hugging Face feature extraction model before being organized and stored within a FAISS index for efficient retrieval.

To ensure a seamless workflow, we employ LangChain to orchestrate the entire process. With LangChain as our backbone, we query a Mistral Large Language Model (LLM) deployed on Amazon SageMaker. These queries include semantically relevant context retrieved from our FAISS index, enabling our chatbot to provide accurate and context-aware responses.
Generate Pre-Signed URL for S3 with AWS Lambda
Tags: aws, s3, lambda, node
Published: 2023-10-24 17:33:39

## Step 1: Create an AWS Lambda function

1. Go to the [AWS Lambda console](https://console.aws.amazon.com/lambda/).
2. Click **Create function**.
3. Choose **Author from scratch**.
4. Configure your function:
* **Function Name:** Choose a name for your Lambda function.
* **Runtime:** Select a runtime,We will use Node in this tutorial. (Node latest version).
* **Execution Role:** Create a new role for Lambda service with permissions to access S3. This role should have an IAM policy allowing PutObject and ReadObject access to the S3 bucket. For simplicity we will choose AmazonS3FullAccess. Do not use this in production environment.
5. Under **Advanced settings**, select **Enable function URL** and **Auth type** as **NONE**. Leave the rest as default.
6. Click **Create function**.

## Step 2: Write the Lambda function code

```javascript
/* We will pass the file name in the request to the lambda 
 * function and that will be used to create the object key. If no 
 * file name is provided we will fallback to a hardcoded filename
 * for simplicity. You can throw a validation error if no filename 
 *is passed in request as query param
*/
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
import {getSignedUrl} from "@aws-sdk/s3-request-presigner";

export const handler = async (event) => {
const region = 'your-region';
const bucket = 'your-bucket';
const queryStringParameters = event.queryStringParameters;
var key = "test";
if (queryStringParameters) {
key = queryStringParameters.filename;
}
return createPresignedUrlWithClient({region,bucket,key});
};

const createPresignedUrlWithClient = ({ region, bucket, key }) => {
const client = new S3Client({ region });
const command = new PutObjectCommand({ Bucket: bucket, Key: key });
return getSignedUrl(client, command, { expiresIn: 3600 });
};
```

## Step 3: Create an S3 bucket

1. Go to the [AWS S3 console](https://console.aws.amazon.com/s3/).
2. Click **Create bucket**.
3. Enter a name for your bucket.
4. Select a region for your bucket.
5. Click **Create**.

## Step 4: Update the CORS policy for the S3 bucket

1. Go to the **Properties** tab for your S3 bucket.
2. Click **Edit CORS configuration**.
3. Add the following CORS policy and Click **Save**.
Again for simplicity we will allow all origins. But in production this has to be revisited to allow only the required origin.
```json
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
```


## Step 5: Test the Lambda function

1. Enter the Function URL in a postman/Curl GET request with filename as query parameter.
2. The response will be a presigned URL that you can use to upload a file to the S3 bucket.
3. Upload a file using the URL in postman/Curl by choosing PUT request type.

## Conclusion

In this blog post, we showed you how to create a Lambda function that generates a presigned URL for S3 upload. We also showed you how to create an S3 bucket and update the CORS policy for the bucket.
How I use Choosy + Shareful to copy clicked (external) URL to my clipboard instead of opening in a browser on MacOS
Tags: browser, choosy, tutorial, macos
Published: 2023-10-24 17:32:09

So what I want is for external links to just go to my clipboard! Then I can decide what to do with the URL. But, with [Choosy](https://choosy.app) and [Shareful](https://apps.apple.com/us/app/shareful/id1522267256?mt=12) I can do so much more. I can copy the URL to my clipboard (just like I wanted) and I can also send that URL to other apps like Messages, Mail, Notes, and more!

Checkout the video on this post on how I did it. You will need to install [Choosy](https://choosy.app) and [Shareful](https://apps.apple.com/us/app/shareful/id1522267256?mt=12) to accomplish it.

![Screenshot of the Share Menu showing up when I click on a URL](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7rj316qcwlnt5hql50u.png)

Note, I updated my Rule in Choosy to this (which is a bit different than the video):

![Screenshot of updated rule](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3410fney1zc6c2roass.png)
LibreCode marca presença no 20º congresso latino-americano de Software Livre e Tecnologias Abertas
Tags: opensource
Published: 2023-10-24 17:26:44


A LibreCode teve uma participação especial na Latinoware, a maior conferência de tecnologias livres da América Latina, realizada de 18 a 20 de outubro em Foz do Iguaçu, com a presença de cerca de quatro mil participantes de vários países.

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

Durante o evento, a LibreCode apresentou o LibreSign, seu mais recente produto, que chamou a atenção da comunidade de software livre. No estande dedicado ao LibreSign, os membros da cooperativa demonstraram a inovação dessa solução de código aberto para diversas pessoas, incluindo o diretor de Projetos e Sistemas da Canoastec, Rogério Alves e também para o coordenador de Projetos e Inovação da Secretaria de Atenção Primária do Ministério da Saúde, Rodrigo Gaete. O LibreSign é o primeiro assinador de documentos eletrônicos web e que reflete o compromisso da LibreCode em desenvolver ferramentas que promovam a liberdade e acessibilidade na tecnologia.


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

Além da exposição do LibreSign, a LibreCode ofereceu uma série de palestras ministradas por seus cooperados, cobrindo diversos tópicos no universo do software livre e enriquecendo o conhecimento do público. Essas apresentações destacaram o papel ativo da cooperativa na disseminação de ideias e práticas sustentáveis.

A LibreCode também fortaleceu sua parceria com a comunidade e-Cidade durante a Latinoware, reafirmando o compromisso conjunto de desenvolver soluções de software livre e tecnologias abertas para o setor público. Essa colaboração destaca a importância da comunidade na evolução e sucesso das iniciativas de código aberto.


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

A participação da LibreCode na Latinoware reforçou seu compromisso em promover um futuro mais livre e acessível na área da tecnologia e enfatizou a importância de preservar a soberania digital para todas as pessoas.
How I started to Learn Python without paying a single dime
Published: 2023-10-24 17:08:21

Today I got deferred from cohort 18 ALX cohort because my monthly score was around 34% and I could not meet the monthly requirement of the program which was 80%. Previously we have been learning C and due to my full-time job as a Maths teacher, I could not really cope well. It was a hard time so I fell sick undeniably. The sickness worsened when one of the hardest projects in ALX was released. The Almighty "SIMPLE SHELL PROJECT" was a project that was used to mark the end of the first trimester before progressing to the next where PYTHON was taught. While I made the deferment today 23rd October 2023, I started learning Python which got my interest due to a chat with my crush😜. She also did well to send me books and recommended a paid Course.

The recommended paid course was what I found to be one of the best courses Online. The ANGELA YU course on Udemy has 101 sections with 635 lectures and 57h 56m total length of videos. The official name of the course is "100 Days of Code: The Complete Python Pro Bootcamp for 2023" and it is a very popular course. The only problem I had with it was the fact that it was paid and I had no money at the time. So bad😭😥. I decided I had to get the course online for free so I searched Google and typed "get 100 days of Python Angela YU free" I saw the class central website but saw that only a small fragment of the course was present there. I mean like day 1 and day 2 only. I felt really mad. I scrolled below and found a Telegram group "Zero to mastery" which fortunately had the course. Smart guy😎🤣 I downloaded the course immediately as an Idan that I was😜🤣😱 and that was literally how I started learning PYTHON.

Some key benefits of her course include the fact that you will know all the:

You will master the Python programming Language by building 100 unique projects over 100 days.

You will learn automation, game, app and web development, data science, and machine learning all using Python.

You will be able to program in Python professionally

You will learn Selenium, Beautiful Soup, Request, Flask, Pandas, NumPy, Scikit Learn, Plotly, and Matplotlib. Create a portfolio of 100 Python projects to apply for developer jobs

Be able to build fully-fledged websites and web apps with Python

Be able to use Python for data science and machine learning

Build games like Blackjack, Pong, and Snake using Python

Build GUIs and Desktop applications with Python

Important links are below:

https://www.udemy.com/course/100-days-of-code/ https://www.classcentral.com/classroom/youtube-100-days-of-code-learn-python-programming-45732/60c82ba5e4ccd https://t.me/+U2og8sy2lLCWHBCi (Link to the free course) https://t.me/zero_to_mastery (Link to the zero to mastery telegram channel)

Follow me for more tech-related content. I also remain @henqsoft on Twitter, Instagram, and Tiktok. Reach out to me I am Henry Fasakin on Facebook.
¿Qué algoritmo debo elegir?
Tags: machinelearning, spanish
Published: 2023-10-24 17:09:09

Esta es una imagen super útil para determinar de manera sencilla que posible camino deberías de tomar a la hora de elegir un algoritmo de aprendizaje computacional, de acuerdo a los datos con los que te estas enfrentando.


![scikit-learn map](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mjp815m9cphxc53qi1h.png)
How I started to Learn Python without paying a single dime
Published: 2023-10-24 17:08:25

Today I got deferred from cohort 18 ALX cohort because my monthly score was around 34% and I could not meet the monthly requirement of the program which was 80%. Previously we have been learning C and due to my full-time job as a Maths teacher, I could not really cope well. It was a hard time so I fell sick undeniably. The sickness worsened when one of the hardest projects in ALX was released. The Almighty "SIMPLE SHELL PROJECT" was a project that was used to mark the end of the first trimester before progressing to the next where PYTHON was taught. While I made the deferment today 23rd October 2023, I started learning Python which got my interest due to a chat with my crush😜. She also did well to send me books and recommended a paid Course.

The recommended paid course was what I found to be one of the best courses Online. The ANGELA YU course on Udemy has 101 sections with 635 lectures and 57h 56m total length of videos. The official name of the course is "100 Days of Code: The Complete Python Pro Bootcamp for 2023" and it is a very popular course. The only problem I had with it was the fact that it was paid and I had no money at the time. So bad😭😥. I decided I had to get the course online for free so I searched Google and typed "get 100 days of Python Angela YU free" I saw the class central website but saw that only a small fragment of the course was present there. I mean like day 1 and day 2 only. I felt really mad. I scrolled below and found a Telegram group "Zero to mastery" which fortunately had the course. Smart guy😎🤣 I downloaded the course immediately as an Idan that I was😜🤣😱 and that was literally how I started learning PYTHON.

Some key benefits of her course include the fact that you will know all the:

You will master the Python programming Language by building 100 unique projects over 100 days.

You will learn automation, game, app and web development, data science, and machine learning all using Python.

You will be able to program in Python professionally

You will learn Selenium, Beautiful Soup, Request, Flask, Pandas, NumPy, Scikit Learn, Plotly, and Matplotlib. Create a portfolio of 100 Python projects to apply for developer jobs

Be able to build fully-fledged websites and web apps with Python

Be able to use Python for data science and machine learning

Build games like Blackjack, Pong, and Snake using Python

Build GUIs and Desktop applications with Python

Important links are below:

https://www.udemy.com/course/100-days-of-code/ https://www.classcentral.com/classroom/youtube-100-days-of-code-learn-python-programming-45732/60c82ba5e4ccd https://t.me/+U2og8sy2lLCWHBCi (Link to the free course) https://t.me/zero_to_mastery (Link to the zero to mastery telegram channel)

Follow me for more tech-related content. I also remain @henqsoft on Twitter, Instagram, and Tiktok. Reach out to me I am Henry Fasakin on Facebook.
108 berufliches Vorwärtskommen: Die Auszahlung.
Tags: deutsch, career, motivation, discuss
Published: 2023-10-24 17:00:00

Moin Moin,

hat man es nun geschafft – im Sinne von: Man ist eine IT–Fachkraft, die nun operativ arbeiten kann und man hat ein persönliches Ziel erreicht. In dem Augenblick in dem man dies erreicht hat man wohl ein unbeschreibliches Gefühl. Ein derartiges Gefühl ist Teil der Auszahlung. Das Erreichen der Ziele selbst und dessen was sich von da an ergibt ist ebenfalls ein Teil der Auszahlung. 
Ohne [Geduld→](https://dev.to/amustafa16421/106-berufliches-vorwartskommen-geduld-zahlt-sich-aus-799) wäre dies wohl nicht möglich gewesen.

Wie geht es nun weiter von hier aus?
Neue Zwischenziele setzen.

Die IT ändert sich ständig, daher gibt es immer wieder etwas neues zu lernen. Es gibt auch einiges was man [für den „Nachwuchs“ tun kann und einiges was man für freie und offene Software-Projekte tun kann→](https://dev.to/amustafa16421/96-berufliches-vorwartskommen-die-gewinnbringende-restzeit-1afp).

Wie geht es für euch weiter?
An was für Zwischenzielen arbeitet ihr gerade?

Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
Functional And Non Functional Software Testing
Published: 2023-10-24 16:50:07

**Difference between Functional testing and non functional testing**🤔

**Functional Testing**
Functional testing verifies the function and features of the software. The main goal is validate the software action and it's based on the customer requirements.

**Non Functional Testing**
Non functional testing verifies the software performance and reliability. The main goal is validate the software performance and it's based on the customers expectations.

**Functional Software Testing**
some Examples for functional testing

1.Unit Testing
2.Integration Testing
3.Interface Testing
4.Regression Testing
5.User Acceptance Testing

**1.Unit testing**
It is 1st level of testing in this process.it will test individual components or unit to ensure the unit work correctly and meet the design specifications.

**2.Integrartion Testing**
Integration testing ensure that interaction between different components or unit. The integrated components work together and allow the data flows smoothly.

**3.Interface Testing**
Interface testing will test the interfaces of components or systems.

**4.Regression Testing**
Regression testing used for retesting the software applications. It will use after code changes or error fixes. It will allow the software work even after modification.

**5.User Acceptance Testing**
User acceptance testing the final phase of testing before a software is deployed. It involve end user testing the application to ensure the it is ready for production. It will performed when at the test complete.

**Non Functional Software Testing**
Some examples for Non function testing

1. Document Testing
2. Installation Testing
3. Performance Testing
4. Reliability Testing
5. Security Testing

**1. Document Testing**
It involve in the software documentation such as requirement, design document, user manual.

**2.Installation testing**
Installation testing is a process of software application for installation, configuration, uninstallation. and ensure that the installation and uninstallation are error free. Installation testing performed before deployed the software to end users.

**3. Performance Testing**
Performance testing focus on the evaluating the speed, responsiveness, stability, scalability in different condition.
it will ensure that more people using the same page with same speed and get response smoothly.

**4. Reliability Testing**
Reliability testing access the software reliable, work consistently and accurate. it will ensure that the software remains stable and reliable in the long term use.

**5. Security Testing**
Security testing aim is that identify the vulnerability in the software. It will access the software to protect the data and protect it from hackers. security testing integrated before the software deployed.
Best way to create requirements.txt
Tags: python, pipreqs, piptools, requirements
Published: 2023-10-24 16:36:50

Hello Devs,

How are you doing with Python?

In my previous post, I emphasized not using `pip freeze` to create `requirements.txt` but instead recommended using `pip-tools`. Today, I want to discuss another better approach to creating `requirements.txt`.

You might recall my earlier suggestion to create `requirements.txt` when you start your project. However, what do you do if you've already completed your project without generating `requirements.txt`?

> `requirements.txt` is invaluable when you or someone else is trying to install all the project-related libraries and dependencies.

You can find my previous post [here](https://dev.to/sajidurshajib/do-not-use-pip-freeze-1ikc).


## Main topic starts from here. 

First, install `pipreqs` and `pip-tools`:

```
pip3 install pipreqs pip-tools
```

Now, create `requirements.in` using `pipreqs`. Next, generate `requirements.txt` using `pip-tools`. But why do we combine these tools?

`pipreqs` doesn't capture sub-packages, which `pip-tools` does. So, we use `pipreqs` to create a package list in `requirements.in`. Then, we generate `requirements.txt` using `pip-tools`, where you'll find a comprehensive package list, including sub-packages.

Here is our final command:

```
pipreqs --savepath=requirements.in --use-local && pip-compile
```

Both `--savepath` and `--use-local` are crucial parameters:

- `--savepath`: Defines the exact filename and path for the `requirements.in` file.
- `--use-local`: Retrieves the package list from your virtual environment.

So now you will find your desired requirements.txt

In this post, I haven't delved much into `pip-tools`. For a more detailed explanation, you can refer to my previous post about [pip-tools](https://dev.to/sajidurshajib/do-not-use-pip-freeze-1ikc).

## Conclusion

Creating a `requirements.txt` file might not seem like a big issue, but sometimes it can be. I hope this post helps you cope with this issue. Feel free to comment if you have any questions or concerns.