teleren/devto huggingface dataset:
Personalized Newsletters Using AI
Published: 2023-10-26 15:50:33

I recently explored how to build my own personalized newsletter to avoid having to sift through multiple news websites every day. The app that I created fetches the latest news about a subject of my choosing from a news API, summarizes and filters the data with the help of ChatGPT, and sends it to my email. In this post, I'll walk you through how I accomplished this project.

## Step 1: Tech Stack

After exploring various ways to achieve this, I opted for a no-code solution. In the end I chose the no-code platform [Clevis](https://clevis.app) to cobble together the required steps and automate the daily email sendout.

## Step 2: Data Gathering

I started by finding a suitable news API. There are several options available, but I settled on one that provides up-to-date information about startups - NewsAPI.org. The API offered a range of endpoints and parameters to customize my data retrieval. In Clevis, I was able to call this API to fetch data about any subject for the current day.

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

## Step 3: ChatGPT Integration

In Clevis I used the result from the NewsAPI.org API call and prompted it to summarize the news in the form of an HTML formatted newsletter.

Here is the prompt I used which works surprisingly well given the simplicity.

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


## Step 4: Sending the email

Clevis comes with built in functionality for sending emails so I simply configured it to send the HTML formatted email that ChatGPT produced for me. Here is an example of how the email looked. ChatGPT even included images from the API response. I believe the formatting could be improved further either by tweaking the prompt or by using my own email template.


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

And here is how the finished app looks in the Clevis editor


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

## Going forward

I belive I will continue to iterate on this project to use data from multiple news sources and websites. One challenge is the token limit of ChatGPT which I might have to find a way to get around.
My Open Source Adventure: A Friendly Recap
Published: 2023-10-26 15:36:51

# My Open Source Adventure: A Friendly Recap

Hello, friends! 👋 I've been on some fun coding adventures recently, and I can’t wait to tell you all about them. Grab a cup of coffee, and let’s chat!

## 1. Tidying Up the Uno Platform 🧹
- **What I Did**: Found two methods, `RestoreBindings` and `ClearBindings`, that weren’t doing anything and removed them.
- **The Learning Part**: Got to know the Uno Platform really well, especially how it connects different parts of programs.
- **The Tough Part**: Making sure that taking away these methods didn’t mess up anything else because the Uno Platform is huge!

## 2. Making Podcast Words Better 🎙
- **What I Did**: Fixed up the text version of a podcast to make sure it matched exactly what was said.
- **The Learning Part**: My grammar skills got a nice workout, and I learned some new techy words.
- **The Tough Part**: Had to listen super carefully to the podcast, sometimes more than once, to catch every word.

## 3. Making the Curio Logo Clickable 🖱
- **What I Did**: Made it so when you click on the Curio logo, it actually takes you back to the home page.
- **The Learning Part**: Felt really part of the coding community and loved making the website nicer for users.
- **The Tough Part**: The challenge was just right, but it was my friend who gave me the nudge to jump in and try.

## 4. Helping with the Python Port Scanner 🔍
- **What I Did**: Made error messages clearer and gave better feedback during scans.
- **The Learning Part**: Got even better at Python and learned heaps about network scanning.
- **The Tough Part**: Focusing on making the tool super user-friendly and helpful.

## To Wrap It Up

And that’s my story! I had heaps of fun, learned a lot, and it felt awesome to help out. Open source is all about everyone chipping in, and I’m stoked to be part of that. Thanks for reading, and happy coding! 🎉
I'm Back! Burnout Sucks.
Tags: watercooler
Published: 2023-10-26 15:34:25

## Why I Took a Break and Why I'm Back!
I stopped writing blogs, and shorts (like this one), other passion projects fell off too awhile back. Mainly I was focused on work and personal life, and was burnt out trying to build out my side projects at the same time. 

Am I gonna start firing at 110% again trying to do all the things at once... No. That is how we end up with giant gaps in activity, the longer they are the harder it is to restart too. 

## So, what's changed?
Well I got a new job @authentication (Clerk) as Sr. Developer Experience Engineer (cool title I know), additionally, personal life has stabilized a bit in the last few years, though I plan on moving again shortly. 

What does this mean... probably some streaming, work related and personal stuff like Dungeons & Dragons, trying to revive the Discord (more, its been active lately), a little writing and continuing Code & Life my 3 days a week Twitter Space I have been doing for 2+ years now 

Ready to join the conversation? Check out our Discord! https://discord.gg/JTDfwPa2mX

And hey, don’t forget to visit my website https://osrg.t3.gg for more updates and insights.

See you around!
Placeholder Contributor
Tags: hack23contributor
Published: 2023-10-26 15:30:24

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
Git - Use Tags for Versioning and Release Management
Tags: git, github, programming, tutorial
Published: 2023-10-26 15:30:00

Git tags are a powerful feature for managing versions and releases of your software projects. Tags provide a stable reference point for specific commits in your Git history, making it easy to identify and work with specific codebase versions. Here's how to use Git tags effectively:

- **Create Lightweight Tags:**
   
   To create a lightweight tag that simply points to a specific commit, use the following command:

   ```bash
   git tag <tag-name> <commit-hash>
   ```

   For example:

   ```bash
   git tag v1.0.0 abc1234
   ```

- **Create Annotated Tags:**

   Annotated tags include additional information like the tagger's name, email, and message. They are more informative and are often preferred for release versions. To create an annotated tag, use the `-a` option:

   ```bash
   git tag -a <tag-name> -m "Tag message" <commit-hash>
   ```

   For example:

   ```bash
   git tag -a v1.0.0 -m "Initial release" abc1234
   ```

- **List Tags:**

   To list all tags in your repository, use:

   ```bash
   git tag
   ```

- **Push Tags to Remote:**

   After creating tags locally, you need to push them to the remote repository to share them with others:

   ```bash
   git push origin <tag-name>
   ```

   To push all tags at once, you can use:

   ```bash
   git push --tags
   ```

- **Checkout Specific Tags:**

   To switch to a specific tagged version of your code, use:

   ```bash
   git checkout <tag-name>
   ```

- **Delete Tags:**

   To delete a tag, use the following command:

   ```bash
   git tag -d <tag-name>
   ```

   To delete a remote tag, use:

   ```bash
   git push origin --delete <tag-name>
   ```

Using Git tags is essential for keeping track of your software releases and version history. It helps you and your team easily identify, reference, and work with specific points in your project's development, making it a valuable part of your version control and release management strategy.
Exception when try to access microservice using Eureka
Tags: springboot, microservices
Published: 2023-10-26 15:22:23

I've got "Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.web.reactive.function.client.WebClientRequestException] with root cause" exception when I was trying to access the microservice which was in Eureka server by using WebClient. when I was using a static url("http://localhost:2000/student/get") It works fine with webClient. But I cant utilize the service discovery("http://STUDENT-SERVICE/student/"). Even RestTemplate threw the same exception. Could somebody explain why this is happening? and what could be done to resolve this?
I am a successful Devop engineer.
Tags: webdev, javascript, beginners, programming
Published: 2023-10-26 15:20:02

DevOps is a software development process that prioritizes collaboration and communication between development and operations teams. A DevOps engineer is in charge of bridging the gap between these two teams and ensuring that the software development process runs smoothly. 

Here are some of the most important abilities for a successful DevOps engineer:

Linux Fundamentals and Scripting: A DevOps engineer must be knowledgeable in the Linux operating system, as most businesses prefer to host their applications on Linux. Furthermore, most configuration management technologies, such as Puppet, Chef, and Ansible, have their master nodes operating on Linux. As a result, a DevOps engineer must be able to work with any scripting language and be well-versed in at least one scripting language (ideally Python).

Knowledge of Various DevOps Tools and Technologies: DevOps processes are carried out in stages, and each stage offers tools that can help with that stage. Source code management, configuration management, continuous integration, continuous deployment, continuous monitoring, and cloud computing are the primary steps. A DevOps engineer must be familiar with various tools and technologies in order to ensure that the software development process operates smoothly.

Cloud Computing: A DevOps engineer should be familiar with cloud computing systems such as AWS, Azure, and Google Cloud Platform. They should be competent to deploy and manage apps on cloud platforms.

Automation is a critical component of DevOps approaches. To automate the software development process, a DevOps engineer should be familiar with automation tools such as Jenkins, Travis CI, CircleCI, and others.
My HacktoberFest Journey
Tags: hack23contributor
Published: 2023-10-26 15:08:13

### Intro
This was my first Hacktoberfest. I was excited to contribute something to open source. I have been trying to learn how to contribute for a long time now and this seemed like a perfect opportunity to grab. {% embed https://github.com/itzmidinesh %}

### Highs and Lows
I was having trouble finding issues that I could work on. Then, it striked that instead of looking for something else I should rather contribute on something that I am already a part of. It clicked and felt so good when my first PR was merged.

### Growth
I improved some documentation and learned about how to raise PR's and how the open source ecosystem works. I am hoping that this will be very helpful for future contributions from me.
🦀⚡ Building extremely fast APIs with Rust & snowboard: Step-by-Step
Tags: webdev, rust, tutorial, opensource
Published: 2023-10-26 15:02:39

Today we'll be writing a working [web API](https://es.wikipedia.org/wiki/Web_API) using **rust** and [snowboard](https://crates.io/crates/snowboard), an extremely simple HTTP library.

### Contents

1. Setting up the server
2. Creating the routes
3. Wrapping up

## Prerequisites

You'll need to have [rust](https://www.rust-lang.org/) installed for this project.

## 1. Setting up the server

First off, we'll create the project (that will be named "faster") and install snowboard:

```sh
$ cargo new faster
$ cd faster
$ cargo add snowboard@0.4.1
```

Then, we will add the following code to `src/main.rs`:

```rust
use snowboard::{response, Server};

fn main() {
    Server::new("localhost:3000").run(|req| {
        println!("Request: {:?}", req);

        response!(ok, "Hello, world!")
    });
}
```

and run it using `cargo run`. And that's it! You got yourself a working server on localhost:3000. Now, to the API functionality

## 2. Creating the routes

Instead of using that closure, we'll be writing our app router in a new function called `router` and adding some routes:

```rust
use snowboard::{response, Request, Response, Server};

fn router(req: Request) -> Response {
    let path = req.parse_url();

    match path.at(0) {
        Some("hello") => match path.at(1) {
            Some(name) => response!(ok, format!("Hello, {}!", name)),
            None => response!(ok, "Hello, World!"),
        },
        None => response!(
            ok,
            "Send a request to /hello to get a greeting!"
        ),
        _ => response!(not_found, "👀"),
    }
}

fn main() {
    Server::new("localhost:3000").run(router);
}
```

In this code, we're doing a lot of things:
- We're checking for the first part of the path (`url/this`). If the request is just `/`, that'll be `None` where we return an ok response (point 5).
- If it matches and it's "/hello" we check for the second part of the path (`url/hello/this`). If it exists, we get it and say hello to them. If it doesn't, we just return "Hello, world!".

And it works perfectly! You can check it out for yourself on your terminal using `curl`:

```
$ curl localhost:3000/
Send a request to /hello to get a greeting!
$ curl localhost:3000/hello
Hello, World!
$ curl localhost:3000/hello/Joe
Hello, Joe!
$ curl localhost:3000/thisroutedoesntexist
👀
```

## 3. Wrapping up

That's it for today! You got yourself an extremely fast & simple API written in Rust. You can check out snowboard [here](https://github.com/Brian3647/snowboard) on contact me in discord @ Brian3647.

If needed, snowboard also supports `async/await` routes, so feel free to expand your API however you want to.
Preventing Empty Updates In PostgreSQL Tables Using A Simple Trigger Function
Tags: sql, tutorial, programming
Published: 2023-10-26 14:51:50

---
published: true
title: Preventing Empty Updates In PostgreSQL Tables Using A Simple Trigger Function
description: 'We will explore the purpose, mechanics, and advantages of a PostgreSQL trigger designed to safeguard against null or empty updates.'
tags:
  - sql
  - tutorial
  - programming
cover_image: 'https://i.imgur.com/JK2j6mT.png'
canonical_url: null
id: 1646381
date: '2023-10-26T14:51:50Z'
---

### The Need for Preventing Empty Updates

Empty updates are silent problems in PostgreSQL, occurring when an `UPDATE` makes no real changes to data. They're wasteful and can lead to loops in scenarios with recursive triggers.

Some common causes of empty updates include:

- Triggers meant to maintain data integrity can trigger loops if they update the same table. This leads to inefficiencies.
- Two tables need to stay in sync. Changes in one table trigger updates in the other, and vice versa. Mismanagement can lead to recursive circular updates, causing empty updates and performance issues.

### The Solution: A Simple Trigger Function

```sql
CREATE OR REPLACE FUNCTION prevent_empty_update()
RETURNS trigger
LANGUAGE plpgsql
AS $function$
DECLARE
BEGIN
    if old is not distinct from new then
        return null;
    end if;

    return new;
END;
$function$;
```

- The `if old is not distinct from new then` condition evaluates if the old and new data are the same. If they are identical, it means that the update does not change any values in the row, and the function returns `null`.
- If the condition is not met, indicating that the update will make changes to the row, the function returns `new`, allowing the update to proceed.

### Application Of The Trigger Function

To put this trigger function into action, you need to apply it to the specific tables where you want to prevent empty updates.
Use the `BEFORE UPDATE` trigger to execute the `prevent_empty_update()` function for each row before the update is performed.

```sql
CREATE TRIGGER prevent_empty_updates
BEFORE UPDATE ON your_table
FOR EACH ROW
EXECUTE FUNCTION prevent_empty_update();
```

By implementing this trigger function, you can improve the efficiency and reliability of your PostgreSQL database, reducing the risk of unnecessary data modifications and recursive loops.
Utilizing SSM Documents for Seamless Tunneling to RDS
Tags: aws, devops, database, security
Published: 2023-10-26 14:46:41

When deploying application servers or databases within private subnets following best security practices, it is essential to establish a robust system for resource management and access. This ensures efficient resource management and facilitates effective troubleshooting when necessary. How can you securely access it by creating tunnelling using an SSM document?

Why go with this approach and tunnel through a bastion host? The key advantage is that SSM records all connections in CloudWatch for audit and security; plus, it's an additional way to connect to private resources.

This solution enables the creation of a tunnel to access other private resources, such as EC2 instances and RDS.
In this blog post, I will show how to create tunnelling to RDS or any EC2 resources within that private subnet while maintaining security using the SSM document.
This is a short step-by-step guide to help you establish a secure connection to your RDS instance.
By the end of this article, you'll clearly understand how to access your RDS instance using SSM documents, keeping your network safe. All the connections established via SSM are recorded in CloudWatch for audit and security purposes.

**Pre-Requirements:**
- I assume you've already set up a Bastion host in your public subnet so that the host can establish communication with the RDS instance, and your public IP is whitelisted and has access to the Bastion host. We'll rely on the **AWS-StartPortForwardingSessionToRemoteHost** SSM document for tunnelling purposes.
- To perform this task, you should have the AWS CLI installed and configured on your machine and the necessary permissions granted to your IAM user.
** We are ready to go ... **

- Step 1: in your host file **/etc/hosts**, add the record for the RDS endpoint we will use later to access using the database client to connect to the RDS instance 
```
localhost <rds-endpoint>
```
- Step2: Run the following command to create a tunnel
```
aws --profile <aws_profile> ssm start-session --target <bastion-host-ec2-id> --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters host=<rds-endpoint-name>,portNumber=5432,localPortNumber=5433 
```
Wait until the connection is established; you can connect to the database using the below command or use your favourite DB management tool, PGAdmin or MySQLWorkbench if it is MySQL Database.
Here is the screenshot from Session Manager:

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

- Step3: Connect using psql cli
```
psql -h 127.0.0.1 -p 5433 -U postgres
```

![Session](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ahn31lqfpn3wcopc6bcq.png)
Azure Open AI - TCS
Tags: azure, devops, ai, tcs
Published: 2023-10-26 14:33:43

Happy to share small achievement from Tata Consultancy Services.



#TCS Provide best platform for learners to learn anything what he/she wants to learn. Thanks #TCS to provide wonderful platform.



“Stay away from those people who try to disparage your ambitions. Small minds will always do that, but great minds will give you a feeling that you can become great too.”



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



Special thanks to Girish Phadke Namrata Gaikwad😍 



CC- Adding my leaders and colleagues to share achievement:

Amit Batra, PMP® Baskar Natarajan Samantak Biswas Shantinath Teradale Amit Bajaj Dr. Ritu Anand Anand Sitaraman K Krithivasan Mukul Sharma Sudeshna Biswas Nigar Sayed Abhishek Saxena Kumar Amitesh Sriram Venkatesan Seethalakshmi Sridhar Keith Mary Rantas-Drew Kapil Gandhi Dr Usha Narasimhan Balasubramaniam Sambandam Maya Sankaranarayanan Dibyendu Naha Ranjith Jayaraman Paresh Sheth Tapan Das Jimmy Mukkalath Selvaraj Shanmugam Minitha Saxena Ramanand Garimella Preetha Kalaivanan Prudvi Raj Amit Vadhera



#kubernetes #k8s #devops #sitereliabilityengineering #costoptimization #gke #google #developercommunity #tcs #gems #developer #leaders #like #cloud #pune #india #github #community #share #education #learning  #GENAI #TCSgems #Xcelerateachievement #TCSian #IAmRemarkable
Real World Client Angular Application - Pre-Sale Promo- 120 + Hours Course
Tags: webdev, angular, web, javascript
Published: 2023-10-26 14:26:29

## Real World Client Angular Application - Pre-Sale Promo- 120 + Hours Course

Promo Link - https://bit.ly/3SbFoGK

Introducing our new course: "Angular Real-World Client Project from Scratch."

In recent months, I took on a challenging project for a prominent clothing brand in my country. This experience was incredibly valuable and enjoyable. I've channeled this knowledge into a comprehensive course, boasting over 100 hours of content.

Promo Link - https://bit.ly/3SbFoGK

But here's the exciting part: I'm offering a limited-time Pre-Sale with exclusive Lifetime bonuses. Let's dive into the course details:

Course Content:

You'll learn how to create a complete Angular project for a clothing brand. It includes 12 different applications, all connected to a single database:

1. Admin Application
2. Inventory and Production Management
3. Point of Sale for retail stores
4. Wholesale Management
5. Customer Management & Rewards
6. Retail Store Management
7. Employee Management
8. Income and Expense Tracking
9. Reports Management
10. Online Sales Management (eBay, Amazon)
11. E-commerce App
12. Content Management System

Promo Link - https://bit.ly/3SbFoGK


This course is not just theory; it's hands-on. We'll follow a three-step approach for each application: planning, design, and database integration. You'll work with Firestore, Strapi SMS, and MongoDB databases.

For beginners, we cover the fundamentals, including TypeScript, the Angular framework, and Tailwind CSS. You'll design everything from scratch, even using Figma for UI/UX.

Beyond technical skills, you'll learn how to work with clients, build your portfolio, find clients, gather requirements, and prepare project proposals.

Pre-Sale Offer:
Promo Link - https://bit.ly/3SbFoGK

During the Pre-Sale, you can access all this knowledge for just $6.99. Join now and receive a bonus gift: the same course in React JS, Next.js, and Svelte JS/Svelte Kit JS, all for free. Act quickly as this offer is limited, and the course launches mid-November.

One more thing: the course has a one-time fee and is hosted on Patreon. For just $3 per month, you can access not only this course but all upcoming courses, source codes from my YouTube tutorials, exclusive Patreon content, and personal live chat features.

This Pre-Course Promo is a way to support my full-time focus on creating valuable content. Your support is appreciated, especially with my family expecting a baby in January 2024.

Don't miss this opportunity. Join the Pre-Sale now, and let's embark on this exciting journey together. Thank you for your support, and I can't wait to see you in the course.

Promo Link - https://bit.ly/3SbFoGK