teleren/devto huggingface dataset:
Launching my first Product on product hunt at the age of 18
Published: 2023-08-15 13:41:28

[Product Hunt](https://www.producthunt.com/posts/promptly-8)
[Landing Page](https://promptly-plugin.vercel.app/)

The concept of Promptly was born out of a desire to push the boundaries of ChatGPT's capabilities. Having utilized AI chatbots extensively, I identified a gap - the need for a master plugin that could elevate the conversational experience to a new realm. With a vision in mind, I set out to craft a product that would redefine human-AI interactions.

[](url)
Creating Promptly was no small feat. Hours of research, coding, and design work went into crafting a seamless user experience. Leveraging my coding skills and a deep understanding of natural language processing, I worked tirelessly to integrate advanced context retention, expand topic coverage, and introduce innovative features.



Advanced Context Retention: One of the cornerstones of Promptly's innovation was its ability to retain context over longer conversations. This ensured smoother and more coherent interactions, mirroring human-like dialogue progression.

Expanded Topic Coverage: Promptly boasted an extensive database of topics, enabling users to engage in discussions ranging from casual chit-chat to specialized subjects. This breadth of knowledge set it apart from conventional AI chatbots.

Heightened Productivity: By unlocking the true potential of ChatGPT, Promptly aimed to make interactions not just engaging, but also productive. Users could now seek information, brainstorm ideas, or even receive personalized recommendations seamlessly.


With the product developed and polished, the next crucial step was the launch on ProductHunt. Leveraging social media, online communities, and my network, I generated buzz and anticipation around Promptly's launch. On the big day, the response exceeded my wildest expectations. Enthusiastic early adopters flooded in, leaving positive reviews and engaging in discussions about Promptly's potential.


The launch of Promptly marked a significant milestone not only in my journey as a creator but also in the evolution of AI-human interactions. Users lauded the product's ability to engage in meaningful conversations that felt remarkably authentic. As feedback poured in, I realized that Promptly had tapped into a genuine need within the AI community.

Looking forward, the success of Promptly has fueled my determination to continue refining and expanding its capabilities. I aim to incorporate even more advanced features, enhance context retention further, and explore opportunities for integration across various platforms.


The story of building and launching Promptly at the age of 18 exemplifies the power of innovation and determination. It underscores that age is no barrier when it comes to making a meaningful impact on technology and user experiences. As AI continues to shape the future, products like Promptly stand as a testament to the boundless potential of human creativity and the limitless horizons of technological advancement.
Full Stack 🤖 AI-Powered 📧 Email Generation App using OpenAI API - Part 1
Tags: node, express, openai, tutorial
Published: 2023-08-15 13:41:10

Are you wondering 🤔 how to utilize the powerful API of ChatGPT 🤖 and make your own app?

Watch this video 🎥 and learn to use the underlying API of ChatGPT with Node.js and React.js to build a simple yet powerful full stack ai email generation app.

In this part of the series, you will learn:
- what is ChatGPT
- how to setup Node.js
- how to setup Express.js
- what is NPM
- how to initialize NPM
- how to install and implement packages like Nodemon, Body-parser, Cors, and Dotenv in the project

{% embed https://www.youtube.com/watch?v=cxsx-187uzk %}

Follow me and support me on:
🔗 LinkedIn: https://www.linkedin.com/in/suriya-ta...
🐦 Twitter: https://twitter.com/SuriyaDisha
📝 Tech Blog: https://blog.suriyadisha.com/
☕ Buy me a coffee: https://www.buymeacoffee.com/suriyadisha
PostgreSQL version 15+ ERROR: permission denied for schema public
Tags: devops, database, postgressql, postgres
Published: 2023-08-15 13:38:22

PostgreSQL version 15+ will error out and tell you that you don't have permission to create something inside the public schema without explicitly specifying who is allowed to do that beforehand. It is now necessary to grant permissions to a user explicitly. 

What should be changed?

If it’s Postgres version 15+ right after the DB_name has been created and DB_user has been created, and before any object creation, connect to the <DB_name> as user admin and run this:

```
GRANT ALL ON SCHEMA public TO <DB_user>;
```

Detailed Explanation.

Reconstruction:

```
psql -h my_db_host -U dima_test -d dima_test -W
Password:

dima_test=> create table xyz(a varchar(100));
ERROR:  permission denied for schema public
```

Workaround:

```
psql -h my_db_host -U root -d dima_test -W
Password: 

dima_test=> GRANT ALL ON SCHEMA public TO dima_test;
GRANT
dima_test=> \q


psql -h my_db_host -U dima_test -d dima_test -W
Password: 

dima_test=> create table xyz(a varchar(100));
CREATE TABLE
dima_test=>
```

`ask_dima@yahoo.com`
#01DicasRápidas: Python
Tags: python, tip, programming, tutorial
Published: 2023-08-15 13:36:52

Nesse primeiro post, vou dar algumas dicas para iniciantes no mundo do Python, dos principais comandos úteis, e bem simples de serem utilizados, em uma análise exploratória.

---

## **Comentários**:


Use o caractere "#" para iniciar um comentário em uma linha. Os comentários são úteis para adicionar notas explicativas no seu código e não são executados pelo interpretador do Python.

```python
# Isso é um comentário
```

---

## **Quebra de linha**:

Para dividir uma código em várias linhas, você pode usar a barra invertida "\" no final de cada linha ou colocá-la entre parênteses, colchetes ou chaves.

```python
# Usando barra invertida
x = 10 + \
    20 + \
    30

# Usando parênteses
y = (10 +
     20 +
     30)

# Usando colchetes
lista = [1, 2,
         3, 4]

# Usando chaves
dicionario = {'a': 1,
              'b': 2}
```

---

## **Indentação**:

O Python usa a indentação para delimitar blocos de código. Ao invés de utilizar chaves ou palavras-chave especiais. Certifique-se de manter a mesma indentação dentro de um bloco para evitar erros de sintaxe.

```python
# Exemplo de indentação
if x > 0:
    print("x é positivo")
    print("Ainda dentro do bloco")
print("Fora do bloco")
```

---

## **Imprimir na tela**:

Use a função **`print()`** para exibir mensagens ou valores na saída padrão.

```python
nome = "Ana"
print("Fala,", nome)

x = 42
print("O valor secreto de x é:", x)
```

---

## **Input do usuário**:

Use a função **`input()`** para receber uma entrada do usuário. Lembre-se de que o resultado do **`input()`** é sempre uma string, portanto, você pode precisar converter para outros tipos, se necessário.

```python
nome = input("Qual seu nome? ")
print("Bem-vindo,", nome)
```

---

## **Operadores de atribuição**:

O Python oferece vários operadores de atribuição úteis para realizar operações comuns em uma única linha.

```python
x = 10  # Atribuição simples
x += 5  # x = x + 5
x -= 3  # x = x - 3
x *= 2  # x = x * 2
x /= 4  # x = x / 4
```

---

## **Importação de bibliotecas**:

Use a palavra-chave **`import`** para importar bibliotecas e módulos no seu código. Isso permite que você acesse recursos adicionais e funções fornecidas por essas bibliotecas.

```python
import math

x = math.sqrt(25)
print(x)

from datetime import datetime

agora = datetime.now()
print(agora)
```

---

## Shape

Traz uma tupla correspondendo o número de linhas seguido do número de colunas, de um dataset:

```jsx
df.shape
```

---

## Colunas de um dataframe

Traz todas as colunas, separadas por vírgula, que compõe um dataset. Muito útil para relembrar quais colunas compõe o dataset após transformações, ou mesmo, no meio da análise exploratória:

```jsx
df.columns
```
createRef in React
Tags: webdev, react, programming, coding
Published: 2023-08-15 13:36:37

In React, `createRef` is a method used to access the DOM nodes or React elements created in the render method. Refs provide a way to interact with the underlying DOM elements, and they can be useful in various scenarios, such as managing focus, triggering animations, or integrating third-party libraries.

Here's a step-by-step guide on how to use `createRef` in React:

1. **Initialization**: 
    Create a ref instance using `createRef` and assign it to a class property.

    ```jsx
    class MyComponent extends React.Component {
        constructor(props) {
            super(props);
            this.myRef = React.createRef();
        }
    ```

2. **Attaching to Elements**:
    Attach the ref instance to a React element using the `ref` prop.

    ```jsx
    render() {
        return <div ref={this.myRef}>Hello, World!</div>;
    }
    ```

3. **Accessing the Ref**:
    Once you've attached the ref to an element, you can access that element directly through `this.myRef.current`.

    ```jsx
    componentDidMount() {
        console.log(this.myRef.current);  // This will log the <div> element to the console
    }
    ```

4. **Usage Scenarios**:
    Refs are useful in various scenarios:

- **Managing focus**: Focus on an input element when a component mounts.
- **Triggering animations**: By accessing the DOM element, you can use libraries like GSAP to trigger animations.
- **Integrating third-party libraries**: Sometimes, you need to integrate third-party libraries that require direct access to the DOM. Refs can help here.

5.**Important Points**:

- Avoid using refs for things that can be done declaratively. For example, instead of using refs to "set" a property on a child component, use props.
- Refs do not trigger a re-render when their content changes. They're just a way to access the DOM or React elements.
- While you can assign a ref to a functional component, it needs to use `forwardRef` to pass the ref along to a DOM element.

Remember that while refs are powerful, they should be used sparingly. In many cases, you can achieve the desired behavior more declaratively using React's usual data flow mechanisms.

Thank you for reading. I encourage you to follow me on Twitter where I regularly share content about JavaScript and React, as well as contribute to open-source projects. I am currently seeking a remote job or internship.

Twitter: https://twitter.com/Diwakar_766

GitHub: https://github.com/DIWAKARKASHYAP

Portfolio: https://diwakar-portfolio.vercel.app/
Tailwind CSS setup
Published: 2023-08-15 13:18:13

**Tailwind CSS ** is an open source CSS framework. It gives us low-level utility-classes to implement CSS in our projects. By low level we mean that the utility classes gives us style elements instead of style components. E.g.- 'bg-red-200' in Tailwind gives red background colour to our element where as in frameworks like bootstrap or materialize we get fully styled components like buttons, forms etc.
       Here are the basic steps to include Tailwind CSS in our javaScript project.

**Step 1:** Get node.js installed in your computer. You can get it by going the nodejs.org and selecting the right version for your computer.

**Step 2:** Go to your project folder in the terminal and write 

```
npm init
```

This will include package.json file to your project folder. you can check this to know your project dependencies.

**Step 3:** On the terminal on the same address of your project folder, write 

```
npm i tailwindcss
```

This will include Tailwind CSS to your project. You can check this as a dependency in your package.json file.

**Step 4:** Now go to your package.json file and in the script tag and replace build tag with

```
"build-css": "tailwindcss build src/style.css -o public/style.css --watch"
```
**Step 5:** Now in your terminal, write:

```
npm run build-css
```

This will compile all your tailwind file in your public CSS file.
    

Now you can use tailwind CSS utility classes in your project.
Type of variable in OOPS
Tags: oop, programming, python
Published: 2023-08-15 13:10:41

In object-oriented programming (OOP), variables can be categorized into different types based on their scope and usage within a class. Here are the main types of variables in OOP:

1. **Instance Variables (Non-Static Variables):**
   Instance variables are associated with individual instances (objects) of a class. Each object has its own copy of these variables. They are defined within the class but outside of any method. Instance variables represent the state of an object and can have different values for different instances of the class.

   Example:
   ```python
   class Person:
       def __init__(self, name, age):
           self.name = name  # instance variable
           self.age = age    # instance variable
   ```

2. **Class Variables (Static Variables):**
   Class variables are shared among all instances of a class. They are declared within the class and outside of any method using the `@classmethod` decorator or directly under the class definition. Class variables are used to represent attributes that are common to all instances of the class.

   Example:
   ```python
   class Circle:
       pi = 3.14159  # class variable
       def __init__(self, radius):
           self.radius = radius  # instance variable
   ```

3. **Local Variables:**
   Local variables are defined within a method and have scope only within that method. They cannot be accessed from outside the method. These variables are temporary and exist only during the execution of the method.

   Example:
   ```python
   class Calculator:
       def add(self, x, y):
           result = x + y  # local variable
           return result
   ```

4. **Parameter Variables:**
   Parameter variables are used to pass values to methods or constructors. They are placeholders for the values that will be provided when the method is called or the object is created.

   Example:
   ```python
   class Rectangle:
       def __init__(self, width, height):
           self.width = width      # instance variable
           self.height = height    # instance variable
   ```

It's important to note that the terminology can vary slightly between programming languages, but the underlying concepts remain consistent. Understanding the different types of variables and their scopes is crucial for writing effective and maintainable object-oriented code.
A help with this select with material react table
Published: 2023-08-15 13:06:47

Hello, I have the following problem: On page load I have a useEffect that returns an x number of records with the following format:
TBLNAME: 'Table1'
TBLNAME: 'Table2'
TBLNAME: 'Table3'
.......
And this is the code to load the select:

```
const [selectTables, setSelectTabless] = useState([]);
.........
 
<FormControl variant="standard" sx={{ m: 1, minWidth: 350 }}>
   <InputLabel >Tablas cargadas</InputLabel>
   <Select
      id="selecttable"
      key={values.iD}
      name={"Tabla"}
      //onChange={(e) =>
      //setValues({ ...values, [e.target.name]: e.target.value })
      // }
    >
    {selectTables.map((table, index) =>
      <menuitem >
      {table}
      </menuitem >
      )}
    </Select>
</FormControl>
```

When I want to display the select, I get the following error:
"Objects are not valid as a React child (found: object with keys {TABLE_NAME}). If you meant to render a collection of children, use an array instead."

Any help please.
Thank you
Azure PostgreSQL: Extending with PostGIS
Tags: azure, postgres, postgis
Published: 2023-08-15 13:05:56

Azure PostgreSQL: Extending with PostGIS
----------------------------------------

Are you tired of your regular, plain old PostgreSQL database? Do you want to add some spatial magic to your data? Look no further, because Azure PostgreSQL with PostGIS is here to save the day! With PostGIS, you can turn your boring data into spatially enabled information that will make your software development projects shine brighter than a supernova.

### What is PostGIS?

PostGIS is a powerful extension for PostgreSQL that brings spatial capabilities to the table. It allows you to store, query, and analyze geographic information within your database. PostGIS brings the world of spatial data to your fingertips, enabling you to perform complex spatial operations like finding nearby locations, calculating distances, and even creating beautiful maps.

### Why use Azure PostgreSQL with PostGIS?

Azure PostgreSQL with PostGIS combines the robustness of PostgreSQL with the spatial magic of PostGIS. By using Azure, you get the benefits of a fully managed database service, including automatic backups, high availability, and scalability. And with PostGIS, you can take your software development projects to a whole new dimension by incorporating geographic data into your applications.

### Getting started with Azure PostgreSQL and PostGIS

To get started, you'll need an Azure account and a PostgreSQL server with the PostGIS extension enabled. If you don't have an Azure account yet, don't worry, it's as easy as pie to sign up. Once you have your Azure account, you can create a PostgreSQL server with a few clicks, and then enable the PostGIS extension using the Azure portal or the Azure CLI.

Once you have your Azure PostgreSQL server with PostGIS up and running, you can start creating spatial tables, importing geographic data, and performing spatial queries. The possibilities are endless! You can find detailed documentation and examples in the official Azure PostgreSQL and PostGIS documentation, so don't be afraid to dive in and explore the spatial wonders that await you.

### Conclusion

Azure PostgreSQL with PostGIS is a match made in heaven for software developers who want to add spatial capabilities to their applications. With PostGIS, you can turn your regular database into a spatial powerhouse, and with Azure, you get all the benefits of a fully managed database service. So why settle for a boring database when you can have one that's spatially awesome?

### References:

*   [Azure PostgreSQL Documentation](https://docs.microsoft.com/azure/postgresql/)
*   [PostGIS Documentation](https://postgis.net/docs/)
Embracing Neovim: Navigating Configuration Challenges and Seeking Guidance
Tags: español, programming, ayuda, help
Published: 2023-08-15 13:03:15

¡Hola a todos!

Soy completamente nuevo en el mundo de Neovim y, para ser honesto, en la programación en general. Estoy realmente emocionado por unirme a esta comunidad y aprender a usar este impresionante editor, pero me estoy enfrentando a algunos desafíos con la configuración. Si hay alguien amable y paciente por ahí dispuesto a ayudar a un novato como yo, ¡sería increíble! 😩

Mi situación es la siguiente: Tengo Neovim instalado en Windows y he configurado mi entorno según lo que se muestra en la imagen adjunta (init.lua). 

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


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


Estoy utilizando LSP-Zero para mi configuración (https://github.com/VonHeikemen/lsp-zero.nvim). Mi problema principal es que estoy tratando de configurar el complemento "cmp" para que me muestre opciones de autocompletado utilizando las palabras del mismo búfer.

He leído la documentación de "cmp" y sé que necesito agregar algo de código como este:
-- Asegúrate de configurar cmp después de lsp-zero
local cmp = require('cmp')

cmp.setup({
  sources = {
    {name = 'nvim_lsp'},
    {name = 'buffer'},
  }
})
Sin embargo, aquí es donde me quedo atascado. No estoy seguro de dónde exactamente debo agregar este código. ¿Debería ser en el archivo init.lua o hay algún otro archivo de configuración específico? Como pueden ver, soy bastante nuevo en esto y estoy tratando de entender todos estos conceptos.

Agradezco de antemano a cualquiera que esté dispuesto a brindarme su ayuda y orientación. ¡Estoy emocionado por aprender y ser parte de esta comunidad!

¡Muchas gracias!
Rubyist Hangout Thread
Tags: discuss, ruby, watercooler
Published: 2023-08-15 13:00:00

Hey folks, this is a weekly hangout thread.

This is an area for **Rubyists to discuss _Ruby_**, but since Ruby is 28 years old, and things don't change so quickly, this is also just **a hangout thread for Rubyists to share whatever you feel like** within our community guidelines.

So what's up this week?
Embracing Neovim: Navigating Configuration Challenges and Seeking Guidance
Tags: beginners, neovim, help, programming
Published: 2023-08-15 12:59:49

Hey everyone,

I'm completely new to the world of Neovim and, to be honest, to programming in general. I'm really excited to join this community and learn how to use this amazing editor, but I'm facing some challenges with the setup. If there's a kind and patient soul out there willing to help a newbie like me, that would be incredible! 😩

Here's where I'm at: I've got Neovim installed on Windows, and I've set up my environment as shown in the attached image (init.lua).

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


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

 I'm using LSP-Zero for my setup (https://github.com/VonHeikemen/lsp-zero.nvim). My main issue is that I'm trying to configure the "cmp" plugin to show me auto-completion options using words from the same buffer.

I've read through the "cmp" documentation, and I know that I need to add some code like this:

lua
Copy code
-- Make sure you set up cmp after lsp-zero
local cmp = require('cmp')

cmp.setup({
  sources = {
    {name = 'nvim_lsp'},
    {name = 'buffer'},
  }
})
However, this is where I'm getting stuck. I'm not sure exactly where I should add this code. Should it go in the init.lua file, or is there some other specific configuration file? As you can see, I'm quite new to this, and I'm trying to wrap my head around all these concepts.

I appreciate in advance anyone willing to lend me a hand and provide guidance. I'm excited to learn and be a part of this community!

Thank you so much!
TIL - 15/08/2023
Published: 2023-08-15 12:59:36

These two are equivalent

```
adb shell am start -a android.intent.action.VIEW -d "my_app://?custom=%7B%22screen%22%3A%22main%22%7D"

```

```
adb shell "am start -a android.intent.action.VIEW -d '"'may_app://?custom={"screen":"main"}'"'"

```

---
Machine Learning Episode 1
Tags: machinelearning, ai, dsa, python
Published: 2023-08-15 12:43:04

LINEAR ALGEBRA

Linear equations
There are three types of linear equation with 2 variables. 
1. Intersects (unique solutions)
2. Two lines in the same line (infinite solutions)
3. Two parallel lines that never meets (no solutions)

The graphs will show an easy idea about how the equation and its solution can be obtain.
 
Linear equation as matrics**

The Determinant 
We will cross multiply the matric

According to the 4th image, 

The determinant = (A x D) - (B x C)

If the determinant is 0, it is singular. That means the matrix does not have an inverse
If the determinant is not 0, it is non-singular. That means matrix has an inverse matrix. 

Let's understand it with equations.

2A + 3B =10
4A + 6B =20 

The determinant = (2x6) - (3x4) 
                            = 0


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