teleren/devto huggingface dataset:
Format repo - GitHub Action to format your code with comfort
Tags: githubhack23, github, actionshackathon, githubactions
Published: 2023-05-21 17:52:57

## What I built 

I made a _GitHub action_ that automatically formats the **Python** and **JavaScript** code after each commit and pushes it to the repository.

### Category Submission: 

DIY Deployments

### App Link

App is [here](https://github.com/marketplace/actions/format-repo).

### Screenshots 

![Example of action pt.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0120j1dk2uo0061dlpf5.PNG)
![Example of action pt.2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p12abaw8gqwbz3dnu0jg.PNG)

### Description 

The action installs _black _ and _prettier_ and uses them to format **Python** and **JavaScript** code. After using **git commands**, changes are pushed to the repository.

### Link to Source Code 

Code is [here](https://github.com/mezgoodle/format-repo).

### Permissive License 

[MIT License](https://github.com/mezgoodle/format-repo/blob/main/LICENSE)

## Background (What made you decide to build this particular app? What inspired you?) 

First, I wanted to make an action that would automatically push commits to GitLab and BitBucket, like a mirror. But there were difficulties with the API of these services. Then I decided to implement my old idea - an action that automatically formats the code. I tried to do it before with Docker and now with js, and it turned out to be much easier.

### How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?) 

I used the libraries from [actions/toolkit](https://github.com/actions/toolkit) to create my action. It's more comfortable than when I did it with Docker. I looked at all the libraries, and most of all: [actions/core](https://github.com/actions/toolkit/blob/main/packages/core), [actions/exec](https://github.com/actions/toolkit/blob/main/packages/exec) and [actions/github](https://github.com/actions/toolkit/blob/main/packages/github).

### Additional Resources/Info

To use it, you need to enable `workflow read:write` in the settings.
Hey Dev Community! Looking for Project Recommendations for my Portfolio 🚀
Tags: beginners, javascript, python, tutorial
Published: 2023-05-21 17:35:41



## Hey fellow devs!

I hope you're all doing amazing in your coding adventures! 🌟

As a junior developer, I'm super excited to level up my skills and build an awesome portfolio that truly reflects my abilities. And who better to ask for advice than this community? 🙌

_I have a little request for you: I'm looking for project ideas that I can include in my portfolio. I've divided them into three categories to make it more fun and interesting. Here they are:_

**Projects to Avoid:**

These are the projects that might not add much value to my portfolio or help me grow as a developer. Let's steer clear of those!
Rating: Nah, not worth it! 🙅‍♂️

**Fun to Work On:**

These are the projects that bring a smile to my face and let me unleash my creativity. They should be enjoyable and engaging!
Rating: Easy to Medium, let's have some coding fun! 😄🎉

**Challenging but Worth the Effort:**

These projects are the real deal, pushing my skills to the next level. They might be tough, but the reward is totally worth it!
Rating: Medium to Hard, let's conquer the coding Everest! 💪⛰️
Do you have any _project recommendations_ that fall into these categories? Any cool ideas, resources, or examples you can share? Your insights and experience would mean the world to me! 🌍❤️

Feel free to drop your suggestions, tips, or any other thoughts you have. Let's support each other as we journey through this coding world together! 🤝
🐍✨ Harness the Power of Colorama in Python! ✨🐍
Tags: python, colorama, terminalcolors, programming
Published: 2023-05-21 17:28:45

Are you tired of looking at plain, monotonous text in your Python console applications? Spice up your output and make it visually appealing with Colorama! 🎨🌈

## 📦 What is Colorama?

Colorama is a Python library that simplifies the process of adding colors and styles to text in the terminal or command prompt. With Colorama, you can easily create eye-catching and readable output, making your programs more engaging and user-friendly.

## 🔧 How to Get Started:

### 1️⃣ Installation:

Before diving into the colorful world of Colorama, you need to install it. Open your terminal or command prompt and run the following command:

```
pip install colorama
```
### 2️⃣ Importing:

Once installed, you can import Colorama in your Python script:

```python
import colorama
from colorama import Fore, Back, Style
```
### 3️⃣ Usage:

Now that you have Colorama at your fingertips, let's explore its features:

🔸 Foreground Colors:
Colorama provides various foreground color options to make your text stand out. Here's an example:

```python
print(Fore.RED + "Hello, Colorama!")
```
🔸 Background Colors:
You can also change the background color of your text for added emphasis. Check out this snippet:

```python
print(Back.YELLOW + "Python is amazing!")
```
🔸 Text Styles:
Colorama offers different text styles, such as bold, underline, and more. Give your text a unique appearance with this code snippet:

```python
print(Style.BRIGHT + "Colorful Text")
```
🔸 Resetting Styles:
To revert back to the default terminal settings, use the following line:

```python
print(Style.RESET_ALL)
```

###4️⃣ Mixing and Matching:
Don't be afraid to get creative and combine different colors, backgrounds, and styles! Experiment with different combinations to find the perfect look for your application.

## 🌟 Bonus Tip:
You can even use Colorama to check if the terminal supports colors using the following code:

```python
if colorama.init():
    # Terminal supports colors
    # Your colorful code here
else:
    # Terminal does not support colors
    # Fallback to non-color output
```
Now that you're equipped with Colorama, bring life to your Python console applications with vibrant colors and stylish text! 🎉🌈
first post
Tags: firstpost
Published: 2023-05-21 16:48:10

first content
**Bold**
Italic

[dev.to](https://dev.to/)


1. One
2. Two

- One
- Two

## Heading 2

> Quote

`Code here`

```
Code block
```

{% embed https://www.youtube.com/embed/jNQXAC9IVRw %}




![caption](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wpozvr00qq1sxtxqs12.png)
How can I continue contributing to Open Source as a Project Manager? Part 2
Tags: pm, java, developer, teamwork
Published: 2023-05-21 16:24:19

In my previous article, we talked about how to create a team and to start to contribute to Open Source if you are a Project Manager.

In my previous article, we discussed how to create a team and start contributing to open-source projects as a project manager.

Now, I want to share my experience regarding the next steps as a PM in an open-source team. After the introductory meeting with my team, I requested that my developers fill out a small survey, where I asked team members about their:

1.Personal motivation: Why do they want to take part in the project?
2.Personal expectations of participation in the team
3.Possible reasons for refusing to be part of the team
4.Personal information including their timezone, GitHub name, etc.

Based on the answers received, I prepared a plan outlining how I could help the team members achieve their goals, and project aims, and be prepared for any risks. As a professional project manager, I know that this step is essential for a project's success.

Additionally, I followed up on the action points discussed in our previous meeting, and one of our great teammates created our GitHub team - an excellent platform where we can work as a team.

Also, we picked a name for our team that everyone liked and that motivated everyone involved. This was a crucial point in building a great team.

At our next online team meeting, I decided to use the technique called "pair programming," mentoring and the power of teamwork and collaboration. One of our specialists shared his screen, and others helped to reproduce a bug while sharing their expertise and thoughts about bug fixing. It was an interesting session for the entire team to communicate with professionals and share their expertise. The team was happy, and so was I!

P.S. I recorded and saved every meeting on our YouTube channel so that my wonderful team could re-watch it. This strategy was also helpful when some team members could not attend the meeting, or when we needed to onboard a new amazing Java developer.


Thank you for reading, and please like and subscribe!

Yasia (Iaroslavna Nezhinskaia)
Material UI: TextField label shrink with startAdornment
Tags: webdev, react, mui, tutorial
Published: 2023-05-21 16:04:46

[`Material UI`](https://mui.com/)'s [`Textfield`](https://mui.com/material-ui/react-text-field/) component has a feature where the `label` is shown inside the input element at first and on focus or when filled, it animates and shrinks to the top.
To make a better looking `TextField` or to add a prefix we can use the [`startAdornment`](https://mui.com/material-ui/react-text-field/#input-adornments) property to show text or an icon inside the `Textfield`. However, after doing so, the `label` will always be stuck in the shrinked position and won't animate anymore (this doesn't happen with `endAdornment`.)

{% codesandbox material-ui-textfield-label-shrink-00-forked-27nl9u %}

## Controlling the shrink state

To fix the problem, we need to shrink the label manually ourselves when needed. the `InputLabelProps` property of the `TextField` exposes a `shrink` property which allows us to do this. setting `shrink` to `true` will shrink and animate the label to the top and setting it to `false` will make it stay inside the input field.
```ts
<TextField
  InputLabelProps={{
    shrink: true/false,
  }}
...
/>
```
We can use the `onFocus` and `onBlur` events to set the `shrink` state:
```ts
const [shrink, setShrink] = useState(false);
...
<TextField
onFocus={() => setShrink(true)}
onBlur={(e) => setShrink(!!e.target.value)}
InputLabelProps={{ shrink }}
...
/>
```
You can see it working here:

{% codesandbox boring-mcclintock-218dg2 %}

## Adding color to the icon
Since the `InputAdornment` is not a child of the `label` but of the `input` field itself, its color won't change when the `Textfield` is focused or when it has the `error` property set.
To fix it, we can directly target the `.MuiInputAdornment-root` class and set its color on `focus` and `error`:
```ts
<TextField
  sx={(theme) => ({
    '& .Mui-focused .MuiInputAdornment-root': {
      color: theme.palette.primary.main,
    },
    '& .Mui-error .MuiInputAdornment-root': {
      color: theme.palette.error.main,
    },
  })}
  ...
/>
```
Working example:
{% codesandbox material-ui-textfield-label-shrink-02-forked-n2i0pb %}

## Fixing the outline
When using the `outlined` variant of the `Textfield`, the placement of the empty space that holds the text is wrong. We can fix it by modifying the `px` in `sx` property of the `.MuiOutlinedInput-notchedOutline` class:
```ts
<TextField
  sx={(theme) => ({
    '& .MuiOutlinedInput-notchedOutline': {
      px: 5.5,
    },
  })}
  ...
/>
```
Final version:
{% codesandbox material-ui-textfield-label-shrink-03-forked-kswu2e %}

🎉 Congratulations, now you have a working and cool-looking `Textfield` with `startAdronment`!
rraft-py: Unofficial Python Binding of the tikv/raft-rs
Tags: distributedsystems, raft, python, rust
Published: 2023-05-21 15:56:51

Hello, I am a developer working as a DevOps engineer at a small IT startup in Korea.
I should've use raft implementation for my company's proprietary orchestrator.

Our company product is developed in Python, but there doesn't seem to be "de facto" standard when it comes to raft, at least to my knowledge.

So, I decided to search for papers on raft implementation. But these papers exceeded 250 pages, and I found it overwhelming to comprehend and implement all the knowledge therein. (From previous experience, I know that once the complexity of the source code reaches a certain threshold, maintaining it becomes quite a challenge, especially while managing full-time work.)

Hence, I resolved to write Python bindings for a well-established, battle-tested raft library. I initially considered writing bindings for Hashicorp's Raft implementation, but handling asynchronous things seems was tricky. Upon the advice of a senior developer, I turned to pyo3 to create bindings for 'tikv/raft-rs'.

The process of writing bindings was more challenging than I had anticipated.

Anyway after much struggle, I succeeded in implementing bindings that pass all the harness test codes.

However, having written all the source codes, I can't help but question whether I should have opted for a different implementation such as async-raft or Hashicorp's raft implementation. I also wonder if it would have been more prudent to port the source codes itself, rather than writing bindings. Numerous thoughts have been running through my mind.

What are your thoughts on this Python binding implementation?
The Fascinating World of Cats!
Tags: cats, kings, majestic, cute
Published: 2023-05-21 15:54:10

<p>Cats have long captivated the hearts and minds of humans with their mysterious and <strong>enchanting</strong> presence. As one of the most popular pets worldwide, these independent and <strong>graceful</strong> creatures have left an indelible mark on our lives. From their elegant strides to their mesmerizing gaze, cats possess a unique allure that continues to fascinate both cat owners and cat admirers alike.&nbsp;</p>
<p>&nbsp;</p>
<figure><img style="max-width: 100%;" src="https://images.unsplash.com/photo-1570824104453-508955ab713e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3w0Mjg1OTN8MHwxfHNlYXJjaHwxfHxjYXRzfGVufDB8MHx8fDE2ODQ2ODIzNDR8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080">
<figcaption><a style="color: grey; text-decoration: none;" href="https://unsplash.com/@theluckyneko">Photo by The Lucky Neko</a></figcaption>
</figure>
<blockquote>
<p><em>One of the remarkable aspects of cats is their diversity. With numerous breeds ranging from the majestic Maine Coon to the exotic Siamese, there is a feline companion to suit every taste and preference. Each breed carries its own distinct characteristics, be it the striking Bengal's wild patterns or the Persian's luxurious, flowing coat. These variations in appearance only add to the allure and charm of cats.</em></p>
<p>~ John Doe</p>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<figure><img style="max-width: 100%;" src="https://images.unsplash.com/photo-1541781774459-bb2af2f05b55?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3w0Mjg1OTN8MHwxfHNlYXJjaHw1fHxjYXRzfGVufDB8MHx8fDE2ODQ2ODIzNDR8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080">
<figcaption><a style="color: grey; text-decoration: none;" href="https://unsplash.com/@kstonematheson">Photo by Kate Stone Matheson</a></figcaption>
</figure>
<p>&nbsp;</p>
<p>Furthermore, cats possess a heightened sense of awareness and perception. Their acute hearing and vision enable them to detect even the slightest sounds and movements, making them highly alert and attentive creatures. This heightened awareness adds an air of mystery to their behaviour, as they often seem to possess an uncanny ability to sense when their human companions are in need of comfort or support.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
Suonerie Telefoniche su e-suonerie.com: Personalizza il tuo Dispositivo con Stile
Tags: android, music
Published: 2023-05-21 15:53:15

Suonerie Telefoniche su e-suonerie.com: Personalizza il tuo Dispositivo con Stile
Se stai cercando suonerie telefoniche per personalizzare il tuo dispositivo, [e-suonerie.com](https://e-suonerie.com/) è il sito web perfetto per te. Questo sito specializzato offre una vasta selezione di suonerie che puoi scaricare gratuitamente per dare un tocco unico alle tue chiamate in arrivo. In questo articolo, ti mostreremo come accedere a e-suonerie.com e scaricare le suonerie desiderate.

Accesso a e-suonerie.com
Apri il tuo browser sul tuo dispositivo mobile o computer.

Digita "e-suonerie.com" nella barra degli indirizzi e premi Invio.

Sarai reindirizzato al sito web ufficiale di e-suonerie.com.

Esplora e Scarica Suonerie
Sulla homepage di e-suonerie.com, troverai diverse categorie e opzioni di suonerie disponibili.

Esplora le categorie per trovare il tipo di suoneria che desideri. Puoi cercare suonerie per genere musicale, popolarità o persino creare suonerie personalizzate utilizzando le tue canzoni preferite o frammenti audio.

Fai clic sulla suoneria che ti interessa per accedere alla pagina di download.

Nella pagina di download, troverai ulteriori informazioni sulla suoneria, come la durata e il formato del file.

Accanto alla descrizione della suoneria, troverai un pulsante o un link per il download. Fai clic su di esso per avviare il download della suoneria.

A seconda delle impostazioni del tuo dispositivo, potresti dover confermare il download o scegliere una posizione per salvare il file della suoneria. Segui le istruzioni sullo schermo e seleziona la posizione desiderata sul tuo dispositivo.

Configurazione della Suoneria sul tuo Dispositivo
Una volta scaricate le suonerie da e-suonerie.com, è il momento di impostarle sul tuo dispositivo in modo che si attivino quando ricevi una chiamata.

Accedi alle impostazioni delle suonerie sul tuo dispositivo. La posizione esatta varia a seconda del sistema operativo e del modello del telefono, ma solitamente si trova nella sezione "Suoni" o "Suonerie" nelle impostazioni.

Cerca l'opzione per cambiare o impostare la suoneria.

Sfoglia le suonerie disponibili sul tuo dispositivo e seleziona quella che hai scaricato da e-suonerie.com.

Salva le modifiche e chiudi le impostazioni.

Ora hai scaricato e impostato una nuova suoneria da e-suonerie.com. Goditi la tua suoneria personalizzata e aggiungi un tocco unico alle tue chiamate in arrivo. Esplora il sito web per trovare ulteriori suonerie che si adattano al tuo stile e alle tue preferenze musicali. Personalizza il tuo dispositivo con le suonerie di e-suonerie.com!
Setting up a Python Environment
Tags: python, development
Published: 2023-05-21 15:53:06

Python is a versatile programming language used for various purposes, including data analysis, web development, and artificial intelligence. One of the most useful features of Python is the ability to create and use virtual environments. In this article, we’ll explore how to create and use a Python environment with examples.

**What is a Python environment?**
A Python environment is a self-contained directory tree that contains a specific version of Python along with any required packages and dependencies. Python environments are useful for isolating different projects and avoiding conflicts between different versions of Python or installed packages.

**Creating a Python environment**
To create a Python environment, we can use the built-in `venv` module. First, we need to navigate to the directory where we want to create the environment. Then, we can run the following command:

```console
python -m venv myenv
```

This will create a new directory called myenv in the current directory, containing the necessary files for a new Python environment.

**Activating the Python environment**
To activate the Python environment, we need to run the activate script located in the `Scripts` directory of the environment. On Windows, we can activate the environment with the following command:

```console
myenv\Scripts\activate.bat
```

On Linux or macOS, we can activate the environment with the following command:

```
source myenv/bin/activate
```
After running the activate command, the terminal prompt will change to indicate that we are now in the virtual environment.

**Installing packages in the Python environment**
Once we have activated the Python environment, we can install packages using the pip command. For example, to install the `numpy` package, we can run the following command:

```
pip install numpy
```

This will install the `numpy` package in the `myenv` environment. We can verify that the package is installed by running the following command:

```
pip list
```

This will display a list of all installed packages in the current environment.

**Using the Python environment**
Once we have installed the necessary packages in the Python environment, we can run Python scripts as usual. However, any packages or dependencies required by the script must be installed in the virtual environment.

For example, suppose we have a script called `my_script.py` that uses the `numpy` package. We can run the script in the `myenv` environment by first activating the environment and then running the script:

```
source myenv/bin/activate
python my_script.py
```

This will run the script in the `myenv` environment with the `numpy` package installed.

**Conclusion**
Python environments are a powerful tool for managing Python projects and dependencies. By creating a virtual environment for each project, we can avoid conflicts between different versions of Python or installed packages. In this article, we’ve explored how to create and use a Python environment with examples.
Display images from assets folder in Flutter
Tags: flutter
Published: 2023-05-21 15:51:35

- Create a folder in the root directory of your app called `assets`. Inside, place your image i.e. `this_is_an_image.png`. The relative path will be `assets\this_is_an_image.png`

- In `pubspec.yaml`, under `flutter:` entry, type the following:

```
assets:
   - assets/this_is_an_image.png
```

- I have been using it like that:

```
Container(
    decoration: BoxDecoration(
        image: const DecorationImage(
            image: AssetImage('assets\this_is_an_image.png'),
            fit: BoxFit.cover,
            ),
        ),
    ),
);
```
Nasha Mukti Kendra In Ludhiana
Published: 2023-05-21 15:39:04

[Nasha Mukti Kendra In Ludhiana](https://krishnashamuktikendra.com/Nasha_Mukti_Kendra_in_Ludhiana.html) is a well-respected foundation and to stay true to our goal we aim to be better each and every day. This respect stems from the years of excellent service that we have given to society. Our treatment and rehab plans have an impressive success rate and we have already helped thousands of addicts before.
Do You Have a Nostalgia Collection?
Tags: discuss, beginners, codenewbie, watercooler
Published: 2023-05-21 15:33:05

Lots of folks gather up mementos from the good ol' days to bring back those nostalgic vibes and keep a strong link to their own history. Some common examples of nostalgia-inducing items that people collect include:

- Vintage toys and games
- Vinyl records and cassette tapes
- Retro technology
- Pop culture memorabilia
- Books and comics

So what's in your nostalgia collection?
Sci-Fi Sunday: Guess the Movie Quote & Pass It On
Tags: discuss, watercooler
Published: 2023-05-21 15:11:20

Let's have a little fun today!

Start by posting a movie quote from a science fiction film:

> I must not fear. Fear is the mind-killer.

Others guess the movie and reply with the correct answer:

**DUNE**.

The person who guessed correctly posts a new movie quote for others to guess:

> There is no Dana, there is only Zuul.

Okay, who's next?

---

Image by <a href="https://www.freepik.com/free-photo/cyberpunk-portrait-with-flying-man-outside_35816227.htm#query=sci%20fi%20movie&position=1&from_view=search&track=ais">Freepik</a>