teleren/devto huggingface dataset:
Weekly 0045
Tags: weeklyretro
Published: 2023-01-30 14:20:29

### Monday

I started to work in the morning very early because today I had a lot of stuff to do.
I worked on the Red Origin’s bug (I worked a little bit over the weekend as well) for the entire morning.
After a while I had a meeting with my product owner about the strategy to send the email to the testers.

Over the lunch I had a meeting with the boarding members of Brandplane to decide some internal rules and other stuff.
Nothing is decided but we have to work on it.

In the afternoon I worked again on Red Origin and its bugs.
In the late afternoon I published the version 6.0

![Red Origin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jd1r6884pvvvt761wo5y.png)

Now we are waiting for the testers.

**Mood:** 🚀

### Tuesday

Not a real productive day. Sometimes happens.
Just a day about researching and recharge for tomorrow.

By the way in the morning I sent out all the tests from Azure DevOps to our three testers.

**Mood**: 🥱

### Wednesday

In the morning I watched a video about improving LinkedIn profile and I updated my profile with some small suggestions that I found. This is my LinkedIn Profile: [https://www.linkedin.com/in/bartolesiemanuele/](https://www.linkedin.com/in/bartolesiemanuele/)

I had a meeting in the middle of the morning for Brandplane about the next steps and about the priorities.
As a developer, of course, I tend to prioritize what is cool but not what is useful for the product. It’s normal but as a CTO, I have to mitigate this feeling.

In the afternoon I had a meeting as one of organizer of Collabdays - Italy 2023.
It’s an event

**Mood: 🚚**

### Thursday

I updated an instance for Red Origin for a tester in the early morning. I hope they start to test the application as soon as possible.
I had some troubles for the installation of one of my colleague. It seemed corrupted or something happened in the database migrations.
I will investigate on it because I don’t want to have this kind of problem for a customer in a production environment.

**Mood: 🤖**

### Friday

I wrote a blog post about how to change or create a license in a GitHub repository.

![https://res.cloudinary.com/practicaldev/image/fetch/s--Md88wmbV--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70dnlxhzv9tzrkh7j14m.png](https://res.cloudinary.com/practicaldev/image/fetch/s--Md88wmbV--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70dnlxhzv9tzrkh7j14m.png)

Link: [https://dev.to/kasuken/add-or-change-a-license-on-github-1k53](https://dev.to/kasuken/add-or-change-a-license-on-github-1k53)

**Mood: ✍️**

---

Are you interested in learning GitHub but don't know where to start? Try my course on LinkedIn Learning: [Learning GitHub](https://bit.ly/learninggithub).

![LinkedIn Learning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sdc2bpiftpadibi4h51c.gif)

---

Thanks for reading this post, I hope you found it interesting!

Feel free to follow me to get notified when new articles are out 🙂

{% embed https://dev.to/kasuken %}
Docker compose For Corteza
Tags: corteza, container, compose, containerapps
Published: 2023-01-30 14:18:11

### Configure docker-compose.yml

```
version: '3.5'

services:
  server:
    image: cortezaproject/corteza:${VERSION}
    restart: always
    env_file: [ .env ]
    depends_on: [ db ]
    ports: [ "127.0.0.1:18080:80" ]

  db:
    
    image: postgres:13
    restart: always
    healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 10s, timeout: 5s, retries: 5 }
    volumes:
      - "dbdata:/var/lib/postgresql/data"
    environment:
      POSTGRES_USER:     corteza
      POSTGRES_PASSWORD: corteza
```

Create .env next to docker-compose.yml
### Configure .env

```
DOMAIN=localhost:18080
VERSION=2022.9

DB_DSN=postgres://corteza:corteza@db:5432/corteza?sslmode=disable

HTTP_WEBAPP_ENABLED=true

ACTIONLOG_ENABLED=false
```
Direct your browser to http://localhost:18080

---

### Expose Corteza to your internal network and the world
If you want to use Corteza in production and with other users,Change the following code in docker-compose.yml as below :

```
ports: [ "0.0.0.0:18080:80" ]
```
And Change the following code in .env as below :

```
DOMAIN=YOUR_PUBLIC_IP:18080
```

---

### Exposing external port
Edit .env to change the exposed port

```
DOMAIN=YOUR_PUBLIC or LOCAL_IP:8585
```
Direct your browser to http://localhost:8585
K6 - Outil simple et rapide de Load Testing
Tags: sre, devops, french
Published: 2023-01-30 14:17:00

Quand on fait du Load Testing sur ses APIs, on est souvent confronté à plusieurs problèmes :
- L'outil n'est pas vraiment simple à utiliser par tous
- L'outil ne permet pas d'aller "simplement" à des "hauts" volumes
- La visualisation des résultats n'est pas très accessible

Aujourd'hui, on va voir comment **[K6](https://k6.io/)** résout ces différents soucis.

---

## Qu'est-ce que K6?

Créé en 2016, K6 est un outil de Load Testing open source développé en Go. Il a été conçu afin de faciliter la vie des développeurs pour effectuer les tests de charge, car le marché et le contexte dans les sociétés faisaient que cette tâche était à de plus en plus de leur responsabilité.

Le projet a été ensuite aquis en juin 2021 par Grafana Labs avec l'objectif d'accélérer le développement du projet.

---

## En quoi il répond aux problèmes évoqués plus tôt ?
### Simple d'utilisation
La grande force de cet outil est qu'il est très rapide à installer et à utiliser. En 10 minutes montre en main, vous pouvez l'avoir installé, créé un premier script et l'avoir exécuté!

De plus, le langage utilisé pour la rédaction des cas de tests est le **javascript**. Que vous venez de n'importe quel langage, vous saurez rapidement vous y retrouver. De plus, la flexibilité du langage aide pour justement éviter d'être bloqué dans la rédaction de certains blocs de code.

### Haute performances
Par rapport à des outils utilisant la JVM pour être exécuté, K6 a besoin de bien moins de ressources pour faire tourner ses tests. De facto, il vous sera bien plus simple d'augmenter le volume généré par une instance.

### Visualisation des données
Vis à vis de pas mal d'outils, K6 permet une intégration avec **Grafana**, **Datadog** ou autres afin d'avoir une bonne visualisation des résultats, mais aussi **être capable de les suivre en temps réel** facilement.

---

Allez voir par vous même leur documentation et expérimentez l'outil. Tout est simple à utiliser, tout est documenté parfaitement avec toutes les étapes pour les différents setups...

Vis à vis de tous les outils que j'ai pu utiliser, celui-là est celui que je préfère car contrairement aux autres je ne suis pas obligé de relire la documentation dans tous les sens pour me rappeler de comment fonctionne un script auquel je n'ai pas touché depuis un bout. 

En conclusion, n'hésitez pas à l'essayer et dites-moi ce que vous en pensez!

---

## Liens
- Site K6 - https://k6.io/
- Projet GitHub - https://github.com/grafana/k6

---

J'espère que ça vous aidera! 🍺

---

<center><h3>Vous voulez me supporter?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
K6 - Lightweight Load Testing tool
Tags: devops, sre
Published: 2023-01-30 14:16:00

When we are doing Load Testing on our APIs, we often have several issues:
- The tool is not easy to use by everyone
- It doesn't allow to do "high volumes easily"
- The visualization of the results can be difficult to read

So today, we will see how **[K6](https://k6.io/)** resolve all these issues.

---

## What is K6?

Created in 2016, K6 is a open source Load Testing tool developed in Go. It was created to help the developers' life with load testing, because in the companies this kind of task was more of the developers' responsability.

The project was acquired in june 2021 by Grafana Labs with the objective to accelerate the development of the project.

---

## Why it resolves the issues ?
### Easy to use
The great force of this tool is that it's really easy to install and use. In ten minutes you can install it, create a first simple scenario and execute it!

Also, the language used to write the test cases is **JavaScript**. It's a simple language that anyone can read and use, no matter which other language you already know. It's a flexible language which helps to avoid some blocking issue.

### High performances
In comparision of other tools which are using the JVM to be executed, K6 needs less resources. So it will be easier to have higher volumes for each instances.

### Data visualization
Against other tools, K6 can be integrated with **Grafana**, **Datadog** and others to have a great visualization. Also you can have a **real time visualization**. *(Which can help a lot in some cases)*

---

Go check by yourself and test the tool. Everything is simple to use, it's well documented with all the steps for each setup...

I really like this tool and find it really easier to use.

In conclusion, try it and give me a feedback about what you think about it!

---

## Links
- K6 website - https://k6.io/
- GitHub project - https://github.com/grafana/k6

---

I hope it will help you! 🍺

---

<center><h3>You want to support me?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Book Review: Learning Go by Jon Bodner
Tags: go, books, beginners
Published: 2023-01-30 13:18:49

Looking for a book to teach you Go?  I'm reviewing the newest and best I can find, to give you the recommendation for which book is the best in 2023.  This is my third review in the series, this time covering Jon Bodner's book, _Learning Go_.

{% youtube https://youtu.be/fx24Oy3QAkI %}
AI Projects for Final Year Students
Tags: aiprojects, aiprojectfinalyearstudents, programming, ai
Published: 2023-01-30 13:10:23

Artificial Intelligence (AI) is a rapidly growing field that has the potential to revolutionize many industries and areas of life. As a result, AI has become a popular topic of study for students pursuing careers in technology and computer science. Final year students in particular have the opportunity to showcase their skills and knowledge by working on AI projects that are both challenging and impactful. In this essay, I will discuss some potential AI project ideas for final year students.

Here are a few ideas for [AI project for final year students:](https://takeoffprojects.com/ai-projects-for-final-year-students)

<u>Object Detection:</u> Train a computer vision model to detect objects in images or video, such as pedestrians, vehicles, or buildings.

<u>Image Segmentation:</u> Develop a deep learning model for semantic image segmentation, which involves classifying each pixel in an image into one of several classes, such as background, foreground, or object of interest.

<u>Speech Recognition:</u> Build a speech recognition system that can transcribe audio into text, with applications in fields such as customer service, dictation, or language translation.

<u>Natural Language Processing:</u> Create a model for natural language processing (NLP), such as sentiment analysis, text classification, or question answering.

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

<u>Recommendation Systems:</u> Build a recommendation system that suggests items to users based on their preferences and past behavior, with applications in areas such as e-commerce, music streaming, or online advertising.

<u>Reinforcement Learning:</u> Implement a reinforcement learning algorithm to solve a complex problem, such as playing a game, controlling a robot, or optimizing a business process.

<u>Generative Models:</u> Train a generative model, such as a Generative Adversarial Network (GAN) or Variational Autoencoder (VAE), to generate new data, such as images, music, or text.

These are just a few examples of AI projects that final year students can work on. The key is to choose a project that aligns with your interests, skills, and career goals, and that allows you to demonstrate your understanding of AI concepts and techniques.

    In conclusion, final year students have many potential AI project options available to them. These projects provide students with the opportunity to apply what they have learned in their coursework to real-world situations and develop their skills in a practical setting. Additionally, these projects demonstrate students' abilities and potential to potential employers and graduate schools.
Adding pinned posts with Laravel
Tags: laravel, pinned, posts
Published: 2023-01-30 14:30:28

---
title: Adding pinned posts with Laravel
published: true
date: 2023-01-30 13:05:00 UTC
tags: Laravel, Pinned, Posts
canonical_url: https://dcblog.dev/adding-pinned-posts-with-laravel
---

 ![Adding pinned posts with Laravel](https://dcblog.dev/images/posts/adding-pinned-posts-with-laravel.png) 

Let's say you have a blog and have posts ordered by their published date. Later you decide you want to pin certain posts.

Pinned posts should be displayed before any other posts regardless of their published date.

## The Solution

You can accomplish this by modifying the order clause in the query.

Take this order:

```php
->orderBy('published_at', 'desc')
```

This will order posts by their published date in descending order.

Adding a second-order clause:

```php
->orderBy('is_pinned', 'desc')->orderBy('published_at', 'desc');
```

This time ordered by a is\_pinned column then order by the published\_at column.

This will show the posts pinned first and then show the posts in their published order.

## The Setup

Adding a migration to add a column called is\_pinned to a posts table

```php
php artisan make:migration add_pinned_field_to_posts
```

### Migration

```php
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPinnedFieldToPosts extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('posts', function (Blueprint $table) {
            $table->boolean('is_pinned')->default(false);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('posts', function (Blueprint $table) {
            $table->dropColumn('is_pinned');
        });
    }
}
```

### Create a local scope

In the post model, create a local scope for the order.

```php
public function scopeOrder($query)
{
    return $query->orderBy('is_pinned', 'desc')->orderBy('published_at', 'desc');
}
```

### Using the local scope

When querying the posts use the order scope to set the order for both is\_pinned and published\_at

```php
Post::order()->paginate();
```
globus_bank_ussd_code6
Tags: globusbank, ussd, code
Published: 2023-01-30 13:02:43


[https://www.bankfanz.com/globus-bank-transfer-code/](https://www.bankfanz.com/globus-bank-transfer-code/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)


https://plaza.rakuten.co.jp/globusbankussd/diary/202301300000/
https://www.divephotoguide.com/user/globusbankussd6
https://www.producthunt.com/@globus_bank_ussd_code6
https://www.provenexpert.com/globusbankussdcode2/
https://vocal.media/authors/globus-bank-ussd-code-0a61n005sy
https://wakelet.com/@globusbankussdcode6364
https://www.lifeofpix.com/photographers/globus_bank_ussd_code6/
https://rosalind.info/users/globus_bank_ussd_code7/
http://phillipsservices.net/UserProfile/tabid/43/userId/196478/Default.aspx
https://camp-fire.jp/profile/globus_bank_ussd_code6
https://app.roll20.net/users/11571740/globus-bank-ussd-code-g
https://seedandspark.com/user/globus-bank-ussd-code6
https://plazapublica.cdmx.gob.mx/profiles/globus_bank_ussd_cod/activity
https://www.zintro.com/profile/globus_bank_ussd_code6
https://peatix.com/user/15739826/view
https://www.metal-archives.com/users/globus_bank_ussd_code6
https://trabajo.merca20.com/author/globus_bank_ussd_code6/
https://www.intensedebate.com/people/Globus_bank6
https://www.mifare.net/support/forum/users/globus_bank_ussd_code6
https://pinshape.com/users/2564011-globus-bank-ussd-code6
https://www.kiva.org/lender/globusbankussdcode8164
https://www.credly.com/users/globus-bank-ussd-code-globus/badges
https://www.myminifactory.com/users/Globusbankussdcode6
https://www.sqlservercentral.com/forums/user/globus_bank_ussd_code6
https://guides.co/a/globus-bank-u-4896
http://foxsheets.com/UserProfile/tabid/57/userId/119344/Default.aspx
https://storium.com/user/globus_bank_ussd_code6
https://speakerdeck.com/globus_bank_ussd_code6
https://www.kompasiana.com/globus44900
https://www.longisland.com/profile/globus_bank_ussd_code6
https://myanimelist.net/profile/globus_bank_ussd
https://social.msdn.microsoft.com/Profile/globus_bank_ussd_code6
https://www.iheart.com/podcast/269-globus-bank-ussd-code-108045958/episode/globus-bank-ussd-code6-108045960/
Swift native base class NSObject
Published: 2023-01-30 12:39:25

#Description

The root class of most Objective-C class hierarchies, from which subclasses inherit a basic interface to the runtime system and the ability to behave as Objective-C objects. It's the one class that has no superclass.

#Core Responsibility:

The NSObject class provides inheriting classes with a framework for creating, initializing, deallocating, copying, comparing, archiving, and unarchiving objects, run-time environment, querying objects, and message forwarding.

> The NSObject is an abstract class. You use instances of classes that inherit from NSObject but never of NSObject itself.


**Declaration**

```
class NSObject
```

#Initializing an Object to Its Class

Every object is created in the run-time system through its isa instance variable, inherited from the NSObject class. isa identifies the object's class; it points to a structure that's compiled from the class definition. Through isa, an object can find whatever information it needs at run time--such as its place in the inheritance hierarchy, the size, and structure of its instance variables, and the location of the method implementations it can perform in response to messages.

Because all objects directly or indirectly inherit from the NSObject class, they all have this variable. The defining characteristic of an "object" is that its first instance variable is an isa pointer to a class structure.

**What if you make a subclass inherited by NSObject?**

- Those classes are Objective-C classes themselves.
- Use objc_msgSend() for calling all the methods.
- Provides Objective-C runtime metadata.

**What if you do not make a subclass inherited by NSObject?**

- Those classes are Objective-C classes but use compatible methods of NSObject class.
- Do not use objc_msgSend() for calling their methods.
- Do not provide Objective-C runtime metadata.

> Important: Making a subclass from NSObject gets you Objective-C runtime feature along with Objective-C performance. But you can include or omit NSObject as a superclass.

#What next?

Now, you know what is [NSObject](https://developer.apple.com/documentation/objectivec/nsobject) class is and why it is essential in the Cocoa Touch framework. In the upcoming articles, you will more about UIKit components. Till then,

Eat. Sleep. SwiftAnytime. Repeat.
Using PHP attributes easily
Tags: php, attributes
Published: 2023-01-30 12:39:23

PHP attributes are a new feature included in the last php 8 version which allow us to easily add metadata to our classes, methods and properties.

Creating an attribute is easy, we only have to create a class, define its properties and mark it as attribute. Let's see an example

```php

    #[\Attribute]
    class IsBackground
    {
        public function __construct(
            public readonly ?int $delay = null
        ){ }
     }

```
In the above code, we've created an attribute called _IsBackground_ which holds one parameter: _delay_. 

Now let's see how we could use it. Imagine we have a class called _Operation_ which we want to decorate as "_IsBackground_".

```php

    #[IsBackground]
    class Operation {

        // properties and methods
    }

```
As we can see, it's already marked simply using _#[IsBackground]_ at the top of the class.

Now, let's see how to read attribute data:

```php
     $reflectionClass = new \ReflectionClass(new Operation());
     $attributes = $reflectionClass->getAttributes(IsBackground::class);
     $attr = reset($attributes);
     $attrObject = $attr->newInstance();

     echo $attrObject->delay;
```

When we decorated _Operation_ with _IsBackground_ attribute we defined no delay. In order to set a delay, we would change Operation class like this:

```php
#[IsBackground(delay: 600)]
class Operation {

    // properties and methods
}
```

> If you want to learn how i used PHP attributes to define API operations, you can read [this post](https://dev.to/icolomina/an-operation-oriented-api-using-php-and-symfony-4p6d) or read my book: [Building an operation-oriented api using PHP and the Symfony framework](https://www.amazon.com/dp/B0D79KGL7P)
Compare API Gateway Kubernetes Ingress Service Mesh
Published: 2023-01-30 12:35:16

|Feature| API Gateway | Kubernetes Ingress |Service Mesh|
|------------------|---------------------|---------------------|---------------------|
|  Purpose|Centralized entry point for clients to access microservices, provides abstraction and protection from direct client requests.|Provides routing for incoming connections to cluster services, enables exposing services to the internet.|Provides advanced traffic management features for microservices communication to improve reliability and performance.|
|Scalability|Typically horizontally scalable by adding instances, provides centralized management of access to microservices.|Horizontally scalable by adding ingress controllers, provides routing within the cluster.|Horizontally scalable by adding proxies, provides flexible and scalable traffic management within microservices.|
|Routing|URL-based routing, request transformations (header manipulation, request data mapping, payload compression, etc.).|Path-based routing within the cluster using ingress rules, no request transformation capabilities.|Advanced routing (load balancing, traffic shaping, circuit breaking, etc.), traffic flow control between services, sophisticated traffic management strategies (canary releases, blue-green deployments, A/B testing, etc.).|
|Security|Authentication, authorization, encryption, SSL termination.|SSL termination, basic security.|mTLS encryption, fine-grained security policies (certificate validation, peer identity verification, etc.).|
|Monitoring & Management|Request logging, performance monitoring, API management, health checks.|Limited monitoring and management capabilities.|Advanced traffic management features for microservices communication to improve reliability and performance.|
Rezbook Global DMC
Tags: webdev, travel, tour, tourism
Published: 2023-01-30 12:35:02

Book Holiday Package From **[Rezbook Global DMC](https://rezbookglobal.com/)** around the world. Get tips for selecting your flight, a hotel room or Airbnb rental. Plus, find out about best practices for packing for your trip and how to get reimbursed for travel expenses with Rezbook Global DMC.