teleren/devto huggingface dataset:
¿Y si Python permitiera 'end' como fin de bloque?
Tags: spanish, python, code, discuss
Published: 2024-02-06 21:21:40

---
title: ¿Y si Python permitiera 'end' como fin de bloque?
published: true
series: ¿Python con 'end' para fin de bloque?
description: Así tendríamos lo mejor de ambos mundos...
tags: #spanish #python #code #discuss
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-06 21:10 +0000
---

En Python, los bloques de código (el código dentro de un bucle, por ejemplo) se marcan utilizando indentación. Es decir, a partir de la siguiente línea que termina con dos puntos (':'), cada instrucción tiene que estar indentada hacia la derecha, hasta el final del bloque.

```python
for _ in range(10):
    print("Python mola!")
```

Normalmente, no supone un gran problema, pero hay un escenario que me pone "muy malo", como se puede ver a continuación.

```python
i = 0
while i < 10:
    if i % 2 == 0:
        i += 2

    i += 1
```

Me refiero al final de ambos bloques, el del `if` y el del `while`. Para mi, esas dos instrucciones de incremento de `i` es como si quedasen descolgadas.

Veamos ahora si se pudiera utilizar `end` como recurso sintáctico para delimitar el final de los bloques. Esto es algo que proporciona [Juía](http://julialang.org/) y multitud de dialectos de BASIC. ¿Cómo quedaría?

```python
i = 0
while i < 10:
    if i % 2 == 0:
        i += 2
    end

    i += 1
end
```

Para mi queda todo mucho más ordenado y limpio... sería como decía, un recurso sintáctico, no tendría que traducirse en nada al código objeto, y sería opcional.

¿Y tú, como lo ves? ¿Sería tan terrible?
Certificado no Ubuntu com Apache
Published: 2024-02-06 21:01:38

Atualmente, possuo um certificado gerado em um servidor Windows Server 2019 com IIS 10. Gostaria de saber se é possível utilizar esse certificado em meu servidor Ubuntu com Apache. Em caso afirmativo, poderia fornecer orientações sobre como realizar esse procedimento? Agradeço desde já pela ajuda.

Good afternoon,

I have a certificate generated on a Windows Server 2019 with IIS 10. Is it possible to use this certificate on my Ubuntu server with Apache? If so, could you provide guidance on how to accomplish this? Thank you in advance for your assistance.
Released a visual guide to functional programming in JS
Tags: webdev, javascript, beginners, frontend
Published: 2024-02-06 20:30:02

Are you interested to learn the benefits of functional programming in javaScript without going into tutorial hell, please check out [my ebook (free)](https://www.learnwithparam.com/resources/ebooks).

It is visual and it helps to learn these concepts,

- Pure Functions
- Immutability
- First-Class and Higher-Order Functions
- Function Composition
- Recursion
- Lazy Evaluation
- Pattern Matching
- Monads
- Currying
- Referential Transparency
Finally got around to making a website for myself
Tags: webdev, showdev, html, css
Published: 2024-02-06 20:25:12

If you've been on the internet, and I am sure you have, you've noticed that anyone who has (or wants) some kind of internet presence has a website. Yet, mine was nowhere to be found.

## The why

I felt like every good developer needs a place of their own. A place to collect everything they want to show to the world. A place where people can go if they want to know more. 

But me? I didn't have such a place yet. So that's why I made one. It didn't need to be fancy. It didn't need to have much. But there needed to be _something_.

## The how

I set out to work! I settled on something extremely basic. Something I can build upon. I decided on just a single index.html and some basic CSS to make it look somewhat pleasant and mobile-friendly.

What I've been seeing a lot lately is that everyone seems to grab the latest and greatest Javascript framework, even though that doesn't always seem necessary. Do you _really_ need all that Javascript overhead? Do you _really_ need that framework that just generates 2 HTML files and some CSS? For me, the answer to these questions was no. Of course, this could easily change in the future as I need more fancier features. But right now, no need.

## The what

The result is a simple (and I mean it when I say simple) page that shows my avatar, silly subtext, and a description of what I do.

And because I also wanted to have it serve as a collection point. I added links to all the related platforms on there.

For now, this is enough. I already have ideas on how I can improve on this. Because a website is never truly done is it now?

You can check it out over here: https://mrlinxed.com

## And you?

Do you already have a website? feel free to share it in the comments. 

If you don't have one yet, what is stopping you? If you need a starting point. You can [purchase the code](https://shop.mrlinxed.com/l/simple-landing-page) I used for my site. And host it for free using CloudFlare.

If you're interested in how I am hosting this page. You can check out my post about that here:

{% embed https://dev.to/mrlinxed/host-your-web-app-for-free-on-cloudflare-pages-15en %}

---

Stuck getting things done?

{% embed https://dev.to/mrlinxed/accomplish-more-with-the-cult-of-done-1p93
 %}
🤗 HuggingChat assistant : ask waiter for menu & advices
Tags: ai, ux, opensource, tutorial
Published: 2024-02-06 19:39:54

## 🫨 Announcement

[HuggingFace](https://twitter.com/huggingface) has just announced the availability of [Hugging Chat Assistant](https://huggingface.co/chat/assistants)❣️

{% twitter 1753429249363452274 %}

## 🎯 Goal

In this demo, you'll **discover a real life experience**, based on [`mistralai/Mixtral-8x7B-Instruct-v0.1`](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) LLM and a [custom dataset](https://github.com/adriens/auptitcafe-data/).


## 🤯 Demo: real life Customer Experience

{% youtube voElox0Cahg %}

## 🗣️📲🤖 Talk to assistant 

Now, let's see what happens when we **give a try from mobile device** (spoiler: it rocks 🤩)

{% youtube WeUf_J1XB2s %}

## 👐 Do the experience (yourself)

Give a try to [`auptitcafe.nc` on HuggingChat](https://hf.co/chat/assistant/65bd4d47a16aaa191b5b501d):

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/94yuo2lbf5e4w45e0lzk.png)](https://hf.co/chat/assistant/65bd4d47a16aaa191b5b501d)

## ↩️ Feedbacks

Feel free to share your feedback or **challenges you submitted to the assistant and how he managed them.**

## 🔭 Next steps

While playing around with data and model, I found that I could strongly improve the bot, see below fo what's next (& follow the series 😹):

{% embed https://github.com/adriens/auptitcafe-sdk/issues/24 %}
Journey into the Unkown
Published: 2024-02-06 19:36:40

From the moment I stepped into the world of software development., I was hit with the realization that there is always something new to learn! Whether it's mastering a new programming language, getting to grips with complex algorithms or delving into the latest development tools, the learning curve is steep, but what a thrill! I have discovered that embracing this continuous learning journey has been crucial in my growth as a software engineer.

But let's be honest, software developer is not for the faint-hearted. From debugging cryptic errors to tackling intricate project requirements, there have been moments of frustration and doubt. However, I have learned to view these challenges as opportunities for growth. Each problem solved is a step forward, and overcoming obstacles has made me a more resilient and adaptable engineer.

As I reflect on my journey as a new software developer, I am filled with gratitude for the experiences, lessons, and opportunities that have come my way. Looking ahead, I am excited about the endless possibilities that lie ahead in this dynamic field. Whether it's exploring emerging technologies, contributing to open-source projects, or mentoring the next generation of engineers, I am eager to continue growing, learning, and making a positive impact through software development.

In conclusion, my journey into software development has been a thrilling ride filled with challenges, growth, and moments of triumph. Through embracing the learning curve, overcoming challenges, embracing a collaborative culture, celebrating milestones, and looking ahead, I am excited to continue evolving as a software engineer and contributing to the ever-changing landscape of technology. So, let's embark on this exciting adventure together and shape the future of software engineering!As a software developer, I’ve found that there’s always something new to learn. Despite the challenges, I embrace the continuous learning journey which has been crucial in my growth as a developer. I’ve learned that each problem solved is an opportunity for growth and has made me a more adaptable engineer. I’m excited about the endless possibilities that lie ahead in this dynamic field, and I’m eager to continue growing, learning, and making a positive impact. Together, let’s shape the future of software development.
Mongoose Tutorial with Code and challenges # This code explains Virtuals in Schema/Model...
Tags: javascript, programming, tutorial
Published: 2024-02-06 19:31:58

## This code is a simple example for virtuals
## Here multiple properties merge to one single property
## When there is nested data inside schema then we use virtuals to merge them into a newly created single property
## lte's see how this code executes

```javascript
  const mongoose = require('mongoose');

main().catch(err => console.log(err));

async function main() {
  await mongoose.connect('mongodb://127.0.0.1:27017/PersonData');

  const personSchema = new mongoose.Schema({
    name: {
      first: { type : String},
      last: {type : String},
    }
  }, {
    virtuals: {
      fullName: {
        get() {
          return this.name.first + ' ' + this.name.last;
        }
      }
    }
  });
```
here we have defined a Schema called personSchema and this personSchema is defined one property "name" and this is a nested data with two other properties "first" & "last".
Then we have defined virtuals with a name called "fullName" which contains get() function .
This get() function returns "name.first" and "name.last" merged to a new property called 'fullName'.

```javascript
  const Person = mongoose.model('Person', personSchema);
```

"Person" is a model of the Schema "personShema"

```javascript
  await Person.insertMany([
       {
         name : {
               first : "Mayuk",
               last : "Mukherjee",
           }
       }
  ])
```
In the "person" model we have given two different values to nested properties "name.first" , "name.last" => "Mayuk" , "Mukherjee" repectively.. 

```javascript
   const allPerson = await Person.find({});
   console.log(allPerson);

   console.log("full name is = "+allPerson[0].fullName);
}  

```
Here by find() method which is a query we get the data and store it into a variable called allPerson. allperson is a array of object here and it has only one object as element and that's why allPerson[0] contains the document.

```
  [
  {
    name: { first: 'Mayuk', last: 'Mukherjee' },
    _id: new ObjectId('65c288e2bf32b1e144f31966'),
    __v: 0
  }
]
full name is = Mayuk Mukherjee
```
Here's the expected output...
Pourquoi Flutterflow 💻
Published: 2024-02-06 19:28:53

Il y a plusieurs raisons pour lesquelles FlutterFlow peut être une excellente option, en particulier si vous envisagez de développer des applications Flutter :

1. Facilité d'utilisation : FlutterFlow offre une interface graphique conviviale et intuitive, ce qui rend la création d'interfaces utilisateur visuelles agréable et accessible à un large éventail de personnes, même à celles qui ne sont pas des développeurs expérimentés.

2. Gain de temps : En utilisant un générateur visuel d'interfaces utilisateur, vous économisez énormément de temps sur le processus de conception et de développement. Vous pouvez rapidement itérer sur les conceptions et voir instantanément comment elles se traduisent en code Flutter.

3. Réduction de la courbe d'apprentissage : Pour ceux qui ne sont pas très à l'aise avec la programmation en Dart ou qui n'ont pas le temps d'apprendre un nouveau langage, FlutterFlow offre un moyen d'entrer rapidement dans le développement d'applications Flutter sans nécessiter une expertise approfondie en programmation.

4. Collaboration en temps réel : La fonctionnalité de collaboration en temps réel intégrée à FlutterFlow permet à plusieurs personnes de travailler simultanément sur un projet, ce qui est idéal pour les équipes de développement.

5. Code Flutter de qualité : Bien que FlutterFlow permette de créer des interfaces visuellement, le code Flutter généré est de haute qualité. Cela signifie que même si vous démarrez avec FlutterFlow, vous n'êtes pas restreint à son interface visuelle, car vous pouvez toujours modifier et personnaliser le code Flutter généré.

6. Possibilité d'apprentissage : Enfin, pour les débutants ou ceux qui souhaitent simplement comprendre comment fonctionne le code Dart ou Flutter, FlutterFlow peut être un excellent outil pour apprendre les bases en observant le code qu'il génère.
Event Storming: The Game-Changing Technique You Wish You Knew Sooner!
Tags: productivity, career, softwaredevelopment, learning
Published: 2024-02-06 19:22:30


_Hello folks, and welcome to another series of Tech Setters where we discuss tech, technologies, and computer science in general. Today, we talk about **Event Storming**, a technique that could be invaluable not only for those of you thinking about starting your own startup but also for those working in established companies or large corporations. It's a practical tool for everyone involved in the software development lifecycle, whether you're at the drawing board of your entrepreneurial journey or navigating the complexities of existing business processes as a high-level manager._

Before we dive deep into the world of Event Storming, let's address a common problems many face during the transition to a microservices architecture, using it as a typical example. Making this leap often results in multiple questions from all involved stakeholders:

- How to properly design microservices?

- How to share and manage data models?

- How to define the boundaries of a service?

- How to determine the service context?

- How to delineate context boundaries?

- To duplicate or not to duplicate data across services?

- How to divide into microservices based on subject areas?

- What is the algorithm for transitioning to microservices?

- How to avoid creating a distributed monolith?

And indeed, how to design correctly? There is no one-size-fits-all answer. If there were, it wouldn't last long before another competitor idea aimed to take the throne! However, there are best practices that have proven their worth in the field. And one such practice is Event Storming.

### Why Bother Reinventing the Wheel or What is the Value of Event Storming?

Complex systems are often developed by large teams where **few, if any, fully understand the entire domain** of the project. Each team member might know their own piece of the puzzle, but combining these pieces into a coherent whole is challenging. Teams frequently encounter incomplete, contradictory, or incorrect requirements and often dig themselves deeper trying to solve issues with technical solutions. This happens because no technology can fix "bad" requirements.

To achieve a common understanding (sometimes called a shared mental model) of the business process of the product being developed, it's essential to bring together domain experts or SMEs (Subject Matter Experts) and equip them with an effective and understandable knowledge extraction tool. Event Storming is simply one of such tools.

👉 **Curious to know more Event Storming?** Then [**check out my full article**](https://iwooky.substack.com/p/event-storming) to know how to close the gap between technical teams and business strategy!


![Event Storming](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8pn2xm2ggz58lojchyv.jpg)
The CSS selector span:has(~span:hover)
Published: 2024-02-06 19:10:21

(~span:hover) selects any <span> element that has a descendant <span> element that is currently being hovered over. 
The ~ combinator is used to select descendants of the selected element. The :hover pseudo-class selects an element that is currently being hovered over by the user's mouse.
The CSS rule color: white; sets the color of the selected <span> element to white.
So, this CSS rule will change the color of any <span> element to white when the user hovers over any of its descendant <span> elements.
AWS Predictions for 2024
Tags: aws, community
Published: 2024-02-06 19:01:19

As you all know, the [2024 survey is live](https://answersforaws.com/survey/) and well underway. I'm excited to share the results with you after it wraps up. In the meantime, I wanted to reflect on last year and make some predictions for 2024.

Infrastructure as Code

Under the [IaC category](https://answersforaws.com/2023/iac/), in July 2023, AWS [added loops to CloudFormation](https://aws.amazon.com/about-aws/whats-new/2023/07/accelerate-cloudformation-authoring-experience-looping-function/), finally ticking a box the community has been asking for since [troposphere](https://github.com/cloudtools/troposphere). I suspect that, in combination with the Terraform licensing changes, it may keep people using CloudFormation for a while longer.

Speaking of which, I debated a lot on whether to separate Terraform and OpenTofu into separate questions. Ultimately, I decided to keep them together, but this may have been a mistake. What are your thoughts?

CI/CD

What surprised me the most about the [2023 CI/CD results](https://answersforaws.com/2023/ci-cd/) was that Jenkins still topped usage at 76%. The retention of GitHub Actions is amazingly high, though, at 99%, so I am expecting to see Jenkins lose the top stop in favor of GitHub Actions.

All of this has nothing to do with AWS, which is telling. Their strategy has been a bit all over the place, and [CodeStar is being discontinued in July](https://aws.amazon.com/codestar/), so that will be removed from the survey next year.

Serverless

In 2023, [SAM and Serverless Framework](https://answersforaws.com/2023/serverless/) were neck and neck at 50% usage. AWS SAM, however, had higher retention, so my prediction is that it will pull ahead in 2024. That is unless CDK overtakes both of them, given it had much higher retention (84%) vs AWS SAM's 69%.

AWS Application Composer was brand new when the survey ran last year and had 63% interest, so I'm excited to see how far it has come in a year.

AI/ML

In January 2023, most people hadn't heard of OpenAI. It was mentioned a few times, so I included it in the "Others" results, but boy things have changed in a year. This time, it earned a dedicated spot on the survey and I am expecting it to top the positive/negative split beating out all other AWS AI/ML services.

Also, now that expectations are a lot higher for the category, I suspect the happiness scores will be down for 2024.


Well, there you have it. I'm excited to see how these predictions hold up. If you haven't already, [please consider taking the survey](https://answersforaws.com/survey/) and sharing your experiences with the community. I'll be back with the results soon after it closes on February 16th.

---

First posted on Feb 5, 2024 at https://answersforaws.com/blog/2024-02-05-predictions-for-2024/
Locating Truck Scales Near Your Area: Everything You Need to Know
Published: 2024-02-06 18:51:07

Truck scales play a crucial role in ensuring safe and legal transportation of goods on the roads. Whether you're a truck driver, a logistics manager, or simply someone interested in road safety and compliance, knowing the locations of [truck scales in your area](https://lsiscales.com/truck-scales/) is essential. Here's everything you need to know about finding truck scales near you:

**Understanding Truck Scales:**
Truck scales, also known as weigh stations or weighbridges, are facilities designed to weigh trucks and their cargo. They help ensure that vehicles are not overloaded, which can compromise safety and damage roads.

**Why Location Matters:**
Knowing the locations of truck scales can save time and money for truckers and trucking companies. By planning routes that pass near weigh stations, drivers can avoid last-minute detours and potential fines for non-compliance.

**Finding Truck Scales:**

**a. Online Resources:** Several websites and mobile apps provide comprehensive databases of truck scale locations. These platforms often allow users to search by location, providing maps, directions, and additional information.

**b. Government Websites:** Many government transportation departments maintain online resources that list the locations of official weigh stations. These websites may also provide real-time information on scale openings and closures.

**c. Trucking Associations:** Trucking associations and industry organizations often offer resources to help drivers locate truck scales. They may provide maps, directories, or mobile apps tailored specifically to the needs of truckers.

**d. GPS Navigation Systems:** Some GPS navigation systems, especially those designed for commercial vehicles, include features that highlight truck scale locations along routes. These systems can be invaluable for drivers navigating unfamiliar areas.

**Tips for Using Truck Scales:**

**a. Plan Ahead:** Incorporate weigh station locations into route planning to minimize delays and ensure compliance.

**b. Check Regulations:** Familiarize yourself with local laws and regulations regarding weigh station usage, including when trucks are required to stop and be weighed.

**c. Stay Informed:** Monitor traffic and weather conditions, as well as any announcements regarding weigh station closures or delays.

**d. Maintain Compliance:** Always adhere to weight limits and other regulations to avoid fines, penalties, and potential safety hazards.

**Conclusion:**
Locating [truck scales near your area](https://lsiscales.com/truck-scales/) is essential for ensuring road safety, regulatory compliance, and efficient transportation operations. By utilizing online resources, government websites, industry associations, and GPS navigation systems, drivers can easily find and plan routes that include weigh station stops. Stay informed, plan ahead, and prioritize compliance to make the most of your trucking journeys.