teleren/devto huggingface dataset:
Colorfull Terminal!!!
Tags: python, opensource, terminal, colorful
Published: 2023-03-31 19:21:46

# Clot!!


<p align="right"> <img src="https://komarev.com/ghpvc/?username=merwin-asm-clot&label=Project%20views&color=0e75b6&style=flat" alt="darkmash-org" /> </p>

[![Downloads](https://static.pepy.tech/badge/clot-terminal)](https://pepy.tech/project/clot-terminal)

<img src="https://media.discordapp.net/attachments/951417646191083551/1090963610383167528/image.png?width=500&height=250">


> Was Thinking Of Making A Terminal Since The Beginning Of Me : ]

**Sooo.. I made It!!**

Its easy asf to install ..
It got some cool features and some cool bugs XD..
(We neeed some ppl to look into em and do pull requests lol) 
And was made in python..
Soo You can also mess around it [i mean its pretty simple ;)]

## Installation :

```
pip3 install clot-terminal # or pip install clot-terminal
```

This will install the program.. 

You can also run with out installing ..
That would be cloning the repo and running the main.py ..

## Present Features:

 - History
 - Colorfull Foreground
 - Made for Windows and Linux users
 - Command Book \[A place to notedown commands and stuff] 

### How to use ?

Just open your terminal and type in clot :)

## Updating

Type in update to any clot session

```
  update
```

## Exiting

Type in exit

``` 
 exit
```

## Preview
<p align="center">
<img src="https://media.discordapp.net/attachments/951417646191083551/1090967924220633168/image.png">
</p>

<p align="center">
<img src="https://cdn.discordapp.com/attachments/951417646191083551/1090291584207159366/image.png">
</p>

### Note :
  - This terminal may be lacking some features which others offer like , going back to previous commands. \[ We be fixin it ]
  - Some tools like vim doesnt work on it... \[ We will fix it]
  - The terminal is slow at printing when you run somethin which takes hella time. \[ Will be def fixed]
  
<hr>

## Collabing and Donating

- Dm on ma discord - cactochan#2004 , If you wanna give some suggestions or you wanna collab with me..

- Duino coin - cacti

- BNB / Eth - 0x9CE5E2179A95Ba94f1B723FbfAd4710a9891c9e3

- Patreon - cactochan

Official Github Page -
The Most Premium Study Abroad Consultants in India
Tags: study, education, mba
Published: 2023-03-31 18:44:24

Are you thinking of studying abroad? Have you found your perfect location, but not sure how to secure a visa? If you're looking for a study abroad consultant in India, then this post is for you! I'll explain some tips and tricks on finding the right consultant and making the right decision.

There are many study abroad consultants in India who can assist students with the process of studying abroad. Here are some well-known study abroad consultants in India:

**1. Study Square:** Study Square a leading student placement service provider that offers guidance to students who want to [study in Australia](https://www.studysquare.com/study-in-australia/), Canada, New Zealand, the UK, and the US.

**2. Study Overseas Global:** Study Overseas Global is a leading education consultant in India that provides guidance to students who want to study in countries such as Australia, Canada, the UK, the US, and New Zealand.

**3. The Chopras:** The Chopras is a well-known study abroad consultant in India that offers guidance and support to students who want to study abroad in countries such as the US, the UK, Canada, Australia, and New Zealand.

**4. Global Opportunities:** Global Opportunities is a leading study abroad consultant in India that offers guidance to students who want to study in countries such as the US, the UK, Canada, Australia, New Zealand, and many more.

**5. Edwise International:** Edwise International is a leading overseas education consultant in India that provides guidance to students who want to study in countries such as the US, the UK, Canada, Australia, and New Zealand.

These are just a few examples of study abroad consultants in India. It is always advisable to do thorough research before choosing a consultant and to ensure that they are reputable and trustworthy.

This article on the Best [Study Abroad Consultants](https://www.studysquare.com/contact-us/) in India has been written with an emphasis on helping Indian students who want to explore their education opportunities beyond national frontiers with a view to help them achieve their goal of studying abroad.
Setting up Continous Integration (CI) in the AWS CloudShell
Published: 2023-03-31 18:22:49

Setting up Continous Integration (CI) in the AWS CloudShell
Build directly from the AWS cloud shell is something I have enjoyed for a long time. And I feel that sharing my ideas about setting up a typical continous integration using GitHub will benefit other  dvelopers. 

## The process…

1. Launch the AWS CloudShell and run the following command and answer the prompts that follow: ssh-keygen -t rsa
Print out your public key by running the command: cat /home/cloudshell-user/.ssh/id_rsa.pub

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

Notice that the path to the file begins with "/home/…" and ends with "pub". Do not run the command with the ending period printed after "pub". 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9qgtktxx5ztjl77t95r.png)
2. Now go to your GitHub profile and select "Settings" the "SSH and GPG keys". Under SSH keys on the right pane click on "New SSH key." Paste in your public key and enter a title in the top field. Then press add SSh key. Your SSH key should now appear as shown below:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/coldmj535ujqgomq1h91.png)
This SSH key allows you to make commits to your GitHub repo without needing to sign in at every commit.

3. You can now create a repo in your GitHub account where you will continously integrate your code directly form the AWS CloudShell. 

4. Back in the CloudShell, clone the repository using the ssh command provided on GitHub. 

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hp5htmxc2u2s931yjlur.png)
To edit a file run vim filename. Make your desired changes to the files in the repo using Vim, commit the changes and push. But, you will need to follow the prompts to enter your name and email address when running these commands for the first time.

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mhsi3e44etet2tyipfho.png)
If you check your GitHub account you would find the changes already integrated there.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s91wjtwcz2wyinl8qm7g.png)
24 berufliches Vorwärtskommen: Ein gerader Berufsweg – Starte jetzt und gut!
Tags: deutsch, career, austausch, 1min
Published: 2023-03-31 18:21:00

Moin Moin,

ich möchte dich ermutigen jetzt und gut zu starten. Sei es, dass du tatsächlich noch den ersten Schritt deines Berufsweges vor dir hast, oder dass du bereits Schritte gegangen bist. Es ist stets möglich gut zu starten. Solltest du bereits Fortgeschritten sein, so würde ein neuer Abschnitt starten. Befriedige deine [ursprüngliche Neugierde→](https://dev.to/amustafa16421/22-berufliches-vorwartskommen-ein-gerader-berufsweg-der-anfang-552f) und steigere deine [emotionale Intelligenz→](https://dev.to/amustafa16421/comment/25k2n).

- Nachdem du nun  Teil 22, 23 und diesen Teil gelesen hast, möchtest du deinen Weg neuausrichten?
- Mehr Libre Software oder Open Source Software entwickeln?
- Andere Teildisziplin?

Beste Grüße,
Mustafa
Async-Await in JavaScript
Tags: javascript, beginners, webdev, tutorial
Published: 2023-03-31 18:20:58

In JavaScript, async/await is an extension of promises which makes it easier to write promises. The keyword _async_ before a function makes the function return a promise, always. And keyword _await_ is used inside async functions, which makes the program wait until the Promise resolves. 

The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.

We use the async keyword with a function to represent that the function is an asynchronous function.

```javascript
async function test(param1, param2, ...paramN) {
  //statements
}
```

Here,

- test - name of the function

- param - parameters that are passed to the function 

##async Function :

```javascript
async function test() {
  console.log("Async");
  return Promise.resolve(1);
}

test();
```

```
Output:
Async
```
Since this function returns a promise, you can use the chaining method then() like this: 

```javascript
async function test() {
  console.log("Async");
  return Promise.resolve(1);
}

test().then(function (output) {
  console.log(output);
});
```

```
Output:
Async
1
```
##await Keyword :

The await keyword is used inside the async function to wait for the asynchronous operation.

```javascript
let result = await promise;
```

The use of await pauses the async function until the promise returns a result value.

```javascript
//a promise
let promise = new Promise(function (resolve, reject) {
  setTimeout(function () {
    resolve("Promise Resolved");
  }, 4000);
});

//async function
async function asyncFunc() {
  //wait until the promise resolves
  let result = await promise;
  console.log(result);
  console.log("hello");
}

//calling the async function
asyncFunc();
```

```
Output:
Promise Resolved
hello
```

- In the above program, a Promise object is created and it gets resolved after 4000 milliseconds.

- Here, the asyncFunc() function is written using the async function.

- Hence, hello is displayed only after promise value is available to the result variable.

- The await keyword waits for the promise to be complete. 

##Error Handling :

While using the async function, you write the code in asynchronous manner.
And you can also use the catch() method to catch the error.

```javascript
asyncFunc().catch(
  //catch error and do something
)

```

The other way you can handle an error is by using try/catch block.

```javascript 
let promise = new Promise(function (resolve, reject) {
  setTimeout(function () {
    resolve("Promise Resolved");
  }, 4000);
});

async function asyncFunc() {
  try {
    //wait until the promise resolves
    let result = await promise;
    console.log(result);
  } catch (error) {
    console.log(error);
  }
}

asyncFunc();
```

##Benefits of Using Async Function :

- The code is more readable than using a callback or a promise

- Error handling is simple

- Debugging is easier 


Follow me on : [Github](https://github.com/jps27cse) [Linkedin](https://www.linkedin.com/in/jps27cse/)
Git y GitHub
Tags: git, github
Published: 2023-03-31 18:16:44

En este artículo, vamos a hablar sobre Git y GitHub ya que  son herramientas esenciales para cualquier desarrollador de software, ya que permiten trabajar de forma colaborativa en proyectos de software, mantener un historial completo de los cambios realizados en el código fuente. A continuación una breve explicación de qué hace cada herramienta 😸✨:

## Git

![Git](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4v1q6srztolplhhoxau6.png)

Alguna vez te has encontrado en una situación así? Imagínate que estás trabajando en un proyecto, escribiendo código, agregando nuevas funcionalidades, corrigiendo errores, etc.

Con el tiempo, es probable que tengas varias versiones de tu código, cada una con cambios y mejoras respecto a la anterior. Sin embargo, ¿cómo sabes cuál es la versión más actualizada? ¿Cómo vuelves a una versión anterior si algo sale mal? 

![gitpower](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/81z9j6dxpdh0lao1s610.png)


Aquí es donde entra en juego **Git** y el versionado de archivos. Con Git, puedes llevar un registro de todos los cambios que haces en tus archivos y tener la posibilidad de volver atrás a cualquier versión anterior si es necesario. Esto se logra mediante la creación de "commits", que son copias lógicas de los cambios realizados en un determinado momento.

## ¿Por qué es tan importante tener un historial de versiones de tus archivos? 

**Facilita la colaboración:** Si estás trabajando en un proyecto con otras personas, cada una de ellas puede tener una versión diferente del archivo. Con Git, pueden trabajar en el mismo archivo sin temor a perder ningún cambio.

**Permite un seguimiento preciso de los cambios:** Con Git, puedes ver exactamente qué cambios se realizaron en cada commit y quién los hizo. Esto hace que sea mucho más fácil encontrar y corregir errores.

**Facilita la reversión de cambios:** Si algo sale mal y necesitas volver a una versión anterior del archivo, Git te permite hacerlo con facilidad.

## GitHub
Por otro lado, GitHub es una plataforma web que se utiliza para alojar, compartir y colaborar en proyectos de software. Es una plataforma de control de versiones que permite a los desarrolladores trabajar juntos en proyectos de software, ya sea de manera individual o en equipo.


![GitHub Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqjiifa2si56wpwklvat.png)


En GitHub, los usuarios pueden crear y alojar repositorios Git, que son los contenedores que almacenan los archivos y carpetas de un proyecto, junto con el historial de cambios realizados. 

Además, GitHub ofrece características adicionales, como herramientas para la gestión de proyectos y la colaboración en equipo, lo que lo hace una plataforma muy popular y útil para desarrolladores de todo el mundo.

**En resúmen:** Git permite tener un control completo de
el historial de cambios en el código fuente de un proyecto de software.
**GitHub** te permite alojar y colaborar en proyectos de software utilizando Git como sistema de control de versiones.
Näme üçin HTML öwrenmeli?
Tags: html, webdev, css, javascript
Published: 2023-03-31 18:01:09


## Näme üçin HTML öwrenmeli?

![](https://cdn-images-1.medium.com/max/4096/1*w1MhMyz2bgu5nXXNoW4ueg.jpeg)
>  Programirleme — pikirlenmekdir, diňeje kod ýazmak däldir — Casey Patton

HTML — web saýt döretmek üçin dildir. HTML **→ **Hyper text markup language.

HTML geçmezden öň şulary bilmeli.

Eger web programirleme başlamaga karar beren bolsaňyz, şu 3sini bilmelisiňiz. HTML, CSS, Javascript. Adam bedeni bilen web saýt tehnologiýasyny deňeşdireli.

![](https://cdn-images-1.medium.com/max/2684/1*UAOfC6USOhCixdJ_qfNYPg.jpeg)

Html — web saýtdaky maglumatlary görkezmek üçin ulanylan bellik dilidir. Bu programirleme dili däldir. Maglumatlary etiketkalar bilen görkezip bilýär. Meselem şu wagt ýazýan hatlarym “paragraf” etiketkasydyr. Adam bedenindäki sünkler → web programirlemede html bolup durýar.

CSS — web saýtdaky elementleriň dizaýnydyr. Adamy owadanlaşdyrmak üçin oňa estetika bereris. Saçyny daramly, egin-eşik geýdirmeli. Web programirlemede dizaýn css bilen ýerine ýetirilýär. Css hem programirleme dili däldir.

Javascript — web saýtdaky işleri ýerine ýetirmek üçin ulanylýar programirleme dilidir. Adamyň süňkleri bar. We owadan edip dizaýn etdik. Emma adam hereket edip bilmeýär :( Ýagny ýöremeýär, tans etmeýär. Adamy tans etdirmek üçin hereketlendirmek gerek. Javascript hem bu işi ýerine ýetirýär. Ýagny web saýdaky işleri ýerine ýetirýär. Meselem: bir linkin (ssylkanyň) üstüne basanyňyzda kitabyň ýüklenmesi.

Html — web saýtdaky maglumatlary görkezmek üçin ulanylýandygyny öwrendik. Meselem: web saýta bir surat goýmak üçin şu etiketkasy ulanylýar.

![](https://cdn-images-1.medium.com/max/2040/1*AArI6VeakXSfG7AYHXfrfA.png)

Tekst goýmak üçin p etiketkasy ulanylýar.

![](https://cdn-images-1.medium.com/max/2744/1*Bhu0Y2mwOwBcunDwQyqABw.png)

Video goýmak üçin video etiketkasy ulanylýar.

![](https://cdn-images-1.medium.com/max/2464/1*x-SRIQONrQOHREBoAWONBQ.png)

Eger html ähli etiketkalary öwrenmek isleseňiz bu saýtdan öwrenip bilersiňiz → [https://www.w3schools.com/html/](https://www.w3schools.com/html/)

Näme üçin HTML öwrenmeli?

![](https://cdn-images-1.medium.com/max/3840/1*WJ_Gj72caLDuMPLAS_77Iw.jpeg)

Eger web programmist bolmak isleýän bolsaňyz, HTML öwrenmelisiňiz. Çünki HTML maglumatlary görkezme we ulanyjydan hem maglumat almak üçin gerekdir. Aslynda web saýt düzmegiň başga ýollary hem bar. HTML öwrenmeseňiz hem bolýar (cross platform — flutter). Emma bu sistemada hem ýazylan kodlar ýene-de HTML-e öwrülýär. Ýagny ýene-de HTML öwrenmelisiňiz.
Control the function internals with callbacks
Tags: javascript, webdev, programming, node
Published: 2023-03-31 17:50:09

There are many uses for callbacks in JavaScript. But the one I really like—and not often talked about—is modifying the behavior of some internal parts of that function.

Let me show you an example.

## Example

Let's say you have a function that fetches and returns some post data.

```js
function getPostById(id) {
  // I'm going to return a literal object here,
  // but imagine it's fetching the post from somewhere
  return {
    title: 'Post Title',
    date: new Date().toString(),
    tags: ['tag1', 'tag2']
  }
}
```

I'm going to focus on the *date* field for this example.

The date returned here is formatted using the `toString` method. If I want to change it to a different format, I have to parse that string into a date object, and then format it however I want.

But wouldn't it be nice if I can specify the formatting code directly in the function without modifying the function code?

A great thing about JavaScript is that it has first-class functions. This means I can pass functions as values to another functions—we call them callbacks.

So, I can modify the function above to move the formatting code into a callback instead of hardcoding it in the body of the function.

```js
function getPostById(id, fnDateFormatter = (date) => date.toString()) {
  return {
    title: 'Post Title',
    date: fnDateFormatter(new Date()),
    tags: ['tag1', 'tag2']
  }
}
```

If you run the code above, it will work exactly as the previous one. The difference here is that I format `new Date()` using the `fnDateFormatter` callback. Also note how I can specify a default callback in the parameters directly—isn't JavaScript great?

Because `fnDateFormatter` is a parameter that accepts a function as a value, I can pass it any other function I want when calling it.

```js
function myDateFormatter(date) {
  return date.toLocaleDateString(
    'en-us',
    {
      weekday: 'long',
      year: 'numeric',
      month: 'short',
      day: 'numeric'
    }
  )
}

const testPostWithDefaultFormatter = getPostById(1)
const testPostWithMyFormatter = getPostById(1, myDateFormatter)
```

I called the function twice: one with the default formatter, and one with a custom formatter. Note how I didn't need to touch the original function code in either one.
Consul Service Discovery on Prometheus.
Tags: kubernetes, devops, observabillity
Published: 2023-03-31 17:45:51

Hello, I hope you are well and safe, I don't know if you scrape Metrics from your Kubernetes workloads dynamically using Consul Service Catalog as Service Discovery Method.

I would like to mention that all the workloads are running on Kubernetes, so in order to monitor them I am using Prometheus Operator, as a result, I have configured it to identify the pods that match specific criteria in the metadata fields.

Finally, in the following example, I will try to show you how you can define a Prometheus scraper that uses Consul Service Catalog as a Service Registry.

Let's Dive in...

```
          - job_name: "test-consul-sd-backend"
            consul_sd_configs:
              - server: "consul-server.consul-system.svc.cluster.local:8500"
            relabel_configs:
              - source_labels: [__meta_consul_service]
                regex: .*backend.*
                action: keep
              - source_labels: [__meta_consul_service]
                target_label: job
            scrape_interval: 60s
            metrics_path: "/api/metrics"
```

of course, you can any of the fields found in the Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config


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


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


I hope you like the tutorial, if you do give it a thumps up! and follow me on Twitter, also you can subscribe to my Newsletter in order to avoid missing any of the upcoming tutorials.

Media Attribution

I would like to thank Clark Tibbs for designing the awesome photo I am using in my posts.

Thank you, Cheers!!!
Event Loop in JavaScript
Tags: javascript, beginners, programming, makstyle119
Published: 2023-03-31 17:06:24

In **JavaScript**, the **event loop** is a fundamental part of the language's concurrency model. It is responsible for handling asynchronous events, such as user input, network requests, and timers. In this blog post, we will discuss what the event loop is, how it works, and how to use it in your JavaScript code.

**What is the Event Loop?**

The event loop is a mechanism that allows JavaScript to handle multiple tasks at the same time without blocking the main thread of the application. The event loop works by continuously checking a queue of events and executing the corresponding event handlers.

When an event occurs, such as a user clicking a button or a network request completing, a corresponding event is added to the event queue. The event loop then continuously checks the event queue and executes the corresponding event handler when an event is detected.

The event loop is designed to prevent the main thread from blocking by offloading long-running or expensive tasks to separate worker threads or the browser's built-in event queue.

**How Does the Event Loop Work?**

The event loop is a continuous loop that performs the following steps:

1. Check the event queue for any pending events
2. If an event is found, execute its corresponding event handler
3. If no event is found, wait for new events to be added to the queue

The event loop's execution is non-blocking, meaning that other code can continue to execute while the event loop is running. This allows JavaScript to handle multiple tasks at the same time without blocking the main thread.

**Using the Event Loop**

JavaScript provides several functions for working with the event loop, including ``setTimeout``, ``setInterval``, and ``requestAnimationFrame``. These functions allow you to schedule tasks to run asynchronously and defer their execution to the event loop.

Here's an example of using ``setTimeout`` to schedule a task to run after a delay:

```javascript
setTimeout(() => {
  console.log('Hello, world!');
}, 1000);
```

In this example, the ``setTimeout`` function schedules a task to run after a delay of 1000 milliseconds (1 second). When the delay is over, the event loop will add the corresponding event to the queue and execute its event handler.

Here's another example of using ``setInterval`` to schedule a task to run repeatedly:

```javascript
setInterval(() => {
  console.log('Tick');
}, 1000);
```

In this example, the ``setInterval`` function schedules a task to run every 1000 milliseconds (1 second). The event loop will add the corresponding event to the queue at each interval and execute its event handler.

**Conclusion:**

The event loop is a crucial part of JavaScript's concurrency model. It allows JavaScript to handle multiple tasks at the same time without blocking the main thread, enabling it to provide a responsive and dynamic user experience. By using functions such as **setTimeout** and **setInterval**, you can schedule tasks to run asynchronously and defer their execution to the event loop.