teleren/devto huggingface dataset:
Live GitHub Status (for GNOME Wayland)
Published: 2024-03-28 08:46:31

---
title: Live GitHub Status (for GNOME Wayland)
published: true
date: 2023-12-14 00:00:00 UTC
tags: 
canonical_url: https://www.tercmd.com/live-github-status-for-gnome-wayland
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82959m1vlid74oc1wi0n.png
---

I had this cool idea to show the currently focused application on my system (i use gnome on ubuntu btw) as part of my GitHub status.

## Implementation

I first went into GitHub settings and created a PAT (NOT fine-grained) with the `user` scope.

Then, I found a [command on GitHub](https://gist.github.com/rbreaves/257c3edfa301786e66e964d7ac036269) to get the focused window class under Wayland in GNOME (e.g. `firefox`, `Code`, `Org.gnome.Software`) and passed that into `os.popen()`

I then used GPT to generate Python code to send the GraphQL API request (although similar code for TS/JS is available in [this GitHub repo](https://github.com/wsmd/github-profile-status/))

I also added some code to map an application name to an emoji with fallbacks.

Just wrap that in a `while True:` loop and youre done

Almost, there are a few things missing:

- adding more user friendly names for apps like `Org.gnome.Software` (Ubuntu Software), but thats something for a future point in time.

- clear status after some time

## The Code

{% embed https://gist.github.com/terminalcommandnewsletter/c0530f2a832463391af118ee4b766bae %}
Effortless WingBits Mining Guide: Low-Cost and Optimized Hardware Setup
Published: 2023-12-02 02:19:30

---
title: Effortless WingBits Mining Guide: Low-Cost and Optimized Hardware Setup
published: true
date: 2023-12-14 00:00:00 UTC
tags: 
canonical_url: https://simeononsecurity.com/other/wingbits-mining-guide-hardware-setup-optimization/
---

 ![](https://simeononsecurity.com/img/cover/WingBits-Mining-Optimization.png)

> **Note** : _This article does not entail an endorsement of wingbits nor does it contain any financial advice. Please do your own research. This article is for educational purposes only._

## Introduction [#](#introduction)

Cryptocurrency mining continues to evolve, and the WingBits technology stack offers an accessible pathway for enthusiasts. In this guide, we’ll explore the hardware requirements, ADSB-specific equipment, and step-by-step instructions for setting up your WingBits mining rig. Whether you’re diving into mining for the first time or optimizing your current setup, this comprehensive guide will walk you through the process, from selecting the right hardware to fine-tuning gain levels. Let’s embark on a journey to efficient and budget-friendly cryptocurrency mining with WingBits.

## Hardware Requirements: [#](#hardware-requirements)

### System Requirements: [#](#system-requirements)

One of the following is required. We basically just need any efficient and low powered computer we can get our hands on. Any Raspberry PI, Intel NUC, or similar will do. They don’t have to be all that powerful. However I will recommend you have at least 32g-64g of storage, 4g of ram, and at least 2 cpu threads. For this we will be targeting a budget of around $100-$200 for hardware but feel free to go higher if it suits your needs. Our power target is 25w or better on average.



[Read More at https://simeononsecurity.com](https://simeononsecurity.com/other/wingbits-mining-guide-hardware-setup-optimization/)
How to get your group project moving
Published: 2023-12-14 16:12:11

---
title: How to get your group project moving
published: true
date: 2023-12-14 00:00:00 UTC
tags: 
canonical_url: https://blog.brainstory.ai/meeting-prep-college/
---

If you found your way here from our [previous blog](https://blog.brainstory.ai/brainstory-meeting/), welcome! This blog will go into a more detailed step-by-step guide with examples, specifically for group projects. We’re talking about meetings that are:

- Hard to schedule because someone has practice from 4-8 pm 👀
- No one seems to care (except for you, dear reader)
- Goal is to just figure out what’s going on and divide up the work

It can feel impossible to just _get people together_. Here’s how to use Brainstory when you can’t seem to wrangle all those ghosts in the group chat.

## Getting started with Brainstory

You probably have some type of project description from your professor. Start talking to Brainstory with those guidelines in mind. You’ll naturally expand on certain ideas, concerns, and action items. In less time than it takes to walk across campus, you’ll have a finished outline of your group project plan!

## Sharing your Brainstory

Send your Brainstory to all of your groupmates, either via email or by dropping the link in the group chat. Say that you already did the planning work and you’re just asking for their feedback. People with super busy schedules can respond whenever they do their work.

## Feedback aggregation

Brainstory will aggregate everyone’s feedback onto a singular document for a source of truth. Giving feedback on Brainstory is a [powerful experience](https://blog.brainstory.ai/brainstory-feedback/) that levels the meeting playing field.

## Decision time!

Brainstory will flag the topics that need any extra discussion and clarification. Otherwise, it’s simply a matter of deciding what to do next! The hardest part of a meeting— getting everyone on the same page about facts and context— is done in advance. For group projects, you might not even _need_ to meet in person. You can decide who is doing what via text!
Brainstory and Budgets
Tags: work, budgets, procurement
Published: 2023-12-14 17:26:51

---
title: Brainstory and Budgets
published: true
date: 2023-12-14 00:00:00 UTC
tags: work, budgets, procurement
canonical_url: https://blog.brainstory.ai/brainstory-work-budget/
---

So you love Brainstory and you’d like to try it for work but… budgets are capped. This is not a problem! You actually have _unlimited_ sharing and feedback requests for guests with _any_ Brainstory.

## How does sharing work with guests?

You have two ways of sharing a Brainstory! You can either:

1. Share directly by inputting guest emails
2. Copy the share link that’s accessible by anyone who clicks it

In both of those situations, the guest user _does not_ need a Brainstory subscription! In fact, any feedback requests they give won’t count towards their 10 free original Brainstories.

## So who needs a Brainstory subscription?

Let’s say someone on your team would like to try starting the Brainstory. They can still do so without purchasing a subscription. Starting an original Brainstory will count towards one of their 10 free uses, but they will _also receive unlimited shares_.

If your team finds Brainstory valuable (and we hope you do!), the people who regularly start the Brainstory are the people who would need a subscription. For some teams, this is effectively just $10/month for the _whole team_ to get value.
FreeInit : Bridging Initialization Gap in Video Diffusion Models - Utilizing AnimateDiff
Tags: ai, stablediffusion, animatediff, text2video
Published: 2023-12-13 23:54:18

HD Video : https://youtu.be/fbOU9jeAfck?si=13T02tvt4HUmg9S-

{% embed https://youtu.be/fbOU9jeAfck?si=13T02tvt4HUmg9S- %}

Repo with code : https://github.com/TianxingWu/FreeInit

Paper : https://arxiv.org/abs/2312.07537
Creating a blob storage container with anonymous read access.
Tags: webdev, javascript, programming, devops
Published: 2023-12-13 23:39:53

A blob storage container is a type of storage container used in Azure Blob Storage, a cloud-based object storage solution supplied by Microsoft Azure. A "blob" in the context of Azure Blob storage is a binary big object that may contain any form of data, including documents, photos, videos, and more.


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

To create a blob storage container, go to the storage account under the Data Storage section.
Select +container.


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

Make the name of the container public.
Click on Create.

To configure the blob container for public access to enable customers to view images.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8qowjfzoy7e3j2pojllt.png)
 
Go to the public container
On the Overview page, click Change access level.
Ensure the public access level is on Blob anonymous read access for Blobs only.
Select ok.

Uploading files and testing access for Blob containers


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

under public container 
Select upload
Browse and select a file
Select Upload 


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

On the overview, copy URL and paste the URL into a new browser
Web scraping with jsdom
Tags: scraping, jsdom, node, javascript
Published: 2023-12-13 23:25:38

---
title: Web scraping with jsdom
published: true
tags: ['scraping', 'jsdom', 'node', 'javascript']
canonical_url: https://sevic.dev/notes/scraping-jsdom/
---

Web scraping means extracting data from websites. This post covers extracting data from the page's HTML when data is stored in JavaScript variable or stringified JSON.

The scraping prerequisite is retrieving an HTML page via an HTTP client.

### Examples

The example below moves data into a global variable, executes the page scripts and accesses the data from the global variable.

```js
import jsdom from 'jsdom';

fetch(URL)
  .then((res) => res.text())
  .then((response) => {
    const dataVariable = 'someVariable.someField';
    const html = response.replace(dataVariable, `var data=${dataVariable}`);

    const dom = new jsdom.JSDOM(html, {
      runScripts: 'dangerously',
      virtualConsole: new jsdom.VirtualConsole(),
    });

    console.log('data', dom?.window?.data);
  });
```

The example below runs the page scripts, and access stringified JSON data.

```js
import jsdom from 'jsdom';

fetch(URL)
  .then((res) => res.text())
  .then((response) => {
    const dom = new jsdom.JSDOM(response, {
      runScripts: 'dangerously',
      virtualConsole: new jsdom.VirtualConsole(),
    });

    const data = dom?.window?.document?.getElementById('someId')?.value;

    console.log('data', JSON.parse(data));
  });
```

### Disclaimer

Please check the website's terms of service before scraping it. Some websites may have terms of service that prohibit such activity.

### Boilerplate

Here is the [link](https://sevic.dev/nestjs-starter) to the boilerplate I use for the development.
Day 853 : Another World
Tags: hiphop, code, coding, lifelongdev
Published: 2023-12-13 23:20:04

- Professional : Not a bad day. Had an all hands meeting. Our team won an award. Nice. Reviewed a team member's code. Did some updates to a demo application I made. Worked on a tutorial. The day went by super quick. Felt like I was in another world.

- Personal : So I was running into an issue with trying to upload a picture from my front end to my backend. I was sending the file, but it kept coming up blank on the server. I was using a library that takes form data from the front end and pulls out the files. I used the exact same library in another project and it worked. Only difference was the servers are on different hosts. I was looking through a bunch of issues and message boards. Seems like it could have something to do with a version or something. Learned about another library that is actually using the same library I was using and substituted the new one. It worked on the first try. haha Listened to some tracks for the radio show and I think I ended the night watching an episode of "Dr. Stone". Don't remember. I was tired after racking my brain trying to get my side project to work. haha 

![Looks like the inside of an inactive volcano in Rapa Nui, Polynesia covered in green foliage with the ocean in the background.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pvvvqwl74dcgloaclebh.jpg)

Going to do more of the same as yesterday. The plan is to get the image that is now sent to the server and pass that on to the Azure Vision AI to remove the background and send that back to the front end. I got it working when the image comes from an external URL so hopefully it won't be too different if the image is coming from the server. I want to go through tracks for the radio show and watch an episode of "Dr. Stone".

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 8y_Heh7AoXY %}
Advent of Code 2023 - December 13th
Tags: advent, adventofcode, python, december
Published: 2023-12-13 22:24:09

---
title: Advent of Code 2023 - December 13th
published: true
description: My progress with the 2023 version of Advent of Code
tags: advent, adventofcode, python, december
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36qayk14ewje7rvykeg5.jpg
series: Advent of Code 2023
# published_at: 2023-12-01 17:41 +0000
---

In this series, I'll share my progress with the 2023 version of [Advent of Code](https://adventofcode.com/2023).

Check the first post for a short intro to this series.

You can also follow my progress [on GitHub](https://github.com/robvanderleek/adventofcode).

## December 13th

[The puzzle of day 13](https://adventofcode.com/2023/day/13) is intimidating if you read the description but in the end not so hard.

__My pitfall for this puzzle:__ Had to use a lot of code and did not have time for anything fancy.

{% spoiler Solution here, do not click if you want to solve the puzzle first yourself %}

```python
#!/usr/bin/env python3
from copy import deepcopy

with open('input.txt') as infile:
    lines = [line.strip() for line in infile.readlines()]

patterns = []
cur_pattern = []
for line in lines:
    if line == '':
        patterns.append(cur_pattern)
        cur_pattern = []
    else:
        cur_pattern.append([c for c in line])
patterns.append(cur_pattern)

def find_vertical(p, exclude = None):
    for idx in range(1, len(p[0])):
        length = min(idx, len(p[0]) - idx)
        left = []
        for col in range(idx - length, idx):
            left.append(''.join([row[col] for row in p])) 
        right = []
        for col in range(idx, idx + length):
            right.append(''.join([row[col] for row in p]))
        if left == right[::-1] and idx != exclude:
            return idx
    return None

def find_horizontal(p, exclude = None):
    for idx in range(1, len(p)):
        length = min(idx, len(p) - idx)
        up = p[idx - length:idx]
        down = p[idx:idx + length]
        if up == down[::-1] and idx != exclude:
            return idx
    return None

def fix_smudge(p):
    result = []
    for idx_y in range(len(p)):
        for idx_x in range(len(p[0])):
            p_copy = deepcopy(p)
            cur = p_copy[idx_y][idx_x]
            if cur == '.':
                p_copy[idx_y][idx_x] = '#'
            else:
                p_copy[idx_y][idx_x] = '.'
            result.append(p_copy)
    return result

def find_reflection(p, exclude=None):
    n = find_vertical(p) if not exclude or exclude >= 100 \
        else find_vertical(p, exclude)
    if n:
        return n
    else:
        n = find_horizontal(p) if not exclude or exclude < 100 else \
            find_horizontal(p, exclude / 100) 
        if n:
            return n * 100

total = 0
for p in patterns:
    ref_p = find_reflection(p)
    fixed = fix_smudge(p)
    for f in fixed:
        ref_f = find_reflection(f, ref_p)
        if ref_f:
            total += ref_f
            break
print(total)
```

{% endspoiler %}

That's it! See you again tomorrow!
Elon Musk
Tags: codepen, webdev, psychology, uxdesign
Published: 2023-12-13 22:14:22

As a psychology student at the University of Lille, my academic journey has delved into the intricacies of human perception, particularly exploring the fascinating realm of UX/UI design. Understanding how colors impact human cognition has been a captivating aspect of my studies.

In November 2023, I embarked on a new venture by diving into the world of HTML and CSS coding. This marked the beginning of my passion for website ergonomics, driven by a desire to master the art of organizing CSS and JavaScript to enhance the visual appeal of the web, making it more user-friendly.

Taking the first steps into the development world, I crafted a short yet meaningful code – a simple "hello" – symbolizing the initiation of my journey into the dynamic field of web development. This endeavor reflects my commitment to merging psychology insights with the art and science of coding to create a digital experience that resonates with human perception and usability.
Dam Thao 👩🏻‍🎓

Check out my very first Pen! 👇

{% codepen https://codepen.io/DAM-Thao/pen/rNPgvEg %}
Adventofcode 🎄: Day 13 - Small Projects
Tags: beginners, react, learning, coding
Published: 2023-12-13 22:12:14

Hello Developers...it is day 13 and I am giving you some obvious reasons, why you should build projects, so let us begin.

Building small projects is a cornerstone of effective learning in React and here is why:

- Hands-on Experience
you get to apply the concepts you learn.


- Reinforces Concepts
projects provide a way to reinforce the knowledge gained from tutorials, lessons, etc.

 
- Problem-Solving Skills
building projects encourages problem solving.


- Builds confidence
completing small projects boosts your confidence as a developer.


- Portfolio Building
small projects contribute to your portfolio.


- Iterative learning
starting with small projects allows you to iteratively build on your knowledge.


- Community engagement
reaching out to the React community becomes a valuable resource.


- Creativity
small projects allow you to be creative.
🛠️ Desafio e Solução em React Native 🛠️
Tags: reactnative, perfomanceoptimization, codeoptimization, usememo
Published: 2023-12-13 22:04:47

Oi pessoal do LinkedIn! 👋

Gostaria de compartilhar uma experiência recente enfrentando um desafio intrigante em React Native e como conseguimos superá-lo.

**💡 O Problema:**

Nosso aplicativo React Native estava enfrentando um problema de desempenho notável em telas mais complexas. O tempo de resposta estava aquém do esperado, afetando a experiência do usuário.

**🧐 Investigação:**

Após algumas análises, descobrimos que a renderização excessiva de componentes estava causando gargalos. Componentes desnecessários estavam sendo renderizados mesmo quando não estavam visíveis.

**✨ A Solução:**

Implementamos uma técnica de otimização de renderização usando o React Memoization. Isso permitiu que evitássemos renderizações desnecessárias e melhorássemos significativamente o desempenho.

```
import React, { useMemo } from 'react';

const MyComponent = ({ data }) => {
  // Utilizando useMemo para memorizar o componente
  const optimizedComponent = useMemo(() => (
    {/* Seu componente aqui */}
  ), [data]); // Dependências que, quando alteradas, acionam a re-renderização

  return optimizedComponent;
};
```

**🚀 Resultado:**

A implementação dessa solução resultou em uma resposta mais ágil do aplicativo, proporcionando uma experiência mais suave aos usuários, especialmente em telas mais complexas.

**🌐 Lições Aprendidas:**

A otimização do processo de renderização é fundamental para garantir o desempenho ideal em aplicativos React Native. Essa experiência nos lembrou da importância de considerar cuidadosamente como e quando os componentes são renderizados.


💬 Vamos trocar ideias:

Já passou por desafios semelhantes em seus projetos React Native? Como você abordou questões de desempenho? Compartilhe suas experiências nos comentários!
Isolation Levels - part XI: Read Uncommitted
Tags: sql, database
Published: 2023-12-13 21:56:29

The **Read Uncommitted** isolation level is designed to **allow dirty reads**, which are changes made by other transactions that have not yet been committed. Such changes should not be visible to other transactions. **Non-MVCC** databases are forced to lock the row being read to ensure that uncommitted transactions are not currently modifying them. These read locks can potentially block the application, for instance, in scenarios where a DBA is counting the rows of a large table. Non-MVCC databases had to allow such dirty reads for these operations, even if they returned **inconsistent results**.

With modern databases that use MVCC, you can safely ignore this isolation level. **MVCC provides a consistent read time without relying on read locks**. When a read encounters an uncommitted change, held with a write lock, it will just read the last committed version before the read time. The Read Committed isolation level offers the same concurrency level while avoiding the exposure of uncommitted changes. In PostgreSQL or YugabyteDB Read Committed will be used when setting Read Uncommitted. It exists for SQL compatibility, but you should never have to set it.
Help SQL query
Tags: sql, discuss, database, help
Published: 2023-12-13 21:45:59

Hey all, 

I need your precious help on an SQL query (ORACLE Database) where I do not know how to get values only for the max date grouped by article...

Here's is the query :

```
SELECT
    vdi.articlesociete.codesociete      AS code_societe,
    vdi.article.code                    AS code_article,
    vdi.prixderevient.article           AS id_article,
    vdi.prixderevient.depot             AS art_depot,
    vdi.prixderevient.datedoc,
    vdi.articlefamille.designation      AS famille,
    vdi.articlesousfamille.designation  AS sous_famille,
    vdi.prixderevient.reel,
    vdi.prixderevient.type,
    vdi.prixderevient.societeth,
    vdi.prixderevient.prixachatnet      AS pa_net,
    vdi.prixderevient.prixderevient     AS dpr,
    vdi.articlesociete.prixmoyenpondere AS pmp,
    vdi.articlesociete.actifvente       AS actif,
    vdi.societeth.code,
    vdi.societeth.nom,
    vdi.depot.code                      AS code1,
    vdi.depot.libelle,
    vdi.societeth.depotprincipal
FROM
    vdi.prixderevient
    LEFT JOIN vdi.article ON vdi.article.pk_article = vdi.prixderevient.article
    LEFT JOIN vdi.articlefamille ON vdi.articlefamille.pk_articlefamille = vdi.article.articlefamille
    LEFT JOIN vdi.articlesousfamille ON vdi.articlesousfamille.pk_articlesousfamille = vdi.article.articlesousfamille
    LEFT JOIN vdi.depot ON vdi.depot.pk_depot = vdi.prixderevient.depot
    LEFT JOIN vdi.articlesociete ON vdi.articlesociete.articlestocke = vdi.article.pk_article
                                    AND vdi.article.societeth = vdi.articlesociete.societeth
    LEFT JOIN vdi.societeth ON vdi.societeth.pk_societeth = vdi.prixderevient.societeth
WHERE
        vdi.article.code = 'PIAA6373'
    AND vdi.societeth.code = 'VDIEA'
    AND vdi.articlesociete.actifvente = '1'
    AND vdi.prixderevient.type != '2'
```