teleren/devto huggingface dataset:
Aprendendo Git Branching - Temas Avançados
Tags: git
Published: 2023-06-09 12:07:58

---
title: Aprendendo Git Branching - Temas Avançados
published: true
description: Série de posts sobre o site/aplicativo Aprendendo Git Branching. Aqui vou postar os comandos que aprendi e o que entendi de cada um.
tags: git
series: Learning Git Branching
---
**WIP**: A descrição e explicação dos comandos está sendo postada [aqui](https://dev.to/epochchrono/aprendendo-git-branching-comandos-24d2) conforme o avanço.

## levels
### Main
#### Módulo: Temas avançados
##### 1: Fazendo mais de 9000 rebases
###### Dificuldade (pra mim!): dificil
- Essa lição é mais um cenário proposto que diz:

> Cara, temos um monte de branches aqui! Vamos fazer um rebase de todo o trabalho contido nesses branches para o main.

> No entanto, a cúpula da administração está tornando as coisas mais difíceis -- eles querem que os commits estejam todos em ordem sequencial. Isso significa que a nossa árvore final precisa ter o C7' por último, C6' acima disso, e assim por diante, tudo ordenado.

> Se você fizer besteira, sinta-se livre para usar o comando reset para recomeçar do zero. Depois lembre de olhar nossa solução do gabarito para ver se consegue resolver a tarefa usando menos comandos! 

- Comandos:
<details>

```bash
# 1
git rebase main bugFix

# 2
git rebase bugFix side

# 3
git rebase side another

# 4
git rebase another main
```
</details>

##### 2: Especificando pais
###### Dificuldade (pra mim!): fácil
- Essa lição é mais um cenário proposto que diz:

> Assim como o modificador `~`, o modificador `^` também aceita um número opcional depois dele.

> Em vez de especificar o número de gerações a voltar (que é o que o `~` faz), o modificador no `^` especifica qual referência de pai a ser seguida a partir de um commit de merge. Lembre-se que commits de merge possuem múltiplos pais, então o caminho a seguir é ambíguo.

> O Git normalmente subirá o "primeiro" pai de um commit de merge, mas especificar um número após o `^` muda esse comportamento padrão.

> Basta de conversa, vejamos o operador em ação.

- Comandos:
<details>

```bash
# 1
git branch bugWork mmain~^2~
```
</details>

##### 3: Espaguete de branches
###### Dificuldade (pra mim!): fácil
- Essa lição é mais um cenário proposto que diz:

> Uhuuuuu Nelly! Temos um belo de um objetivo para alcançar neste nível.

> Temos aqui um `main` que está alguns commits atrás dos branches `one`, `two` e `three`. Seja lá por qual razão, precisamos atualizar esses três outros branches com versões modificadas dos últimos commits do `main`.

> O branch `one` precisa de uma reordenação e da exclusão do C5. O `two` precisa apenas de reordenação. O `three` precisa de um único commit!

> Vamos deixar você descobrir como resolver esta tarefa -- mas não deixe de ver a nossa solução depois com o comando `show solution`.
- Comandos:
<details>

```bash
# 1
git checkout one

# 2
git cherry-pick C4 C3 C2

# 3
git checkout two

# 4
git cherry-pick C5 C4 C3 C2

# 5
git branch -f three C2
```
</details>
Who's looking for open source contributors? (week 45)
Tags: discuss, opensource, contributorswanted, codenewbie
Published: 2023-06-09 12:00:00

---
title: Who's looking for open source contributors? (week 45)
series: Looking for Contributors
published: true
description: Discover which open source projects are actively seeking contributors. Learn how you can make a meaningful contribution to the open source community and gain valuable experience. Find out who's looking for open source contributors now.
tags: discuss, opensource, contributorswanted, codenewbie
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2023-06-09 12:00 +0000
---
Open Source is about the community. Whether you have a project or you're looking to make your first PR, we want to help facilitate those connections. 

## Tell us about your project
_Promote your project by providing a link to the repo. Everyone who posted in previous weeks is welcome back this week, as always 😄_

Open Source should be a welcoming space for contributors. The README is the front door of your project. If you'd like to check out an example of a README, here's our [OpenSauced/insights README](https://github.com/open-sauced/insights).

If you submit please have the following in your repo to make it welcoming and helpful for contributors:

1. README.md
2. CONTRIBUTING.md

Feel free to drop your issues and repos in the [OpenSauced Discord](https://discord.gg/opensauced) #:eyes:-looking-for-contributors channel at any time! 

If you're new to open source, and you're not sure where to start, check out our [Intro to Open Source course](https://github.com/open-sauced/intro). 

Finally, consider reading the [Best Practices for Maintainers](https://opensource.guide/best-practices/).

Just a note to say, we've restarted this post from something Ben was doing for a while :star-struck: 

Happy coding!
Python: meet ThreadPool
Tags: python, programming, performance, beginners
Published: 2023-06-09 11:58:10

As the name suggests, you can use ThreadPool to manage thread pools in Python.

## Disclaimer

I'll simplify various concepts here, as it's only an introduction.

## Python Threads in short

A Python process can be considered as an instance of the Python program (~ main thread).

It usually executes specific instructions in one thread, but you can create more threads to execute some tasks _concurrently_.

The built-in ThreadPool class can ease the configuration while providing some good standards.

Of course, you may want to manage it manually, like starting and closing threads exactly when you need it, but it gets significantly harder when the number of tasks increases, and the class already optimized that operation.

## Multiprocessing in short

With ThreadPool, you basically get "reusable threads" to execute tasks. The class abstracts the complexity:

* you don't have to select a thread for your task
* you don't have to start the thread manually
* you don't have to wait for the task to complete
* it supports both local and remote concurrency

There is so much more to say about multiprocessing, but, as a beginner, such built-in tool can be beneficial:

```python
from multiprocessing.pool import ThreadPool

if __name__ == '__main__':
    results = ThreadPool(5).imap_unordered(myfunc, some_list)
    for result in results:
        print(result)
```

Here, we define a pool of 5 tasks, and we apply `myfunc` to `some_list`. If you have a list of files or URLs to process, you may leverage the benefits of the pool to speed up the execution.

_N.B.: `pool.imap_unordered` is a variant of `pool.imap`. It might be slightly faster in some cases._

## The big caveat

Obviously, if you misuse it, ThreadPool can have unexpected effects, but it's designed to ease the implementation and prevent common mistakes.

In my experience, it should not be used for writing large files unless you process them in chunks in your handler (`myfunc`), which Python allows you to do quite easily.

## Better implementations

Please refer to [the documentation](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.ThreadPool) for better implementations of ThreadPool.

For example, you'll see that Python devs recommend using `concurrent.futures.ThreadPoolExecutor` instead of `ThreadPool`, because it's compatible with more libraries:

```Python
from concurrent.futures import ThreadPoolExecutor

if __name__ == '__main__':
    with ThreadPoolExecutor(max_workers = 5) as executor:
        executor.map(mynfunc, some_list)
```

## Bottom line

Thread pools allows managing thread conveniently **and** efficiently.

The internal mapper is pretty handy to apply a function on each element in a list.
Unconventional Programming Opinion: You become an unofficial maintainer once you update your framewor
Tags: webdev, framewo
Published: 2023-06-09 11:40:40


[I published this article on my blog.](https://kiru.io/blog/posts/2023/unconventional-programming-opinion-framework-maintainer/)


TLDR: Dear framework developer, please consider us, the framework users, as the unofficial maintainer of your framework. When you change things, think about the wider cost.

Warning: This is going to be a short gibberish, brain-fart and/or rant.

Recently I was migrating a project from a framework v385 to v366 and felt the pain wasting time to apply some internal refactoring the framework team did to my own project.

Imagine if I had the following functions in my code and I wanted to refactor.

```
const isUnicorn = (animal) => {
  return hornCheck(animal)
        && !isThisCodeImaginary(animal)
        && areWeInMysticalLand();
}
const hornCheck = (animal) => animal.horns.length == 1;
const isThisCodeImaginary = (animal) => 1/0;
const areWeInMysticalLand = () => true;
```

Renaming any of those functions would cost me nothing. Now, if the same code was a framework, and your users defined the areWeInMysticalLand function, then changing it would be easy for you. For the users, you would leave an entry in the migration notes.

As a developer and user of the before-mentioned imaginary framework, you literally are changing your code to satisfy the refactoring the framework developers did.

Obviously this is a made up example and I don’t want to point the fingers to the poor maintainers. I just want to give you a different perspective on how to think about small changes.

With each new version of frameworks, languages, and tools around us, I wonder, when do we stop doing stuff in the name of better and improvements.

That’s it?
Yep, I don’t want to waste your and my time.

Let me go back searching the internet for why v366 gives me an error.

See ya later.
Azure Application Insights with Angular
Published: 2023-06-09 11:40:02

<a href="https://www.youtube.com/embed/ln3Cn8NZ4wM" target="_blank"><img src="https://i.ytimg.com/vi/ln3Cn8NZ4wM/maxresdefault.jpg" alt="IMAGE ALT TEXT HERE" width="240" height="240" border="10" /></a>
Azure Application Insights is a powerful monitoring tool that can be used from the early stages of development to production.<br/>
In this video, we will go through how to set it up, implement it in Angular, and view the same logs.<br/>
{% tag azure %} {% tag angular %} {% tag application insights %}
MİÇO AJANI (LINUX) KURULUMU
Published: 2023-06-09 11:29:01

- Miço istemci Linux işletim sistemine sahip makinelere çeşitli yöntemlerle kurulabilir. Bu kurulumda manuel kurulumda interaktif modunun hiç açılmadan kurulum yapılmasına değinilecektir.

- Mico-setup ve osquery paketleri istemci üzerine atılarak kurulumu gerçekleştirilir. Kurulum sırasında Mico sunucusunun IP adresini vermektedir. 

- Miço ajan kurulumu manuel kısımda interaktif modunun hiç açılmadan kurulum yapılması için şu komut girilir:

```bash
echo mico mico/server_url string "https://MICO_SERVER:7779" | sudo debconf-set-selections | sudo apt-get install /tmp/DEBS/mico-setup-x64.deb -y
```

**:bangbang:** Komutu çalıştırmadan önce, mico-setup-x64.deb dosyasının /tmp/DEBS/ dizininde olduğundan emin olun. Eğer dosya başka bir konumda ise, komutu ona göre düzenlemelisiniz.

- Böylece kurulum gerçekleşir.
ChatGPT and AI tools
Published: 2023-06-09 11:04:54

1. [**Google Bard**](https://bard.google.com/)
   An AI chatbot that can answer questions, summarize articles, and generate images using natural language and internet access

2. [**Vidyo.ai**](https://vidyo.ai/)
An AI that can convert YouTube videos into short clips with captions and editing options.

3. [**Jeda.ai**](https://www.jeda.ai/)
AI Workspace for Instant Productivity

4. [**Scribble Diffusion**](https://scribblediffusion.com/)
Turn your sketch into a refined image using AI

5. [**Rezi**](https://www.rezi.ai/)
Rezi is the only resume platform that uses leading AI to automate every aspect of creating a hirable resume

[**Read the More about Article on here**](https://osandalelum.github.io/)
Kubeconfig for EKS Cluster
Tags: aws, awscommunitybuilders, kubernetes, eks
Published: 2023-06-09 10:21:28

#How to create a `kubeconfig` file for an existing EKS Cluster?


### Step-1:
Install **`aws-cli`** on your machine using the following script:

```bash
#!/bin/bash
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version

```

### Step-2:
Run **`aws configure`** command to set up aws credentials:
```
$ aws configure

AWS Access Key ID [None]: <AccessID>
AWS Secret Access Key [None]: <AccessKey>
Default region name [None]: <Region>
Default output format [None]: <Format, e.g:json>

```
### Step-3:
Create **`kubeconfig`** file on **`~/.kube/config`** location:

```
$ aws eks update-kubeconfig --name <EKS_CLUSTER_NAME> \
                            --region <REGION_CODE>

```

> Run:
```
$ aws eks update-kubeconfig --name cluster-1 --region ap-northeast-1 

$ cat ~/.kube/config

```
****
### Bonus: How to list all existing EKS Cluster ?
```
$ aws eks list-clusters --region <AWS-REGION> 

$ aws eks list-clusters --region ap-northeast-1
```
> Output:
```
{
    "clusters": [
        "Cluster-1",
        "Cluster-2"
    ]
}
```

> Query Cluster Name:
```
$ EKS_CLUSTER_NAME=$(aws eks list-clusters --region ap-northeast-1 --query clusters[0] --output text)

$ echo $EKS_CLUSTER_NAME

```
> Output:
```
Cluster-1
```
What are new trends in B2B ecommerce? How AI will change that?
Tags: discuss, ai
Published: 2023-06-09 10:54:44

New trends in B2B ecommerce include personalization, mobile commerce, and the rise of marketplaces. AI is changing the game by enabling personalized experiences, optimizing mobile commerce, and powering efficient marketplaces and ecosystems. It's revolutionizing the B2B ecommerce landscape, enhancing customer experiences, and driving growth.
Astro.build - Compress files
Tags: astro
Published: 2023-06-09 10:53:18

Here is how to allow compress files in Astro.
For now this an experimental feature

In Astro config file, put the following code :

```js
import { defineConfig } from 'astro/config';
import compress from "astro-compress";

export default defineConfig({
    integrations: [compress()],
    vite: {
        build: {
          assetsInlineLimit: '0',
        },
      },
});
```
AI: what is Machine Learning
Tags: ai, machinelearning
Published: 2023-06-09 10:40:45

In recent months, everywhere there is talk of artificial intelligence. Sometimes with knowledge of the facts, sometimes by slipping it a little haphazardly into conversations. It's definitely not a new concept, but it's not an easy topic of discussion, for several reasons. It is difficult to understand the basics, it is difficult to understand the concrete areas of use, it is difficult to enter into the ethical implications.

As a technician, however, I feel the need to understand how this branch of information technology can enter into my work routine, so I started training me to be able to understand a little better the limits and potential. 

So now I want to start sharing with you what I have learned and I am learning, so as to help those wishing to learn more to get a better idea of the current evolutionary state.

The first question that I had, was what means "machine learning".

## What is Machine Learning?
Machine learning (ML for friends) is a discipline of artificial intelligence (AI for friends).

## What is the goal of ML?
The goal of ML is the creation of systems capable of learning independently starting from data analysis.

## How does it do it?
ML is based on algorithms that simulate the learning process of human beings, going to refine results and performances from time to time.

ML uses mathematical algorithms applied to large amounts of data with the aim of producing models applicable to those same data that can be replicated on the data itself in order to be able to produce predictions.

The need for a similar technology is given by the fact that a problem cannot always be solved by programmed software, either because it is too complex or because it evolves too quickly.

For example for facial recognition, or language translation, but also for medical diagnoses.

To solve these complex problems, a large amount of data is fed to the system, and the algorithms are left to work on it by recognizing patterns, rules, relationships between the data themselves, so as to obtain a model which can then also be applicable in future.

Everything therefore starts from a training phase, precisely because it is not the programmer who defines the algorithm, but it is the system itself which autonomously analyzes the data provided and discovers how to use them to solve specific problems.
How to Boost Your Web Performance in Asp .NET Core MVC
Tags: webdev, programming, html, aspdotnet
Published: 2023-06-09 10:38:44

Boosting web performance in ASP.NET Core MVC involves optimizing various aspects of your application. Here are several techniques you can apply:

1. Caching: Implement caching mechanisms to store frequently accessed data in memory, reducing the need to retrieve it from the database repeatedly. Utilize features such as in-memory caching, distributed caching, or client-side caching using HTTP headers like ETag or Cache-Control.

2. Minification and Bundling: Minify and bundle your static assets like CSS and JavaScript files to reduce their size and the number of HTTP requests. Tools like ASP.NET Core Bundler & Minifier can automatically combine and compress your files.

3. Gzip Compression: Enable Gzip compression on your server to reduce the size of transmitted data. This can significantly reduce the time it takes to transfer resources to the client.

4. Optimize Images: Compress and optimize images to reduce their file size without sacrificing quality. Tools like ImageSharp or ImageMagick can be used to resize, compress, and cache images.

5. Client-Side Caching: Leverage browser caching by setting appropriate HTTP headers (e.g., Cache-Control, Expires) for static resources. This allows the client's browser to store and reuse resources, reducing subsequent requests.

6. Lazy Loading: Implement lazy loading techniques for images and other content that is not immediately visible on the page. This defers the loading of non-critical resources until they are actually needed, improving initial page load time.

7. Database Optimization: Optimize your database queries by using appropriate indexes, reducing unnecessary data retrieval, and optimizing database schema. Entity Framework Core provides tools and techniques for improving database performance.

8. Asynchronous Programming: Utilize asynchronous programming techniques, such as async/await, to avoid blocking threads and improve scalability. This allows your application to handle more concurrent requests.

9. Use Content Delivery Networks (CDNs): Offload static content, such as CSS, JavaScript, and images, to a CDN. CDNs distribute your content across multiple servers worldwide, reducing the network latency and improving delivery speed.

10. Performance Monitoring and Profiling: Regularly monitor your application's performance using tools like Application Insights or MiniProfiler. Identify performance bottlenecks, optimize critical code paths, and measure the impact of your optimizations.

Remember, the specific techniques you should apply may vary depending on your application's requirements and constraints. It's important to profile and benchmark your application to measure the effectiveness of each optimization and iterate as necessary.
Setting up an audience targeting on your Facebook ad Manager.
Tags: beginners, advert, dev, facebook
Published: 2023-06-09 10:33:05

Setting your detailed target audience on Ad Manager

In Facebook ad creation, audience targeting falls in the New ad set stage, i.e the second stage of the ad setup on Ad Manager, the result of the campaign ad is somewhat dependent on the audience targeting as well because the general aim of running ad is to reach out to the business audience. However, before embarking on this task of setting up an ad on Facebook, we need to first:

- 
 Create a detailed Audience analysis report for your brand Set up your Professional Facebook page, and add all necessary business information like phone number, contact address, and business description. You can now proceed to your Ad Manager on your account. Ensure that your main Facebook account is allowed to run ads. Whichever account you’ll want to use, you can verify this by clicking on ad manager/create ad, it will display a drop box of caution if it is restricted, if not, then you’re good to go. 

- 
Now, moving on to the audience set- The ad IDE(Integrated development environment) is in 3 phases which are; **campaign name, Ad set name, and Ad name**. The audience setting will be done on the Ad set name category, Procedures are:

 Click on edit audience In alignment with your already made audience analysis, set those whom your ad campaign is targeting, and select the right gender, and age.

Select the location you’ll like to display your ad to. Move on to a detailed targeting audience, here you can make wide changes to your audience, by browsing the interest, behavior, and demography of people as regards your brand. That’s why knowing much about your audience is crucial to generating results. During the process of editing your detailed targeting audience, the slide by the right-side corner updates as any changes are made. Note that if the slide displays audience unavailable, it means that you have made the wrong editing of audience and your ads will not be shown to the right audience.

All you need to do is to go back to editing the detailed targeting audience to re-edit or click on the performance per goal option to select the right option that best suits your campaign.

 Of course, your ad campaign requires enough knowledge and experience before it can perform well. As a newbie, you keep learning and practicing to become better. 
Hope this is impact? you can add your view in the comment session. Thank you.