teleren/devto huggingface dataset:
GENERATIVE AI
Tags: ai, gcp, generativeai
Published: 2023-06-16 08:04:55

I’m glad to share that I’ve obtained all these badges from Google Cloud for completing all courses of Generative AI Learning Path.

Since Google released this Free Learning Path for Generative AI, it has been the talk of the town. But it’s time to practically get our hands dirty & dig into these informative courses.

Check out my Google Cloud Skills Boost credentials: https://lnkd.in/dFem2yRk

Thanks to Tata Consultancy Services to provide opportunity : https://lnkd.in/dDEGdXFV

This learning path contains the following courses:

✅Intro to Large Language Models
✅Intro to Responsible AI
✅Intro to Image Generation
✅Generative AI fundamentals
✅Encoder-Decoder
✅Attention Mechanism
✅Transformers and BERT Models
✅Create Image Captioning Models
✅Intro to Gen AI Studio
✅Generative AI Explorer — Vertex AI

It has 11 activities with 10 free courses & 4 credit labs. All of these are microlearning courses with short, concise but information-packed contents & tricky quizzes.
Thanks to Qwiklabs for the quests on how to use Generative AI on Google Cloud. Through the labs, we get to learn about how to use the models in the Vertex AI PaLM API family, including text-bison, chat-bison, and textembedding-gecko. We also get to learn about prompt design best practices, and how it can be used for ideation, text classification, text extraction, text summarization, and more. We also learn how to tune a foundation model by training it via Vertex AI custom training and deploy it to a Vertex AI endpoint.

Please like ,share and subscribe below #channelpartners on
#youtube :: https://lnkd.in/dDaZPGR5
#github :: https://lnkd.in/dHAMiTcH
#hashnode :: https://lnkd.in/d_gtGxuS
#twitter :: https://lnkd.in/e5ZY5j-x
#DevCodeCommunity :: https://lnkd.in/duMEcSnc
#Tealfeed :: https://lnkd.in/eTyp-Xe4
#medium :: https://lnkd.in/dpEzM8GU

generativeai #llms #llama #googleai #bard #bert #ai #ml #neuralnetworks #deeplearning #google #generativeai #googlecloud #googlecloudplatform #googlebardai #chatgpt #encoder #machinelearning #cloud #opportunity #training #share #design #language #learning #bardai #generativeai #like #agile #leaders GDG Cloud Pune GDG India #pune #india 😊
How to make a batch process that emails big CSV (~1-2 Mbytes) from complex unoptimized queries using laravel.
Tags: howto, php, laravel
Published: 2023-06-16 08:03:06

For some reason in my current work, I need to crunch data from an non-optimal sql query and send the result into a csv to an email. All I have though is a php laravel system.

Therefore there are some limitations:

1. Memory: We cannot use the laravel's DB layer because of:
  1. SQL complexity, I need to execute the query once pagination offers no use
  2. Result Set size: I cannot fetch the results alltogether
2. Email Limitations: CSV may be huge. I cannot send it as is even if it is compressesed.

For 1.1 and 1.2 we can use a console command that sends the email. Jobs decause data crunching takes time is a no go. 

Then we have the following options though:
**Option1:** Trigger the command into background using `&`:
```php
  shell_exec("php artisan data:crunch &");
```
As you can see we avoid using `Artisan` class because we need to run the command into background. In order to do it the command at `shell_exec` must be terminated with `&`.

**Option2:** Use cron:

```php

$schedule->command('data:crunch')->dailyAt('...')->runInBackground();

```
In this case as you can see at `./app/Console/Kernel.php` we utilize the `runInBackground` method.

The command itself should use the PDO _directly_ instead of laravel's db layer. For this use the following code:

```php
namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;

class MyCommand extends Command
{
   // COmmand Definitions are ommited
  
  public function handle()
  {
    // COmplex SQL
    $sql = "...";
    $pdo = DB::getPdo();
    
    $stmt = $pdo->prepare();

    while($item = $stmt->fetch(\PDO::FETCH_NUM)){
      // GEN CSV here
    }
  }
}
```

For multiple DB connections use (replace the `my_connection` with the appropriate one defined upon `./config/database.php`):
```
  DB::connection('my_connection')->getPdo();
```
For the CSV you'll need to have enough disk space and this algorithm needs to be followed:

1. Save upon `storage_path();` using php's `file()` and `fputcsv`:
   ```
     $fp = fopen(storage_path('mycsv.csv','w');
     while($item = $stmt->fetch(\PDO::FETCH_NUM)){
        fputcsv($fp,$item);
        fflush($fp);
     }
     fclose($fp);
   ```
   Due to memory limitations we need to build the file line by line instead of one-go that laravel's API provide. `fflush()` ensures that line is written in case of unexpected termination.
2. Then upload it into:
  1. An s3 bucket hosted as static website or served via a CDN
  2. Azure blob storage 
  3. Into a seperate (s)ftp server.
  4. Any web accessible storage
4.send the email towards the receipient. In this email you'll need to place the url of the file inside.
     
The idea is that we need a URL where the end user needs to be able top download the file.Therefore, we need to upload the file into a storage that is able to provide a public-available url. And send this email. The reason why is because mailboxes cannot handle huge files.

Also, if CDN is used, the files can be served via signed URLS if possible.
Hospitals should avoid DIY software testing solutions
Published: 2023-06-16 08:00:06

A recent [survey](https://connectlp.keysight.com/Healthcare-Keysight-Vital-Signs-eBook) of QA and IT leaders at major US providers caught my eyes. While there's no surprise that the healthcare industry lags in deploying test automation practices, the impact is beyond code issues and software glitches.

94% healthcare leaders report lack of test coverage hurt patient outcomes.

The study also focused on an interesting trend on do-it-yourself (DIY) testing approaches, which is often perceived as a cost-effective solution. Despite open source, in-house built yields the lowest satisfaction rates when it comes to meeting pre-release requirements compared to manual testing or test automation platforms. 

This revelation serves as a wake-up call for healthcare organizations to reevaluate their testing strategies and prioritize quality assurance.

I think it’s well worth reading the Vital Signs Report in full — to understand the full impact of DIY testing solutions on healthcare software quality and patient outcomes. It also explores the key challenges associated with emerging regulations and shares the best practices for automated EMR testing to safeguard high-quality patient experience in the digital age.

View survey results: https://connectlp.keysight.com/Healthcare-Keysight-Vital-Signs-eBook
🎯 Goals of Processes Changes
Tags: webdev, programming, softwareengineering, productivity
Published: 2023-06-16 07:43:09

Are you planning to change processes in your team?
Are you planning to introduce new processes?
Do you want to add an Agile methodology or a Code Review process?

That's great! But you should understand that each change should have a goal for a business side. When we talk about processes, the goals of process changes vary depending on the type of project.

**Startup.** The goal of a startup is to prove or disprove the theory of the project idea's success. Accordingly, process changes/implementations should help achieve the end goal even faster.

**Product.** Here it gets more interesting. When a project transitions into the product stage, the technical debt in its codebase quickly accumulates, which can consume a significant amount of resources if it exceeds acceptable limits. Therefore, process changes/implementations should help effectively fulfill business requirements while reducing technical debt and establishing a codebase that can serve for decades.

**Outsourcing.** Here it's quite simple. We build good processes to easily and seamlessly replace any participant in this process. This is the main goal of processes in outsourcing. However, we can also transfer the same goal to the product.
How to Rotate PDF Pages in Java
Tags: pdf, java, programming
Published: 2023-06-16 07:17:43

Rotating PDF pages is a useful method for adjusting page orientation within a PDF document, allowing users to rotate pages by 90, 180, or 270 degrees clockwise or counterclockwise without altering the layout of text and images. This feature is particularly beneficial for documents that need to adapt to screen or printer orientation or change reading direction. In the following sections, I will provide a guide on how to programmatically rotate PDF pages using Java as an example.

## Step 1: Install a PDF Library
I highly recommend [Free Spire.PDF for Java](https://www.e-iceblue.com/Introduce/free-pdf-for-java.html), which is a totally standalone PDF Library. It supports a wide range of features such as creating, editing and converting of PDF files effortlessly within Java applications.

You can download it from [this link](https://www.e-iceblue.com/Download/pdf-for-java-free.html) to local and unzip it.

## Step 2: Import JAR file to your project
Take IntelliJ IDEA 2018 as an example

- Create a new project in IntelliJ IDEA.
- Click “File”- “Project Structure”- “Modules”- “Dependencies” in turn. 
- Choose the “JARs or Directories” under the right green plus.
- Find the “Spire.Pdf.jar”  in the lib folder of the decompressed package and import it to the project.

## Step 3: Write code
```java
import com.spire.pdf.PdfDocument;
import com.spire.pdf.PdfPageBase;
import com.spire.pdf.PdfPageRotateAngle;

public class RotatePdfPage {
    public static void main(String []args){

        //Create a PdfDocument instance
        PdfDocument pdf = new PdfDocument();

        //Load a PDF document
        pdf.loadFromFile("sample.pdf");

        //Get the first page
        PdfPageBase page = pdf.getPages().get(0);

        //Get the original rotation angle of the page
        int rotation = page.getRotation().getValue();

        //Rotate the page 180 degrees clockwise based on the original rotation angle
        rotation += PdfPageRotateAngle.Rotate_Angle_180.getValue();
        page.setRotation(PdfPageRotateAngle.fromValue(rotation));

        //Save the result document
        pdf.saveToFile("result.pdf");
    }
}
```
In this code, you need to create an instance of PdfDocument first and load a sample file using **loadFromFile()** method. Then, you can get the original rotation angle of the page using **getRotation().getValue()** method and rotate the page 180 degrees clockwise based on the original rotation angle. Finally, save the result file with **saveToFile()** method.
If you want to rotate the whole PDF file, please loop through all pages before getting the original rotation angle of the page.

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

Referring to the above method, you can also use this PDF component to [convert PDF to Word](https://www.e-iceblue.com/Tutorials/Java/Spire.PDF-for-Java/Program-Guide/Conversion/Convert-PDF-to-Word-in-Java.html), or [print PDF files](https://www.e-iceblue.com/Tutorials/Java/Spire.PDF-for-Java/Program-Guide/Print/How-to-print-PDF-document-in-Java.html).
What is Mobile App Architecture?
Tags: beginners, architecture, appwritehack, designpatterns
Published: 2023-06-16 07:15:49

Mobile app architecture encompasses the overall design and operational flow of a mobile application, encompassing the constituent elements, frameworks, and patterns employed in its creation. In essence, it delineates how the various elements of a mobile app collaborate to deliver the intended functionality and user experience.

A well-conceived architecture is paramount in developing mobile apps that are stable, scalable, and easily manageable. Broadly speaking, mobile app architecture typically comprises the following components:

- Presentation Layer: This layer assumes responsibility for the app's user interface (UI), encompassing screens, buttons, menus, and other UI elements that users interact with.

- Application Layer: This layer houses the app's business logic, including algorithms, rules, and workflows that empower the app to execute its functions.

- Data Layer: This layer manages the app's data, encompassing storage, retrieval, and manipulation of data from databases, APIs, and other sources.

- Networking Layer: This layer facilitates communication between the app and external systems, such as servers, APIs, and other web services.

These constitute the fundamental components of **[mobile app](https://www.uplogictech.com/mobile-app-development-company
)** architecture. Typically, a development team handles these components and arranges them in a specific configuration. Different approaches to managing these components may be referred to as distinct types of mobile app architecture.

Read more: https://www.uplogictech.com/blog/the-mobile-app-architecture-what-does-it-mean/
Getting Started With Django.
Published: 2023-06-16 07:09:35


What experiences do you have while starting over with django framework? It can require a little work to download and install django for your project. However, the easiest way is to follow through the documentation. This way, you'll be taken through simple steps to get started with. There are two ways though:

1. Installing globally (pip install django)

2. Installing virtually (pipenv install django).
I like the virtual installation since the project will be independent of the other existing or future projects. The dependencies won't have to interfere with those of other projects. I would recommend it. Tell me what you think...
Problems I face as a freelancer on Upwork
Published: 2023-06-16 07:05:09

Hi guys, I hope you're doing well. I would like to share some of my experience and also some questions i still have as a freelancer. 

I started freelancing at the beginning of this year as of 2023 both on upwork and fiverr. So far 6 months have elapsed but not good results yet on both sides. 
One thing I've noticed is that its hard for new-comers like myself to get at-least one gig a week or even a month. 

**Guys, am i doing things the way they are supposed to be ?**
I truly don't understand why am i failing to make it. 

Nowadays its hard for me on upwork, you find a gig with over 50+ proposals sent but unfortunately the client instead invites totally different people to take up that gig, so in the end people who sent their proposals actually wasted all the connects.

Maybe I'm talking from one side, I would like to hear from the those ones who have made it through freelancing so that I also learn or follow their practices.

To be honest **freelancing is also a problem on its own**

I look forward to hearing from successful freelancers from anywhere around the world.

Best regards
Isaac Katongole
Frontend Developer
Do Code Comments Deserve a Special Spot or Can Well-Written Code Speak for Itself?
Tags: discuss
Published: 2023-06-16 07:00:00

Are code comments really necessary? Share your insights and experiences on whether meticulously crafted code can be self-explanatory enough to render comments redundant. Are comments an essential part of code documentation, or can they sometimes be more confusing than helpful? Join the conversation!

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}

[Image by pch.vector on Freepik](https://www.freepik.com/author/pch-vector)
Using Redux without Build Steps (a.k.a via CDN)
Tags: redux, javascript, react, tutorial
Published: 2023-06-16 06:56:08

Learning Redux sometimes hard, even still hard for me, even harder if we just learn and never use it.

Buy hey I just created a GitHub repository that contains educational material (a.k.a simple sample) about how to use Redux without any complexity.

Check it out at https://github.com/sonyarianto/redux-without-buildsteps

It's called "Redux without Build Steps", it will show you about how to use the famous Redux just by using their CDN script. No installation, no `npm install` things and all code is in a single HTML file, even we do not need a web server to run it.

Hope you enjoy it learning Redux.
Quick guide about Layer 2 scaling solutions
Published: 2023-06-16 06:54:19

Layer 2 refers to a secondary framework or protocol that is built on top of an existing blockchain system. Major cryptocurrency networks such as Ethereum face transaction speed and scaling difficulties. Bitcoin and Ethereum are still not able to process thousands of transactions per second. Additionally, these layer 2 solutions usually offer much better transaction fees.


Layer 2 solutions are designed to address the scalability limitations of the Layer 1 blockchain networks. By moving some of the computational and transactional processes off-chain while leveraging the security of the underlying Layer 1 network, Layer 2 solutions can significantly increase transaction throughput, reduce fees, and enhance the overall efficiency of blockchain systems. 

There are two dimensions layer 2 is different from layer 1
first is transection execution and second is data availability

1) Transaction execution strategies deal with how transactions are run, where they are run, what the trust environments are, what the security and decentralization environments are, etc.

2) Data availability strategies deal with whether or not the Layer 2 solution makes their transaction data available on the main Layer 1 chain or not.

Types of Layer 2 Scaling Solutions:
1. State Channel
2. Side Chains
3. RollUps
   Optimistic Rollups (ORs)
   Zero-Knowledge Rollups (ZKRs)
4. Palsma
5. Validiums
6. Voliltions

While Layer 2 scaling solutions offer significant advantages, there are some considerations and challenges to keep in mind:
Security: Layer 2 solutions rely on the security of the underlying Layer 1 blockchain. Ensuring the integrity and safety
How to Add URL Rewrite Programmatically in Magento 2
Tags: webdev, magento, magento2tutorials
Published: 2023-06-16 06:49:00

Magento 2 is a well known internet business stage that offers a variety of highlights and functionalities for traders to deal with their web-based store. 

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

One essential part of an internet based store is the URL structure, which can affect the web search tool rankings and client experience. URL changing is an element of Magento 2 that empowers vendors to make custom, Website optimization cordial URLs for their items, classes, and different pages. 

In this blog, we will dive into the course of **_how to add URL rewrite programmatically in Magento 2_**, investigating the means and advantages of this cycle. You can likewise peruse, how to successfully involve URL modify Usefulness in Magento 2.

For more info, visit **_https://webguru.dev/how-to-add-url-rewrite-programmatically-in-magento-2/_**
The Mobgames.AI
Tags: unity3d, ai, productivity, discuss
Published: 2023-06-16 06:38:18

Introducing mobgames.ai, an innovative AI-powered game development tool for Unity and Unreal Engine. Discover the capabilities of this exciting tool by watching this informative video: 

{% youtube 0ggJcWnMooo %}

Source : [mobgames.ai](mobgames.ai)

What are your thoughts on this tool? Do you believe it will positively or Negatively impact the game development profession?
How to Configure Shipping Methods in Magento 2
Tags: magento, magento2, magento2tutorial
Published: 2023-06-16 06:35:22

If you run an eCommerce store on Magento 2, it's important to have knowledge of its shipping methods. Shipping methods determine the cost and mode of delivery for products to customers. Offering multiple shipping options can enhance the customer experience and even influence their buying decisions. Therefore, it's crucial to grasp the fundamental shipping configurations and default shipping methods available in Magento 2.

This article will delve into the process of **_How to Configure Shipping Methods in Magento 2_**. We will explore the various types of shipping methods categorized by delivery type, and provide an overview of the default shipping methods offered in Magento 2. By following this guide, you will gain a solid understanding of how to effectively manage and optimize shipping methods in Magento 2, ultimately improving the shipping options for your eCommerce store.

For more information, please visit this :- **_[https://webguru.dev/how-to-configure-shipping-methods-in-magento-2/](https://webguru.dev/how-to-configure-shipping-methods-in-magento-2/)_**
How to make deep fake lip sync using Wav2Lip
Tags: python, deepfake, lipsync
Published: 2023-06-16 06:32:42


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02xcjlo2mpo2cw70yfg5.png)
🎥✨ In our latest video tutorial, we will dive into the fascinating world of deepfake lip syncing using the powerful Wav2Lip Python library! 💻👄
In this tutorial, we'll guide you through the step-by-step process of harnessing the Wav2Lip library. From installation to collecting and preparing video and audio files, we'll cover everything you need to know to get started.
Discover how to run the Wav2Lip model effectively, and create your own lip sync videos.
Very cool !

If you are interested in learning modern Computer Vision course with deep dive with TensorFlow, Keras and Pytorch , you can find it here  : http://bit.ly/3HeDy1V
Perfect course for every computer vision enthusiastic.

Moreover I recommend this book for deep learning based on Tensorflow and Keras : https://amzn.to/3STWZ2N

You can find the video here: https://youtu.be/P4PXI4Cx3hc

Enjoy
Eran
#python #deepfake #wav2lip #DeepfakeLipSyncing #Wav2LipTutorial #LipSyncTutorial
🐍 Snake Game using Javascript!
Tags: webdev, frontend, javascript, beginners
Published: 2023-06-16 06:12:16


![Snake Game](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bz1bvneuzhb632opqklj.png)
Excited to build your own Snake Game? 😃
**Checkout the complete code** [here](https://stackblitz.com/edit/js-mgek3n?file=index.js)

This project is completely built on the core Javascript.This will help you understand and practice the Javascript code.

### **I would recommend the following points before going through the code -**
- Create your own project from scratch.
- Copy the code line by line and try to execute it to better understand each part of the code.
- Once you understand the code, try to add / improve existing functionality. **for eg:** you can improve the UI/UX of the code, you can provide game levels from easy to hard based on certain metrics etc.

Brag about this project in your resume, portfolios or on social media accounts. 😎
Hope you will enjoy building your own Snake Game. Follow me for more such content.
Facing 429 status code error response issue in next js application
Tags: nextjs, axios, react
Published: 2023-06-16 06:07:31


Hi, 
I am using a Nextjs React application with Nextjs  version 9.2.0 & React version 16.8.6. 

**Issue**: I am calling an api to resend email verification and when a user tries for more than 4 times to resend email, cloudflare will throw 429 status code in http header. The problem which i am facing is i am not getting any error response with status code 429. 
I am using axios's interceptors to get the response 
eg: instance.interceptors.response.use(function (response) {
    // Do something with response data
    return response.data;
}, function (error) {
	//getting error as undefined
});

where instance = axios.create({  });

Could you please suggest a possible solution?