teleren/devto huggingface dataset:
slay the state
Tags: gamedev, writing
Published: 2023-12-24 16:21:43

---
title: slay the state
published: true
date: 2023-12-07 00:00:00 UTC
tags: [ 'gamedev', 'writing' ]
canonical_url: https://onwriting.games/daily/20231207-220-slay-the-state/
---

_Slay the Princess_ takes **reacting to the state** very seriously.

Practically **every major action** you take has an impact on the story.

There are very subtle and interesting examples.

For instance, it's not the same to attack the princess as soon as you enter the room as it is to try attacking her after you've been talking with her.

The game reacts to the fact that you take the time to talk to her.

Unfortunately, the game only uses boolean variables (true / false) to define the state. (except at certain times when it considers how many times you 'revived', but it's not very relevant).

Despite this, it has so many other strong aspects that the fact we are just following one path or another doesn't come across as a disadvantage, but undoubtedly it is a structure that has been seen a lot.

Narratively, I think the greatest value of this game lies precisely in its reaction to your actions.

I believe there isn't a single action that doesn't generate some kind of reaction, whether it be at the level of the story, or with the Achievements.

If I had to choose one thing to recommend about this game to any writer, it would be this.

Players expect the game to react to their actions, the more dramatic the action, the more dramatic the reaction they expect.

We should never forget this, **let's avoid the frustration** of giving options that have no effect, please.
Quando muore un Pod
Published: 2024-03-21 13:33:19

---
title: Quando muore un Pod
published: true
date: 2023-12-07 00:00:00 UTC
tags: 
canonical_url: https://theredcode.it/kubernetes/quando-muore-un-pod/
---

Quando un **container fallisce** e un **Pod muore** , possono esserci diverse ragioni, e queste sono sempre descritte all’interno dei _termination messages_.

Questo tipo di dato è _fondamentale_ per comprendere quali siano gli eventi che hanno portato all’arresto dell’applicazione e quindi per permettere ai team di indagare sull’origine della causa.

Di default, questi messaggi risiedono nella cartella _/dev/termination-log_: questo vuol dire che, quando il Pod termina, il campo relativo al suo _status_ viene aggiornato con le informazioni che riguardano le cause di arresto, come mostrato di seguito.

Creando un Pod come il seguente, facciamo sì che il container attenda 30 secondi prima di stampare in output il messaggio “_Good_ _night_!”, riportandone il contenuto nel path di default:

```
apiVersion: v1
kind: Pod
metadata:
 name: demo
spec:
 containers:
 - name: demo
 image: centos
 command: ["/bin/sh"]
 args: ["-c", "sleep 30 && echo Good night! > /dev/termination-log"]

```

Questo messaggio è recuperabile sfruttando il campo _status_ del template del Pod, in questo modo: utilizzando il comando _kubectl get pod_ e recuperando l’output in formato yaml, dovremmo ottenere un risultato simile al seguente, dove il campo _status_ contiene al suo interno una serie di dettagli sullo stato dei container e della causa del loro arresto:

```
kubectl get pod demo --output=yaml

>>>
apiVersion: v1
kind: Pod
...
 lastState:
 terminated:
 containerID: ...
 exitCode: 0
 finishedAt: ...
 message: | #################
 Good night! ################
 ...

```

Si è già detto che Kubernetes recupera i messaggi di arresto dal file _/dev/termination-log_; qualora volessimo però specificare un path diverso, potremmo utilizzare il campo **terminateMessagePath** all’interno delle specifiche del container.

Kubernetes utilizzerà il contenuto del file specificato per popolare il messaggio di stato del container sia in caso di successo che di errore.

Il messaggio di terminazione deve essere un breve stato finale, ad esempio un messaggio di errore rispetto a dei test o delle asserzioni che controllano lo stato di integrità del pod; dev’essere breve perché <ins>kubelet tronca i messaggi più lunghi di 4096 byte.</ins>

Un’altra nota interessante è che **non** è possibile impostare il percorso del messaggio di terminazione **dopo l’avvio di un pod** : questo deve essere impostato prima del suo avvio, altrimenti verrà utilizzato quello di default.

```
apiVersion: v1
kind: Pod
metadata:
 name: demo
spec:
 containers:
 - name: demo
 image: centos
 terminationMessagePath: "/tmp/my-custom-log-file"

```

# Risorse utili

- [Documentazione ufficiale](https://kubernetes.io/docs/tasks/debug/debug-application/determine-reason-pod-failure/)
Why is Brainstory feedback powerful?
Published: 2023-12-07 17:01:53

---
title: Why is Brainstory feedback powerful?
published: true
date: 2023-12-07 00:00:00 UTC
tags: 
canonical_url: https://blog.brainstory.ai/brainstory-feedback/
---

## What does Share in Brainstory do?

Sharing in Brainstory allows others to give feedback on your Brainstory using the same “think smarter” philosophy. When you share with others, they’ll get an email invitation to your Brainstory with options:

- Extend this idea
- React to specific points
- Walk through point by point

## How is it different from sending someone a Google Doc or an email?

Brainstory will let someone freely talk about your idea, **without having to worry about synthesizing ideas together or covering all the required points**. Imagine the best parts of a water cooler conversation, with the deep thinking that comes with connecting over a meaningful idea.

## But wait! There’s moreee

You can also share with a group! Let _every individual contribute on equal footing at their own pace_. Meetings focus on who speaks the most and loudest. Brainstory helps everyone think better, equally.
GPT vs Brainstory: A Head-to-Head Comparison
Published: 2023-12-10 23:52:34

---
title: GPT vs Brainstory: A Head-to-Head Comparison
published: true
date: 2023-12-07 00:00:00 UTC
tags: 
canonical_url: https://blog.brainstory.ai/gpt-vs-brainstory/
---

> Why would I use Brainstory when I could just build the same thing in ChatGPT?

You can! Using Brainstory over ChatGPT is like buying furniture over building your own. Brainstory has a lot of built-in features that’s designed for a specific use— deep thinking and collaboration.

If you’re looking for something that’s more geared towards automating tasks, then you might want to build a solution or work with GPT instead of Brainstory.

## The Brainstory difference

![Comparison chart of ChatGPT vs Brainstory](https://blog.brainstory.ai/blogimages/brainstorygpt.png)

1. Brainstory’s [speaking interface](https://dev.to/contenda/why-does-brainstory-only-support-talking-56pp) helps you think smarter. Speaking your thoughts aloud allows for a more natural and unrestricted flow of ideas. ChatGPT has transcription only on mobile.

2. Brainstory’s [feedback feature](https://dev.to/contenda/why-is-brainstory-feedback-powerful-1lpo) gets everyone on the same page faster, by giving detailed context around what your collaborators are thinking. ChatGPT doesn’t have a sharing or collaboration feature.

3. Brainstory _does not do your work for you_. In the world of “automate everything”, this might feel counterintuitive, but the feeling of thinking smarter is unmatched. ChatGPT might give you answers, but Brainstory helps you come up with better answers on your own.
Add multiple remotes to a Git repository.
Tags: webdev, github, git, tutorial
Published: 2023-12-06 23:42:25

**As a programmer, one of the best things that has happened to me is Git! 
Git allows you to keep your code in sync with a remote repository that is shared with your team members.**


# Adding multiple remotes
When you run the command 'git init', you are creating a Git repository on your local machine. The purpose of this repository is to keep your code changes organized and ready to be synchronized with a remote Git repository. To sync your code changes with a remote repository, you need to specify the location of the remote repository.

**The first step is to add remote repos to your project.**

```
# Syntax to add a git remote
git remote add REMOTE-ID REMOTE-URL
```
 By convention, the original/primary remote repo is called the origin. Here’s a real example:

```
# Add remote 1: GitHub.
git remote add origin git@github.com:example/example1.git
# Add remote 2: BitBucket.
git remote add upstream git@bitbucket.org:example/example2.git
```
In the above example, we add the remote repository of a project. Use the above command to add one or more remote Git repos(using your project URL) – make sure that each repo has its Remote ID, i.e. **origin, upstream** in the above example.


# List all remotes
If you want to view a comprehensive list of all the remotes, you can do so by using the following command:

```
$git remote -v
origin	    git@github.com:jigarius/toggl2redmine.git (fetch)
origin	    git@github.com:jigarius/toggl2redmine.git (push)
upstream    git@bitbucket.org:jigarius/toggl2redmine.git (fetch)
upstream    git@bitbucket.org:jigarius/toggl2redmine.git (push)
```

# Remove a remote
If you no longer need a remote you added, you can remove it by following these steps:

```
# The syntax is: git remote remove REMOTE-ID
git remote remove upstream
```
_Note: **In my case, it's Upstream, but it will be your remote-id; it could be anything you specified such as origin, origin2, etc.**_

# Conclusion
Synchronizing code across multiple Git repositories and pushing it to multiple remotes is a straightforward process that can be quite useful when managing mirrors or copies of the same repository.
🎀 Domaine.nc data as Jupyter on Kaggle 📊
Tags: datascience, dataengineering, api, jupyter
Published: 2023-12-06 23:40:57

## ❔ About

Domaines names management is a crucial part of IT services, availability and can have a huge impact on: 

- 📝 Service Level Agreements
- 💰 Revenues (transaction, ads,...)
- 🌟 e-reputation

> ... and especially during the end-of-year period where a lot of transactions have to be handled on schedule.

With this short demo, you'll see how, thanks to a public API we can efficiently:

- 1️⃣ **Get data** all together at scale
- 2️⃣ **Explore data** in an unprecedented way
- 3️⃣ **Build efficient yet simple reports** to avoid domain name expiration **at scale**
- 4️⃣ **Export** data efficiently (and import them in third party tools)

👉 To achieve this, the storytelling will rely and explain how to use the following datascience stack:

- `csv` (becauase...of course❣️)
- [Duckdb](https://duckdb.org/) so we can make OLAP like queries on the data
- Jupyter Notebook on Kaggle
- [`tad`](https://duckdb.org/docs/archive/0.7.1/guides/data_viewers/tad.html) (A Tabular Data Viewer)
- [Seaborn](https://seaborn.pydata.org/)

## 🍿 Demo time

{% youtube F6ow49TpK60 %}

## 🔖 Resources

- [Kaggle Notebook](https://www.kaggle.com/adriensales/domaine-nc)

## 🔙 Talanoa 2022

{% embed https://youtu.be/Ef8E69UhZ3w?si=JRxFhcaWGvSR6pmp&t=5007 %}
PHP 8.3 [already] available on Platform.sh 😎
Tags: webdev, php, devops, tooling
Published: 2023-12-06 23:14:10

PHP developers everywhere are rejoicing in the release of a special gift this month — PHP 8.3. ✨

But the excitement doesn't stop there, after some testing, **PHP 8.3 now ready to use on all Platform.sh projects!** 🎉

Discover some of the [noteworthy features that PHP 8.3 has to offer](https://platform.sh/blog/php-8-3-now-available-on-platform-sh/?utm_source=social&utm_medium=organic-social&utm_campaign=platformsh-blog-2023) in our latest article and how to get straight to testing it our for yourself.

Happy deploying!✨
Day 848 : The Greatest
Tags: hiphop, code, coding, lifelongdev
Published: 2023-12-06 22:51:53

_liner notes_:
- Professional : Got up early to attend a talk prep session. Afterwards, I went back to sleep. Not sure what happended, but I couldn't wake back up till like an hour and a half from when I was supposed to start my day. Attended a couple of meetings. Closed out any old issues on a repo I maintain where there was a response to my message for over a month. Replied to a message about creating a change log for the Web Components. Worked on converting an older tutorial to use a new SDK. Not a bad day.

- Personal : Went through Bandcamp to check out some tracks for the radio show. Spent most of the night watching videos, reading docs and trying out an AI Image generator. It's not the greatest. You have to send a message to get access to an API. Not sure if I'll use it. By the time I knew it, it was late and I went to bed.


![A field in Yosemite Valley, CA, USA with tall yellow grass and trees with green leaves and large gray stone mountains in the distance with the sun shining between them.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8iur2i9j1wo1wgqtl9kj.jpg)

Going to try and do a repeat of last night except with less going down rabbit holes. Definitely want to get that demo working where I upload an image and this library creates a palette of colors I can use in my side project. That's it. Going to eat dinner.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube hd_7JX0eHP8 %}
Scrimba Course
Tags: javascript, html, css, webdev
Published: 2023-12-06 22:38:55

I have just finished Scrimba's course on HTML, CSS and JS, and I got to say, it is the most beautiful thing I have done in my life.

I am a beginner coder still in university, so my knowledge is very limited. I learn best through examples and hands-on work, so when I was looking for a course or tutorial to follow, it was difficult. I heard freecodecamp was good, so I gave it a go, and even though the content was nice, I just ended up forgetting everything, but Scimba was a different story.

The course basically holds your hand through the whole thing, and they teach you through actual examples and projects and make you do most of the coding, I found that even if I went away from the course for a few days and came back, I seemed to remember everything. Not to mention the projects were fun to make and show to my friends and family. My favourite project was the blackjack game which I improved on after finishing the tutorial. 

The course isn't only the best thing, the UI is genius as well. The UI is a video but it's also a coder editor, and its cool, anytime you want you can pause the video and edit the code to test things out, and when you resume the video the code reverts back to what it was. It also has an inbuilt console and a mini browser.

Overall, the Scrimba course was fantastic, I learnt so much and all the knowledge I gained was retained in my head. I am planning to do the React JS course on Scrimba next. For anyone who is also a beginner like me, I reckon the Scrimba course, they are a really good starting point.
How to draw System Design Diagrams
Tags: softwareengineering, nextjs, systemdesign, saas
Published: 2023-12-06 22:16:02

When I was preparing for my System Design Interview, I found that
most diagramming tools on the market are generic drawing tools that don't directly assist in drawing software System Design Diagrams. Usually, these tools only offer a bunch of shapes and the ability to connect them by arrows.

This gave me the idea of building a tool that is specific to **System Design** called [SystemDraw](https://www.systemdraw.net/).

## Nodes

With **SystemDraw** you can easily drag and drop software architecture elements like Load Balancers, Databases, Caches, etc. You don't need to import any special libraries or extensions.

## Attributes

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

Each **SystemDraw** node comes with a special set of attributes. For example, you can configure a database node with the type of database (SQL, document, wide column, graph), the type of replication used(leader-follower, multi-leader), and the type of sharding. 

As another example, on the cache node, you can specify the type of cache(in-memory, distributed), coherence(write-through, write-behind), and also the eviction policy (FIFO, LRU, LFU).

## Tables

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bpk5nbprwkodpqrlsbxi.png)
**SystemDraw** has a special node for Table design. You can simply drag in the table node and start adding the column names and data types.

## Traffic Estimator

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5m7pd8w2ywpngu24fsbz.png)
**SystemDraw** also has a built-in node called Traffic Estimator. The Traffic Estimator helps in calculating the estimated storage, bandwidth, and cache for the system. 

## Try it

You can try it out today at [SystemDraw](https://www.systemdraw.net/draw), no login is required. If you want to save, just use your Google account to log in and you will have the ability to store it to your browser's local storage.

## Tech Stack
The tech stack I ended up using for this tool is NextJs with a MongoDb database deployed on Vercel. The actual library used for the **drawing page** is [ReactFlow](https://reactflow.dev/).

Follow me at [https://twitter.com/sunilr](https://twitter.com/sunilr)
Go is awesome!
Tags: go, programming, webdev
Published: 2023-12-06 22:15:01

My favorite coding language is Go. Here's why!

## Statically typed

Go is a statically typed language. This means that once a variable has been declared, its type cannot change. For example, `x := 4` means that `x` is now `4`. If I were to change this to a string, it would fail. 

## Concise

Hello world in Java is extremely complex:
```java
public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
```

Although Python is simpler, Go is still not nearly as verbose as Java:
```go
package main

func main() {
    println("Hello, World!")
}
```

## camelCase

I get that some people prefer snake_case to camelCase, but I like camelCase. And seeing as most of the other languages I use are supposed to use snake_case, it's nice to use camelCase every so often.

## Easy to learn

Alright, sure, I tried like ten languages before settling on Go, so I did have experience. However, it's still extremely easy to learn. It took me about two days to figure out how to do most things, which was fairly quick, and I loved it. 

## Other

* Go is a compiled language, making it extremely rapid. 
* It comes with a built-in formatter (`go fmt <filename>`)
* It's new-ish, so the developers learnt from other languages' mistakes
* It has a wide variety of applications, from webdev to CLI apps.

Have you tried Go? Did you like it?
How to send PDF's with Telegram.
Tags: python
Published: 2023-12-06 21:58:19

In this article, we will cover how to send a PDF via telegram. 
NOTE: This guide assumes you have an API token from Telegram. 

Here is the code so you can see it before we start. 

```
import requests

def send_pdf(bot_token, chat_id, pdf_path):
    """
    Send a PDF document to a specific chat using Telegram Bot API.
    
    :param bot_token: str - Your Telegram bot token
    :param chat_id: str - Your chat id
    :param pdf_path: str - The path to the PDF file you want to send
    """
    method = "sendDocument"
    url = f"https://api.telegram.org/bot{bot_token}/{method}"
    files = {'document': open(pdf_path, 'rb')}
    data = {'chat_id': chat_id}
    response = requests.post(url, files=files, data=data)
    return response.json()  # Returns the result as a JSON object

# Call the function and print the result
result = send_pdf(bot_token, chat_id, pdf_path)
print(result)
```


Here is a breakdown. 

### The Function Components

- **pdf_path**:
  - Description: This specifies the location of the PDF file you want to send.
  - Usage: Replace `'Invoices1.pdf'` with the path to your document.

- **bot_token**:
  - Description: This is your unique token for interacting with the Telegram bot.
  - Usage: Replace `YOUR_BOT_TOKEN` with the token you received from BotFather.

- **chat_id**:
  - Description: This is the identifier for the chat where you want to send your PDF.
  - Usage: Replace `YOUR_CHAT_ID` with the desired chat ID.


Once you set up your parameters, you move on to making the actual request to send the pdf. 

### Making the Request
Inside the function, the code constructs and sends an HTTP request to the Telegram API:

- **Method**: `method = "sendDocument"`
  - This specifies the action we want our bot to perform - sending a document.

- **Constructing the URL**: 
  - `url = f"https://api.telegram.org/bot{bot_token}/{method}"`
  - This dynamically creates the request URL using your bot's token.

- **Preparing the File**: 
  - `files = {'document': open(pdf_path, 'rb')}`
  - This opens your PDF in binary read mode, ready for transmission.

- **Sending the Request**: 
  - `response = requests.post(url, files=files, data=data)`
  - This sends the file to the specified chat via your bot.


## Execution
result = send_pdf(bot_token, chat_id, pdf_path)
print(result)

Once you execute, you will know pretty quickly if the PDF has been sent ! Feel free to comment or contact me with any questions. 

You can contact me at [X](https://twitter.com/tunahorse21?lang=en)
Create Terraform Cloud Organization
Tags: azure, devops, terraform, community
Published: 2023-12-06 21:47:57

Greetings my fellow Technology Advocates and Specialists.

This is __Chapter #1__ of my Terraform Cloud Series.

In this Session, I will demonstrate, how to __Create Terraform Cloud Organization.__

| __ADDITIONAL CONTRIBUTOR(S):-__ |
| --------- |
| Anand Arbone - @anandarbone |

I had the Privilege to talk on this topic in __ONE__ Azure Communities:-

| __NAME OF THE AZURE COMMUNITY__ | __TYPE OF SPEAKER SESSION__ |
| --------- | --------- |
| __Azure Spring Clean - 2024__ | __Virtual__ |

| __EVENT ANNOUNCEMENTS:-__ |
| --------- |
| ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljbu5ud1x5yrihxb6mbc.png) |

| __REQUIREMENTS:-__ |
| --------- |
| 1. Terraform Cloud. |

| __CODE REPOSITORY:-__ |
| --------- |

{% github arindam0310018/06-Dec-2023-DevOps__Terraform-Cloud %}

| __TERRAFORM CLOUD LOGIN URL:-__ |
| --------- |
| https://app.terraform.io/session |
| ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oj01u30i9zmsjkzvt8b3.jpg) |

| __STEP BY STEP PROCESS:-__ |
| --------- |
| 1. Create __Terraform Cloud Organization__. |
| ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxpgsp33zgwkg1z0kclr.jpg) |
| 2. Provide __Organization Name:__ "MITRA008" and __Email Address:__ "mail2arindam2003@yahoo.com". |
| ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzqvv8hla6x18qtm9vsy.jpg) |
| 3. __Organization "MITRA008" created successfully in Terraform Cloud__. |
| ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bob4h2lpe69h7crh7jtk.jpg) |

__Hope You Enjoyed the Session!!!__

__Stay Safe | Keep Learning | Spread Knowledge__
🎬 Video - How to use CodeBehind framework?
Tags: dotnet, aspdotnet, csharp, backend
Published: 2023-12-06 21:34:30

Elanat framework new video on YouTube channel.

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

In this video, we teach you how to install the CodeBehind framework in Visual Studio 2022.

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 (about 3 minutes in only 26 MB).

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

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)