teleren/devto huggingface dataset:
No-Code Predictions with AI for 30% growth
Published: 2023-07-29 13:30:00

## Welcome to [Faraday](https://www.aiforme.wiki/ai/tools/Faraday), where AI meets simplicity. Say goodbye to complex algorithms and PhD-level knowledge—Faraday brings the power of machine learning predictions to everyone, from marketers to developers. 

With Faraday, you can predict lead scores, prevent churn, find new customers, personalize outreach, and achieve your goals with ease.

**How It Works:**

**No-Code Predictions:** Faraday lets you embed AI in your workflows without requiring extensive coding or technical expertise. Anyone can harness the power of machine learning predictions to enhance their team's performance.

**AI for All:** Whether you're a marketer, data analyst, or developer, Faraday makes it easy for everyone to leverage the potential of machine learning predictions in their daily operations.

## Why Choose Faraday:

**Marketing and Growth:** Achieve your marketing and growth goals by using Faraday's powerful built-in templates for lead scoring, personas, and more. Or unleash your creativity and build custom strategies from scratch.

**Data and Analytics:** Faraday seamlessly integrates with your existing stack, ensuring that you have access to connected consumer data and proven machine learning predictions.

**Platforms & Developers:** Developers can enhance their platforms with AI capabilities, making their tools perform even better and delivering unmatched value to their users.

**Versatile Prediction Recipes:** Explore a wide range of prediction recipes designed to help you optimize lead scores, personalize outreach, engage customers, and more.

**Ethical AI:** Faraday values fairness and puts you in control. Choose the right balance between power and fairness in your AI predictions, ensuring ethical and responsible use.

**Conclusion:**
With Faraday, you don't need to be a data scientist to harness the power of AI predictions. Empower your team with the ability to make data-driven decisions and crush your goals effortlessly. 

Whether you're a marketer, developer, or data enthusiast, [Faraday](https://www.aiforme.wiki/ai/tools/Faraday) is the tool that bridges the gap between AI and simplicity. Start your AI journey with Faraday and experience the remarkable impact of no-code predictions.
What you learning about this weekend?
Tags: codenewbie, discuss, learning, beginners
Published: 2023-07-29 13:00:00

Hey hey hey! 👋

What you all learning about this weekend?

Whether you're sharpening your JS skills, making PRs to your OSS repo of choice 😉, sprucing up your portfolio, or writing a new post here on DEV, we'd like to hear about it.

Raise a glass to learning! 🍷

![Classic GIF of dude looking at the camera and tapping his head to indicate thinking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/al02iiil164klxk5p0cy.gif)
How to use forEach loop in Node JS template engine
Tags: node, express
Published: 2023-07-29 12:59:05

Hi friends, in this tutorial you will learn how to use forEach loop in Node JS template engine. Generally, ejs (embedded template engine) is known as the node js template engine. Therefore, we will use forEach loop inside the html files residing under the views folder by default.

Also read, EJS Template in Node JS with an Example

HTML files are created inside the views folder with .ejs extension which means the HTML files can be displayed on the browser directly without any .html extension just by including the name of the route.

Also read, How to render HTML files in Express JS

Steps to use forEach loop in Node JS template engine

Step 1:- First of all create a file with a .js extension inside the root directory that is your project folder. For eg:-
foreach.js

Step 2:- Now, inside the "foreach.js", initialize the packages and modules of express js framework with the help of const keyword as shown below.

const express = require('express');

Step 3:- Now, declare another variable "data" to use the functionality of express js modules as shown below.

const data = express();

Step 4:- Now, call the ejs template engine using the set() method and the above "data" variable as shown below.

data.set('view engine','ejs');

Step 5:- Now, set up the route name "profile" using the get() method and the above "data" variable as shown below.

data.get('/profile',(req,resp)=>{
   const skillset = ['C','C++','java','PHP','Node JS','Python','React JS'];
   resp.render('profile',{skillset});
});

Please note that in the above piece of code, I have used an array of skillset=['C','C++','java','PHP','Node JS','Python','React JS'] so that it can be displayed in the HTML file using the forEach loop.

Step 6:- Now, create an HTML file (profile.ejs) under the default views folder using the .ejs extension.

Step 7:- Now, paste the below code inside the profile.ejs file as shown below.

```
<html>
    <title></title>
    <head></head>
    <body>
        <h2>Welcome to the profile page</h2>
        <h3>My Skillsets are given below</h3>
        <ul>
            <% skillset.forEach((val)=>{
                %>
                    <li><%= val %></li>
                <%
            }) %>
        </ul>
    </body>
</html>
```

Complete Code (foreach.js)

```
const express = require('express');
const data = express();
data.set('view engine','ejs');
data.get('/profile',(req,resp)=>{
   const skillset = ['C','C++','java','PHP','Node JS','Python','React JS'];
   resp.render('profile',{skillset});
});
data.listen(3000);
```

Step 8:- Now, go to your browser and type http://localhost:3000/profile and press ENTER and then you can see the output as shown below.

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

Conclusion:- I hope this tutorial will help you to understand the concept. If there is any doubt then please leave a comment below. Download
DataMesh on GCP
Tags: datamesh, dataplex, googlecloud, bigquery
Published: 2023-07-29 12:56:56

I've been leading a many-week bookclub on the [DataMesh book ](https://www.oreilly.com/library/view/data-mesh/9781492092384/)(cover image from a presentation from the book author) and also have been building POCs of a DataMesh using Google Cloud set of DataPlex services.

To that end, I will link resources here.
- First the [YouTube playlist](url) for the bookclub.
- Next my notes from my GitHub Repo `gcp-for-bioinformatics' on [Dataplex](https://github.com/lynnlangit/gcp-essentials/blob/master/4_big%20data_and_genomics/4k_BigLake_&_Dataplex/Dataplex.md).
- Also a [dedicated Repo](https://github.com/lynnlangit/learning-data-mesh) with notes on Data Mesh in general.

Are you exploring Data Mesh yet?  How's it going?  Share comments here.
Next13 Fullstack Ecommerce 🛒 | React, Typescript, TailwindCSS, Prisma and MongoDB 🔥
Tags: nextjs, react, tailwindcss, javascript
Published: 2023-07-29 12:38:33

I start a new Fullstack E-commerce course on my YouTube Channel 🔥

It's free 🙌

![ecommerce preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7t0eiyl249lrlx1zqb4.png)

This comprehensive course teaches you how to build powerful ecommerce application from scratch using `Next.js`, `React`, `TypeScript`, `Tailwind CSS`, `Prisma`, and `MongoDB`. 

From frontend design to backend infrastructure, you'll learn to create dynamic interfaces, handle data modeling and queries, implement user authentication, and deploy to production. Gain the skills to become a proficient full-stack ecommerce developer and create scalable, feature-rich online stores

## Check out the demo of the application in the following video
{% youtube sBl0ZsJE9DY %}
MVC-Razor Is A Fluent Web Development Paradigm.
Tags: mvc, mvcrazor, aspnet, razor
Published: 2023-07-29 12:35:55

In the ever-changing world of web development, our goal is to create efficient and easy-to-maintain applications. That's where MVC-Razor comes in- a perfect fusion of two essential components. The Model-View-Controller(MVC) pattern and the Razor view engine. This dynamic duo empowers developers to build powerful web applications with ease, focusing on separation of concerns, code reusability, and a seamless user experience.

**Mechanism of MVC-Razor**
MVC-Razor brings together two important elements. The MVC pattern separates the application into three parts,

- The Model(data and logic)
- The View(user interface)
- The Controller(handling interactions)

MVC-Razor comes with the support of the ASP.NET ecosystem, providing a wide range of resources and tools for streamlined development. It makes code reusability a breeze with Razor's elegant syntax and templating capabilities. 

MVC-Razor offers the perfect blend of the MVC pattern and the Razor view engine. And Creates reusable components to enhance consistency, boost productivity, and improve the user experience effortlessly.
Practical Betterments
Tags: showdev, jamstack, webdev, writing
Published: 2023-07-29 12:13:09


[Pracitcal Betterments](https://practicalbetterments.com) is a collection of one-off actions that improve your life continuously.

For the past year I've been collecting what I was calling "life hacks", but are really their own thing — that I've decided to call practical betterments. Partly because life hack is sort of vague and can mean anything from "make your bed every morning", to "use toilet rolls to organize your wires" — but mostly because the domain [practicalbetterments.com](https://practicalbetterments.com) was available.

I didn't originally intend for this collection to be a website — but after boring everyone I know with them, it seemed important for my personal life to have an outlet.

I've collected over a hundred of these — and am trying to write one up every morning. You can learn more about them on the [about page](https://practicalbetterments.com/) or jump right in and get a taste for the kind of thing it is with these:

- [Cut the end off your toothbrush](https://practicalbetterments.com/cut-the-end-off-your-toothbrush/)
- [Adjust the temperature of your boiler](https://practicalbetterments.com/adjust-the-temperature-of-your-boiler/)
- [Switch your phone to dark mode](https://practicalbetterments.com/switch-your-phone-to-dark-mode/)

I hope you enjoy them, let me know what you think!
How to configure python environs for Visual Studio Code
Tags: python, datascience, bash
Published: 2023-07-29 12:00:19

If you need to store environment variables for Python that does not automatically get detected by VS Code then [this answer](https://stackoverflow.com/questions/53653083/how-to-correctly-set-pythonpath-for-visual-studio-code) should hopefully help you.

I am doing a Data Science bootcamp and need to store a specific path for one of my challenges. 

Exporting `PYTHONPATH` in `~/.zshrc` works perfectly when I run the notebook directly from Juypter, however the environment variable is not detected through VS Code.

I created a global file in my home directory from the `pwd` (present working directory) that I wanted to store in my path:

```bash
echo "export PYTHONPATH=$(pwd):$PYTHONPATH" >> ~/.python-env
```

I opened the JSON User Settings in VS Code and added the `python.envFile` setting which points directly to `~/.python-env`

```json
{
    "python.envFile": "~/.python-env"
}
```
Five Methods for Directly Assigning Primitive Values Received with a Pointer in Go
Published: 2023-07-29 11:59:27

First of all, let’s see in which case we need this process.

A sample need scenario;

```go
type MyStruct struct {
 Text *string
}
```

Let’s have a `struct` as above. We have a data that is parse to this model and let’s assume that the `Text` field is filled after parse. In this case, it will be enough to use a suitable data for our model.

But if we wanted to fill the `Text` field of the model we created when we had no data to parse, what should we do?

In fact, the best way to fulfill such a request, if it were supported by Go, would be as follows.

```go
a := MyStruct{
  Text: &"text",
}

// or
a := MyStruct{
  Text: &string("text"),
}
```

However, since the method of giving the address of the string value with `&"text"` is not supported, we have to resort to other methods.

Unfortunately the `new` function can’t help either, because the `new` function only creates a zero-valued variable and return its address. Therefore we cannot assign the value we set at once.

## 1. By Creating Helper Variable
We can create a helper variable to send the address to the `Text` field.

```go
text := "text"
 
a := MyStruct{
  Text: &text,
}
```

## 2. By Creating Helper Function
We can create a helper function to send the address to the `Text` field.

```go
func Ptr(v string) *string{
 return &v
}
.
.
.
a := MyStruct{
  Text: Ptr("text"),
}
```

## 3. By Creating Helper Function With Generics
Actually best effective method is this method. Because it’s more readable and reusable method.

```go
func Ptr[T any](v T) *T {
 return &v
}
.
.
.
a := MyStruct{
  Text: Ptr("text"),
}
```

Instead of `*string` If we have a `*int64` type field, we have to specify number as `int64`. Because default decimal number type is `int`. Thus we can not send parameter directly as `Ptr(123)`. We can specify the type of the parameter in 2 different ways.

```go
// first way
Ptr(int64(123))

// or second way
Ptr[int64](123)
```

## 4. By Using Slice
Another simple method that we can apply by using slice.

```go
a := MyStruct{
  Text: &[]string{"text"}[0],
}
```

But it is not a very readable writing style.

## 5. By Using One-liner Anon Function

```go
a := MyStruct{
  Text: func(v string) *string { return &v }("text"),
}

// or

a := MyStruct{
  Text: func() *string { v := "text"; return &v }(),
}
```

This method also seems very complicated

Thank you for reading, I hope you enjoyed it
Stop merging the main branch into your feature branch! Try rebasing
Tags: git
Published: 2023-07-29 11:35:20


_📝 This post is part of my ["Shorts"](https://poddarayush.com/shorts) series. Each post in this series is hyper-focused on a single concept and should take less than 1 minute to read._

If you have ever worked in a software development team, you must have faced a situation where a bug fix is present in the `main` branch and you require it in your feature branch to progress.

A trivial way to solve this problem is to merge the `main` branch into your feature branch. But, this leads to a dirty commit history in your feature branch. Your feature branch will consist of few (or many) commits that are unrelated to your task.

What if?
--------

What if you could create a new branch of the `HEAD` of the `main` branch and migrate all your feature branch commits into the new branch?

This would give you two-pronged benefits:

*   You will have the bug fix in your “new” feature branch
*   You will have a clean commit history in your feature branch.

Using git-rebase
----------------

You can use the following command to get this desired result:

```
git rebase <branch-to-rebase-to>

```


Mostly, you’ll be using `git rebase main`, which means that your feature branch’s history will be rewritten such that the base of your feature branch will be altered to the `HEAD` of the `main` branch.

![The green commits form after the rebase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/517su2l6ilfh35l5tnzs.png)

### Caveat

Since this command rewrites history, you may have to use the `--force` flag when pushing your changes in the feature branch to the remote repository.

Sources
-------

*   [https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase)
*   [https://www.atlassian.com/git/tutorials/rewriting-history](https://www.atlassian.com/git/tutorials/rewriting-history)
S1E2: Concurrency Design Patterns: Boring Desing Pattern in Go
Tags: go, systemdesign, designpatterns, webdev
Published: 2023-07-29 10:58:33

Today we will continue our Concurrency Design Pattern web series, in this blog we will learn about the Boring Design Pattern. If you want to keep update with the latest video, then please subscribe my YouTube channel (It motivate me to make more such videos for the community).
Channel Link: https://www.youtube.com/@codepiper 
Boring pattern Video Link: https://www.youtube.com/watch?v=RidHWJCveLw
 
---- 

Let's first see where we can apply this pattern and what can be the use cases of this pattern:

1. **Small and Independent Tasks**: The boring design pattern is well-suited for scenarios where you have several small and independent tasks that can be executed concurrently. Each task can be encapsulated within a separate goroutine.
2. **I/O-Bound Operations**: For applications that involve I/O-bound operations (e.g., reading and writing to files, making network requests), the boring design pattern can be beneficial. Concurrently executing I/O-bound tasks using goroutines and channels can improve overall throughput and performance.
3. **Event Handling**: When dealing with events or event-driven programming, the boring design pattern can be employed to handle multiple events concurrently. Each event handler can run in its own goroutine, responding to events as they occur.

Now we will see how can we implement this pattern with the help of `goroutine` and `waitgroups`

```go
package main

import (
	"fmt"
	"sync"
)

// Boring function that returns a channel to send boring messages
func boring(msg string) <-chan string {
	ch := make(chan string)
	go func() {
		defer close(ch) // Close the channel when the goroutine exits
		for i := 1; i <= 5; i++ {
			ch <- fmt.Sprintf("%s: %d", msg, i)
		}
	}()
	return ch
}

func main() {
	aliceCh := boring("Alice")
	bobCh := boring("Bob")

	// Receive messages concurrently
	var wg sync.WaitGroup
	wg.Add(2)

	go func() {
		for msg := range aliceCh {
			fmt.Println(msg)
		}
		wg.Done()
	}()

	go func() {
		for msg := range bobCh {
			fmt.Println(msg)
		}
		wg.Done()
	}()

	wg.Wait()
}
```

Github Link for the same code: https://github.com/arshad404/CodePiper/tree/main/GO/concurrency-patterns/Boring
Project Manager Interview Questions and Answers
Tags: project, training, management, certification
Published: 2023-07-29 10:38:25

The following are some typical project manager interview questions. You can prepare stories about your prior experiences using this list as a jumping-off point.

1.	Tell me about yourself.
This frequent opening question gives you the chance to introduce yourself and share your background in your own terms.

Answer. You can approach this question in a number of different ways. One efficient strategy is to begin in the present, move on to your past, and end with your future. Describe your position and the work you do. Afterward, go into detail about prior experiences that are pertinent to the position you're looking for. Finally, describe the type of work you hope to undertake after this one and why the position you applied for interests you.

2. Can you tell us about the last project you worked on?
An interviewer could inquire about your most recent project to learn more about the kinds of projects you're accustomed to working on, the project management techniques you've employed, the size of your team, and other specifics.
Answer. Describe the important information about the project, like the overall goal, team size, and how you approached it. Speak candidly about what went well, and be sure to mention something you might have improved or that you learned. Having some metrics on hand to show the results of the project can be useful here.

3. How should tasks be ranked in a project?

For a project, it's important to know what to prioritise. There's a possibility that you'll be asked what you select to prioritise and why. Another question you might be asked is how you would balance working on several projects at once.

Answer. How to respond: Connect your response to the project's appeal. Deadlines, stakeholder needs, or identifying the actions that make up a vital path may all be factors in your response. You can use some historical instances as a guide or go through some fictitious scenarios.

👉👉Learn the most demanding 

[Project Manager Interview Questions and Answers](https://www.youtube.com/watch?v=MorX3t-_fjQ)

Official website: The Knowledge Academy.
YouTube Channel: The Knowledge Academy
Create DB Seeder in Laravel
Tags: webdev, tutorial, laravel, database
Published: 2023-07-29 10:33:24

In Laravel, seeding the database allows you to populate your database tables with sample or default data. This is particularly useful during development and testing when you need to have consistent data for your application. You can create seeders that define the data you want to insert into the database.

To create a seeder in Laravel, you can use the `artisan` command-line tool. Follow these steps:

## 1. Create a new seeder:

Open a terminal or command prompt and run the following command:

```
php artisan make:seeder ExampleTableSeeder

```
This will create a new seeder file in the `database/seeders` directory.

## 2. Edit the seeder file:

Open the created seeder file (e.g., `ExampleTableSeeder.php`) located in the `database/seeders` directory. The file will look something like this:

```
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class ExampleTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // Insert your data here using the DB facade
        // For example:
        // DB::table('example_table')->insert([
        //     'column1' => 'value1',
        //     'column2' => 'value2',
        // ]);
    }
}

```

## 3. Define the data to be inserted:

In the `run() `method of the seeder file, use the `DB` facade to insert the data into the respective database table. You can insert multiple rows using a loop or insert them individually.

## 4. Load the seeder:

To seed the database, you need to call the seeder from the `DatabaseSeeder` class. This class is defined in the `database/seeders` directory and is automatically generated when you create a new Laravel project.

Open the `DatabaseSeeder.php` file and add the call to your `ExampleTableSeeder` in the `run()` method:

```
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $this->call(ExampleTableSeeder::class);
        // Add more seeders here if needed
    }
}

```

## 5. Run the seed command:

Now, you can run the following command to seed the database:

```
php artisan db:seed

```
This command will execute the `run()` method of the `DatabaseSeeder` class, which, in turn, will call your `ExampleTableSeeder` and insert the defined data into the database table.

Remember that each time you run the seed command, it will refresh the data in your database, so use it with caution, especially in a production environment. In a production environment, seeding is typically not needed, and you should be using migrations and a database seeder for development and testing purposes.


`#DevelopersLab101 #LaravelDevelopment`