teleren/devto huggingface dataset:
Dominando a função WITH: Criando Consultas Temporárias no SQL
Tags: datascience, sql, beginners, tutorial
Published: 2023-09-15 13:15:00

Olá a todos! Hoje, vamos mergulhar em um recurso extremamente útil em SQL - a instrução WITH, também conhecida como Common Table Expression (CTE).

**1. Introdução à Instrução WITH**

A instrução WITH nos permite definir uma tabela temporária no início de uma consulta que podemos usar em seguida. Isso é especialmente útil quando estamos trabalhando com consultas complexas, pois podemos dividir a consulta em partes menores e mais compreensíveis.

Uma CTE é como uma visão temporária, que só existe durante a execução da consulta. Veja um exemplo simples:

```
WITH CTE_AutoresMaisVendidos AS (
  SELECT Autor, COUNT(*) as NumeroDeVendas
  FROM Vendas
  GROUP BY Autor
)
SELECT * FROM CTE_AutoresMaisVendidos;
```

Nesse exemplo, a CTE_AutoresMaisVendidos é uma tabela temporária que contém cada autor e o número de vendas. Em seguida, fazemos uma consulta SELECT simples nessa tabela temporária.

**2. Exemplos de Uso**

Agora, vamos ver como a instrução WITH pode ser usada para simplificar consultas complexas. Imagine que temos uma consulta onde queremos encontrar o autor mais vendido e o livro mais vendido:

```
WITH CTE_AutoresMaisVendidos AS (
  SELECT Autor, COUNT(*) as NumeroDeVendas
  FROM Vendas
  GROUP BY Autor
),
CTE_LivrosMaisVendidos AS (
  SELECT Livro, COUNT(*) as NumeroDeVendas
  FROM Vendas
  GROUP BY Livro
)
SELECT TOP 1 Autor FROM CTE_AutoresMaisVendidos ORDER BY NumeroDeVendas DESC,
SELECT TOP 1 Livro FROM CTE_LivrosMaisVendidos ORDER BY NumeroDeVendas DESC;
```

Dividir a consulta em duas CTEs torna o código mais fácil de entender e manter.

**3. WITH e Recursão**

Um recurso avançado da instrução WITH é a capacidade de usar a recursão. Com a recursão, podemos executar uma consulta repetidamente, usando o resultado da iteração anterior. Isso é útil, por exemplo, para navegar por hierarquias de dados.

Por causa de sua complexidade, não vamos nos aprofundar na recursão aqui. Mas saiba que a instrução WITH permite que você crie consultas potentes e eficientes ao lidar com situações complexas.

Dominar a instrução WITH é uma habilidade valiosa para qualquer desenvolvedor SQL. Continue praticando e experimentando, e logo você estará criando consultas mais claras, eficientes e poderosas. Boa codificação!
King of wicker Crown Basket
Tags: basket, wicker, baskets, daisylife
Published: 2023-09-15 13:13:11

King of wicker Crown Basket
King of Wicker.
Natural wicker round basket for coffee tables, display and gift hampers

Includes : 1 'King of wicker' basket
Material: 100% natural wicker, no color
Care: Water and heat resistant. Wash and dry in sun or brush them to clean.
Comes in 6 sizes:
Smaller- 22 * 22 * 9 cm
Small- 30 * 30 * 9 cm
Medium- 39 * 39 * 12 cm
Big- 46 * 46 * 13 cm
Bigger- 50 * 50 * 11 cm

🎁 Gift Hampers with a Personal Touch: Create unforgettable gift experiences with our natural wicker baskets. Whether you're curating a spa-themed pampering package, assembling a gourmet foodie's dream, or presenting a thoughtful housewarming gift, our King of Wicker basket provides the perfect foundation for your creativity. Its spacious interior can hold an array of treasures, making your gift truly special.

🏡 Versatile Decor Piece: Beyond coffee tables and gifting, this wicker round basket is a versatile decor item that effortlessly blends with various interior styles. Use it as an eye-catching storage solution, a plant holder, or even as a picnic basket for a touch of outdoor charm indoors.

🌱 Sustainable and Durable: We take pride in our commitment to sustainability. The King of Wicker basket is not only visually appealing but also built to last. Its durable construction ensures that you can enjoy its natural beauty for years to come, making it an eco-conscious choice for your home.

Transform your living spaces and gift-giving occasions with the timeless beauty and versatility of the "King of Wicker" Natural Round Basket. Experience the warmth and charm of natural wicker in every detail, enhancing your home decor and creating memorable moments that will be cherished for a lifetime. Choose the King of Wicker, and reign supreme in style and sophistication.

[Shop Now](https://www.daisylife.in/products/daisylife-natural-wicker-basket)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6trgklaj34d0asi6107.png)
Exploring the Horizon: Future Trends and Developments in Apache Age
Tags: apacheage, agedb
Published: 2023-09-15 13:08:51

Apache Age has already established itself as a powerful distributed graph database, but the world of technology is ever-evolving. In this blog post, we'll take a peek into the future and explore some of the potential trends and developments we can anticipate in Apache Age. These insights can help you stay ahead of the curve and make informed decisions as you leverage this cutting-edge graph database.

## The Evolving Landscape of Graph Databases
**1. Graph Machine Learning Integration:**
Expect tighter integration with graph machine learning libraries and frameworks. Apache Age is likely to offer more out-of-the-box support for graph-based machine learning tasks.
**2. Performance Enhancements:**
Continued optimization for performance, especially for complex graph traversals and queries. Expect Apache Age to become even more efficient in handling large-scale graphs.
**3. Standardization of Query Languages:**
Closer alignment with standard graph query languages like GraphQL. This could simplify query development and integration with other tools and frameworks.

## Scalability and Distribution
**1. Advanced Sharding Strategies:**
Further development of sharding strategies to allow for more fine-grained control over data distribution. This can lead to better load balancing and improved query performance.
**2. Cloud-Native Support:**
Enhanced support for cloud-native deployments, making it easier to deploy and manage Apache Age in cloud environments like AWS, Azure, and Google Cloud.

## Security and Compliance
**1. Enhanced Security Features:**
Apache Age is likely to introduce more robust security features, including advanced authentication methods, encryption options, and compliance tooling to facilitate GDPR and other data privacy regulations.
**2. Data Auditing and Monitoring:**
Improved auditing and monitoring capabilities to help organizations track and manage access to sensitive graph data.

## Ecosystem and Community Growth
**1. Community Expansion:**
As Apache Age gains popularity, its open-source community is expected to grow. This means more contributors, more plugins, and a richer ecosystem.
**2. Integration with Other Data Technologies:**
Expect tighter integration with other data technologies, such as Apache Kafka, Apache Spark, and more, to facilitate data pipelines and analytics workflows.

Apache Age is on a trajectory of continuous growth and improvement, with an eye toward addressing evolving industry demands. As it moves forward, you can anticipate enhanced performance, advanced security features, and a broader ecosystem. By staying informed about these future trends and developments, you'll be well-prepared to leverage Apache Age's evolving capabilities to build even more powerful and efficient graph-based applications in the years to come.
Accelerating Stable Diffusion with Optimum Neuron and AWS Inferentia2
Tags: stablediffusion, aws, hardware, opensource
Published: 2023-10-09 12:44:16

---
title: Accelerating Stable Diffusion with Optimum Neuron and AWS Inferentia2
published: true
date: 2023-09-15 12:56:04 UTC
tags: stablediffusion,aws,hardware,opensource
canonical_url: https://julsimon.medium.com/accelerating-stable-diffusion-with-optimum-neuron-and-aws-inferentia2-1a689a2e6af9
---

In this video, I show you how to accelerate Stable Diffusion and Stable Diffusion XL inference with the Hugging Face Optimum Neuron library and AWS Inferentia 2. A few lines of code is all it takes, and of course, we run some benchmarks.

{% youtube -YFVlu5bqsg %}
Simplify Redux State Management with createSlice()
Published: 2023-09-15 12:55:14

This is a sneak peek into Redux State Management in Web Development. Take a dive and find what you may seem helpful to you.

Are you tired of writing tons of boilerplate code for your Redux actions and reducers? Say hello to the `createSlice()` function! 🚀

Redux is an excellent state management library, but it often comes with a fair share of code that needs to be written to handle actions and reducers. The good news is that Redux Toolkit provides us with a powerful tool called `createSlice()`, which makes managing your Redux state a breeze.

### What is `createSlice()`?

`createSlice()` is a function that accepts an initial state, an object full of reducer functions, and a "slice name." It automatically generates action creators and action types that correspond to the reducers and state. Let's dive into how it works.

```javascript
const sliceName = createSlice({
  name: 'ui',
  initialState: [],
  reducers: {
    nameOfSliceReducerAction(state, action) {
      // Your reducer logic goes here
    }
  }
})
```

In the example above, we create a slice named 'ui' with an initial state of an empty array and a reducer function called `nameOfSliceReducerAction`. 

### Redux Without Mutation

One of the core principles of Redux is that the state is not mutated. Instead, a new state object is returned with each action. `createSlice()` takes care of this for you by generating actions and payloads automatically.

```javascript
const uiActions = sliceName.actions;
```

With `uiActions`, you can access the generated action creators.

### Setting Up the Store

In your `./store/index.js` file, create your Redux store and configure it with your slice reducer.

```javascript
import { configureStore } from '@reduxjs/toolkit';

export const store = configureStore({
  reducer: { ui: sliceName.reducer }
});
```

The `configureStore` function can accept either a single reducer or a map of reducers.

### Integrating Redux into Your App

Now, it's time to integrate Redux into your application. Import the store in your `main.js` or `index.js` file to provide it to the entire application.

```javascript
import { store } from './store/index';
```

### Dispatching Actions

In your components, you can easily dispatch actions using the `useDispatch` hook provided by `react-redux`.

```javascript
import { useDispatch } from 'react-redux';

const dispatch = useDispatch();

// Dispatch an action
dispatch(uiActions.nameOfSliceReducerAction(payload));
```

### Accessing Redux Data

To access data from Redux, use the `useSelector` hook.

```javascript
import { useSelector } from 'react-redux';

const data = useSelector((state) => state.ui.dataInInitialState);
```

The `useSelector` hook receives a function that returns the current state value you want to access.

With `createSlice()`, managing your Redux state becomes a breeze. Say goodbye to tedious boilerplate code and enjoy a more efficient and streamlined development process. Happy coding! 🚀🌟

#Redux #StateManagement #React #WebDevelopment
Will Bun replace Node.js? First try with NestJS
Tags: node, javascript, typescript, frontend
Published: 2023-09-15 12:43:50

Many people recently talked about Bun, so we decided to try it.

[Bun](https://bun.sh/) is a fast JavaScript all-in-one toolkit that helps to develop, test, run, and bundle JavaScript & TypeScript projects. It claims to be really fast in terms of runtime and development. So it should not only make the app faster but speed up the development process too. Take a look at their [video presentation on YouTube](https://www.youtube.com/watch?v=BsnCpESUEqM&pp=ygUGYnVuIGFp).

Our idea was to run our [Brocoders Nest.js Boilerplate](https://github.com/brocoders/nestjs-boilerplate) on Bun and see how it performs. The test was made on MacBook Pro 2GHz, 16Gb memory:

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

So we tried to install dependencies with npm install and bun. The difference is pretty decent: 32s npm and 5s bun.

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

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

But then we tried to run it, there was an error appeared on the screen:

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

The problem is connected with emitDecoratorMetadata feature that is not supported by Bun yet. There is an issue with it on Github: https://github.com/nestjs/nest/issues/12359#issuecomment-1712712949
So, finally, I would say that Bun is really a perspective thing, but so far, it seems it's not ready for production yet. But we will definitely watch this repository and come back to it later.
dba_extents size_mb
Tags: uyumsoft
Published: 2023-09-15 12:40:45

```
with da as (
 SELECT owner, segment_name, SUM(bytes)/1024/1024 size_mb
   FROM dba_extents
   group by rollup(owner, segment_name)
) select owner, segment_name, size_mb, round(size_mb/total_mb*100)
  from da 
    cross join (
      select size_mb as total_mb 
      from da t where owner is null and segment_name is null
    )
order by size_mb desc
```
Effortless Data Import and Export with Apache Age: A Practical Guide
Tags: apacheage, agedb
Published: 2023-09-15 12:22:20

Data import and export are essential tasks when working with a graph database like Apache Age. These processes enable you to load data into your graph database and retrieve information for various purposes, from data backups to analytical insights. In this blog post, we'll walk you through the steps of importing and exporting data in Apache Age, providing practical guidance and insights.

## Data Import in Apache Age
**1. Data Preparation:**
Before importing data into Apache Age, you must prepare your data. Common data formats for preparation include CSV, JSON, or other structured formats. Make sure your data aligns with the schema you've defined for your graph.

**2. Choose the Import Method:**
Apache Age offers several methods for data import:

**Using SQL:** Apache Age extends SQL to support graph data. You can use SQL INSERT statements to add data to your graph. This allows you to insert nodes and edges directly using SQL queries.

**Bulk Loading:** For larger datasets, consider using bulk loading tools like pg_bulkload to significantly improve import performance.

**3. Importing Data:**
If you choose SQL, execute SQL INSERT statements to create nodes and edges, gradually populating your graph.
Bulk loading tools are more efficient for loading extensive datasets into your Apache Age graph.

## Data Export in Apache Age
**1. Data Selection:**
Before exporting data, determine what data you want to export. You can select specific nodes, edges, or entire subgraphs based on your requirements.

**2. Choose the Export Format:**
Apache Age supports various export formats, including CSV and JSON. Select the format that best suits your needs.

**3. Custom Export Scripts:**
Depending on your specific export requirements, you may need to develop custom scripts or applications to transform and export data in the desired format.

## Best Practices for Data Import and Export
**Data Validation:** Ensure your data is clean and adheres to your schema before importing. Invalid or inconsistent data can lead to issues in your graph.

**Backup Before Import:** Always back up your existing data before performing any import operations, especially when importing large datasets that could overwrite existing data.

**Monitor Performance:** Keep an eye on import and export processes, particularly when dealing with large datasets. Monitor resource usage and optimize your methods if necessary.

**Error Handling:** Implement error-handling mechanisms to address issues that may arise during import or export, such as handling duplicate data, missing values, or format inconsistencies.

Data import and export are fundamental operations when managing a graph database with Apache Age. Whether you're loading new data into your graph or extracting insights from it, mastering these processes is crucial for leveraging Apache Age's capabilities in your graph-based applications. By following the steps and best practices outlined in this guide, you'll be well-prepared to handle data import and export efficiently and effectively in your Apache Age projects.
Education Loan to Study UK
Published: 2023-09-15 12:03:36

Your Bridge to UK Education! Dreaming of studying in the UK? Let financial constraints no longer be a barrier. WeCare Capital offers tailored [education loan to study UK](https://wecarecapital.in/uk/), ensuring your UK academic aspirations come true. With competitive interest rates, flexible repayment options, and a hassle-free application process, we prioritize your education goals. Trust WeCare, and step confidently into world-class UK institutions. Your dream, our commitment. Let's make it happen together
Comunicação além das técnicas
Tags: braziliandevs, devrel, communication, diversity
Published: 2023-09-15 11:44:29

Ao invés de "bem vindo", use "boas vindas". No lugar de desenvolvedor, use "pessoa desenvolvedora". Não fale apenas "eles", fale "as pessoas". Para não falar "como vocês podem ver", descreva o que está mostrando. Quando for usar algum termo técnico da sua área ou em outro idioma, considere explicar dependendo das pessoas que estiverem acompanhando sua fala.

Existem coisas que parecem apenas detalhes, mas que podem fazer toda a diferença na sua comunicação. Além de técnicas para melhorarmos a nossa habilidade de expressar ideias, seja em relação à postura, à respiração, à entonação, entre outras, também é importante melhorarmos nosso conteúdo.

Pratique e tente ser uma pessoa que faz com que as outras sintam-se parte do seu discurso, da sua apresentação, do conteúdo que você cria, da sua reunião no trabalho, da aula que você dá etc.

O que você faz para melhorar sua comunicação no seu dia-a-dia?
LEW Course
Tags: news
Published: 2023-09-15 11:41:47

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

We offer various services ranging from, EMA licence and renewal, electrical testing and commissioning, LEW preparation course, etc. Visit our services for more info.RES Engineering Services is setup in April 2014.

The Director in RES Engineering Services has more than 13 years of experience in the Electrical Engineering Field. Other than providing LEW Licensing Services, he also provides consultancy and training serivces to various industries. RES Engineering Services is a BizSafe Certified company with diverse clients in the commercial and industrial sectors.
Bun: A new JavaScript runtime for the modern era
Tags: bunjs, javascript, node, programming
Published: 2023-09-15 11:39:36

Bun is a new JavaScript runtime built from scratch to serve the modern JavaScript ecosystem. It is designed to be fast, lightweight, and easy to use. Bun provides a minimal set of highly-optimizable APIs for performing common tasks, like starting an HTTP server and writing files. It also includes a complete toolkit for building JavaScript apps, including a package manager, test runner, and bundler.

Bun is still under development, but it has already been used to build some popular projects, such as Next.js and SvelteKit. It is a promising new tool for JavaScript developers, and I am interested to see how it develops in the future.

Here are some of the key benefits of using Bun:

- Speed: Bun is significantly faster than Node.js. This is because Bun is built on top of the JavaScriptCore engine, which is the same engine that powers Safari. Bun also uses a number of optimizations to make it even faster.
- Lightweight: Bun is much lighter weight than Node.js. This means that Bun can be used in resource-constrained environments, such as serverless functions.
- Ease of use: Bun is designed to be easy to use. It has a simple and intuitive API, and it comes with a number of tools to help developers get started quickly.
- Complete toolkit: Bun includes a complete toolkit for building JavaScript apps, including a package manager, test runner, and bundler. This means that developers can use Bun to build their entire app from start to finish.

If you are looking for a fast, lightweight, and easy-to-use JavaScript runtime, then Bun is worth considering. It is still under development, but it has a lot of potential.

Here are some specific use cases where Bun may be a good fit:

- Building high-performance server-side applications: Bun is ideal for building high-performance server-side applications because it is so fast and lightweight.
- Developing serverless functions: Bun is a good choice for developing serverless functions because it is lightweight and easy to use.
- Building modern web applications: Bun can be used to build modern web applications, such as Next.js and SvelteKit.

If you are interested in trying Bun, you can install it from the Bun website. There are also a number of tutorials and resources available to help you get started.
Feature Components just Released! 🎉
Tags: news, tailwindcss, html, react
Published: 2023-09-15 11:37:50

Need a way to present essential information? ℹ️

Introducing our New Accessible Feature Component, featuring 12 different variations! 

[https://wind-ui.com/components/features/](https://wind-ui.com/components/features/)

Copy, Paste & Enjoy! 💚
Tales of a Release Gone WRONG!
Tags: webdev, coding
Published: 2023-09-15 11:35:00

We had a rough release, where Stripe upgraded their webhook version and we found out during the release. So were against a clock to make sure the system was ready within the next few hours.

I'm sure we all have stories like this one. Join the discussion and let us know what your experience is!

https://youtu.be/KIbKcvAXHmI

{% youtube https://youtu.be/KIbKcvAXHmI %}