teleren/devto huggingface dataset:
Forking a Repository
Tags: codenewbie, github, prudyopensourceseries, opensource
Published: 2022-04-29 13:34:44

So recently, I started my coding journey. While it would be so amazing to jump into that story, I think I'll tell it another time. Afterall, we came here to fork a Repository. 

The mystery and beauty of Forking a Repository as explained on Google, is that, it is a method to _freely experiment with changes without affecting the original project. Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea._ 

So by Forking a repository, you create a copy you can call your own. (Like the character in the meme👇🏽)


![Forking a Repository](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fslfjp876xhgj3gdbzt3.png)

So nice😊😊

I'll add one more and we'll jump in. 😂Forgive me. 


![The beauty of Forking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xodbdoktb07q3rw0m476.jpg)


While some may feel otherwise, Forking isn't really about theft. it's about collaboration, transparency improvement, expansion and all the beauty of Open Source. Yes! the web is moving so fast and here, we have to share to grow and grow to share. 

Such motivation 🤧


Okay, let's begin. 


---
**FORKING A REPOSITORY**

**Step 1: The Repository**

Like finding a something you like, you find a Repository. You could sometimes be invited to see it or you may have stumbled on it. Or you desperately searched for it. The first step always begins at finding a Repository.


![The selected Repository](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9lc4w7pxkp72plw376a.jpg)

**Step 2: The Forking**

Just below the Navbar on the top right corner of your GitHub is a **Fork button.** Usually or maybe always between the watch button and the Star button. Click on it.😋


![The Forking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eopgxkaav9pieo3e24y1.jpg)

**Step 3: The Renaming**

You may or may not want to rename your forked repository. However, it is named after the original by default but you could decide to rename to fully possess.😶

Fork it.
Click "create Fork"😶

![The Renaming](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baeunn0rorx60rkp7iyx.jpg)

**Step Final: The celebration**

You could get us some drinks🍸🍾 because you just forked it😊we are proud of you. Now go create and change the world. 

Also follow me on [Github](https://github.com/Prudence97) you could have a Repo, I would love to Fork. 😋
Free Laptop
Published: 2022-04-29 13:33:38

Hi guys, hope you are all having a wonderful day, I really need help getting a laptop, the present situation in my country is discouraging.
I am currently learning PHP, but I keep have problems because I borrow laptops from people I know, and it's really inconveniencing them.
I would really appreciate it if anyone can help.
I just want to be among those who virtually create and connect the world, it has been my dream since I was 9, and I am just so close yet so far.
Please any help will be appreciated thanks so much.
Hi. I need some good ideas about this problem with TG Passport Bot
Tags: javascript, tg, webdev
Published: 2022-04-29 13:17:58

Now I'm working on a bug with tg passport bot, and when I click authorize:

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

I get a modal window like this:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1opj4srvts9qlkt567j.png)

This behavior is only on mac os. If I use an iphone, then the button to authorize is not clickable at all
TUTORIALS FOR GEEKS
Tags: javascript, beginners, programming, tutorial
Published: 2022-04-29 13:12:50

1. [Learn Java Programming](https://techarge.in/learn-java-programming/)
2. [Python Programming Tutorial](https://techarge.in/learn-python-programming-tutorials/)
3. [Learn SQL](https://techarge.in/sql-tutorial/)
4. [Data Structure And Algorithm Tutorial](https://techarge.in/data-structure-and-algorithm-tutorials/)
5. [Computer Networking Tutorial](https://techarge.in/computer-networking-tutorial/)
6. [DBMS Tutorial](https://techarge.in/dbms-tutorials/)
7. [C Programming Tutorial](https://techarge.in/learn-c-programming-language-tutorial/)
8. [Information System Analysis Design And Implementation](https://techarge.in/information-system-analysis-design-and-implementation-tutorials/)
9. [Computer Network Security Tutorial](https://techarge.in/computer-network-security-tutorial/)
10. [E-Commerce Tutorial](https://techarge.in/e-commerce-tutorial/)

Happy Learning!!
This Week in Python
Tags: python
Published: 2022-04-29 12:48:36


**Fri, April 29, 2022**

This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

## Python Articles


- [You Should Compile Your Python And Here’s Why](https://glyph.twistedmatrix.com/2022/04/you-should-compile-your-python-and-heres-why.html) – write Python that’s faster than C by optimizing your code, adding standard type annotations, and using Mypyc
- [Python Bi-Dictionary](https://towardsdatascience.com/python-bi-dictionary-key-can-be-value-and-value-can-be-key-50715a2046af) – Key Can Be Value, And Value Can Be Key
- [How I Integrated Zapier into my Django Project](https://djangotricks.blogspot.com/2022/04/how-i-integrated-zapier-into-my-django-project.html)
- [Common Python Anti-Patterns to watch out for](https://tvkoushik.medium.com/common-python-anti-patterns-to-watch-out-for-9271d13a3f8e) – Anti-patterns which will make you more mindful while writing code
- [Python 3.11 Preview: Task and Exception Groups](https://realpython.com/python311-exception-groups/)


## Projects

- [reloadium](https://github.com/reloadware/reloadium) – Advanced hot reloading for Python
- [gradio](https://github.com/gradio-app/gradio) – Create UIs for your machine learning model in Python in 3 minutes
- [hatch](https://github.com/ofek/hatch) – Modern, extensible Python project management
- [pypyr](https://github.com/pypyr/pypyr) – automation task runner
- [PyNeuraLogic](https://github.com/LukasZahradnik/PyNeuraLogic) – PyNeuraLogic lets you use Python to create Differentiable Logic Programs
Automating code review on commit
Published: 2022-04-29 12:37:24

# HOW TO AUTOMATE CODE REVIEWS ON COMMITS

Imagine the hustle of spending hours on code review every day. Code review automation may save countless wasted efforts.

This Article may walk you through steps on how to add automated code reviews that may be executed during every code commit.

Codacy is one of the tools that may be used to achieve this.

Codacy is an automated code review tool that helps developers ship better software, faster. With Codacy, you get static analysis, cyclomatic complexity, duplication, and code unit test coverage changes in every commit and pull request. 

## Steps to integrate your project with Codacy

## 1. Sign up

You may use your Git provider such as GitHub, GitLab, or Bitbucket to sign up to Codacy. This links your Codacy user with your Git provider user, making it easier to add repositories to Codacy and invite your teammates.

![sign up](http://res.cloudinary.com/clickpesa/image/upload/v1650444797/engineering-blog/images/f47nkua8llyolvnmeqdu.png)


## 2. Grant access

Codacy will request access to your Git provider and will require you to provide a few details regarding your organization. (this helps them on use case evaluation).


![grant access](http://res.cloudinary.com/clickpesa/image/upload/v1650444920/engineering-blog/images/vtxfeitocdow3fw4uqqa.png)

## 3.  Choose organization

Now you will be required to join the organizations that contain your repositories

`	`Note:	

codacy name the organizations similar to your git repository user name. 

Example If your repository is “github.com/Fruitsandvegies”. Then the name of your organization will be “Fruitsandvegies”.

![choose organization](http://res.cloudinary.com/clickpesa/image/upload/v1650444969/engineering-blog/images/zc6idpiadlinetgvui8i.png)

## 4. Adding repository

By selecting the organization on step 3, codency will list all related repositories available. Select the “add” option to add the repository for review. Codancy will immediately set up everything so as to be ready to analyze on the next commit.

Note:

You can add the repository to Codancy only if you have permission to that repository.

![adding repository](http://res.cloudinary.com/clickpesa/image/upload/v1650445009/engineering-blog/images/eiwpirbmddgpnq1mwt8d.png)


## 5.  Review result of the analysis

`	`Select “Go to repository” once the analysis has completed reviewing the results.


Detailed analysis result

![review result of the analysis](http://res.cloudinary.com/clickpesa/image/upload/v1650445048/engineering-blog/images/yxdypvp8vbvhpsyav2kx.png)



The initial analysis from Codancy will be based on the default configuration. Codacy provides tweaks to allow you to set up a custom configuration such as files to ignore, code pattern, and adjust quality settings.
How to fix a commit?
Tags: git, beginners, programming, tutorial
Published: 2022-04-29 12:18:02

To start this tutorial, I created a file and I'll use to test.

![Start tutorial](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6ei0mqvtov3qd792ap1.png)
 
Let's imagine that in the last command we wrote like this:
```
git commit -m "adding fils"
```
To fix, simply type:
```
git commit -m "adding files" --amend
```

## Two important commands that _git_ give us

`git --hard` and `git soft`

**HARD** = is usually used when we messed up the code and want to get everything back to how it was before you messed with it. It's an **undo**-like function, so be careful.

**SOFT** = On the other hand, we have Soft, which will remove the commits from our commit list **without** removing the changes from the commits.

![git log](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2t532678ub316wfn5cp.png)
 
And in our case, we want to delete the last three commits.

```
git reset --soft HEAD~3
```
And we can confirm by putting `git log`
![confirmation git reset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5sz4wd85xpxger6tpvz.png)

We also confirm that the files are to be committed
![committed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69d50ds7uurzmd9chym6.png)
 
## Inteface experience Git by terminal

Another way (the most correct according to the documentation) is to give the following command:

```
git rebase -i HEAD~3
```

![git rebase -i](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nf23r37q027kk7zks6i.png)

And we can (we must) change the command pick to squash

When recording, another screen will appear, informing what was done.

![recording](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5sn6yrykmy5lh0kg42ui.png)

Also, it will ask us to put a decent message.

![done](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykqzyqaj8x6vuoqeme9k.png)

The result
![The result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qckzjsdz4uy2530ytfb2.png)


I hope I have helped you.
Save your web camera recording locally in your browser
Tags: web, webdev, javascript, programming
Published: 2022-04-29 12:15:17

This post is the sequel of [How to record your web camera only with JavaScript](https://dev.to/eneaslari/how-to-record-your-web-camera-only-with-javascript-531g).

Today we will store the video after recording into browser's indexedDB. 

So lets start with the already existing code of web camera recording [Source code](https://github.com/tzagiollari/how_to_record_your_web_camera_only_with_JavaScript). We will make a new branch for this project:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9dd538vh60agm40a25gh.png)
 
I know I know I am good at naming!

Next let's create a new file named [idb-file-storage.js](https://gist.github.com/EneasLari/7509d0a47c1dd92d823d4d059f7ac148#file-idb-file-storage-js). This is a wrapper of [indexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)

Now lets create a new file named indexedDB.js:
{% gist https://gist.github.com/EneasLari/7509d0a47c1dd92d823d4d059f7ac148 file=indexedDB.js %}

In this file we define three functions:

* saveRecordedVideoInDB(recordedpieces, stored_name, blob_name)
function that saves the array of recorded pieces

* retreiveVideoFromDB(stored_name)
returns an array of stored videos in indexedDB

* removeStoredVideo(bloburl, videoname, stored_name)
removes a specific video from indexedDB


Now add a script tag with indexedDB script at index.html:

`<script type="module" src="js/indexedDB.js"></script>`

And finally edit the index.js. Call saveRecordedVideoInDB function when the recording stops.

```
    mediarecorder.onstop = ()=>{ 
     window.saveRecordedVideoInDB([recordedChunks],"storedvideos", "videoname" + datetime).then(() => {
            download();
          })
    }
```

The final index.html and index.js:

index.html:
{% gist https://gist.github.com/EneasLari/7509d0a47c1dd92d823d4d059f7ac148 file=index.html %}

index.js
{% gist https://gist.github.com/EneasLari/7509d0a47c1dd92d823d4d059f7ac148 file=index.js %}

If you press f12 and you navigate to Application > Storage > IndexedDb in console panel you will see that a new entry added.

If you want to retrieve it or delete it from html, simply call the retreiveVideoFromDB and removeStoredVideo.

Source code provided below:

[Source Code](https://github.com/tzagiollari/how_to_record_your_web_camera_only_with_JavaScript/tree/save_your_web_camera_recording_locally_in_your_browser)

Thanks for your time.
Leave a question or comment below.
implementing retry mechanism in rmq
Tags: rabbitmq, dlx
Published: 2022-04-29 12:13:06

Rabbit MQ is an opensource message broker. We can publish messages to exchanges and queues can be bound to exchange with routing keys. Consumers will consume the payloads from the queues and so the application will work as intended.

Lets assume for some reason application couldn't process the payload and it rejects it, and we need to retry it with some delay? This is not rocket science, but lemme show you how I would have done it.


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

### Pre-Conditions
- `q_work` is bounded to `ex_main` with `rk_work`
- DLX of `q_work` is `ex_retry`
- DLX Routing Key of `q_work` is `work`
- `q_retry_work` is bounded to `ex_retry` with `rk_work` 
- DLX of `q_retry_work` is `ex_main`
- DLX Routing Key of `q_retry_work` is `work`
- TTL of the `q_retry_work` is `30s`

Producers publishes messages to `ex_main`. 
Messages with `rk_work` routing key is immediately pushed to `q_work`. 
The application will consume or reject messages. 
Rejected messages are dropped to `ex_retry` and messages with `rk_work` will immediately pushed to `q_retry_work`.
Since no one is consuming from `q_retry_work` and after 30s it will dropped the messages to its DLX, which is `ex_main`.
Keploy-Calling all Open Source Contributors
Published: 2022-04-29 12:07:48

Have you ever heard about API calls? Have you ever heard about the term testing? When you are broadcasting a live stream or creating a post over Instagram you are essentially making an API Call, according to the definition, an API call is the process of a client application submitting a request to an API and that API retrieving the requested data from the external server or program and delivering it back to the client. But you know, with API Calls, there comes a tedious task to test, right?


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



Problems like validating the test parameters, and securing API call sequences, are faced by every student developer nowadays. Nothing to worry about, What if I introduce you to a tool that can do this thing for you in minutes? Interesting, right?



Well, the platform I am talking about is Keploy, which is a No Code API Testing Platform. You can use this to generate test cases and mocks from your API Calls. I got to know about this when I was participating in a hackathon and performing testing and was writing a hell number of test cases for my API calls, as the time was less, my team members suggested looking out for a tool that does that, while I was searching on Github, I got to know about this platform, I joined their slack, introduced myself. The community is very welcoming, when I told them about the issue, they helped me to set up keploy onto my local system, and I got free from writing the test cases over and over again.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/20h47n3vjrcoa8gjly8l.jpg)




Now comes the question of what makes Keploy different from others? The main answer lie in its features, it converts the api calls into a test case from any source, safely replays all the CRUD operations, not only this, it gives accurate noise detection? Amazing right?


Now, when you have got to know that what is keploy and what makes it different. Join the community and contribute to our amazing [open source project](https://github.com/keploy/keploy)
How to debug artifact passing on Gitlab easily
Tags: devops, gitlab, tooling
Published: 2022-04-29 12:05:27

## How to debug artifact passing on Gitlab

Lately, I've been working a lot with GitLab pipeline files and I have now a bit more complicated setup than usual. In my case, the middle step is included from another project as a template. I had a nasty bug that from the first step artifacts were never arriving at the last step. However as per Gitlab's docs that should be working by default.

A simplified version of my `gitlab-ci.yml`. Inspiration from [StackOverflow](https://stackoverflow.com/a/56550870):

```
image: ubuntu:18.04

stages:
  - test
  - build
  - deploy

test:
  stage: test
  script:
    - echo "test result..." >> test_result.txt
  artifacts:
    paths:
    - "test_result.txt"
    expire_in: 1 day

# runs in stage build
include:
 - project: 'another-project'
   ref: 'master'
   file:
     - '/templates/build.yml' # this creates build_result.txt

# trying to debug if included step can see the artifact from before
included-build:
  script:
    # This is wrong! Overriding the included template's script section
    - cat test_result.txt

# test_result didn't arrive here at all
deploy:
  stage: deploy
  script:
    - cat test_result.txt
    - cat build_result.txt
```

## The Problem

So I wanted to debug why `test_result.txt` from the first step never arrived at the last stage.

My first thought was I can debug this by adding a `script` to every step in between to `cat test_result.txt` right? Nope!

Because the included template also introduces a `script` section, if I add a `script` section to `included-build` the included scripts will be overridden. Thus losing the original behavior.

🔥 Hot tip, you can always validate this by looking through the (View Merged YAML)[https://docs.gitlab.com/ee/ci/pipeline_editor/#view-expanded-configuration] tab. This way you make sure you see everything merged from templates and won't be surprised :).

## The solution

I discovered that every job can have a `before_script`. In my case, this was not used in any steps, so I could use it with confidence. This way I can be sure I don't break any scripts already included.

```
# trying to debug if included step can see the artifact from before
included-build:
  when: on_success
  before_script:
    # right! Won't change the original behavior of this job
    - cat test_result.txt
```

So I could add this `before_script` section to **every job in between** the first and last step, and this way found the bug easily. Hopefully, this small tip helps you as well.

🔥🔥 Extra hot tip, use the [Gitlab Workflow VS Code Extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow), it works with on-prem servers as well (not just official gitlab.com projects)!

You can...

- follow your latest pipeline without stepping out from your VS Code.
- Have **CI variable auto-completion**.
- Review and create merge requests

It just works like a charm, a must-have when working with GitLab.
MY SPOTIFY PLAYLIST
Tags: uncategorized, music, spotify
Published: 2022-09-15 20:28:52

---
title: MY SPOTIFY PLAYLIST
published: true
date: 2022-04-29 12:03:33 UTC
tags: Uncategorized,music,spotify
canonical_url: https://blog.aldinn.com/my-spotify-playlist/?utm_source=rss&utm_medium=rss&utm_campaign=my-spotify-playlist
---

 ![](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOTE5IiBoZWlnaHQ9IjEwNzciPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIHZhbHVlcz0icmdiYSgxNTMsMTUzLDE1MywwLjUpO3JnYmEoMTUzLDE1MywxNTMsMC4xKTtyZ2JhKDE1MywxNTMsMTUzLDAuNSkiIGR1cj0iMnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPjwvcmVjdD48L3N2Zz4=)

<iframe loading="lazy" title="Spotify Embed: Aldinn Tunes" style="border-radius: 12px" width="100%" height="380" frameborder="0" allowfullscreen allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" src="https://open.spotify.com/embed/playlist/1O178Hi5F5gIWXqL4iGlOZ?si=dab07589f71542e5&amp;utm_source=oembed"></iframe>
The post [MY SPOTIFY PLAYLIST](https://blog.aldinn.com/my-spotify-playlist/) appeared first on [Aldinn Rocks](https://blog.aldinn.com).
vvv.code.blog
Tags: webdesign, webdevs, developer, webdeveloper
Published: 2022-04-29 11:42:00

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gya2whej7rnkxkfpdylq.png)
**[vvv.code.blog](https://vvv.code.blog/)**
Code of The Future
Information at
**[vvv.code.blog](http://vvv.code.blog/)**
No.1 on Google
+16M Views Google Maps
SuperFast
Michael Weber
React, Vue and Svelte : Comparing Select Binding
Tags: javascript, react, vue, svelte
Published: 2022-04-29 11:35:13


## Select Binding in...
You will notice that without any extra code, React will select the next value because the first one is disabled. Vue and Svelte leave the select empty.

Check it out 🚀

### React
[Live Example](https://stackblitz.com/edit/vitejs-vite-rtknog?file=src/App.tsx)

```jsx
const [selected, setSelected] = useState<string>('Choose one option');

<section>
    <h2>Select</h2>
    <select onChange={(e) => setSelected(e.target.value)}>
        <option value="" disabled>
        Please select one
        </option>
        <option>Frontend Developer</option>
        <option>Backend Developer</option>
        <option>Fullstack Developer</option>
    </select>
    <p>Selected: {selected}</p>
</section>
```

### Vue
[Live Example](https://stackblitz.com/edit/vitejs-vite-awpag1?file=src/App.vue)

```jsx
const selected = ref('Choose one option');

<section>
    <h2>Select</h2>
    <select v-model="selected">
      <option value="" disabled>Please select one</option>
      <option>Frontend Developer</option>
      <option>Backend Developer</option>
      <option>Fullstack Developer</option>
    </select>
    <p>Selected: {{ selected }}</p>
</section>
```

### Svelte
[Live Example](https://stackblitz.com/edit/vitejs-vite-acfjqm?file=src/App.svelte)

```jsx
let selected: string = 'Choose one option';

<section>
    <h2>Select</h2>
    <select bind:value={selected}>
      <option disabled value="">Please select one</option>
      <option>Frontend Developer</option>
      <option>Backend Developer</option>
      <option>Fullstack Developer</option>
    </select>
    <p>Selected: {selected}</p>
</section>
```