teleren/devto huggingface dataset:
Workflows with github
Tags: osdc, github
Published: 2023-06-13 03:38:37

Adding actions on GitHub allows you to automate various tasks and workflows within your repositories. Actions are event-driven scripts that run in response to specific triggers. Here's a guide on how to add actions on GitHub:

**Access the Repository**
1. Log in to your GitHub account and navigate to the main page.
2. Select the repository where you want to add actions. If the repository doesn't exist, create a new one by clicking on the "New" button, or clone an existing repository from another user.

**Create the Actions Workflow File**
The easiest way to configure actions is to use the github Actions button in the repository, but in this post I will cover how to add it manually.
1. Inside the repository (bash), navigate to the root directory or the .git folder.
2. If the .git folder doesn't exist, create it.
3. Inside the .git folder, create a new folder named workflows.
4. In this folder, create a new YAML file with a descriptive name, such as actions.yml. 

**Define the Workflow**
1. Open the YAML file you created and define the structure of your workflow.
2. Start by specifying the `name` and `on` fields. The `name` field is a descriptive name for your workflow, while the `on` field defines the trigger event that will initiate the workflow. For example, you can set it to `push` to trigger the workflow whenever code is pushed to the repository.
3. Add the necessary `jobs` to your workflow. Jobs are the individual units of work that your workflow will perform. Specify a `name` for each job and define the steps it needs to execute.

**Configure Actions**
1. Within each job, you can configure actions to perform specific tasks.
2. Actions are pre-built or custom scripts that are executed within your workflow.
3. You can choose from a wide range of pre-built actions available in the GitHub Marketplace by searching for specific functionality.
4. If you have a custom script, you can create an action within your repository by defining the necessary steps.

**Commit and Push**
1. After defining your workflow and configuring the necessary actions, save the YAML file.
2. Commit the file to your repository by staging and adding a commit message.
3. Push the commit to the repository.

**Test the Workflow**
1. Once you push the commit, GitHub will automatically start processing the workflow defined in your YAML file.
2. You can observe the progress and logs of your workflow by navigating to the "Actions" tab in your repository.
3. GitHub will display the status of each job and the output generated by the actions.

As an example, I added a Workflow for [penn](https://github.com/interactiveaudiolab/penn) cloned to [my user](https://github.com/FredAdiv/penn).
In [this workflow](https://github.com/FredAdiv/penn/blob/master/.github/workflows/test_ci.yml), I added an automatic installation of all requirements and run the test whenever the user pushes or PR the repository.

Thanks Gabor for providing sample CIs in the course.
Cheers and happy workflowing :-)
How to Configure Product Stock in Magento 2
Tags: magento, magento2, magento2tutorial
Published: 2023-06-13 03:33:55

Efficient product stock management is a crucial aspect of operating an e-commerce store. Within Magento 2, the options of "In Stock" and "Out of Stock" play a pivotal role in providing valuable information to customers regarding product availability. By displaying accurate stock status, you can significantly improve the shopping experience for customers and showcase a customer-centric approach.

This guide will walk you through the process of **_How to Configure Product Stock in Magento 2_**. To effectively manage stock, you can access the "Inventory" section in your backend by navigating to Stores > Configuration > Catalog > Inventory. Within this section, you have the ability to configure stock settings for individual products as well as the entire catalog.

Configuring stock settings for each product is vital for keeping track of stock levels. By enabling the "In Stock" and "Out of Stock" options, customers can easily view the current availability of a product, enabling them to make informed purchase decisions. To configure stock settings for a specific product, go to the product edit page and select the "Advanced Inventory" tab. Here, you can set the product's stock status, manage its quantity, and receive notifications when stock levels drop below a specified point.

Managing stock levels for the entire catalog can also be accomplished through the "Inventory" section. You can establish default stock settings for all products and define rules for backorders, out-of-stock items, and notifications regarding low stock.

For more information , please visit this :-**_[https://webguru.dev/how-to-configure-product-stock-in-magento-2/](https://webguru.dev/how-to-configure-product-stock-in-magento-2/)_**
100 Days Coding Challenge - Day 24: FreeCodeCamp JavaScript Algorithms and Data Structures
Tags: webdev, javascript, programming, 100daysofcode
Published: 2023-06-13 03:33:35

## Day 24

Today I did the second project, or code, whatever, of the certification, with a for and doing an array of objects


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/868jbyxagrrkk6oupr3e.png)
7 Strategies for Better Debugging
Tags: programming, beginners, opensource, testing
Published: 2023-06-13 03:30:00

Debugging: it's a puzzle that over 60% of developers find challenging. But with the right strategies, it can be tackled effectively. 

Here are 7 practical tips to help you debug more efficiently.

---

## 1. Get to Know Your Code
Dive deep into your code. Understanding its structure and flow is crucial. Comments and documentation are your roadmap through the code. Always question assumptions and ensure you really understand what's happening.

---

## 2. Make the Bug Repeatable
Can't reproduce the bug? Then you can't fix it. Find the specific conditions that trigger the bug and document them. Making the bug repeatable is your first debugging victory.

---

## 3. Break it Down
Big problems become manageable when broken down into smaller pieces. Isolate the section of code causing the bug. By solving small parts, you often find the solution to the larger issue.

---

## 4. Use Debugging Tools
Leverage debugger and logging tools. They can give you insights into your code and help pinpoint where things are going wrong. Let the tools do the heavy lifting.

---

## 5. Talk to a Duck
Rubber duck debugging involves explaining your code, line by line, to a rubber duck (or any object!). This helps you spot inconsistencies or flaws you might have missed.

---

## 6. Keep a Bug Diary
Document each bug, the attempted fixes, and what worked. This "bug diary" can be a lifesaver when you encounter similar bugs in the future.

---

## 7. Ask for Help
Don't be afraid to seek help. New eyes often spot new things. Use online communities like StackOverflow and GitHub for shared wisdom.

---

## Conclusion
Remember, each bug squashed is a step towards better software. 
Happy debugging!

---

## Before we go...

Thanks for reading!

If you loved this, consider following me :)

Got any doubt or wanna chat? React out to me on [twitter](https://twitter.com/yatendrakumar27) or [linkedin](https://www.linkedin.com/in/yatendra2001/).

Looking for AR/VR+AI updates along with baby coding assignments to ride next wave of big tech revolution?

Checkout my newsletter: {% embed https://newdimension.substack.com/ %}
The Collab Lab turns 4 soon! And with time comes change.
Tags: nonprofit, changemanagement, volunteermanagement, engineering
Published: 2023-06-13 03:22:42

As of August, it will have been 4 years since we kicked off the first-ever project at The Collab Lab. We just wrapped up our 61st team! As of today, we’ve helped over 230 early-career developers—from incredibly diverse backgrounds—learn how professional software teams collaborate, teaching practical skills including pair programming, giving/receiving code reviews, and how to demo work to stakeholders, all of the stuff that’s all but impossible to simulate when you’re studying on your own.

<hr>


## What’s changing

For the last 3 years or so, we’ve been following a cadence of one cohort per quarter where we run between 4 and 7 teams of 4 developers each. That worked well as long as we were content to execute the current program. What it didn’t allow us much time for was program and curriculum development.

Not for nothing, that model was a big improvement over the early days when we’d kick off the next team when the current one was halfway through. 🤪🫠

The existing structure served us well, as long as we didn’t want to make too many improvements to the program…

> _“We’ve been wanting to make some meaningful changes to the structure of the program to better serve our community and given that we’re volunteer run, we need the extra time between cohorts to make these changes.” —Me to the Collab Lab board members in Q2 2023 😅_

Our program as it’s currently structured is 8 weeks long. About a year ago, we added an optional 2-week career development program to the end of each project term. That gave us just 2 weeks before the next round of applications would open up and we’d be back on the hamster wheel of providing direct service to the next group.

So, with the enthusiastic consent of our Board of Advisors ([Chiamaka Umeh](https://www.linkedin.com/in/chiamakaumeh), [David Baker](https://www.linkedin.com/in/fullybaked), [EJ Mason](https://www.linkedin.com/in/mxmason), [Yolanda Haynes](https://www.linkedin.com/in/yolanda-haynes), [Mindy Zwanziger](https://www.linkedin.com/in/mindyzwan), & [Shelley McHardy](https://www.linkedin.com/in/shelleymchardy)), we have decided to move from offering 4 cohorts per year to 2.

Sometimes, less truly is more.

By giving ourselves some breathing space between cohorts, we expect to create the capacity to make substantive changes to the program that will allow us to scale horizontally in a way that’s tough to pull off today. We fully expect that by the end of next year we will be able to serve even more early-career developers than we do today and at a higher level of quality.

<hr>

## What’s staying the same

What will **never** change as long as The Collab Lab exists is our commitment to helping early-career developers from diverse backgrounds make the jump into tech. In the current jobs environment, this is as tall a task as it’s ever been and we are more committed than ever to doing everything we can to ease that transition for as many people as possible.
78. Subsets
Tags: leetcode, medium
Published: 2023-06-13 03:22:02

Problem Source: [78. Subsets](https://leetcode.com/problems/subsets/description/)

We will start utilizing UMPIRE method

<strong>1. Understand the problem</strong>
We want to generate a list containing all the subsets of a given list `nums`.

<strong>2. Matching</strong>
This problem seems like generating combinations. We can achieve this by utilizing either BFS or DFS algorithm.
And since we establish a larger subset from the smaller ones, we can use Queue to keep track of that.

<strong>3. Plan</strong>
We want to create an algorithm which can keep adding the elements and create new subset but maintain the order of elements.

For example, if `nums = [1,2,3]`. The first subset is obviously `[]`.

Starting with `[]`, we can create 3 new subsets: `[1]`, `[2]`, and `[3]` by adding `1`, `2`, and `3` into the empty subset to create new ones.

With this, as long as we know which element did the last subset ends with, we can start appending numbers starting from that index to create new subsets.

Here is the algorithm:
1. Using recursion
2. At each recursion, we will keep track of (1) the current subset and (2) the index that subset ends with (the index we can start appending element)
3. Add the current subset into the resulting list. Then repeat the recursion as long as the index is within the limit of the `num` arrays


<strong>4. Implement</strong>
```java
class Solution {
    /**
    Utilize recursion / DFS to construct

    Keep track of result List

    each element still need to be able to know what to do next, right?
    */
    private List<List<Integer>> result;
    public void recursion(List<Integer> root, int[] nums, int idx) {
        result.add(root);

        for (int i = idx; i < nums.length; i++) {
            List<Integer> newList = new ArrayList<>(root);
            newList.add(nums[i]);
            recursion(newList, nums, i + 1);
        }
    }
    public List<List<Integer>> subsets(int[] nums) {
        result = new ArrayList<>();
        List<Integer> empty = new ArrayList<>();

        recursion(empty, nums, 0);

        return result;
    }
}
```

<strong>5. Review and Evaluate</strong>
This algorithm we generate all possible subsets of a list. If a list is of length `n`, we will have `2^n`.

So this problem will not be good to solve in general if the length of the list grows too large
MassContacts - Search 50 million+ contacts & CVs
Tags: b2b, database, contacts, data
Published: 2023-06-13 02:51:18

MassContacts is a curated database of 50 million+ working professionals and CVs. Boost your lead generation, marketing, and recruitment efforts. Use advanced filtering to find your perfect prospects and candidates. It’s the most affordable and easy-to-use contact database and CV search in the market.

[https://masscontacts.online](https://masscontacts.online)
Using Ngrok To Set Up Multiple Ports
Tags: beginners, tutorial, programming, development
Published: 2023-06-13 02:07:35

## Introduction

Hello! 😃 Recently I had to set up two ports to listen on a global network, so in this tutorial I'm going to show you how I used a service called Ngrok to do that.

---

## What Is Ngrok

Ngrok is a tool that creates a secure tunnel to your localhost. This is useful when you want to share your local web server or any TCP based application over the internet.

Before we can use it we need to sign up for a free account and install it.

---

## Installing Ngrok

First you need to sign up for a free account via:
https://dashboard.ngrok.com/signup

Once you have signed up for a free account you need to install Ngrok either via zip or via the command line, once install run the following command to initialize ngrok:

```bash
ngrok config add-authtoken [YOUR_AUTH_TOKEN]
```

Done, now we can actually use ngrok. 😆

---

## Using Ngrok To Serve Two Ports

Usually if you use ngrok with the command line you can only serve one port with a free account, but if you use a configuration file you can actually serve upto two with one command.

To do this create a file called "ngrok.yml" and fill it with something like the following:

```yml
version: 2
authtoken: [YOUR_AUTH_TOKEN]
tunnels:
  first:
    proto: http
    addr: https://localhost:4000
  second:
    proto: http
    addr: 3001
```

The above demonstrates a sample configuration file which has two tunnels, one tunnel shows how you can forward a localhost address that uses https, and the second tunnel shows how to forward http.

Now that we have our configuration file you can use ngrok to tunnel both of the above addresses by running the following command:

```bash
ngrok start --config ngrok.yml --all
```

When the above command is run you will be given two global addresses. 😄
Try changing the above configuration for your own web applications and give it a try. Just remember since it's global if anyone gets your address they can access your web application.

---

## Conclusion

In this tutorial I have shown how you can get a global address for up to two ports with a free Ngrok account. 

I personally use ngrok quite a lot, especially for outside endpoints etc, so it is worth checking it out. 🤓

If you have any useful use cases for ngrok please let me know. 
As always happy coding! 😎

---

Like me work? I post about a variety of topics, if you would like to see more please like and follow me.
Also I love coffee. 

[![“Buy Me A Coffee”](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ethand9999)

If you are looking to learn Algorithm Patterns to ace the coding interview I recommend the [following course](https://algolab.so/p/algorithms-and-data-structure-video-course?affcode=1413380_bzrepgch)
Vector Database: New Hype or Hope for AI's (LLM) and Industry 4.0? :)
Tags: database, datascience, machinelearning, opensource
Published: 2023-06-13 01:56:10

Hello everyone,

I hope you are well; today, I'm going to leave this brief summary about vector databases that have drawn much attention mainly for accelerating initiatives with artificial intelligence, such as Large language models (LLMs) and Industry 4.0.

To know more:

https://jlgjosue.medium.com/vector-database-new-hype-or-hope-for-ais-llm-2b1589add49f

Thanks for reading; share this post; please! :)
Join our Discord server
Published: 2023-06-13 01:31:56

[afkmedia.com/discord/official-servers/events](https://discord.gg/CXkfBD36We)
[afkmedia.com/discord/official-servers/events](https://discord.gg/CXkfBD36We)
[afkmedia.com/discord/official-servers/events](https://discord.gg/CXkfBD36We)
[afkmedia.com/discord/official-servers/events](https://discord.gg/CXkfBD36We)
[afkmedia.com/discord/official-servers/events](https://discord.gg/CXkfBD36We)
10 Rules that will help you build secure, scalable & adaptable applications
Tags: devjournal, programming, applications, beginners
Published: 2023-06-13 01:31:00

People don't care about what you say, they care about what you build -Mark Zuckerberg

10 Rules that will help you build secure, scalable and adaptable applications:


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


## 1. Don't Over Engineer The Solution:

Resist the urge to overengineer solutions by testing ease of understanding with fellow engineers.


## 2. Design scale into the solution:

Design for 20X capacity, Implement for 3X capacity and Deploy for 1.5x Capacity.


## 3. Simplify the solution 3 times over:

Simplify scope using the Pareto principle. Simplification needs to happen during every aspect of product development.


## 4. Reduce DNS Lookups:

Reduction of objects, tasks, computation, and so on is a great way of speeding up page load time.


## 5. Reduce Objects Where Possible:

Reduce or combine objects but balance this by maximizing simultaneous connections. Test changes to ensure performance improvements.


## 6. Use Homegenous Networks:

Buy best of breed for other networking gear (firewalls, load balancers, and so on). Choose single providers.


## 7. Design to clone things:

Simply clone services and implement a load balancer.


## 8. Design to split different things:

Split both the services and the data along the lines defined by the verb/noun approach.


## 9. Design to split similar things:

Identify something you know about the customer and split both data and services based on that attribute.


## 10. Design your solution to scale out - not just up

Plan for success and design your systems to scale out.




Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
JAZIX ALBUM UPDATE 1
Tags: music, youtube
Published: 2023-06-13 00:48:25

The album title has been confirmed to be titled "MAAOLOI"
No planned release date, but we are hopeful for 2023.

We know there will be either 9 or 10 tracks, less than "The NKZ Collection" but we are looking for the tracks to outdo how long the project will go on for.
Projects I work on
Tags: telephony, go, blog, linux
Published: 2023-06-13 00:33:03

My first ﻿Coventry﻿ phone and home / facility automation platform will be called Coventry Apollo. This will use a admin / integration / web service package called apollo that was started in ﻿golang﻿. The ui will be html templates as that is the best I can do on my own.

Other parts of a Coventry phone system had been in development and foss licensed for awhile, including the Coventry call server itself, the Bordeaux media application server, and the Partisipate softphone client. Other parts still pending include a sip to x10 adapter bridge and a sip ai driven voice assistant.

The ideal target platform is a RaspberryPi-like SBC running AlpineLinux. This would be able to connect up to 80 sip endpoints and support up to 200 concurrent call sessions.
Flutter 🧢 Best code to share by Twitter and Line
Tags: flutter, line, twitter, dart
Published: 2023-06-13 00:31:51

There are multiple REST APIs for sharing Twitter and LINE.

But some are not fully supporting native mobiles, Android, and iOS. For example, some are not working as deep-link, or force hashtags to raw string.

Don’t mind, I found the best APIs and write the codes to share by Flutter below.

Check it👇

```

Future<void> shareByLine(String text) async {
  final lineUrl = Uri(
    scheme: 'https',
    host: 'line.me',
    path: 'R/msg/text/' + text,
  );
  await launchUrl(lineUrl, mode: LaunchMode.externalApplication);
}

Future<void> shareByTwitter(String text) async {
  final tweetQuery = <String, dynamic>{
    'text': text,
    // 'url': 'https://...',
    // 'hashtags': ['tag1', 'tag2'],
  };

  final twitterUrl = Uri(
    scheme: 'https',
    host: 'twitter.com',
    path: 'intent/tweet',
    queryParameters: tweetQuery,
  );

  await launchUrl(twitterUrl, mode: LaunchMode.externalApplication);
}

String? encodeQueryParameters(Map<String, String> params) {
  return params.entries
      .map((MapEntry<String, String> e) =>
          '${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value)}')
      .join('&');
}

```

THX💜
Assignment 1
Published: 2023-06-13 00:05:26

This is going to be kind of like a journal for assignments I need to do for the boot camp I signed up for!

Assignment 1 wants us to write a short blog of something that we learned this week based off a blog post or twitter update that we are following.

I ended up looking at the Hongkiat website (https://www.hongkiat.com/blog/) because the description sounded most interesting to me. The very first blog post I saw was titled "[10 Instagram Tools for Businesses, Influencers and Creators](https://www.hongkiat.com/blog/instagram-tools-businesses-influencers-creators/)" which was interesting for me because I just finished my job as a Marketing Manager for a small company last week, and Instagram was a social media platform I dealt with for that company ([ShopDavidPeck](https://www.instagram.com/shopdavidpeck/?hl=en)). I've never actually heard of these tools that were listed on this blog post, the two tools that we used were Plann and Tailwind (moreso of Plann). It seems that many of these tools do the same thing, track KPI's, engagement rates, follower growth, audience demographic, and scheduling your posts on your calendar. Some like "Determ" look interesting to where it notifies you of any sudden increase in mentions. 

The one that interested me the most though was definitely Jasper AI. I feel like AI is an interesting tool that has been getting more popular, and I'm interested in learning more about it. Jasper AI focuses on Brand tone of voice, which is very helpful and something that I definitely would have loved to have when working in the Marketing field. Having that consistent tone of voice when multiple people are working on different blogs/newsletters/etc is something that is necessary for a business to have, but difficult to achieve. Teaching Jasper AI by uploading existing content and brand guidelines is something that I wish I could have tested when I was working back in Marketing.