teleren/devto huggingface dataset:
How to Collaborate with an Experienced Book Writing Company
Tags: book, marketing, publishing
Published: 2023-09-22 22:00:11

Both aspiring authors and seasoned authors might find working with a [book writing company](https://bookwritinggenie.com/) to be an interesting and gratifying experience. In this blog article, we'll dig into the complexities of working with a book writing firm to realise your creative ambitions and examine the fascinating world of ghostwriters for hire.
Learn the crucial stages to selecting the ideal ghostwriter, regardless of whether you want to create a novel, biography, self-help book, or any other type of creative work. We'll provide helpful advice on how to handle the collaboration process skillfully so that your distinct voice and vision are maintained throughout the writing process.
We'll provide you useful pointers and suggestions to help you successfully collaborate with your chosen writing service, from determining the scope and objectives of your assignment to developing a positive working relationship. This article will arm you with the knowledge required to start a fruitful collaboration with a book writing service, whether you're new to the field of ghostwriting or an established author looking for professional help.
My problem about telling others to blindly read source code
Published: 2023-09-22 22:00:00


“You should read the famous repo’s source code. Just read them, you will grow” I keep hitting this suggestion lately and it’s bothering me.

My problem with this suggestion is without any goal in mind, blindly reading source code won’t help and will even cause harm. You need to have a goal in mind to make the magic work. Like “Hey, I want to learn about how to get the header using remark”. For this question, I found out Astro.js has an `Astro.glob` function, the returns have a getHeadings function. How about I dig inside this function to see how it works?

Another example. Recently, I needed to implement an Auth-Guard middleware, I immediately remembered that Auth0 provided a similar function. So I go to their repo to see how it can help me to implement my middleware and it is indeed very helpful.

To me, the better version of this suggestion would be “When you encounter services that have good quality and open-source, list it down but read their source code when you need them”.
A Python script to see my most watched YouTube videos
Tags: python, youtube
Published: 2023-09-22 21:33:12

I use YouTube Music and I was wondering which songs I've listened to the most. You can't find that information in the YouTube Music app. But luckily, Google keeps a complete history at Google Takeout. So I can get the list of my most played songs. Here are the steps to do that.

## 1. Download YouTube Music takeout data

Go to [https://takeout.google.com/settings/takeout](https://takeout.google.com/settings/takeout) and deselect all takeouts.

![Deselect all the takeouts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dw7wbfjt6qeqrkqly556.png)

## 2. Select YouTube and configure the export

![YouTube takeout](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9oqyexa5tvfgonfiduj.png)

## 3. Deselect all YouTube content options

![Deselect all YouTube content options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vmq9t16tv0zeqzs6ylv0.png)

## 4. Select just "history" content option

![Select just "history" content option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7gtswjstzkzy4um0kbb.png)

## 5. Export JSON, not HTML

![Export JSON, not HTML](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rv0zyws8kskhfa6zmbcj.png)

## 6. Create the export

After this step, you will be emailed a link with a zip file that has your history.

![Create the export](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7iffulah16d9dn0mxiv.png)

## 7. Unzip the file

If you're on a Mac, that's just double-clicking the zip file.

## 8. Place the Python code next to watch-history.json

In the new folder that was unzipped, you'll find `watch-history.json` inside a few folders. In my case the path was `Downloads/YouTube and YouTube Music/history/watch-history.json` so I developed the script at `Downloads/YouTube and YouTube Music/history/top_yt.py`

## Python code

Paste the following into `top_yt.py`:

```py
import json
from collections import Counter
from pprint import pprint

watched = Counter()
for item in json.load(open('watch-history.json')):
    if "titleUrl" not in item:
        # Watched a video that has been removed
        continue
    title = item["title"]
    url = item["titleUrl"]
    key = f"{title} @> {url}"
    watched[key] += 1

pprint(watched.most_common(20))
```

## Running the code, seeing the result

```py
$ python3 top_yt.py
[('Watched Here Comes The Sun (Remastered 2009) @> '
  'https://www.youtube.com/watch?v=xUNqsfFUwhY',
  334),
 ('Watched Guess Who Is Back @> https://www.youtube.com/watch?v=OZrh6U4CyCw',
  65),
 ('Watched The Rumbling (TV Size) @> '
  'https://www.youtube.com/watch?v=KHCIO7a3jSI',
  61),
 ('Watched ətˈæk 0N tάɪtn @> https://www.youtube.com/watch?v=zroFzv7sFis', 61),
 ('Watched Omokage (produced by Vaundy) @> '
  'https://www.youtube.com/watch?v=jg-uSq64Ru8',
  48),
...
```

For me, the top result wasn't a song I liked too much, but it was my alarm clock for almost a year. Of these songs, I recommend you check out this one: [Omokage by milet, Aimer, Lilas Ikuta, Vaundy](https://www.youtube.com/watch?v=jg-uSq64Ru8)

I hope you find this script useful. Cheers.
Amit Sheen a CSS Wizard
Tags: css
Published: 2023-09-22 21:12:26

In right hands CSS is really a wonderfull tools for artists...
Look at this video [3D CSS - lighting, animations, and more!](https://www.youtube.com/watch?v=NdftnCDwKaU)


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

You can play with the first part here [CSS 3D](https://flems.io/#0=N4IgtglgJlA2CmIBcAmAHAOjQGhAZ3gQGMAXeKZEDIvPEXPIgJwHtZZkBtABmwEYAbAF1cAMwgI6STqAB2AQzCIkVABYkwHXERayyeygB1ZxgDxQIANwAERWPNoBeQ-iLxZ8FwD5j16+atbeycXUVgWFiZvUwB6C0sfWT8AmzsHPGcQIgBXACNPEGs8EgBPBEzc+SIAawBzVmzZKCQSJnlZPAAHeSZ3Em9fP394oPTM0VY9aLirRKHhwLSQkEqa6fi5oZTR5YRRfpAvWI3B5JGljJcmCFr1ddnThdTgy5ASFk77hMfti4r5dh4VTyKAsADuX02Z0WLwqLBI7zAkMGxweSSeO1elXYyJMslRCRAAF9sHJFMoqAArOjaXT6EiUYmkkAKJSUai0ehZOl9ShIVjw6zAQYAWhFuRYAA8AMJsSJIawAYm4ADEVQB2ADcopFrBI8jIAGVOvByAqAMzcPDa2RE4zGABUSFk8IAFEh4GBOqUAJRCwatdp4USRMAi4pleAKzq9AhMSzwEXmqA2u144wSqAlf3o1Z1BpNEU6cJMJDK7jcG1+SCyEWqeA3dQKvgVyyqKvWCxdewlJBheCSjsAm61iBkMB4JBuPTwJgdynZYoQUQlIs8vRTvqzjshvThiAALyjAE5uJ1B4MTUwuvBSFYo9YW56O1eb3eEyLIjcILIFQBWbgAFJbABIhXQA4CRWsFBPR9TVrGMNN7VkDBGHceAcz8ToWDwMcIF0BVensEh7w7QMOhDJgwwjBAkBjeA4w-ZMh1kCAwANfDf2s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9a4SPMTE6j4FGe2Qn4b+XVlFcgIMQZGUgQAtjQFw4kIgWTkkoAAQUgCQawhp6zuGsAAEU9CwYkQA)
Do online friends meet in real life?
Published: 2023-09-22 11:35:23

OnlyFans offers a platform for individuals to connect with content creators and establish relationships based on shared interests. Recently, OnlyFans login has gained popularity as a platform where people can share exclusive content and engage with their fanbase. To create an account on OnlyFans, you can visit their website and click on the "OnlyFans / Registration" button. You will be prompted to provide your email address, create a username, and set a password. After completing the registration process, you can log in to your OnlyFans account using the credentials you provided during sign-up. It's important to prioritize the protection of your personal information by avoiding the sharing of sensitive details like your home address or financial information. When considering in-person meetings, exercise caution by choosing public venues, informing someone about your whereabouts, and, if possible, having a friend accompany you [find more info](https://onlyfans.onlinefundate.com/).
WhatsApp Logo/Icon Using HTML & CSS Code
Published: 2023-06-06 06:18:29

Welcome to the CodeWithRandom blog. In This Article, We learn how to create a **[WhatsApp Logo](https://www.codewithrandom.com/2023/02/12/whatsapp-logo-using-only-html-css-whatsapp-logo-code/)**. We use HTML & CSS Code for Creating WhatsApp Logo.

Hope you enjoy our blog so let's start with a basic HTML structure for the WhatsApp Logo.

## Html Code For WhatsApp Logo
```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> 
    <title>WhatsApp Logo</title>
    <link rel="stylesheet" href="style1.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
</head>
<body>
  <div class="white">
      <div>
        <i class="fas fa-phone"></i>
      </div>
    </div>
</body>
</html>
```
There is all the HTML Code for the WhatsApp Logo. Now, you can see output without CSS. Then we write CSS Code for the WhatsApp Logo.

## CSS Code For WhatsApp Logo
```
body{
    margin: 0;
    padding: 0;
    background: lightblue;
}
div{
    width: 70px;
    height: 70px;
    border-radius: 35px;
    background: #3AC371;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
}
.white{
    width: 80px;
    height: 80px;
    border-radius: 40px;
    background-color: #fff;
    box-shadow: 2px 2px 3px 2px rgba(0,0,0,.3);
}
.white::before{
    content: "";
    top: 65px;
    left: -15px;
    border-width: 20px;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
    position: absolute;
    transform: rotate(-50deg) rotateX(-55deg);
}
.white::after{
    content: "";
    top: 63px;
    left: -4px;
    border-width: 15px;
    border-style: solid;
    border-color: transparent #3AC371 transparent transparent;
    position: absolute;
    transform: rotate(-51deg) rotateX(-50deg);
}
.fas{
    left: 17px;
    top: 18px;
    position: absolute;
    font-size: 35px;
    color: #fff;
    transform: rotate(90deg);
}
```
We have completed our CSS Code Section For WhatsApp Logo.  Here is our final updated output with HTML And  CSS Code.

We have completed our CSS Code Section.  Here is our updated output with HTML & CSS. Hope you like the WhatsApp Logo, you can see the output project screenshots. See our other blogs and gain knowledge in front-end development.

Thank you

This post teaches us to create a **[WhatsApp Logo](https://www.codewithrandom.com/2023/02/12/whatsapp-logo-using-only-html-css-whatsapp-logo-code/)** using simple HTML & CSS. If we made a mistake or any confusion, please drop a comment to reply or help you in easy learning.

Written by - Code With Random/Anki

code by - Md Aman
Case Sensitivity with `localeCompare` in JavaScript
Tags: i18n, react, sort, javascript
Published: 2023-09-22 20:03:19

I recently ran into a bug using code like the following:

```js
someArray.sort((a, b) => a.name.localeCompare(b.name))
```

At a glance this seems fine—`localCompare` enjoys fantastic browser support, and as the name suggests, it isn’t English-centric. However, this is still the web we’re building for, and the familiar gotcha of inconsistent behavior amongst browsers is lurking here. This can lead to hard-to-debug inconsistencies and bugs.

Most browsers—including Chrome, Edge, and Firefox—and Node treat `localeCompare` as case-insensitive by default, treating an uppercase “A” as the same as a lowercase “a”. Safari, however, does something different.

Safari uses a variant of case-sensitive sorting, but not in the usual ASCII order where “Z” sorts above “a”. Instead Safari sorts lowercase letters above their uppercase companions, but in alphabetical order otherwise, like “aAbBcC”. In many cases this is fine—sorting based on the user’s locale is not only acceptable, it’s preferable. But as you may suspect given the title, **that’s not always true**.

In scenarios where data is expected to match the order from a server, such as when sorting properties before hashing for verification or as a checksum, or when hydrating server-side rendered React, this behavior becomes troublesome. In these cases, consistent behavior across environments is critical to prevent bugs. Thankfully, this can be achieved by specifying a few additional options to `localeCompare`:

```js
a.name.localeCompare(b.name, "en", { sensitivity: "base" })
```

First, we’re specifying an expected locale. This ensures the items are compared in the same locale server-side and client-side. In a localized app, this value can be localized as well, just be sure to use the same value in both environments.

The second change, adding `sensitivity: "base"`, tells browsers to use the _base_ character (think lowercase) for comparison (MDN), effectively making the comparison case-insensitive. This results in consistent sorting behavior across Node and all common browsers (including IE11). 🎉
🎬 Video - Hello World! tutorial on CodeBehind framework
Tags: tutorial, beginners, programming, csharp
Published: 2023-09-22 20:01:42

Elanat framework created a channel on YouTube.

YouTube channel link:
[https://www.youtube.com/@elanatframework](https://www.youtube.com/@elanatframework)

In this video, we have taught how to create Hello World using the CodeBehind framework.

The audio on the video is the English text read by google translate and allows you to access a quality subtitle in all languages of the world.

Note: The size of the video is very small; watch in 1080 quality (more than 6 minutes in only 50 MB).

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

CodeBehind in NuGet:
[https://www.nuget.org/packages/CodeBehind](https://www.nuget.org/packages/CodeBehind)

CodeBehind repository link:
[https://github.com/elanatframework/Code_behind](https://github.com/elanatframework/Code_behind)

CodeBehind page in Elanat website:
[https://elanat.net/page_content/code_behind](https://elanat.net/page_content/code_behind)
A Recap of My Coding Bootcamp Experience
Published: 2023-09-22 19:54:23

When I decided to embark on a coding journey, I knew it wouldn't be easy. With no prior coding experience, I was essentially starting from scratch. That's when I stumbled upon the world of coding bootcamps—a fast-track way to become a developer in a matter of months. Little did I know just how transformative this experience would be.

###The Pre-Bootcamp Days

Before enrolling at Flatirons Software Engineering bootcamp, I was finishing a degree in computer animation. While finishing my degree I realized that my motion sickness was triggered by  working on animation sequences, so I decided to pivot my focus slightly. My motivation to learn coding was clear: I wanted a career change and the promise of a fulfilling, in-demand profession in the tech industry, that also fits in the world of game design.


###The Challenges

Coding bootcamps are not for the faint of heart. There were moments of frustration, late-night debugging sessions, and days when I felt overwhelmed by the sheer amount of information I had to absorb. Impostor syndrome crept in occasionally, making me doubt my abilities. But with the support of my fellow students and the guidance of our instructors, I persevered.


###The Bootcamp Community

The sense of community within the bootcamp was invaluable. My peers and I supported each other through the ups and downs. We collaborated on projects, shared resources, and celebrated each other's achievements. The instructors were not just educators but mentors who provided guidance and encouragement.
SQL 50–1683. Invalid Tweets
Tags: mysql, sql, interviewquestions, leetcode
Published: 2023-09-22 19:16:31

It’s an [easy](https://leetcode.com/problems/invalid-tweets/) problem from [SQL 50](https://leetcode.com/studyplan/top-sql-50/) with the description being:

```
Table: Tweets

+----------------+---------+
| Column Name    | Type    |
+----------------+---------+
| tweet_id       | int     |
| content        | varchar |
+----------------+---------+
tweet_id is the primary key (column with unique values) for this table.
This table contains all the tweets in a social media app.
Write a solution to find the IDs of the invalid tweets. The tweet is invalid if the number of characters used in the content of the tweet is strictly greater than 15.

Return the result table in any order.

The result format is in the following example.

Example 1:

Input: 
Tweets table:
+----------+----------------------------------+
| tweet_id | content                          |
+----------+----------------------------------+
| 1        | Vote for Biden                   |
| 2        | Let us make America great again! |
+----------+----------------------------------+
Output: 
+----------+
| tweet_id |
+----------+
| 2        |
+----------+
Explanation: 
Tweet 1 has length = 14. It is a valid tweet.
Tweet 2 has length = 32. It is an invalid tweet.
```

The solution is simple and straight forward, you will get the tweet_id column where content is greater than 15 with any order.

This can be done using LENGTH or CHAR_LENGTH, both would work and the performance is very similar. Those two functions basically return the size of the content and with that you can check the length and return the invalid ones.

```mysql
SELECT tweet_id FROM Tweets WHERE LENGTH(content) > 15;
```

> Runtime: 1114 ms, faster than 89.65% of MySQL online submissions for Invalid Tweets.
> Memory Usage: 0B, less than 100.00% of MySQL online submissions for Invalid Tweets.

```mysql
SELECT tweet_id FROM Tweets WHERE CHAR_LENGTH(content) > 15;
```

> Runtime: 1160 ms, faster than 84.01% of MySQL online submissions for Invalid Tweets.
> Memory Usage: 0B, less than 100.00% of MySQL online submissions for Invalid Tweets.

---

That’s it!

If there is anything thing else to discuss feel free to drop a comment, if I missed anything let me know so I can update accordingly.

Until next post! :)
Add Class To Body If JavaScript Is Enabled
Tags: webdev, javascript, beginners, tutorial
Published: 2023-09-22 19:05:41

This snippet is super small but is super handy. It detects to see if JavaScript is enabled on the users browser. If yes, a class will be added to the <body> tag

```
$('body').addClass('yourClassName');
```

Adds the class yourClassName to <body> tag if Javascript is enabled.

```
<body class="yourClassName">
```
Check Out DEV Lead Software Engineer Ridhwana Khan’s talk at Rocky Mountain Ruby!
Tags: ruby, meta, conference, techtalks
Published: 2023-09-22 19:03:44

Hey DEV Community! We are excited to share an upcoming conference talk by our Lead Software Engineer Ridhwana Khan 🤩🎉. If you weren't able to catch her caching talk at [Rubyday 2023](https://2023.rubyday.it/), check it out at [Rocky Mountain Ruby](https://rockymtnruby.dev/)!

@ridhwana will be talking about the **caching strategies we use on dev.to** – YES! this very site :wink:

[Rocky Mountain Ruby](https://rockymtnruby.dev/) is a Ruby-focused conference held on October 5th & 6th 2023 in Boulder, Colorado, USA.

> We’ve always put a lot of effort into performance at DEV. We want our users to be able to see their content almost instantaneously when interacting with our site.

> In order to do so we’ve placed emphasis on caching. We’ve had to ask ourselves questions like: what are the right things to cache? Which layer in the stack would be best to cache it? And how will this affect the overall performance?

> During this presentation, I’d like to show you some of the caching strategies we have in place and discuss how they’ve sped up the interactions within our site.

We are **so proud** of Ridhwana and so excited for her talk! If you're attending Rocky Mountain Ruby (or happen to be local to Boulder, Colorado), definitely check it out!

{% embed https://rockymtnruby.dev/talks/caching-strategies-on-https-dev-to/ %}
<Title>
Tags: beginners
Published: 2023-09-22 19:00:08

Hello All,

It's nice to be part of this great community! My name is Rich, and I'm currently enrolled in a Full-Stack Web Development Bootcamp.

As a child, I've always wanted to be part of something..bigger, but never knew what that would be. Anyhow, who knew a little bit of sans-serif would spark my interest in developing projects that could be seen by anyone in the world!

I'll update you all -

To be continued . . .

Best,
Rich
1337(ish)
Building multiarch images with Buildah
Published: 2023-09-24 21:09:55

---
title: Building multiarch images with Buildah
published: true
date: 2023-09-22 19:00:00 UTC
tags: 
canonical_url: https://ozor.es/en/post/building-multiarch-images-buildah/
---

With the growth and popularization of platforms beyond amd64, especially the ARM platform, it becomes a concern for those maintaining container images to build them tailored for these platforms as well.

In this article, I will show you how to build these images using [Buildah](https://buildah.io/).

Buildah is an open-source project led by RedHat (but receives contributions from other companies) that aims to simplify the construction of container images that adhere to and are compatible with the [OCI (Open Container Initiative)](https://opencontainers.org/) standard.

So let’s get to the steps.

## Prerequisites

- Installation of the Buildah package
- Installation of the `qemu-user-static` package (Ubuntu/RedHat) or `qemu-arch-extra` package (Arch Linux);

`sudo dnf install -y buildah qemu-user-static` (Fedora and derivatives)

`sudo apt-get install -y buildah qemu-user-static` (Ubuntu/Debian and derivatives)

`pacman -Sy buildah qemu-arch-extra` (Arch Linux and derivatives)

## Building the images

The workflow you need to follow to build the images is as follows:

1. Create the manifest

```
export MANIFEST="multiarch-image" # manifest name, can be any name
export IMAGE="registry/repository/image:tag" # image name, e.g., docker.io/ozorest/example:latest
buildah manifest create "$MANIFEST"

```

1. Run the build for each architecture

In the directory with your Dockerfile, you can run the following loop for each architecture:

```
for arch in amd64 arm64; do
 buildah build --arch $arch --tag "$IMAGE" --manifest "$MANIFEST" .
 # buildah build --arch $arch --tag "$IMAGE" --manifest "$MANIFEST" -f path_to_Dockerfile, in case the Dockerfile is not in the current directory
done

```

1. Push the manifest to the registry

```
buildah manifest push --all "$MANIFEST" "docker://$IMAGE"

```

And that’s it, folks! Stay tuned for more content!