teleren/devto huggingface dataset:
The Journey of an Artificial Intelligence Recommending Taylor Swift's Songs
Tags: tensorflow, python, taylorswift, node
Published: 2023-08-07 22:16:21

It's not exactly a thunderous revelation that in recent times we've all been practically run over by a name resonating like a musical tsunami: Taylor Swift. And I'll be honest, my obsession with her lyrical ability is so obvious that it would be easier to hide it in a packed stadium from The Eras than to search for all the hidden Easter eggs in "Look What You Made Me Do." It's as if she has a song ready for every micro-moment in life, whether you're in the dumps or at the peak of a wild party.

So, I got to thinking... could we create a kind of electronic guru, an artificial intelligence, that selects the perfect Taylor Swift soundtrack according to your current mood? And thus was born Dorothea AI, my modern version of a musical advisor, but with a healthy dose of technological cuteness. To train this beauty, I fed her with 233 songs, leaving aside the original versions and focusing solely on the editions stamped with the "taylor’s versions" seal (after all, we don't listen to stolen versions).

All of this wouldn't have been possible without the magic of TensorFlow and the hands-on approach of Python, which were the secret ingredients of the recipe. Now, if you want to take a peek at the result of this slightly crazy experiment, just click [here](https://whatsmytaylorswiftsong.vercel.app).

Oh, and of course, if you're the curious type who likes to tinker with gears, the entire process is neatly stored in [this digital vault](https://github.com/thethiago27/dorothea_ia). Who knows, maybe you'll be inspired to create the next AI that chooses songs based on the weather? The sky's the limit, my friend!
Day 799 : Healer
Tags: hiphop, code, coding, lifelongdev
Published: 2023-08-07 22:11:05

_liner notes_:
- Saturday : Feels like everything was trying to prevent from doing the radio show. My van wouldn't start. Jump started it and took the battery store where I bought the battery. I must have carried a 70 pound battery back and forth like 5 times in 100 degree heat. So my back got super sore. Not sure what happened, but after all that, I came back home with the same battery I originally bought. Awesome. Then I had to head to the station. Got to the station in time. I set up my equipment and then I turned on my recorder and... it turned off and wouldn't turn on. I searched the internet and seems like it's a thing that happens. Never happened to me before, but of course it would happen this day. Luckily, I had the other recorder (same model, but the knobs got loose) in the van and got that as a substitute. After all that, still had a good time on the radio show. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a van's battery hooked up with wires with the words Aug 5th 2023 Corrupt or Stupid](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eojh3zuauuonukcd8pnt.jpg)

- Sunday : So far, the van has started every time since Saturday. I did my study sessions (https://untilit.works) and got quite a bit done considering being in pain. Ended the night watching the new "Bleach" episode and catching up on "Zom 100". 

- Professional : Today woke up to a bunch of messages from co-workers and community members. Went through those. Had a meeting where I updated some folks from engineering on updates I've been making and things I've found. Spent the rest of the day updating some docs.

- Personal : Pretty much the details page is done. I created the layout and got the data from the back end to be displayed. There's one feature I need to add that will check to see if the session had be started yet so that I can update the UI to allow people to enter. There's some stuff I need to implement on the back to make that work. It's coming together and I'm learning a lot.

![Aerial view of the green mountains off the coast of Big Sur, CA, USA with a little white beach next to the ocean. ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reomn6thtop0jdxv24i8.jpg)

It is so HOT! Which is probably not making my back feel any better. The plan is the same as usual. Eat dinner, go through tracks for the radio show, work on side project, maybe watch an anime and go to sleep. Most of that, I'll probably do laying down. Definitely need a healer. haha

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube n25vseUQdK8 %}
How to use React Query and How to fix minor issues from that?
Tags: react, reactquery, beginners, javascript
Published: 2023-08-07 20:36:21

# 

Hi Devs,

Today, I want to share my knowledge about an alternative way to fetch data and render it on pages using React Query. I used Redux before to manage states and fetch data but it requires too much code, which can be ridiculous. In contrast, React Query is an excellent alternative that I fell in love with immediately even though I am still learning it.

Let me explain why you should use React Query and how to fix minor issues with it.

**Why use React Query?**

Caching and retrying are easier!

When you use `useEffect` to fetch data, you declare error, loading, and data using `useState.` However, this is not reusable and makes your code too long. You may consider declaring it as a global state, but this approach seems a bit dubious and messy.

React Query can resolve all these issues, including handling cache and retrying.

**What is caching, by the way?**
In computing, a cache is a high-speed data storage layer that stores a subset of data, typically transient in nature. This allows future requests for that data to be served up faster than accessing the data's primary storage location. Caching enables you to efficiently reuse previously retrieved or computed data.

**How can we cache data in React Query?**
TanStack Query has excellent documentation that explains everything a newcomer needs to know. What a wonderful library!

Check this link out if you want to deep dive into it and I highly recommend you to read.

https://tanstack.com/query/v4/docs/react/guides/important-defaults

By default, React Query saves data as a stale status, requiring a fresh data check. However, by setting up a `staleTime` we can define how long it will contain data as a fresh status.

Let's check with actual code.

```jsx
const {
    isLoading,
    error,
    data: products,
  } = useQuery(
    ['products', checked],
    async () => {
      console.log('...fetching products')
      return fetch(`data/${checked ? 'sale_' : ''}products.json`).then((res) =>
        res.json()
      )
    },
    {
      staleTime: 1000 * 60 * 5, //5 mins
    }
  )

```

In this code sample, the staleTime is set as a third parameter when fetching data, which saves the data as defined.

By installing the dev tool provided by React Query, you can check the data status and which data is updated. This makes it easy to manage bugs and debug errors, and prevents unnecessary network requests.

While I have briefly covered React Query today, I plan to explore it more in-depth and cover other related topics as well.


Thank you for taking the time to read this, and happy coding! 😎
Choose a startup vs established company
Tags: career, discuss
Published: 2023-08-07 20:32:15

I know somebody who has to choose between a startup or established company and they would be new to the role at that level. The worry is the mentoring might not be available and the startup could chew them up. This person is not afraid to hit the ground running however.

What can this person do to work out what is stable and what is not stable.
ChatGPT Prompt Engineering for Developers
Tags: 100daystooffload, llm, course, chatgpt
Published: 2023-08-07 20:27:58

I have recently finished the [ChatGPT Prompt Engineering for Developers](https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/) a course made by [DeepLearning.AI](https://www.deeplearning.ai/).

This is one of their short courses that they offer for free.

The course has nine lessons where each lesson has a video about 10 minutes and a supplementary Jupyter notebook (Python) to aid the learning of the current topic. It's a great starting course if you want to know more about this topic.

The lessons are:

### 1. Introduction

Introduces the course and is led by experts Isa Fulford and Andrew Ng. The course will explore instruction-tuned LLMs.

### 2. Guidelines

Goes through two key principles of prompting. Key principles are *clear instructions* and *giving the model time to think*. Each principle has some tactics that involve delimiters, structured outputs, checking conditions, and few-shot prompting.

There is also a section about hallucinations and how to reduce them.

### 3. Iterative

Walks us through the iterative prompt development process.

![Iterative prompt development](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3met9q3b4155b2hic5lv.png)

### 4. Summarizing

This lesson demonstrates how to use ChatGPT for text summarization. It covers summarizing reviews, modifying prompts for specific purposes, and extracting information. Also, it shows a workflow to summarize multiple reviews efficiently for better insights.

### 5. Inferring

Shows how to inferring with ChatGPT, where the model analyzes text to extract information like sentiment, topics, and emotions from reviews as an example.

### 6. Transforming

Here we explores the capabilities transforming text. Demonstrations of translation between languages, conversion of tones and formats, proofreading for grammar and spelling errors, and generating compelling and formatted content using various prompts.

### 7. Expanding

This lesson is the contrary to the *Summarizing* lesson. *Expanding* involves generating longer text from shorter prompts. It showcases personalized email generation, leveraging sentiment analysis and customization.

It also introduces the parameter *temperature* of LLMs to control response variety.

### 8. Chatbot

Walks through how to build a custom chatbot. The "OrderBot" example demonstrates building a conversational pizza order assistant.

Shows that customization and persona-building are possible by adjusting system messages and how to work with context.

### 9. Conclusion

A summary of the complete course.
Google's Innovative Approach to Lure Employees Back to Office: A Paid Stay at the Company's Hotel
Tags: remote, job
Published: 2023-08-07 20:15:26

**A Unique Solution to a Post-Pandemic Challenge**

In the wake of the pandemic, companies worldwide have been grappling with the challenge of bringing employees back to the office. Google, known for its innovative approaches, has come up with a unique solution: offering its employees a paid stay at the company's hotel.

**The "Summer Special" Offer**

Google has announced a "Summer Special" offer, allowing full-time employees to book a room at an on-campus hotel in Mountain View for $99 a night. The special is set to run through September 30, with the company hoping it will facilitate the transition of Google employees to a hybrid workplace. However, the cost of these stays will not be reimbursed by the company, and employees will be required to use their personal credit cards.

**The Perks and the Pitfalls**

The company highlights several benefits of this arrangement. Employees can avoid the morning commute, have an extra hour of sleep, grab a quick breakfast, or work out before work starts. After work, they can enjoy a quiet evening on the rooftop deck or participate in local activities.

However, the offer has sparked skepticism among some employees. The cost of $99 a night, which amounts to roughly $3,000 a month, has been a point of contention. While some employees appreciate the hotel amenities, others find the cost too high.

**The Bigger Picture: Google's Return-to-Office Plans**
This hotel strategy is part of Google's broader plan to bring employees back to the office. Last year, the company began bringing most employees back to physical offices three days a week. However, attendance has been sparse as workers cited high housing costs near offices and higher productivity while working remotely. In response, Google has implemented stricter measures, including using office attendance in performance reviews and tracking badge data.

**The Future of Work: A Balance Between Personal and Professional Life**

Google's hotel strategy is a bold move that reflects the company's commitment to maintaining a physical office culture. However, it also raises important questions about the future of work and the balance between personal and professional life. As the world continues to grapple with these issues, it will be interesting to see how such strategies play out and shape the workplaces of the future.
Effortless react forms with Material UI
Tags: react, form, reactform, jsonschema
Published: 2023-08-07 20:02:28

In this article, we would see how to create react forms effortlessly using Material UI and json.

We are going to create a registration form using [MuiForms](https://github.com/manojadams/mui-forms) react library.

## Install MuiForms

```
npm install mui-forms
```
## Define your schema
```
{
"fields": [{
        "name": "first_name",
        "meta": {
            "displayType": "text",
            "displayName": "First Name",
            "displayProps": {
                "md": 6,
                "sm": 6
            }
        }
    }, {
        "name": "last_name",
        "meta": {
            "displayType": "text",
            "displayName": "Last Name",
            "displayProps": {
                "md": 6,
                "sm": 6
            }
        }
    }, {
        "name": "email",
        "meta": {
            "displayType": "email",
            "displayName": "Emal"
        }
    }, {
        "name": "password",
        "meta": {
            "displayType": "password",
            "displayName": "Your password"
        }
    }]
}
```
Create a file with name schema.json (or any other name) and save it.

## Add to your app
```
import React from "react";
import MuiForms from "mui-forms";
import schema from "./schema.json";

function MyForm() {
  return (
   <MuiForms 
      schema={schema} 
      onSubmit={(formData) => {
        // handle form submission
      }}
    />
  )
}
```

##  Registration form is ready
{% codesandbox https://codesandbox.io/embed/registration-form-mui-forms-mvnycy?fontsize=14&hidenavigation=1&theme=dark %}

### Reference:

[Registration form link](https://mui-forms.vercel.app/examples/registration-form)

[Github source](https://github.com/manojadams/mui-forms)
Raku Blog Posts 2023.32
Tags: programming, rakulang, summary
Published: 2023-08-07 19:31:11

- [UTF-8 Glyphs and Graphemes](https://dev.to/bbkr/utf-8-glyphs-and-graphemes-331b)
- [Fun with UTF-8: browsing code points namespace](https://dev.to/bbkr/fun-with-utf-8-browsing-code-points-namespace-4bgm)
- [UTF-8 code point properties](https://dev.to/bbkr/utf-8-code-point-properties-mf6)

*Paweł bbkr Pabian* continued their blog series about Unicode, using Raku examples.

- [Migrating Perl to Raku](https://dev.to/lizmat/migrating-perl-to-raku-1c47)
- [Syntactic Changes (part 1 of 3)](https://dev.to/lizmat/syntactic-changes-between-perl-and-raku-part-1-of-3-m97)
- [Syntactic Changes (part 2 of 3)](https://dev.to/lizmat/syntactic-changes-between-perl-and-raku-part-2-of-3-2a8h)
- [Syntactic Changes (part 3 of 3)](https://dev.to/lizmat/syntactic-changes-between-perl-and-raku-part-3-of-3-458e)

*Elizabeth Mattijsen* started a series of blog posts about the differences between Perl and the Raku Programming Language.

- [Workflows with LLM functions](https://rakuforprediction.wordpress.com/2023/08/01/workflows-with-llm-functions/)
- [Number guessing games: PaLM vs ChatGPT](https://rakuforprediction.wordpress.com/2023/08/06/number-guessing-games-palm-vs-chatgpt/)

*Anton Antonov* continued writing blog posts about Large Language Models and the various AI services.

- [Parenthood](https://gfldex.wordpress.com/2023/08/06/parenthood/)

*Wenzel P.P. Peppmeyer* shows how subclassing a metamodel class will allow one to find out any child classes given a base class.

- [Rakudo Weekly News 2023.32](https://rakudoweekly.blog/2023/08/07/2023-32-rakudoc-gamma/)

*Elizabeth Mattijsen* reports on all recent developments around Rakudo, an implementation of the [Raku Programming Language](https://raku.org).
I have a library with 30000 code lines and I can't use them effectively in multi-project
Published: 2023-08-07 19:22:08

x.x that so bad, I can't find a effectually way to import them, some time I need a small section of code and I have import the whole assembly O __ O and that assembly depend on something else!!! Don't have time to look at them nether, I should focus on develop game!!!
The 53rd Day of the 100 Days of Code Challenge
Published: 2023-08-07 19:14:02

Hey everyone!

Today, I explored the Vocode library and langchain agents to see how I can incorporate it into the personal AI assistant I've made briefly before, the one that can make restaurant reservations over the phone. However, it couldn't actually make phone calls. Rather than make something new that would do it, I said "why not use Vocode?" as it already contains all the necessary building blocks and does everything in a quite sophisticated manner.

I then moved on to debugging the real-time transcription app I'll soon be finished with, as I'm planning on cutting down on dependencies. Hoping that it'll work!

That's it for today,
Happy coding everyone!
How to use openAI API
Published: 2023-08-07 18:54:30

```ruby

require "http"
require "json"

request_headers_hash = {
  "Authorization" => "Bearer #{ENV.fetch("OPENAI_API_KEY")}",
  "content-type" => "application/json"
}

request_body_hash = {
  "model" => "gpt-3.5-turbo",
  "messages" => [
    {
      "role" => "system",
      "content" => "You are Ruby programing expert"
    },
    {
      "role" => "user",
      "content" => "What are the steps for creating a dynamic web application"
    }
  ]
}

request_body_json = JSON.generate(request_body_hash)

raw_response = HTTP.headers(request_headers_hash).post(
  "https://api.openai.com/v1/chat/completions",
  :body => request_body_json
).to_s

parsed_response = JSON.parse(raw_response)

pp parsed_response

```
Twitter is X . but why ?
Tags: twitter, news, ios, website
Published: 2023-08-07 18:34:51



On July 23, 2023, Twitter changed its name to X following its acquisition by Elon Musk. The change was met with mixed reactions, with some users praising the new name and logo, while others criticized it as being too vague and uninformative.

There are a few reasons why Musk decided to change Twitter's name to X. First, he has a long-standing fondness for the letter X. He founded his first company, Zip2, with the X.com domain name, and he later merged X.com with Confinity to form PayPal. The X also appears in the names of several of Musk's other companies, such as SpaceX and Neuralink.

Second, Musk believes that the X name is more reflective of his vision for Twitter. He wants to transform Twitter into a "super app" that can be used for a variety of purposes, such as social networking, messaging, payments, and more. The X name is meant to convey this sense of potential and versatility.

Third, Musk may have also changed Twitter's name to X in order to distance the company from its past. Twitter has been criticized for its role in spreading misinformation and hate speech. Musk has said that he wants to make Twitter a more "free speech" platform, but he has also promised to crack down on harmful content. The X name is a clean slate for Twitter, and it allows Musk to start fresh with a new vision for the company.

In addition to the reasons mentioned above, there are a few other possible explanations for why Musk changed Twitter's name to X. For example, the X name may be seen as more futuristic and innovative than the Twitter name. It may also be easier to trademark and copyright the X name than the Twitter name.

Ultimately, only Musk knows for sure why he decided to change Twitter's name to X. However, the reasons mentioned above provide some possible explanations for his decision. It remains to be seen whether the X name will be successful for Twitter, but it is clear that Musk has big plans for the company.

Here are some additional details about the X rebrand:

* The new logo features a white X on a black background. The X is meant to represent the potential of Twitter to be a "super app" that can be used for a variety of purposes.
* The new tagline for Twitter is "The Everything App." This tagline reflects Musk's vision for Twitter as a platform that can be used for everything from social networking to payments.
* The X rebrand was met with mixed reactions from users. Some users praised the new name and logo, while others criticized it as being too vague and uninformative.
* It remains to be seen whether the X rebrand will be successful for Twitter. Only time will tell whether Musk's vision for Twitter will be realized.
Tokenização: Transformando Ativos e Recursos Digitais
Tags: web3, blockchain, token, cryptocurrency
Published: 2023-08-07 18:23:04


A essência da tokenização reside na capacidade de representar ativos tangíveis e intangíveis por meio de tokens, unidades digitais intrinsecamente vinculadas a uma blockchain ou plataforma de criptomoedas. Ao assim fazer, a tokenização transcende as fronteiras entre os mundos físico e virtual, capacitando ativos reais - sejam eles imóveis, obras de arte preciosas ou commodities valiosas - a serem digitalizados e acessíveis a uma audiência global.

Esse processo de tokenização é ancorado na tecnologia de contratos inteligentes, que habilita a criação de tokens padronizados, seguindo protocolos específicos, como o padrão ERC-20 na rede Ethereum.

A tokenização desvenda esse potencial ao fragmentar ativos anteriormente ilíquidos em frações negociáveis, democratizando o acesso e possibilitando a participação em mercados outrora restritos. Propriedades imobiliárias podem ser divididas em partes menores, permitindo que investidores de todos os tamanhos participem de oportunidades anteriormente inacessíveis.

A tokenização não conhece fronteiras geográficas, agindo como uma ponte digital entre continentes e culturas. Tokens podem ser criados, acessados e negociados por qualquer pessoa, em qualquer lugar, proporcionando uma conexão global que transcende limitações territoriais. Essa característica da tokenização amplia os horizontes de investidores, permitindo que uma pessoa em um canto remoto do mundo invista em ativos localizados em outra nação, tudo isso com apenas alguns cliques.

A verdadeira magia da tokenização reside na transparência e segurança que ela impõe. Cada transação é registrada de forma imutável na blockchain, criando um histórico transparente e audível. Não há espaço para manipulações ou discrepâncias ocultas, uma vez que todas as ações realizadas com tokens são gravadas em um formato imutável.

A tokenização também lança um desafio direto aos intermediários tradicionais. A capacidade de conduzir transações ponto a ponto elimina a necessidade de intermediários em algumas situações, reduzindo custos e aumentando a eficiência. Transferir a propriedade de tokens é ágil e eficaz, abrindo caminho para processos de transação que antes eram burocráticos e demorados.

Apesar de seus benefícios, a tokenização não está isenta de desafios. Questões regulatórias e conformidade legal representam preocupações significativas, especialmente ao tokenizar ativos financeiros. A evolução da adoção da tokenização está atrelada a uma análise contínua e cuidadosa das normas e regulamentações aplicáveis, garantindo sua integração harmoniosa na economia global.

A tokenização emerge como uma tecnologia promissora e impactante, revolucionando a maneira como interagimos com ativos e recursos. A revolução está em andamento, e a tokenização está na vanguarda, capacitando uma nova era de interações econômicas e comerciais.