teleren/devto huggingface dataset:
I told ChatGPT to tell me a visual horror story. This is what I got.
Tags: chatgpt, ai, storytime, horrorstories
Published: 2023-03-25 13:42:37

I've been seeing a lot of online articles and posts that show how chatGPT is being used to create articles, college homework's and how it would eventually replace our jobs, so it got me wondering, can ChatGPT also create visual horror stories? Seeing that at the time of writing this article horror stories are in short supply because halloween is still a long way, I've asked chatgpt to tell me a short horror story with ASCII art as pictures. Here's how it went.

**_ME: Can you tell me a short horror story with matching ascii art as pictures in it?_**


![ChatGPT Story Panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jlxw3z8eco0e7o4ezxmi.png)

> The ascii image was cut-off here. Idk why.

![ChatGPT Art](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9hwvbpzfln7ibovthkm.png)


![ChatGPT panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mon41r8wrhzq1szlvzfk.png)


![ChatGPT panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o60zxw5etyjvc4802xka.png)


![ChatGPT panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14m1tureteurby48kqhm.png)


![ChatGPT art](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qr8id74exha9tg2xqfs8.png)


![ChatGPT panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6zqsmhppisfn3c4735n6.png)


![ChatGPT Art](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/luv976pxrjgmcussu80q.png)

Well that was it. I think the art was not scary enough so I requested the AI to make it more scarier. Here's what I got in return:


![ChatGPT Art](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2r7kcn58rp1oxe8oku8j.png)


![ChatGPT Art](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dct29di0kaq5l5e6ffhn.png)

Overall I think it was really impressive. While currently I would not say that ChatGPT would replace any horror writers anytime soon, it definitely has way better horror story writing skills than me (or any type of writing for that manner).
how to deploy react project with warnings on netlify.
Tags: netlify, webdev, react, javascript
Published: 2023-03-25 13:40:02

i was deploying my react page on netlify when I got this error "Build failed due to a user error: Build script returned non-zero exit code: 2"

I saw some warnings related to variable dependencies not being in the useEffect but I didn't want to solve it, so I tried finding a new solution.

and then I saw this:

```bash
12:39:50 AM: Treating warnings as errors because process.env.CI = true.
12:39:50 AM: Most CI servers set it automatically.
```

I thought maybe setting this CI variable to false would solve my problem, and it did so here's the solution for you, if you are suffering from the same.

* first step is to find deploy settings in your netlify app.
    
    
![netlify deploy settings auto publishing demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr9kajuvkbnykdfolvnh.png)


    
* just find deploy settings and scroll down to the environment variables section which looks like this:
    
    
![netlify environment variables key ci](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhxtp56dhc8iutd1qdw0.png)


    
* add the new variable CI with the value 'false'.
    
* deploy your site again and the error will be solved.
    
   
![netlify site is live](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0d0aj1czdutsht0kher5.png)
12- Map Printing with PyQGIS
Tags: programming, python, pyqgis
Published: 2023-03-25 12:05:59

--- series: A beginner's guide to using Python with QGIS ---
![Layout.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1623514088236/0S5bBpoF3.png align="left")

Learn how to easily print maps using PyQGIS with this step-by-step guide. PyQGIS is a Python library that provides access to QGIS API, allowing you to automate tasks and create custom plugins. In this tutorial, we'll use QgsLayoutExporter() class to export layouts as images, PDFs, and SVGs. Whether you're a GIS professional or a Python developer, you'll find this tutorial helpful to enhance your mapping skills.

We use the ***QgsLayoutExporter()*** class to export a layout that we opened:

```python
manager = QgsProject.instance().layoutManager()
print(manager.printLayouts())
  
layout = manager.layoutByName("Layout1")
```

We use the QgsLayoutExporter() class to export to image, SVG, and PDF:

```python
exporter = QgsLayoutExporter(layout)
```

Export to PNG image:

```python
exporter.exportToImage("D:/Python_QGIS/Layout1.png", QgsLayoutExporter.ImageExportSettings())
```

![Layout1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1623514728268/nte6Udvfo.png align="left")

Export to PDF:

```python
exporter.exportToPdf("D:/Python_QGIS/Layout1.pdf", QgsLayoutExporter.PdfExportSettings())
```

Export to SVG image:

```python
exporter.exportToSvg("D:/Python_QGIS/Layout1.svg", QgsLayoutExporter.SvgExportSettings())
```

Use a for loop to export the layout:

```python
for layout in manager.printLayouts():
    exporter = QgsLayoutExporter(layout)
    exporter.exportToImage("D:/Python_QGIS/Image2.png".format(layout.name()),
        QgsLayoutExporter.ImageExportSettings())
```

In conclusion, this tutorial provides a step-by-step guide on how to easily print maps using PyQGIS. It explains how to use QgsLayoutExporter() class to export layouts as images, PDFs, and SVGs. By following this tutorial, GIS professionals and Python developers can enhance their mapping skills and automate tasks. Overall, this tutorial is a helpful resource for anyone looking to improve their knowledge of map printing with PyQGIS.

> If you like the content, please [SUBSCRIBE](https://www.youtube.com/channel/UCpbWlHEqBSnJb6i4UemXQpA?sub_confirmation=1) to my channel for the future content
View In MySQL
Tags: mysql, view, beginners, programming
Published: 2023-03-25 11:57:04

A view is a virtual table that is based on the result of a `SELECT` statement. Views are used to simplify complex queries by providing a way to create a logical representation of the data in a database. Once a view is created, it can be used like any other table in the database.

To create a view in MySQL, you can use the `CREATE VIEW` statement. Here's the basic syntax:

```
CREATE VIEW view_name AS
SELECT column1, column2, ...
FROM table_name
WHERE condition;
```

Here, `view_name `is the name you want to give to your view, `table_name` is the name of the table you want to base your view on, and `column1`, `column2`, etc. are the columns you want to include in your view. You can also include a `WHERE` clause to filter the data that's included in your view.

For example, let's say you have a table called `customers` with columns `id`, `name`, and `email`. You could create a view that includes only the `id` and `name` columns like this:

```
CREATE VIEW customer_names AS
SELECT id, name
FROM customers;
```

Once you've created a view, you can use it in your queries just like you would any other table. For example, you could run a query to select all the `customers` from the `customer_names` view like this:

```
SELECT * FROM customer_names;
```

This would return a result set with just the `id` and `name` columns from the `customers` table.
The most effective strategy for pursuing a career in technology
Tags: webdev, javascript, programming, beginners
Published: 2023-03-25 11:56:22

Transitioning to a job in technology has grown in popularity in the current digital era. There are countless chances for people interested in a career in technology thanks to the expansion of the tech sector. But making the switch to technology can be difficult, particularly for individuals without prior experience. We'll talk about how to make the best transition to technology in this article.

1. Identify your interest and goals

Finding your interests and goals is the first step in making the switch to technology. There are numerous routes one might take in the huge realm of technology. Programming, web development, data science, cybersecurity, and other tech-related fields are just a few examples. It's crucial to investigate the available possibilities and decide which one best suits your interests and abilities.

2. Learn the basics

The next stage is to educate yourself on the fundamentals after choosing your area of interest. This can be accomplished through enrolling in bootcamps, workshops, or even online courses. Before delving further into your field of interest, it is crucial to have a firm grasp of the fundamentals.

3. Build a portfolio

A portfolio is a great approach to demonstrate prospective employers your abilities and work. Projects, code samples, and even a personal website might be included in a portfolio. Employers want to know what you're capable of, and showing off your abilities in a portfolio can assist.

4. Network

When making the switch to technology, networking is essential. Meet individuals in the sector by going to meetings, conferences, and hackathons. You never know who you'll run into, and making friends can lead to mentorship and job prospects.

5. Apply for internships or entry-level jobs

Applying for internships or entry-level positions is one of the finest methods to acquire real-world IT experience. These chances can give you practical experience and aid in skill development. During this stage, it's crucial to be open to learning and accepting of new difficulties.

6. Continuously learn and upskill

Keeping up with the most recent trends and tools is crucial because technology is continuously improving. In the IT sector, it's crucial to keep learning and upgrading. To stay informed, go to conferences, take online courses, and read trade journals.

To sum up, making the switch to technology calls for a well-thought-out plan and commitment. Identifying your interests and goals is crucial, as are learning the fundamentals, creating a portfolio, networking, applying for internships or entry-level positions, and upskilling and learning new things constantly. Making the switch to technology may be a successful and enjoyable career move with the appropriate strategy and mindset.
Indexing In MySQL
Tags: mysql, indexing, beginners, programming
Published: 2023-03-25 11:46:51

Indexing in MySQL is a technique used to optimize the database performance by creating a data structure that provides `fast access to the rows in a table`. An index is essentially a data structure that is used to `speed up` the retrieval of data from a table. It works by creating a separate structure that contains a subset of the data in the table, along with pointers to the corresponding rows in the table.

An index is similar to an index in a `book or a library`. It helps you find the data you need more quickly by providing a map to the data. Without an `index`, MySQL would have to search through every row in a table to find the data you need, which can be a `time-consuming and resource-intensive process`.

To create an index in MySQL, you can use the `CREATE INDEX statement`. For example, let's say we have a table called `employees` with columns for `id`, `name`, and `department`. We can create an index on the `name` column using the following SQL statement:

```
CREATE INDEX idx_name ON employees (name);

```

This statement creates an index called `idx_name` on the `name` column of the `employees` table. The index will contain a subset of the data in the `name` column, along with pointers to the corresponding rows in the table.

Once the index is created, MySQL will use it to speed up queries that involve the `name` column. For example, if we want to find all employees with the name `John`, we can use the following SQL statement:

```
SELECT * FROM employees WHERE name = 'John';

```

It's important to note that while indexing can greatly improve the performance of your database, it can also have some downsides. Indexes take up space on disk and in memory, so creating too many indexes can have a negative impact on performance. Additionally, indexes need to be updated every time the table they're associated with is updated, which can also impact performance.

In conclusion, indexing in MySQL is a powerful technique that can greatly improve the performance of your database. By creating an index on a column or set of columns, you can speed up queries and reduce the amount of time it takes to retrieve data from your tables. However, it's important to use indexes judiciously and be mindful of their impact on performance.
Can I use Apache AGE to handle both graph and relational data in a single query?
Tags: apacheage, graphdatabase, postgres, database
Published: 2023-03-25 11:05:53

There is no way to handle both graph and relational data at the same time in a single query in Apache AGE. If you have a graph with nodes representing customers and orders, and you have a relational database containing customer and order details. In that case, you need to convert your relational database containing customer and order details to nodes representing customers and orders.

**Solution for this Scenario**
You can import and save your relational data in csv file and then you can convert it to nodes and edges as follow:

Nodes
First create a vertex label for the node.
`SELECT create_vlabel('agload_test_graph','Country');`

Then load data from csv file to the nodes. One node will be created for each tuple (row) and that's node label will be `Country`.
`SELECT load_labels_from_file('agload_test_graph',
                             'Country',
                             'age_load/countries.csv');`

Edges
First create an edge label for the edges.
`SELECT create_elabel('agload_test_graph','has_city');`

Then load data from csv file to the edges.This csv file will contain the relationship between nodes.
`SELECT load_edges_from_file('agload_test_graph', 'has_city',
     'age_load/edges.csv');`

Apache AGE provides you facility to do Hybrid Query (Cypher + SQL) to get data (nodes and edges) from the Graph Database. It does not mean you can get data from Relational and Graph databases at the same time in single query.

For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
Maximizing the Value of Your Machine Learning Projects with the TOGAF Framework
Tags: architecture, machinelearning, design
Published: 2023-03-25 11:00:55

## Intro:

**TOGAF** (The Open Group Architecture Framework) comprehensive approach for designing, planning, implementing, and managing an enterprise information technology architecture. **CRISP** (**Cr**oss **I**ndustry **S**tandard **P**rocess for Data Mining) is a standard process used for developing machine learning models. It is a cyclical process that involves four phases: 

1. Inspiration / Problem Identification

2. EDA and Data Engineering

3. Feature Engineering & ML Models

4. Operationalise 

The blog is exploring the key themes to overlay TOGAF framework and ensure the Architecture engagement to implement machine learning implementation

##Integrating the CRISP Cycle with TOGAF:

**_Inspiration / Problem Identification_**

- Validate Alignment to strategic business drivers
- Capture the Business process involved
- Define the Business KPI that needs to measure model performance
- Evaluate the current process and capture any change in business process to improve the data capture
- Evaluate the re-usability with other processes 

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

**_EDA and Data Engineering_**
_Data Sourcing_:
- Identify the system of record for the data in scope
- Identify industry relevant sources for data pertaining to business domain
- Data security consideration (Privacy and reuse) 

_Data Engineering_ 
- Design the data engineering Strategy (Frequency of refresh, Feature engineering and reusability, Data profiling and Data cleansing)
- Data Quality 

_EDA_
- Detect outliers and anomalies and understand the business context
- Validate the hypothesis of the business case

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

**_Feature Engineering & ML Models_**

- Cost Vs Performance consideration 
- Build vs Buy decision 
- Dependencies cost and benefit of model options
- Selection of technology stack 
- ML Ops
- Evaluation of parameters
- Explainable AI and Model Transparency 
- Framework to evaluate the model continuously


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

**_Operationalise_**

- Define the Service level agreement on ML usage
- Define the NFR’s of serving API’s
- Model version management and change management strategy


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




By integrating the CRISP cycle into the overall enterprise architecture process using the TOGAF framework, organizations can ensure that their machine learning models are developed and deployed in a consistent and effective manner that aligns with the overall goals and objectives of the enterprise.
Simplify Your Package Management with OneLinePackages
Tags: webdev, javascript, npm, devs
Published: 2023-03-25 10:57:04

OneLinePackages is a convenient and user-friendly website that offers a simple solution to retrieve all of your installed packages from the NPM registry API. With just one line of code, users can quickly and easily access a list of all their installed packages, making it easy to manage and keep track of dependencies. The website is designed to streamline the process of retrieving package information, providing developers with a hassle-free experience. Whether you are a seasoned developer or just starting out, OneLinePackages is a valuable tool for simplifying the management of your packages.

{% embed https://youtu.be/c3Gs8jOq17c %}

https://www.onelinepackages.xyz/
Select All graphs from Apache Age
Tags: apacheage, graphdatabase, database, postgres
Published: 2023-03-25 10:55:10

We can select all graphs present in our PostgreSQL Database by executing a simple query.

If you have already set the search path by using:

`SET search_path = ag_catalog, "$user", public;`

You can select all graphs in the Database by using:

`SELECT * FROM ag_graph;`

Otherwise, if you have not set the search path. You can select all graphs in the Database by using:

`SELECT * FROM ag_catalog.ag_graph;`

It's output will look like this:

>       name      |   namespace
> ----------------+----------------
>  graph          | graph
>  staff_details  | staff_details
>  visual         | visual
>  community_test | community_test
> (4 rows)

This is how we get names of all the graphs that exist in our PostgreSQL database.

For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
A world without OSS
Tags: discuss
Published: 2023-03-25 10:49:24

Imagine a world where Open-Source Software did not exist. Where every developer was as protective of their Intellectual Property Rights as companies are of their IPR. Where would we be today?

Would our industry be better respected or would it have died? Might developers be better paid or seen as an abusive scourge on society? In such a world, society might have stagnated from a lack of innovation. 

Imagine, no free apps for your phone. No free development tools to learn your trade. We might be better off because we leave our computers and phones at work and actually engage with friends and family directly, like we used to many years ago.

Who knows, I certainly don't. I find it an interesting question nonetheless, and I am interested in what others have to say on the topic.
Lazy Loading & Eager Loading
Tags: lazyeagerloading, laravel, beginners, programming
Published: 2023-03-25 10:45:11

In Laravel, `lazy` loading and `eager` loading are two techniques for fetching related data from a database. Understanding the differences between these two techniques can help developers `optimize` their application's `performance` and prevent unnecessary database queries.

**Eager Loading**
        Eager loading is a technique that allows developers to load related data along with the main model. It is best used when a developer knows that they will need to access the related data and wants to minimize the number of database queries needed. `Eager` loading is achieved using the `with` method in Laravel.

For example, suppose we have a `Post` model that has many `Comments` and we want to display all posts and their comments on a page. Without eager loading, we would need to perform a separate database query for each post to retrieve its comments. With eager loading, we can use the `with` method to load all comments along with the posts in a `single query`:

```
$posts = Post::with('comments')->get();

```

**Lazy Loading**
       Lazy loading, on the other hand, is a technique that delays the loading of related data until it is actually needed. It is best used when a developer is unsure whether they will need to access the related data and wants to minimize the initial database queries. In Laravel, lazy loading is achieved using `lazy relationships` or by accessing the related data through a `magic` property on the model.

The n+1 problem occurs in lazy loading when you load related data in a loop. For example, if you have a view that displays a list of Users and the number of Posts each User has.

For example, suppose we have a `User` model that has many `Posts` and we want to display all users and their posts on a page. With lazy loading, we would retrieve all users first, and then use lazy loading to retrieve each user's posts only when they are needed:

```
$users = User::all();

foreach ($users as $user) {
    foreach ($user->posts as $post) {
        // do something with the post
    }
}

```
In this example, lazy loading is used to retrieve each user's posts only when they are needed, which minimizes the number of initial database queries.

To solve the n+1 problem, you can use eager loading instead of lazy loading. You can modify your query to fetch all the related Posts at once.