teleren/devto huggingface dataset:
Unlocking Success in Problem Solving: Start with the Problem Statement!
Tags: problemsolving, softwaredevelopment
Published: 2023-09-11 16:18:52

In the world of development, it's easy to dive headfirst into solving issues. However, before we solve any issue, we should identify the Problem statement clearly and accurately. This is often a step when overlooked or done poorly, leads to wasted time and resources.

![What's your problem meme image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vvqkiqsyj5r7re481j6e.jpeg)

## The problem statement

As a developer, I often see people misinterpret issues as problem statements. This can lead to solutions that are not effective or even counterproductive. We've all been there, facing an issue, and thinking that the problem statement is simply a feature not working correctly. But wait, there's more to it!
The feature not working correctly is not the actual problem statement; it's just the issue that needs fixing. We should collect some basic info like criticality and identify the problem statement to work upon, which can be like _we need to hotfix this issue_ or _we need to identify the root cause and fix the issue_. The approach to both the problem statements can be very different.

You can try answering these questions to phrase the core problem statement to work on:
- What is the issue?
- Who is affected by the issue?
- What is the importance?
- What are the consequences?
- What are the desired outcomes?

## Why is this important? 

The approach to problem-solving can vary dramatically based on the problem statement. Whether it's a POC, planning of architecture, or process design, understanding the problem statement is a game-changer. When you know the problem, you can start thinking about how to solve it. This can help you narrow down the options and choose the best solution for your needs.

It's important to remember that there is no one-size-fits-all solution to every problem. We have countless ways, tools, and frameworks at our disposal to solve problems. However, blindly following what others are doing isn't the best strategy. Instead, align the pros and cons of available options with your specific problem statement. Give weightage to the pointers that fit your problem. The best solution will vary depending on the specific problem statement.

Some additional thoughts on the importance of identifying the problem statement:
- It can help you avoid wasting time and resources on solutions not addressing the core problem.
- It can help you get buy-in from stakeholders, as they will be more likely to support a solution that they understand and believe is necessary.
- It can help you identify the right people to be involved in problem-solving.
- It can help you track your progress and measure the success metrics of your solution.

If you're facing a problem, I encourage you to take the time to identify the problem statement first. By taking the time to identify the problem statement, you can increase your chances of solving the problem.
Write a Playwright test using AWS Lambda
Tags: playwright, aws, lamda, testing
Published: 2023-09-11 16:08:26

1. **Create a Playwright Test Script:**

Write your Playwright test script in a Node.js environment. Here's a simple example using Playwright to open a webpage and take a screenshot:
`const { chromium } = require('playwright');

exports.handler = async (event) => {
  let browser;
  try {
    browser = await chromium.launch();
    const context = await browser.newContext();
    const page = await context.newPage();

    await page.goto('https://example.com');
    await page.screenshot({ path: '/tmp/example.png' });

    await browser.close();

    return {
      statusCode: 200,
      body: JSON.stringify({ message: 'Screenshot taken!' }),
    };
  } catch (error) {
    console.error('Error:', error);

    return {
      statusCode: 500,
      body: JSON.stringify({ error: 'Internal Server Error' }),
    };
  } finally {
    if (browser) await browser.close();
  }
};`

2. **Package Dependencies:**

Since AWS Lambda has limited space for dependencies, you should use a tool like serverless or AWS SAM to package your Lambda function along with its dependencies. Ensure that you package Playwright and any other required Node.js modules.

3.**Deploy to AWS Lambda:**

Use AWS CLI or a deployment tool like serverless or AWS SAM to deploy your Lambda function to AWS.

4.**Configure Lambda Function:**

In the AWS Lambda console, set up your function. You'll need to configure the following:

   ** Runtime:** Node.js (Choose the version according to your script's requirements).
   ** Handler:** The name of your Lambda function and the exported function (e.g., filename.handler).
    **Memory:** Set memory as per your requirements.
   ** Timeout:** Set the timeout duration for your function. Ensure it's long enough to complete your Playwright test.
   ** Execution Role:** Create an IAM role that allows the Lambda function to execute other AWS services and resources as needed.

5.**Create an API Gateway (Optional):**

If you want to trigger your Lambda function via an HTTP request, you can create an API Gateway and configure it to invoke your Lambda function.

6.**Testing the Lambda Function:**

You can now test your Lambda function by invoking it either through the AWS Lambda console or by making an HTTP request if you set up API Gateway.
ChatGPT-ChromaDB for BG3: A Generative AI Learning Adventure!
Tags: discuss, genai, chatgpt, vectordb
Published: 2023-09-11 15:58:13

---
title: ChatGPT-ChromaDB for BG3: A Generative AI Learning Adventure!
published: true
description: 
tags: discuss, genai, chatgpt, vectordb
# cover_image:
# Use a ratio of 100:42 for best results.
# published_at: 2023-09-11 15:50 +0000
---

In recent weeks, I've been delving into GenAI while also enjoying the fantastic game Baldur's Gate 3 (BG3). For a bit of fun and learning, I thought: why not combine the two? The result? A ChatGPT game assistant for BG3 🎮✨ using OpenAI + VectorDB. Learning and gaming—sometimes they just go hand in hand! 

I'm using ChatGPT as the LLM and BAAI/bge-base-en as the embedding model. I'm currently experimenting with prompts to achieve better results!

![Simple demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hof6xfbmh9jym776f0w9.png)

As I mentioned, this is just a fun side project very generic and simple but using BG3 data for entertainment while I am learning about Gen-AI.

If you have any cool tips, improvements, or suggestions for better prompts, I'm all ears! 😄

https://github.com/douglasmakey/chatting-with-docs
Choangvip - Cái Tên Đang Làm Mưa Làm Gió Trên Thị Trường Cá Cược Hiện Nay
Published: 2023-09-11 15:39:16

**[choangviptop](https://choangvip.top/)** đang nổi lên như một hiện tượng trong làng cá cược hiện nay, và không khó hiểu khi người chơi đổ xô đến đây để trải nghiệm những trò chơi đa dạng và những lợi ích tuyệt vời. Dưới đây là những điểm nổi bật giúp Choangvip trở thành cái tên hot nhất trên thị trường cá cược:

1. Uy Tín và An Toàn:

Choangvip luôn đặt uy tín và sự an toàn của người chơi lên hàng đầu. Hệ thống bảo mật tuyệt đối giúp bảo vệ thông tin cá nhân và tài khoản của bạn.
2. Sự Đa Dạng Trong Trò Chơi:

>>> Xem thêm : [https://www.metooo.io/u/choangviptop](https://www.metooo.io/u/choangviptop)

Tại Choangvip, bạn có thể tìm thấy đa dạng các trò chơi, từ game bài đổi thưởng, đánh bài, đến các trò slots đầy thách thức và hấp dẫn. Sự lựa chọn phong phú này đảm bảo rằng mọi người đều có thứ gì đó phù hợp với sở thích của họ.
3. Cơ Hội Trúng Lớn:

Choangvip thường xuyên tổ chức các chương trình khuyến mãi với cơ hội trúng lớn. Điều này làm tăng phần thú vị và hứng thú trong việc tham gia.
4. Hỗ Trợ Khách Hàng Tận Tình:

Đội ngũ hỗ trợ khách hàng của Choangvip luôn sẵn sàng hỗ trợ bạn trong mọi vấn đề liên quan đến trò chơi, giao dịch, hoặc tài khoản cá nhân.
5. Tiện Lợi Trên Di Động:

Ứng dụng di động của Choangvip cho phép bạn chơi mọi lúc, mọi nơi, mang lại sự tiện lợi không giới hạn.

>>> Tham khảo: [https://www.hackathon.io/users/426700](https://www.hackathon.io/users/426700)

6. Khuyến Mãi và Quà Tặng:

Choangvip luôn cung cấp các chương trình khuyến mãi hấp dẫn và thường xuyên tặng quà cho các thành viên thân thiết.
7. Trải Nghiệm Chuyên Nghiệp:

Sự chuyên nghiệp trong cách hoạt động và phục vụ của Choangvip đã thu hút một lượng lớn người chơi.
Như vậy, Choangvip không chỉ là một nơi giải trí tốt, mà còn là một sân chơi thú vị và hấp dẫn đối với những người yêu thích cá cược. Hãy tham gia ngay để trải nghiệm sự khác biệt và sự đỉnh cao của giới cá cược.

"
Địa chỉ: 38 Đường số 2C, An Lạc, Bình Tân, Thành phố Hồ Chí Minh, Việt Nam
Mail: tv645435@gmail.com"
Accept iDEAL through Stripe, a common payment method in the Netherlands
Tags: stripe, ideal, payment, ecommerce
Published: 2023-09-11 15:27:28

iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%.

iDEAL redirects customers to their online banking environment to authenticate a payment using a second factor of authentication and there is immediate notification about the success or failure of a payment. The exact customer experience depends on their bank.

You don’t actually have to integrate iDEAL and other payment methods individually. If you use [EasyPie](https://easypie.shop), Stripe automatically determines the most relevant payment methods to display on the checkout screen.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7mwhmd6qszurabwcw23z.PNG)

{% youtube _qt_phaxe5c %}
A Code Editor
Tags: html, webdev
Published: 2023-09-11 15:12:44

## Code

## `<BODY STYLE = "BACKGROUND-COLOR : KHAKI ; COLOR : GRAY ; PADDING : 24PX ; FONT-FAMILY : MONOSPACE ; FONT-SIZE : 72PX ;" CONTENTEDITABLE = "TRUE" SPELLCHECK = "FALSE"> </BODY>`

---

## Output
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83do6b0owmr2t5k6x9o7.PNG)

> A screen resolution of 1920 pixels by 1080 pixels.
Shared Preference Editor is taking a long time to update the value
Published: 2023-09-11 15:09:50

Shared Preference Editor is taking a long time (3-4 seconds) to update the value into the XML file.
Below is my scenario
1. I am updating the parameter value into the shared pref.XML file.
2. After updating the value withing 2-3 seconds I reboot the device.
3. After reboot I am able to see there is two shared pref XML file in /data/data/apk.package/shared_pref path.
one is original and another one is xml.bak file
In xml.bak file parameter value is not updated while in xml file value has been updated properly.
4. After reboot when I run the application, bak.xml is convert into the main xml file (main xml file deleted) and application read parameter value from bak.xml file which is not correct.

Below is my source code
`sUserPref = app.getSharedPreferences("ABC", Context.MODE_PRIVATE);
sUserEditor = sUserPref.edit();
sUserEditor.putInt(storedKey, value);
if (sUserEditor.commit()) {
LogHelper.Logd(DBG_HEADER, "commit success");
return true;
} else {
 return false;
}`

Why sharedpref is taking time to update the file? Is it depends on the memory in the device? Is there any other alternative?
Taking Notes On Terminal Made Simple: Introducing AppNotEx for Linux
Tags: linux, terminal, archlinux, cpp
Published: 2023-09-11 14:57:59

## Introduction
In the world of Linux, quick note-taking is a must for many users. Whether you're jotting down ideas, keeping track of important information, or simply need a place to store your thoughts, having a reliable note-taking tool is essential. Meet **AppNotEx**, a Linux terminal-based note keeper that simplifies the process of taking and organizing your notes.

## Installation
For Arch Linux users, installing AppNotEx is a breeze. You can use the AUR package manager to install it:

```bash
yay -S appnotex
```

For other distro users you can build the tool from source easily - 

Clone the AppNotEx repository:
```
git clone https://github.com/Abir-Tx/AppNotEx.git && cd AppNotEx
```

Initialize and update submodules:
```bash
git submodule init && git submodule update
```

Build the AppNotEx binary:
```bash
make builddir && make
```
You'll find the compiled binary in the bin folder. Then just add the binary to your path using `export` command and that's it.

## Usage

So you might be thinking what's the use of this tool for me? Well, sometimes you might be working on your terminal doing something & you remember some other works or do later thing suddenly and you wish to take a quick note there without the need to leave your terminal. In this case the **AppNotEx** comes in play, using this tool you can take quick notes on the terminal and then whenever needed you can even export those notes to any format using the `--export` parameter. Or you can view all the notes using `--print` command

```bash
appnotex --print 
```

The above command will print all the saved notes in the terminal. Under the hood the tool uses **SQLITE3** database to quickly perform the asked tasks and also work inside the terminal. So you can also easily migrate or modify the database if you know a bit of SQL. 

Mushfiqur Rahman Abir
_Computer Science Engineer_
Node.js path module
Tags: node, javascript, webdev, beginners
Published: 2023-09-11 14:27:16

The path module in Node.js is a built-in module that provides utilities for working with file and directory paths. It helps in constructing, manipulating, and working with file and directory paths in a cross-platform manner, making it easier to write platform-independent code.

Here are some common functions provided by the path module:
**1. path.join([...paths]):**
Joins one or more path segments into a single path, using the appropriate platform-specific separator (e.g., "\" on Windows and "/" on Unix-like systems).

```

```

**2. path.resolve([...paths]):**
Resolves an absolute path from relative paths. It returns an absolute path by combining the current working directory with the provided paths.

```
    const path = require('path');
    const absolutePath = path.resolve('folder', 'file.txt');

```
**3. path.basename(path, [ext]):**
Returns the last portion of a path (i.e., the filename). You can also specify an extension to remove.

```
    const path = require('path');
    const filename = path.basename('/path/to/file.txt'); // Returns 'file.txt'

```
**4. path.dirname(path):**
Returns the directory name of a path.

```
    const path = require('path');
    const dirname = path.dirname('/path/to/file.txt'); // Returns '/path/to'

```
**5. path.extname(path):**

Returns the file extension of a path, including the dot.

```
    const path = require('path');
    const extension = path.extname('/path/to/file.txt'); // Returns '.txt'

```
**6. path.normalize(path):**
Normalizes a path by resolving '..' and '.' segments and removing redundant slashes.

```
    const path = require('path');
    const normalizedPath = path.normalize('/path/to/../file.txt'); // Returns '/path/file.txt'

```
**7. path.isAbsolute(path):**

Check if a path is an absolute path.

```
    const path = require('path');
    const isAbsolute = path.isAbsolute('/path/to/file.txt'); // Returns true

```
These are just a few of the functions provided by the path module. The module is particularly useful when dealing with file I/O, working with file paths in a cross-platform way, and ensuring that your code behaves consistently across different operating systems.
Install Playwright and Visual Studio Code
Tags: testing, playwright, vscode
Published: 2023-09-11 14:53:46

Playwright is a tool that can automate tasks on the web. It works with multiple browsers, so you can use it to test your website or app on different browsers. It can also be used to scrape data from websites or monitor website performance.

Visual Studio Code is a code editor that makes it easy to write code for Playwright. It has a lot of features that can help you write code more efficiently, such as syntax highlighting and code completion.

Install JavaScript Runtime
[Node.js](https://nodejs.org/en)

Install Visual Studio Code
https://code.visualstudio.com

`mkdir playwright` to create a new directory

Installing Playwright
https://playwright.dev/
`npm init playwright@latest`

Running the Example Test
`npx playwright test`

or run with UI mode
`npx playwright test --ui`

HTML Test Reports
`npx playwright show-report`
Example chat app - Clerk makes auth dead simple
Tags: typescript, cloudcomputing, tutorial
Published: 2023-09-11 14:52:11

If you're looking to explore a great example of a real-world, feature-rich chat application built with React and leveraging the power of [Clerk](https://clerk.com/docs) for authentication, check out the ["nchat" GitHub repository](https://github.com/davemooreuws/nchat).

The **nchat** example showcases the seamless integration of Clerk for user authentication in an chat application with a backend that leverages WebSockets written with the [Nitric Framework](https://nitric.io/).

Here's an overview of the Clerk side of the fence. You can dive deeper into the code to check out the backend implementation using WebSockets from [Nitric](https://nitric.io/blog/websockets-announcement).

**Wrap Your Home Component**:

Wrap your entire `Home` component with the `ClerkProvider` to provide access to the [Clerk context](https://clerk.com/docs/components/clerk-provider).

**Import Clerk Components**:

Import the necessary Clerk components.

```javascript
import { SignedIn, SignedOut } from "@clerk/clerk-react";
```

**Your Component**:

```typescript
export default async function Home() {
  const { websocketUrl } = await retrieveData();

  return (
    <div className='flex flex-col bg-cover'>
      <SignedIn>
        {!websocketUrl ? (
          <div className='max-w-4xl mx-auto p-6'>
            There was a problem loading the messages, please login again.
          </div>
        ) : (
          <div className='flex-1 overflow-y-scroll no-scrollbar p-6'>
            <div className='max-w-4xl mx-auto'>
              <MessageFeed websocketUrl={websocketUrl} />
            </div>
          </div>
        )}
      </SignedIn>
      <SignedOut>
        <div className='h-full flex items-center justify-center flex-col py-10'>
          <SignIn />
        </div>
      </SignedOut>
    </div>
  );
}
```

Here `SignedIn` and `SignedOut` components will conditionally render content based on the user's sign-in status using Clerk's authentication.

**Configuration**:

Make sure you have properly configured Clerk with your API keys and domains, and set up the necessary authentication methods according to your project's requirements. 

**Closing Remarks**

These snippets are just to give you a taste. Refer to the [example project](https://github.com/davemooreuws/nchat) and [Clerk docs](https://clerk.com/docs) for all the details!

With that, your React component is ready for user authentication and conditional rendering based on the user's sign-in status.
Platform Engineering Consulting & Development Services
Tags: platformengineering
Published: 2023-09-11 14:39:45

InfraCloud assists companies in adopting Platform Engineering through strategy, migration, enablement, and cloud-native development services.

## Why Choose Platform Engineering Consulting Services?

- Workspace Automation: Accelerate developer onboarding with one-click workspace automation.
- Developer-Friendly DevOps Toolchain Templates: Streamline development with templates.
- Standardization of DevOps Tools: Ensure consistency in tool usage.
- Rapid Time to Market: Speed up product delivery.
- API-Driven DevOps Tools Integration: Seamlessly connect DevOps tools.
- Self-Service Developer Portal: Empower developers.
- Single Pane of Glass: Gain visibility into the product delivery lifecycle.
- Multi-Cloud Adoption: Enhance DevOps with multi-cloud support.

## What do we Offer in Platform Engineering Consulting?

**Single-click Developer Workspace Setup**

Remove the pain point of onboarding your developers with the help of platform engineering consultants, enabling you to develop and scale faster.

**Platform Engineering & DevOps Advisory**

We start with Platform & DevOps maturity assessment to understand the organisation’s maturity. Accordingly, our experts share a detailed architecture platform selection recommendations and strategy roadmap along with cost optimizations.

**CI/CD workflow Setup**

Platform Engineering Consulting helps design a better CI/CD workflow foundation, providing a simplified template and customization as per developer needs.

**Integrating DevOps Tools using APIs**

Each organization has its unique requirement, which our platform engineering consultant keeps in mind and provides the necessary higher-level self-service building block.

**Internal Developer Portal Setup and Centralized Dashboard View**

Stop hopping from one dashboard to another with the help of our platform engineering consultant, providing a single pane of glass and a command center to manage various deployments and releases.

**Platform Engineering Training & Support**

From laying the foundation of the cloud to application modernization, our platform engineering consultant helps you at all levels. We facilitate best practices in your cloud operation and development.

## Why Choose InfraCloud for Platform Engineering Consulting Services?

- Certified Developers: Our team includes certified Kubernetes experts.
- Domain Expertise: We bring best practices from working with 100+ clients.
- First Mover Advantage: As India's first Kubernetes service provider, we offer unparalleled expertise.
- Training: We focus on core concepts and practical experiences.
- CNCF Certified Provider: InfraCloud is a CNCF Silver Member and Kubernetes Certified Service Provider (KCSP).
- Expand Easily: Scale your team effortlessly with our support.

## Ready to Transform your Business with Platform Engineering?

[Schedule a call with our experts to understand how our platform engineering consulting services can help you.](https://www.infracloud.io/platform-engineering-consulting/)
Open Source ABCs: open data
Tags: opensource, discuss, 100daysofoss
Published: 2023-09-11 14:12:04

---
title: Open Source ABCs: open data
published: true
description: Join our #100DaysOfOSS blog series as we explore the world of Open Source Software (OSS) from A to Z! Every week, we'll discuss two new letters of the English alphabet. Share your thoughts, ideas, and favorite OSS projects for each letter. Let's celebrate the power of open source together! 
tags: opensource, discuss, 100DaysOfOSS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxwg4ygmybnni1tpwdx3.png
# Use a ratio of 100:42 for best results.
series: 100DaysOfOSS
canonical_url: https://opensauced.pizza/docs/community-resources/open-source-abcs-open-data
---

Welcome to our [#100DaysOfOSS series](https://dev.to/opensauced/100daysofoss-growing-skills-and-real-world-experience-3o5k). Until October 31, we'll be doing  Open Source Software (OSS) terms from A to Z. We'll be diving into a different letter of the English alphabet, uncovering OSS concepts, and sharing our thoughts on them.

I thought about using [OpenSauced](https://opensauced.pizza/) and talking about how we're redefining contributions in open source, how we're supporting maintainers creating healthy projects, and how we're fostering a healthy ecosystem for open source, but instead I'll go with open data for the letter "o". 

**Open Data**: Open-source projects sometimes produce open data, which refers to freely accessible and shareable datasets. Open data enables researchers, analysts, and other developers to use and build upon existing information.

Now, we want to hear from you! What other OSS terms can you think of that start with the letter "o"? 

Remember to use the hashtag #100DaysOfOSS if you share on social media, and don't forget to tag us [@saucedopen](https://twitter.com/saucedopen) so we can follow along.