teleren/devto huggingface dataset:
Managing Notifications
Tags: programming, opensource, repost, notifications
Published: 2023-06-06 14:00:00

> This article was originally posted on [Patreon](https://www.patreon.com/posts/managing-79956595) and has been brought over here to get all of the [Pidgin](https://pidgin.im) Development/History posts into one single place.

Historically Pidgin hasn't handled notifications in the most user friendly ways.  They were tucked away in the bottom of the `Buddy List` window and there was actually two types, connection errors and authorization requests. The authorization requests could actually be used for more, but no one ever used that API.

Some other issues with it were that it isn't clear what account a connection error is from especially if you have the same username on multiple accounts. Also multiple notifications would stack with some tiny controls to navigate them which weren't usable via the keyboard.

![A screen shot of notifications in pidgin 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rpnq8elzbq2taif16jkh.png)

This all was usable enough, but for Pidgin 3 we wanted to do better. But in Pidgin 3 we've moved to a single window. This was a problem because the state of the notifications was stored by the user interface. In Pidgin's case, this meant it was in the `Buddy List`, so removing that window meant we had to move where that state was stored.

To do that we created the [Notification Manager API](https://docs.imfreedom.org/purple3/class.NotificationManager.html). The Notification Manager API, as you might have guessed, manages [Notifications](https://docs.imfreedom.org/purple3/class.Notification.html). Since the notification state is now stored in libpurple, this means we were able to remove it from the `Buddy List` window and into the new single window design.

![A screen shot of notifications in pidgin 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmltiknbje0sittwqns0.png)

As you can see is much easier to work with. It is sorted newest to oldest, the actions are easily accessible, the protocol icon helps you figure out which account the notification belongs to, and most importantly, keyboard navigation is supported!

We also added a [bunch of helpers](https://docs.imfreedom.org/purple3/class.Notification.html#constructors) for creating notifications so that they will get used more. An example of this is server notifications. Historically we popped up a dialog for these which can be very annoying and very easy to accidentally dismiss as they would steal keyboard focus. But now these just go to the notification manager!

I hope you're enjoying these posts! Remember they go live for patrons at 9AM CST on Mondays and go public at 12AM CST on Thursdays! If you'd like to support my work, you can join find a list of ways to do so [here](https://imfreedom.org/donate/#gary-kramlich).
A new card for your Home Assistant dashboard
Tags: homeassistant, smarthome, dashboard, lovelace
Published: 2023-06-06 13:58:27


![A screenshot of Minimalistic Area Card](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/waj4m42wprjxsxmvgpu9.png)



I've created a new card for your home assistant dashboard, that aims to be a minimalist version of the native area card. 

By minimalist, I mean it would be as simple as having a title, sensors, and toggle buttons. For style changes, this card can use the area image already defined, a camera image, or a solid color. 

It is not my goal to provide many ways of customizations, however you can also use other tools like `card-mod` if you need to add custom style changes. 

[Check out the documentation](https://github.com/junalmeida/homeassistant-minimalistic-area-card) on how to setup it using HACS for Home Assistant. 

If this is useful for you, [please consider donating](https://github.com/sponsors/junalmeida), but only if you wanted to :)
Adding a Soldier to Your JavaScript Array Army: A Tactical Guide to High-Intensity Programming
Tags: webdev, javascript, beginners
Published: 2023-06-06 13:29:10

Attention all code generals! We're heading to the battlefront of JavaScript arrays. Our mission? Add a soldier at a precise index. It's easy, they said. Well, "easy" is relative. Brace yourselves!

Imagine you're leading an army. Not just any army, but an army of integers, strings, objects, and yes, undefined soldiers (we don't talk about them much). Your JavaScript array army is lined up, ready for battle against the dark forces of... your code project.

Now, you've just got a new recruit and you're thinking, where should I place them in my neat little formation? Well, isn't it obvious? Wherever you want!

The JavaScript army is the epitome of inclusivity and chaos. You can place this new soldier in the front, back, middle, wherever. But not just anywhere! This isn't a casual game of poker, but high-intensity coding combat. Let me guide you through this tactical conundrum using our beloved .splice() method.

```javascript
let army = ['Pvt. Zeros', 'Cpl. Ones', 'Sgt. Twos'];
let recruit = 'Gen. Threes';

// Insert Gen. Threes at index 2. The power move.
army.splice(2, 0, recruit);

console.log(army); // ['Pvt. Zeros', 'Cpl. Ones', 'Gen. Threes', 'Sgt. Twos']
```
Look at that! You've just stuck Gen. Threes between Cpl. Ones and Sgt. Twos. Now that's what I call a strategic surprise!

_But wait, you say, what does **splice(2, 0, recruit)** mean? Well, my dear coding strategist, the first parameter is the index to add the recruit, the second is the number of soldiers to be removed (none, in this case), and the third is our brave recruit._

So, remember, in the chaotic battlefield of your codebase, you don't just have power, you have the power to confuse your enemies with the unexpected positioning of your troops. After all, the war of code is a game of minds and arrays! And remember, in JavaScript, there's no such thing as too many soldiers! Unless you run out of memory, of course. But hey, that's a battle for another day.
Building Mobile App MVP - @RenderATL
Tags: webdev, vue, javascript, tutorial
Published: 2023-06-06 13:20:32

This is the content from the talk i did at [RenderATL](https://www.renderatl.com/) Tech Conference in Atlanta last week. I had been wanting to go to the conference since it first started two years ago, and finally made it as a speaker.


![speaker on stage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ps2j1vi5glr4iqq6vyb9.JPG)

The main theme of my talk was about leveraging existing web development experience to build your mobile application Minimal Viable Project so you can save time and money to focus on more value adding activities.

The expression I used in the conference is the same one I share with potential client we work with at [Clearly Innovative Inc](http://www.clearlyinnovative.com)

![main theme of talk](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/njv3ze33qoq1v2co5qri.png)

Part of the talk was a live coding section which I have reproduced in this video.

I have provided a link to the source code, the slides and the video. The video will eventually be posted to the RenderATL YouTube Channel

### Slides
RenderATL Presentation - https://bit.ly/renderATL23-aks-slides

### Video
{% youtube aq7m5FPFX-A %}

### Links
- Ionic Visual Studio Code Plugin - https://marketplace.visualstudio.com/items?itemName=ionic.ionic
- Ionic Vue - https://ionicframework.com/docs/vue/overview
- Capacitor - https://capacitorjs.com/
- Share Plugin - https://ionicframework.com/docs/native/share
Quality defects? Not on our watch!
Tags: manufacturing, indusrty, qdataops, qualitycontrol
Published: 2023-06-06 13:01:07

Quality defects? Not on our watch!
We're committed to providing accurate insights, leading to ZERO DEFECTS with qDataOps, our Total Quality 4.0 Software.
Learn more - https://lnkd.in/e9Hxj4Vy
#AI – Using OpenAI Whisper to convert audio to text, in Python, from my podcast episode (in Spanish!)
Tags: englishpost, audiototext, openai
Published: 2023-06-08 18:16:12

---
title: #AI – Using OpenAI Whisper to convert audio to text, in Python, from my podcast episode (in Spanish!)
published: true
date: 2023-06-06 13:00:00 UTC
tags: EnglishPost,audiototext,EnglishPost,OpenAI
canonical_url: 
---

Hi!

Today’s post is how to use Whisper to get the text transcription from my podcast episode audio. Based on the Podcast Copilot sample, I decided to use Whisper to do this. Let’s start!

OpenAI – Whisper

> Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification.
> 
> <cite>Whisper GitHub</cite>

You can get more information about Whisper here

- Blog, [Introducing Whisper](https://openai.com/research/whisper)
- GitHub, [https://github.com/openai/whisper](https://github.com/openai/whisper) 

And, once installed (simple python package), it’s super easy to use:

```python
import whisper

model = whisper.load_model("base")
result = model. Transcribe("audio.mp3")
print(result["text"])

```

Super easy! However, this approach may trigger some memory problems with large audio files.

The approach in the original Podcast Copilot is to split the podcast audio into small chunks and get the transcript for each one of the small pieces. In example:

```python
# Chunk up the audio file 
sound_file = AudioSegment.from_mp3(podcast_audio_file)
audio_chunks = split_on_silence(sound_file, min_silence_len=1000, silence_thresh=-40 )
count = len(audio_chunks)
print("Audio split into " + str(count) + " audio chunks \n")

# Call Whisper to transcribe audio
model = whisper.load_model("base")
transcript = ""
for i, chunk in enumerate(audio_chunks):    
    if i < 10 or i > count - 10:
        out_file = "chunk{0}.wav".format(i)
        print("\r\nExporting >>", out_file, " - ", i, "/", count)
        chunk.export(out_file, format="wav")
        result = model.transcribe(out_file)
        transcriptChunk = result["text"]
        print(transcriptChunk)
                
        transcript += " " + transcriptChunk

# Print transcript
print("Transcript: \n")
print(transcript)
print("\n")

```

And that’s it! Depending on your machine, this may take some time. I added a start/end check, so you can get an idea of how much time you need to spend processing an episode.   
In example, for a 10 min audio, transcript done with an estimated time of 06:05.

![transcript done for the last chuck with an estimated time of 06:05.](https://brunocapuano.files.wordpress.com/2023/06/image.png?w=1024)

The full source code is here:

{% gist https://gist.github.com/elbruno/049e7d3ced4aa36c88c37449b0934b6c  %}

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

More info in [https://beacons.ai/elbruno](https://beacons.ai/elbruno)

* * *

##
Is HTML a Programming Language?
Tags: html, webdev, javascript, programming
Published: 2023-06-06 12:46:14

Read the Full Article: [BroJenuelArticle - Is HTML a Programming Language?](https://brojenuel.com/blog/Is-HTML-a-Programming-Language-)

For so long, programmers in dev communities have been debating about HTML and whether it's a programming language or not. Especially beginners and even senior programmers talk about this. And because this topic is popular it created a meme like this photo.

![html is programming language meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjcw2mu9h0e4xsvr1vwv.png)

So, why do some people say that it's a programming language? here are some reasons 😁 And Why why people say its not a programming language 😎?

Some individuals argue that HTML is a programming language because it allows for the creation and organization of structured content. Some argue that HTML is not a programming language because it lacks essential elements found in traditional programming languages.


![html is programming language meme 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycfqbvrz3a8wjk2xzu7c.png)

Despite these arguments, some people still consider HTML to be a programming language. This is because HTML can be used to create interactive web pages that can respond to user input.
Atomic design
Tags: webdev, javascript, react, frontend
Published: 2023-06-06 12:21:01

At the dawn of web development, we used to have extremely simple pages, with most of the logic being on the backend. But nowadays, having a thoughtfully designed and built website is crucial to success, as among all factors for rejecting/mistrusting a website, over 94% are related to poor design. So better-looking websites help to build trust with your customers and attract more people. 

With the advance of development, we also started to value the separation of concerns and modularity more. So it became clear that we needed to create functionality in a reusable way. On the FE, this can be achieved with a design system. 

In short, the UI/UX designer creates simple, building-blocks components like inputs, alerts, buttons, etc., and then starts building pages using as many existing components as possible. The developer can also create the basic components and then build the pages like lego using the pieces(components) they already have. A good design system can be a game changer - allowing your designers and developers to create and iterate faster. 

“Atomic design” is an amazing design system that takes its inspiration from chemistry. Like in web design, everything can be built from simple components like inputs, text, buttons; in chemistry, everything is built from atoms. In Atomic design, there are five levels of components.

- **Atoms** - basic building blocks like buttons, text, inputs
- **Molecules** - more complex components combining multiple atoms, e.g. a search input - combines input, label text, and a button
- **Organisms** - rather complex components made from molecules like headers or footers
- **Templates** - A page made from organisms but without any real content. In terms of React, this can be a layout component.
- **Pages** - A specific instance of a template, a real page in your application

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

The distinction between templates and pages is rather hard to see, especially in frameworks like React, where a page is just a “template” because some content can be dynamic, i.e., fetched from the server. 

Atomic design provides you with a clear mental model of separating components and creating design systems. It makes you write more reusable code by encouraging you to use more components and make your code more modular. It can greatly speed up work because after the initial investment in building out reusable components, creating actual pages will be much easier. 

Have you tried Atomic design?
Resilience
Tags: systems, systemdesign, resilience, beginners
Published: 2023-06-06 12:14:26

The term resilience means the ability of a system to keep functioning correctly and reliably in case of unexpected events like hardware failures, network outages, or software errors. Resiliency is one of the most important aspects of system design because the software systems need to be capable to handle any kind of unexpected events that might occur during the tenure. They also need to recover quickly from the failures so the operations can continue.

## Fault Tolerant

A resilient system is expected to be fault tolerant which means it can handle all kinds of failures without causing the entire system to fail. To achieve this, we need to use [redundant](https://dev.to/pragyasapkota/redundancy-1h72) hardware and software components, backup systems, and failover mechanisms that help automatically switch to backup systems in case of an emergency i.e., when the primary systems fail.

## Scalability

A resilient system should not just limit itself to being fault tolerant but also should be designed with [scalability](https://dev.to/pragyasapkota/scaling-3dfh) in mind. This means that the system should be able to handle the increased traffic or workload without becoming overloaded or disturbing the performance. For this, we need [load balancing](https://dev.to/pragyasapkota/load-balancing-why-do-we-need-them-1kfn) and other techniques that help to distribute the workload across multiple systems.

## Failure Recovery

Likewise, a resilient system should be able to recover quickly from failures. The failure detection and the automatic recovery should be very fast without the need for manual intervention. We can do this by using automated monitoring and alerting systems that notify administrators of failures and initiate automated recovery procedures.

## Conclusion

There are numerous ways to make your system resilient but the best way for that would be for the developers to follow established best practices for fault tolerance and scalability. The system should be [redundant](https://dev.to/pragyasapkota/redundancy-1h72) with automated monitoring and alerting mechanisms. The developers should also keep testing and validation tasks regular, so the system resiliency is ensured and the failures have a quick recovery time.

**_I hope this article was helpful to you._**

**_Please don’t forget to follow me!!!_**

**_Any kind of feedback or comment is welcome!!!_**

**_Thank you for your time and support!!!!_**

**_Keep Reading!! Keep Learning!!!_**
Product Transformation
Tags: lean, agile, designthinking, storybytes
Published: 2023-06-06 11:52:21


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ca6t2fqzzayacgbk8rmw.png)
Any products on the market are trying to solve a problem. A problem which doesn’t exist or a problem you’re not yet aware of. Save time, money, and energy, and convert them all to gains. Companies jump on the agile bandwagon, and although they see a jump in outputs, it does little to their actual outcomes. More and more people are deciding to become product coaches, and the demand for their skill sets continues to grow. A challenging journey awaits in product transformation, where the delicate balance of effective management strategies and tools holds the key to proper alignment.  

Through binding these strategies, organisations gain the resilience to weather any storm that may come their way. And many product and technology leaders and executives fail to embrace this concept. Organisations resistant to embracing product transformation may remain confident that their works-well methods worked before, so they’ll work again. But there’s little evidence to support that. Industries and dominant players continually disrupt companies willing to use these new tools and techniques. 

It’s only a question of when, and not if, one will also come gunning for them. Hopefully, all the products will go brought a phase of design thinking, lean prototyping and agile building. If not possible, at least be aware of the stages, and tap on them to build things right.
I've just completed a front-end coding challenge from
Tags: webdev, javascript, frontend
Published: 2023-06-06 11:40:55

I've just completed a front-end coding challenge from @frontendmentor! 🎉

You can see my solution here: https://www.frontendmentor.io/solutions/newsletter-signup-form-with-success-message-NBsODB5IiW

Any suggestions on how I can improve are welcome!

#FrontendMentor #CodeChallenge
Productivity... As a Developer??
Tags: productivity, programming
Published: 2023-06-06 11:30:29

Ok, many developers -like me- are obsessed with productivity so here are so things:
(Note: these are my ideas and thoughts)

## Apps:
Of course, as any developer we mainly use apps -unless you are coder grandpa and you use pen and paper- so here is my collection:

**Text Editor**: VSCode
It just works, it's fast, reliable, FOSS, and it has a lot of [extentions](https://dev.to/youssefmic/5-heavenly-vscode-extensions-1ma3)
If you want something other than VSCode you can see my list on [text editors](https://dev.to/youssefmic/what-text-editor-should-i-use-43a6)

**Browser**: Firefox Developer Edition:
It's open source, fast (and not a memory hog looking at you Chrome) and it makes me feel better about myself :D.

**Notes**: Obsidian
I really like it it's FOSS, fast, and I like how I can open them anywhere because it uses markdown.

**TODOS**: Todoist
Ok, this is not open-source, but it is actually one of the best. It is minimalist fast and beautiful.

**Project Management**: FocalBoard
If you've never heard of this one, you have been missing soooo much, it is like a trello/notion hybrid.

## Methods:
So, this won't be a large chapter, but I suggest you reading Getting Things Done by David Allen, also Building a Second Brain by Thiago Forte

## Conclusion:
Programming is hard, and these tips/apps will help you!
✨✨ Tutorial: How to Buy a Token on the 🦄 Uniswap Universal Router 🦄 with 🐍 Python 🐍 | HackerNoon ✨✨
Tags: tutorial, python, ethereum, programming
Published: 2023-06-06 11:07:24

Creating a swap transaction for the latest Uniswap router is not as straightforward as it used to be with the previous routers: you cannot just use the router ABI and invoke a swap function.

This [guide](https://hackernoon.com/how-to-buy-a-token-on-the-uniswap-universal-router-with-python) will teach you how to use Python to build the transaction input data you need to send to the Uniswap Universal Router (UR) in order to buy a token with ETH.

✨✨ [Tutorial link](https://hackernoon.com/how-to-buy-a-token-on-the-uniswap-universal-router-with-python) ✨✨

I have developed some time ago an open source Python codec for the UR.Since then I have been asked to clarify some points about its usage. So I decided to write this tutorial.

I would love to hear any constructive feedback about both the [Uniswap Universal Router codec](https://github.com/Elnaril/uniswap-universal-router-decoder) and this [tutorial](https://hackernoon.com/how-to-buy-a-token-on-the-uniswap-universal-router-with-python), so feel free to comment about them!

Thanks in advance! :)