teleren/devto huggingface dataset:
(test post dev api) Why convert HTML to Markdown?
Published: 2023-07-28 14:24:26

### [](https://github.com/thephpleague/html-to-markdown#why-convert-html-to-markdown)Why convert HTML to Markdown?

*"What alchemy is this?"* you mutter. *"I can see why you'd convert [Markdown to HTML](https://github.com/thephpleague/commonmark),"* you continue, already labouring the question somewhat, *"but why go the other way?"*

Typically you would convert HTML to Markdown if:

1. You have an existing HTML document that needs to be edited by people with good taste.
2. You want to store new content in HTML format but edit it as Markdown.
3. You want to convert HTML email to plain text email.
4. You know a guy who's been converting HTML to Markdown for years, and now he can speak Elvish. You'd quite like to be able to speak Elvish.
5. You just really like Markdown.

### [](https://github.com/thephpleague/html-to-markdown#how-to-use-it)How to use it

```
<span class="line"><span style="color: #81A1C1">use</span><span style="color: #D8DEE9FF"> League</span><span style="color: #ECEFF4">\</span><span style="color: #D8DEE9FF">HTMLToMarkdown</span><span style="color: #ECEFF4">\</span><span style="color: #8FBCBB">HtmlConverter</span><span style="color: #81A1C1">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">converter</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">new</span><span style="color: #D8DEE9FF"> </span><span style="color: #8FBCBB">HtmlConverter</span><span style="color: #ECEFF4">()</span><span style="color: #81A1C1">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">html</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">"</span><span style="color: #A3BE8C"><h3>Quick, to the Batpoles!</h3></span><span style="color: #ECEFF4">"</span><span style="color: #81A1C1">;</span></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">markdown</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">converter</span><span style="color: #81A1C1">-></span><span style="color: #88C0D0">convert</span><span style="color: #ECEFF4">(</span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">html</span><span style="color: #ECEFF4">)</span><span style="color: #81A1C1">;</span></span>
```



**and**

```
use League\HTMLToMarkdown\HtmlConverter;
$converter = new HtmlConverter();
$html = "<h3>Quick, to the Batpoles!</h3>";
$markdown = $converter->convert($html);
```

   
[*Read more posts on my blog (etanish.com)*](https://etanish.com)
Use of WHERE clause in PostgreSQL
Tags: postgres, tutorial, programming, sql
Published: 2023-07-28 14:19:44

In this tutorial, I will be explaining how can we return rows which satisfies a specific condition using `WHERE` clause.
**SYNTAX of Postgres WHERE statement**

```
SELECT list
FROM table_name
WHERE condition
```
As from syntax it is clear that `WHERE` clause comes right after the `FROM` clause. The `condition` part of the `WHERE` clause returns the filtered rows from the `SELECT` statement. The `condition` must result to true, false or unknown. Either it can be a boolean expression or the combination of boolean expressions using different operators as `OR` or `AND` operators.

This query will return only the rows which satisfies the `condition` of `WHERE` clause.
Before looking into the example, To form the `condition` in the `WHERE` clause, we use comparison and logical operators:
Some of the operators we can use are:


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

**Example**
Let's see example of the `WHERE` clause with `EQUAL`, `AND` and `OR` operator.
Suppose we have the `customer` table with following attributes in the database:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wo3tuk988tbtwf44p29s.PNG)
**1.  Using `WHERE` clause with the `equal` (=) operator **

```
SELECT
	last_name,
	first_name
FROM
	customer
WHERE
	first_name = 'Jamie';
```
The above query returns the result as the `customers` which has `first_name` as Jamie.

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

**2.  Using `WHERE` clause with the `AND` operator **

```
SELECT
	last_name,
	first_name
FROM
	customer
WHERE
	first_name = 'Jamie' AND 
        last_name = 'Rice';
```
The above query returns the `customers` whose `first_name` and `last_name` are Jamie and Rice.

**OUTPUT**

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

**3. Using `WHERE` clause with `OR` operator:**

```
SELECT
	first_name,
	last_name
FROM
	customer
WHERE
	last_name = 'Rodriguez' OR 
	first_name = 'Adam';
```
The above query returns the customers whose `last_name` is ROdriguez or the `first_name` is Adam.

**OUTPUT**

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

**Conclusion**
In this tutorial we learnt about the use of `WHERE` clause in PostreSQL. Also we learnt about how logical and comparison operators can be used in the `WHERE` clause.
Probando generadores de texto a imagenes con IA, StableCog vs Mage🤖
Tags: ai, promptengineering, beginners, productivity
Published: 2023-07-28 14:10:08

Desde que el boom de las inteligencias artificiales nos explotó en el rostro no han parado (y tampoco van a parar) de salir un montón de herramientas que usan inteligencia artificial para resolver problemas o para ser más productivos y eficientes.

Uno de los más sorprendentes son los generadores de texto a imagen, los más conocidos como bien sabemos son 3:

* **Stable Diffusion**
* **Dall-E 2**
* **Midjourney**

Estas si bien son las más populares existen otras que se pueden usar de manera gratuita y con resultados igual de impresionantes.

Este es el primero de una serie de post que iré compartiendo de mi experiencia usando estas herramientas, proporcionare los prompts de todas las imágenes que compartiré y las herramientas que use.

Más que un conjunto de artículos rigurosos, técnicos y serios; quiero escribir posts un tanto mas lúdicos y entretenidos de este campo de la IA que me llama mucho la atención.

---

Para comenzar, he utilizado las siguientes herramientas para esta ocasión:

1. [StableCog](https://stablecog.com/generate)
2. [Mage](https://www.mage.space/)

El objetivo es comparar las cuatro herramientas pasándose el mismo prompt para ver que tanto varían los resultados, el prompt en cuestión es el siguiente (dividido en dos partes):

**Prompt positivo:**
Ilustración de primer plano estilo surrealista de una hermosa y feliz campesina holandesa del siglo XIX, pintura, detallado, líneas limpias, colores vivos, colores nítidos, ilustración premiada, retrato profesional, obra maestra, full HD, 4k, esquema de colores vibrantes, muy detallado, estilo surrealista, estilo Leonora Carrington.

**Prompt negativo:**
Feo, embaldosado, manos mal dibujadas, pies mal dibujados, cara mal dibujada, fuera de encuadre, extremidades adicionales, desfigurado, deformado, cuerpo fuera de encuadre, mala anatomía, filigrana, firma, cortado, bajo contraste, subexpuesto, sobreexpuesto, malo arte, principiante, aficionado, cara distorsionada.

Los resultados fueron los siguientes:

## [StableCog](https://stablecog.com/generate)
![img-1](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/stablecog-1.jpeg?raw=true)
![img-2](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/stablecog-2.jpeg?raw=true)
![img-3](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/stablecog-3.jpeg?raw=true)
![img-4](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/stablecog-4.jpeg?raw=true)

## [Mage](https://www.mage.space/)
![img-5](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/mage-1.png?raw=true)
![img-6](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/mage-2.png?raw=true)
![img-7](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/mage-3.png?raw=true)
![img-8](https://github.com/crisdux/img-dev-to/blob/master/AI-generator-images/27-07-23/mage-4.png?raw=true)
Power of AI: Turning LinkedIn Data into Captivating Music!
Tags: ai, chatgpt, gpt3, machinelearning
Published: 2023-07-28 14:03:09

I fed my LinkedIn profile data to an AI Model, and the result is mind-blowing! Weird but Interesting.

Introduced myself via AI Music

- Lyrics Generated by AI 
- Music Video Generated By AI

Thinking of an innovative possibility - AI's ability to take your LinkedIn profile data and transform it into an extraordinary musical creation!

Picture this: AI carefully analyzes your career milestones, accomplishments, and aspirations from your LinkedIn profile. Then, like a musical maestro, it weaves a mesmerizing melody that echoes your unique professional story.

But it doesn't end there! AI brings your journey to life through a visually stunning Music Video. The result will be a masterpiece that showcases your career in a way you've never imagined!

 Don't miss this unique experiment - check out the video now!

{% embed https://www.youtube.com/watch?v=Vh4LCOzZwNc %}

Connect me on [Linkedin](https://www.linkedin.com/in/lakin-mohapatra/), [Twitter](https://twitter.com/lakincoder), [Instagram](https://www.instagram.com/lakin_codes/)
SysAdmins! We’re just users without you ❤️
Tags: it, webdev, cloudcomputing
Published: 2023-07-28 13:59:53

Today, we joyfully celebrate **System Administrator Day**, dedicated to those who make our networks function seamlessly, and servers operate like synchronized orchestras.

For many years, system administrators have been an integral part of our IT lives. Their technical expertise and skill in solving the most complex tasks have formed the foundation upon which our digital worlds are built.

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

This occasion is a wonderful opportunity to think of all those system gurus who effortlessly manage hundreds of servers and virtual machines. Their work is often hidden from us, like a protective firewall layer, but we know well how they roam through data centers, solving issues, and preventing network failures.

Now is the perfect time to say “thank you” for overseeing the health of our infrastructure and “bravo” for your creativity in solving technical challenges.

Congratulations to all system administrators on their professional holiday! You are our heroes of the digital era, our defense against cyber threats, and the reliable pillars in the world of IT. May your code always be flawless, and servers steady like rocky cliffs supporting our infrastructure.

_Thank you for your dedication, skill, and patience! You are the true virtualization wizards, impeccable network architects, and guardians of IT order!_

In honor of the holiday, we are offering you a **20% cashback in bonus coints** using the promo code **“SYSADMIN28”**.

> 
How to activate the promo code?

Open the control panel and go to the “[Refill balance](https://my.serverspace.us/billing/addmoney)” page.

1. Activate promo code SYSADMIN28 in the “Promo code” tab.
2. Top up your balance with any amount and recieve a 20% cashback in bonus coints.
3. The promo code is valis for only three days and will be active until 31.07.2023
Note: promo code must be activated before refilling balance.

_Happy SysAdmin Day!_
A Beginner's Guide To Creating a Simple RESTful API with Python Flask
Published: 2023-07-28 13:56:14

Step 1: Setup
First, make sure you have Python installed on your system. You can download Python from the official website:(https://www.python.org/downloads/)

Next, install Flask using pip, the Python package manager. Open a terminal or command prompt and run the following command:

```
pip install Flask
```
Step 2: Create the Flask App
Create a new Python file (e.g., app.py) and import the necessary modules:

```
from flask import Flask, jsonify, request
```
Next, initialize the Flask app:

```
app = Flask(__name__)
```
Step 3: Define Routes and Endpoints
In Flask, you define routes using the @app.route decorator. Each route corresponds to a specific URL, and each URL will be associated with a function that handles the request and returns the response.

Let's create a simple API with two endpoints: one to get a list of items and another to get details of a specific item.

```
# Sample data - you can replace this with your own data or use a database
items = [
    {"id": 1, "name": "Item 1"},
    {"id": 2, "name": "Item 2"},
    {"id": 3, "name": "Item 3"}
]

# Endpoint to get all items
@app.route('/api/items', methods=['GET'])
def get_items():
    return jsonify(items)

# Endpoint to get details of a specific item
@app.route('/api/items/<int:item_id>', methods=['GET'])
def get_item(item_id):
    item = next((item for item in items if item['id'] == item_id), None)
    if item:
        return jsonify(item)
    return jsonify({"message": "Item not found"}), 404

```
Step 4: Run the Flask App
At the end of your app.py file, add the following lines to run the app:

```
if __name__ == '__main__':
    app.run(debug=True)
```
Step 5: Test the API
Save the file and run it using the following command in the terminal:

```
python app.py
```
Your Flask app should now be running locally at http://127.0.0.1:5000/.

To test the API, you can use tools like curl, Postman, or simply use your web browser.

To get all items, open your web browser and go to http://127.0.0.1:5000/api/items.
To get details of a specific item (e.g., item with ID 2), go to http://127.0.0.1:5000/api/items/2.
Congratulations! You have just created a simple RESTful API with Python and Flask. From here, you can continue exploring more advanced features of Flask, like handling POST, PUT, and DELETE requests, using a database, authentication, etc. Happy coding!.
As Fun-tásticas Funções Mais Usadas no SQL ou Quase..
Tags: database, developer, sql
Published: 2023-07-28 13:50:53

Recentemente, tenho estado envolvido em um projeto que exige uma integração intensa entre PHP, Vue.js e um banco de dados SQL. Decidi então criar um artigo sobre as funções principais que utilizamos para manipulação de dados no SQL. Embora algumas delas não sejam novidade, às vezes podemos esquecê-las por não usá-las no cotidiano. A seguir, apresento alguns dos principais comandos que podem ser úteis de um modo diferente.

1. **SELECT: O Sherlock Holmes das Consultas**

Seu primeiro parceiro de crime é o clássico comando SELECT! Com ele, você vai vasculhar os segredos escondidos nas suas tabelas, trazendo à tona informações valiosas. É como ser um detetive das consultas SQL, desvendando os mistérios dos dados!

2. **INSERT INTO: O Criador de Novos Mundos**

Precisa acrescentar informações novinhas em folha ao seu banco de dados? O INSERT INTO é o herói da vez! Com esse superpoder, você vai criar novos registros como quem cria um novo universo em um piscar de olhos!

3. **UPDATE: O Metamorfose Ambulante**

Hora de dar uma repaginada nos seus dados! O comando UPDATE é o verdadeiro camaleão da manipulação. Com ele, você vai transformar valores, atualizar registros e deixar tudo tinindo, como se seus dados tivessem passado por uma sessão de beleza!

4. **DELETE: O Destruidor de Registros Indesejados**

Às vezes, é preciso limpar a bagunça e se livrar de registros que não servem pra nada. É aí que o DELETE entra em cena, chutando para bem longe aquelas informações inúteis e abrindo espaço para a arrumação!

5. **ORDER BY: O Organizador de Bailes Datais**

Seus dados estão fazendo uma festa sem sentido? O ORDER BY é o mestre de cerimônias perfeito! Com ele, você vai organizar uma dança de valores, escolhendo quem vai à frente, quem fica atrás e quem está no centro das atenções!

6. **GROUP BY: O Agrupador de Trupes de Dados**

Quando a galera se junta em torno de um interesse comum, é hora de chamar o GROUP BY! Esse comandante talentoso agrupa os dados e mostra quem está do mesmo lado da força. É como fazer uma reunião de fãs em um evento nerd!

7. **JOIN: O Cupido das Tabelas**

Amor está no ar! O comando JOIN une os dados de tabelas diferentes, criando pares perfeitos de informações! É como fazer um match entre colunas e mostrar que, juntos, os dados são muito mais fortes!

8. **LIKE: O Detetive de Palavras Desaparecidas**

Quer encontrar palavras perdidas no meio de uma confusão textual? O LIKE é o investigador particular que vai te ajudar! Ele é especialista em descobrir padrões e rastrear informações escondidas!

9. **DISTINCT: O Caçador de Duplicatas**

Chega de cópias repetidas! O DISTINCT é o exterminador de duplicatas, caçando e eliminando registros indesejados. Com ele, seus resultados vão ficar mais únicos do que um unicórnio dançando salsa!

10. **AGGREGATE FUNCTIONS: Os Magos dos Números**

E para fechar com chave de ouro, temos as Aggregate Functions! São verdadeiros mágicos que fazem contas mirabolantes com seus dados. SUM(), AVG(), COUNT(), MIN() e MAX() vão mostrar que a matemática pode ser divertida também!
Use empty-react-app cra-template to create new project
Tags: react, javascript, webdev, reactjsdevelopment
Published: 2023-07-28 13:45:43

Below is the link to see the code to see cra-template structure

Anyone can use below commands to create create react application with redux implementation, unit test cases setup and well defined project structure.

npx create-react-app [app-name] --template empty-react-app
or
yarn create react-app [app-name] --template empty-react-app 

Instead of cloning project or download zip file from git, one can use the above commands, so saving much time. Just replace <app-name> with your folder/project name and you are done.

What is Empty React App CRA Template 

This is a custom create-react-app template of empty-react-app. Empty React App has been developing the ultimate React starter kit for many years now. On the other hand CRA (create-react-app) is currently the people's favorite choice. This template has been created to join their strengths together. CRA provides the necessary bootstrapping to start your projects but does not provide a guide on how to build it. That is where empty-react-app comes in to the picture and to guide you into creating state-of-the-art web applications.


https://github.com/thesologlobesightseer/empty-react-app
Building smth cool this weekend? Built👩‍💻 🔜 Launch 🚀
Tags: beginners, javascript, tutorial, webdev
Published: 2023-07-28 13:35:13

I decide to launch on Product Hunt the project I build last months. 

Here I created the page for the future launch, if you interested to support, please follow.

https://www.producthunt.com/products/linkedin-post-generator

Are you building smth cool? And planning to launch it on Product Hunt?
Feature request: Unit test coverage for HTML files
Tags: angular, typescript, frontend, webdev
Published: 2023-07-28 13:34:14

Hello everyone,
I've submitted a feature request on angular/cli, and the idea is to include unit test coverage for HTML files, not just TypeScript. If you think this would be a valuable addition, please consider upvoting the post on GitHub so that it can be taken into consideration. (We need at least 20 upvotes for the request to be considered.) Thank you all for your interest and support. 🙏
https://github.com/angular/angular-cli/issues/25563
Prompt Generator: Unleash 12x creativity
Tags: beginners, programming, productivity, career
Published: 2023-07-28 13:30:00

Welcome to [HeroGPT](https://www.aiforme.wiki/ai/tools/HeroGPT), the ultimate prompt generator powered by ChatGPT and the Midjourney Prompt Library. Unleash your creativity and craft engaging stories, scenarios, and ideas with the flexibility of variables. HeroGPT allows you to create personalised prompts that can be filled with unique content using variables like friend_1,friend_2, or any other custom name.

## How It Works:

**Create Your Prompt:** Write a creative and imaginative prompt using variables to add dynamic elements to your stories or scenarios.

**Personalize Your Content:** When you click "Run," HeroGPT will prompt you to fill in the variables, allowing you to customize your story with specific names, locations, or any other details you desire.

**Access Your Masterpiece:** Once you've filled in the variables, you can copy your personalized prompt or open it directly in ChatGPT to see your creative vision come to life.

## Why Use HeroGPT Prompt Generator:

**Infinite Possibilities:** With the ability to use variables, HeroGPT opens up endless possibilities for creating unique stories, dialogues, and scenarios.

**Tailored Experiences:** Personalize your prompts with names, places, or any other details to make your stories feel authentic and relatable.

**Seamless Integration:** Access ChatGPT directly from the generator to explore your prompt further and enjoy real-time interactions with your creative ideas.

**Conclusion:**
Experience the power of [HeroGPT](https://www.aiforme.wiki/ai/tools/HeroGPT) Prompt Generator to craft captivating stories and scenarios like never before. Use variables to infuse your prompts with personality and make your narratives stand out. Whether you're a writer, storyteller, or just someone seeking inspiration, HeroGPT is here to spark your creativity and bring your ideas to life.

Try it now and embark on a journey of boundless imagination with HeroGPT!
What was Reddit’s initial architecture?
Tags: architecture, softwareengineering
Published: 2023-07-28 13:23:15

The core of Reddit is extremely simple. A user posts a link and other users can vote. I love Reddit’s initial architecture because it matches. It’s dead simple.

Reddit was initially written by Steve Huffman in the span of a couple weeks in Lisp.

They ran all of Reddit on a single computer that ran both the Lisp process and Postgres.

The database only had a few tables: links, votes, and users.

Steve Huffman explains it [here](https://askadev.joinperch.com/q/what-was-reddits-initial-architecture-933ca252).
comment utiliser la propriété filter en css?
Published: 2023-07-28 13:10:32

DÉFINITION :La propriété CSS filter permet d'appliquer des filtres et d'obtenir des effets graphiques de flou, de saturation, etc. Les filtres sont généralement utilisés pour ajuster le rendu d'une image, d'un arrière-plan ou des bordures.
VOICI QUELQUES PROPRIÉTÉ FILTER:
filter:blur();
filter:contrast:()
filter:grayscale()
filter:hue-rotate()
filter:drop-shadow()
    NB:vous devez définir la propriété soit en pixel ;en pourcentage en Rem etc. 
    DEMO:
    

CONCLUSION: cette propriété nous permettra d'obtenir des effets flou d'ajouté des contraste sûr nos plages.