teleren/devto huggingface dataset:
The evolution of web development: From HTML to Web3.0
Tags: discuss
Published: 2023-06-03 01:10:09


Welcome, fellow web enthusiasts, to a thrilling ride through the evolution of web development! Over the years, we've witnessed the web transform from its humble beginnings with HTML to the cutting-edge world of Web3.0. Hang on tight as we navigate through time, sprinkling some puns and jokes along the way. Let's dive in and make some "web waves" together!

*Chapter 1: HTML* - Where It All Started
Ah, HTML, the backbone of the web. It's like the sand on the beach, the foundation upon which everything is built. We owe a lot to this markup language that brought structure to the World Wide Web. It's as essential as sunscreen on a hot summer day! So, dear readers, what's your favorite HTML tag? Share it with us in the comments section below. Don't be shy!

*Chapter 2: CSS* - Making the Web Look Stylish
Just like a fashionable outfit makes heads turn, CSS revolutionized web design. It's like the stylist that gives our websites a touch of elegance. With CSS, we can make pages look so good that they'll make the Mona Lisa blush! So, what's your favorite CSS property? Let us know in the comments and remember, style never goes out of fashion!

*Chapter 3: JavaScript* - The Dynamic Performer
JavaScript, the "rockstar" of web development! It's like the adrenaline rush that adds interactivity and functionality to our websites. With JavaScript, we can create mind-blowing animations, games, and dynamic web experiences. It's the DJ that gets the party started on our web pages! Do you have a favorite JavaScript framework or library? Drop a comment and let's jam together!

*Chapter 4: Web3.0* - The Next Wave
Ahoy, landlubbers! Web3.0 is upon us, and it's making waves in the web development world. It's like a shiny new surfboard, ready to ride the tides of decentralized applications, blockchain, and smart contracts. It promises a more immersive, secure, and user-centric web experience. Are you excited about Web3.0? Tell us what you think about this next big thing in the comments. Cowabunga, dudes!

Conclusion:
We've taken a joyful ride through the evolution of web development, from HTML's humble beginnings to the exciting realm of Web3.0. Just like waves in the ocean, technology keeps advancing, bringing new possibilities and challenges. But remember, no matter how much things change, the web will always be a place where creativity and innovation can thrive. So, dear readers, keep riding those waves, leave your comments and let's continue to shape the future of the web together!

Now it's your turn to make a splash in the comments section below. Which part of the web development evolution got you most excited? Any funny web-related puns or jokes you'd like to share? We can't wait to read your comments and have a good laugh together. Catch you in the comment section, fellow web surfers! Hang ten! 🤙
Python 异步编程之-线程
Tags: python, programming
Published: 2023-06-03 00:59:19

> 上一篇我们讲到，进程是一个相对独立的单元。而线程则是一个进程内单一顺序的控制流，是操作系统运行调度的最小单元。因此，一个进程可以包含多个线程。比如，播放视频时，画面和声音就是不同的线程在处理。

## 1.创建线程

### （1）使用threading.Thread()直接创建
```python
def fun1():
    print('任务1开始')
    time.sleep(2)
    print('任务1结束')
 
def fun2():
    print('任务2开始')
    time.sleep(4)
    print('任务2结束')
 
 
thread1 = threading.Thread(target=fun1)
thread2 = threading.Thread(target=fun2)
 
# 守护线程,随主线程结束而结束，即不会打印“任务2结束”
thread2.setDaemon(True)
 
# 启动任务
thread1.start()
thread2.start()
 
# 主线程会等待本线程完成
thread1.join()
    
```

### （2）继承Thread
```python
class MyThread(threading.Thread):
    # 可以给线程取名字
    def __init__(self, name):
        super().__init__(name=name)
 
    # 需要实现的核心代码
    def run(self):
        print("这里写核心功能")
 
 
t = MyThread('线程1')
t.start()
t.join()
```

## 2.线程间通讯
同一个进程下的线程，使用的是同一块内存。因此天然可以进行通信。此外，还可以使用队列。参看第3部分。
```python
# 定义任意类型的全局变量都可以实现线程间通信
lst = []
 
def fun1():
    global lst
    lst.append(1)
 
def fun2():
    global lst
    dt = lst.pop()
    print(dt)
 
thread1 = threading.Thread(target=fun1)
thread2 = threading.Thread(target=fun2)
thread1.start()
thread2.start()
```

## 3.数据安全和锁的概念
先直接看一个例子
```python
import threading
 
 
def add():
    global total
    for i in range(1000000):
        total += 1
 
 
def desc():
    global total
    for i in range(1000000):
        total -= 1
 
 
if __name__ == '__main__':
    total = 0
    thread1 = threading.Thread(target=add)
    thread2 = threading.Thread(target=desc)
    thread1.start()
    thread2.start()
 
    thread1.join()
    thread2.join()
    print(total)
```

更多请看：
[Python 异步编程之-线程](https://blog.csdn.net/qq_45055172/article/details/121488988)

---
相关文章：
[Python 异步编程之-线程](https://blog.csdn.net/qq_45055172/article/details/121488988)
How to send upsell emails with MedusaJS and Postmark
Tags: medusajs, javascript, opensource, tutorial
Published: 2023-06-03 00:41:38

For example someone buys a few samples at your store and you never hear from him again.. That's frustrating!

We all know that follow-up/upsell mails help to keep your customers engaged and make sure they won't forget you. I want to explain how you can easily send those emails with MedusaJS.

## Install the plugin

```bash
npm i medusa-plugin-postmark
```

## Postmark template
Not sure where to start with the template? A small explaination can be found [here](https://postmarkapp.com/support/article/786-using-a-postmark-starter-template) or you can use the sourcecode of a [stripo mail template](https://viewstripo.email/).

If you created your template (and saved) you need to copy the ID that can be found in the top right corner while editing your template.

![Postmark template](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fivnfugfd42ow7vswi2f.jpg)

## Setup your medusa config
Open your `medusa-config.js` and add the following lines in the plugin array.
```js
{
		resolve: `medusa-plugin-postmark`,
		options: {
			server_api: process.env.POSTMARK_SERVER_API,
			from: process.env.POSTMARK_FROM,
			bcc: process.env.POSTMARK_BCC || null,
			pdf: {
				enabled: false
			},
			events: {
			},
			upsell: {
				enabled: process.env.POSTMARK_UPSELL_ENABLED || false,
				template: process.env.POSTMARK_UPSELL_TEMPLATE || null,
				delay: process.env.POSTMARK_UPSELL_DELAY || 9, // delay in days
				valid: process.env.POSTMARK_UPSELL_VALID || 30, // delay in days
				collection: process.env.POSTMARK_UPSELL_COLLECTION || null,
			},
			default_data: {
				product_url: process.env.POSTMARK_PRODUCT_URL || '',
				product_name: process.env.POSTMARK_PRODUCT_NAME || '',
				company_name: process.env.POSTMARK_COMPANY_NAME || '',
				company_address: process.env.POSTMARK_COMPANY_ADDRESS || '',
			}
		}
	},
```
and make sure you have the following `.env` keys and values
```
POSTMARK_SERVER_API=4e7bc01b-****-****-****-51f8b224c6c8
POSTMARK_FROM=your@mail.com
POSTMARK_PRODUCT_URL=https://mail.com/
POSTMARK_PRODUCT_NAME=
POSTMARK_COMPANY_NAME=
POSTMARK_COMPANY_ADDRESS=
POSTMARK_UPSELL_DELAY=7
POSTMARK_UPSELL_ENABLED=true
POSTMARK_UPSELL_TEMPLATE=123456
POSTMARK_UPSELL_COLLECTION=pcol_01GQDXMFP78WHSFFAHB6K4EV79
POSTMARK_UPSELL_VALID=21
```
Make sure you set the correct values, and change the `POSTMARK_UPSELL_TEMPLATE` for the correct template ID in postmark and add your own collection to only mail people who bought in that collection.

The `POSTMARK_FROM` email address must be a verified sender in your Postmark account.

## You're ready to go!
You're ready to remind your customers how bad they need your products!
**Keep in mind!** If you install this on a running website it could mail old orders. Want to prevent that? Make sure every order has the following metadata ( or add it to existing metadata)
```json
{
    "upsell_sent": true
}
```

## Having problems?
Experiencing issues, or need a little help? Let me know in the comments and I will try to help when possible!
The cheapest way to the square
Tags: perl, python, theweeklychallenge
Published: 2023-06-03 00:25:47

I'm always amazed at how far technology has come. If you told me twenty years ago, I'd be completing this challenge 41,000 feet in the air on a device that is $300 (about US$200), I'd totally laugh at you :)

Unfortunately the budget airline I'm flying with (Air Asia X) doesn't offer WiFi, otherwise I could also push this 41,000 feet in the air too.

## Weekly Challenge 219

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-219/), [My solution](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-219/sgreen)

## Task 1: Sorted Squares

### Task

You are given a list of numbers.

Write a script to square each number in the list and return the sorted list, increasing order.

### My solution

This is straight forward, so doesn't need much explanation. I take the input, square each number, sort the list, and finally print the list.

### Examples

```bash
$ ./ch-1.py -2 -1 0 3 4
0, 1, 4, 9, 16

$ ./ch-1.py 5 -4 -1 3 6
1, 9, 16, 25, 36
```

## Task 2: Travel Expenditure

### Task

You are given two list, `@costs` and `@days`.

The list `@costs` contains the cost of three different types of travel cards you can buy.

For example `@costs = (5, 30, 90)`

```text
Index 0 element represent the cost of  1 day  travel card.
Index 1 element represent the cost of  7 days travel card.
Index 2 element represent the cost of 30 days travel card.
```

The list `@days` contains the day number you want to travel in the year.

For example: `@days = (1, 3, 4, 5, 6)`

The above example means you want to travel on day 1, day 3, day 4, day 5 and day 6 of the year.

Write a script to find the minimum travel cost.

### My solution

For this task, it's back to using a recursive function. For the input, I take assume the first three values are the cost for a 1 day, 7 day and 30 day pass, and use the rest of the numbers for the `days` list.

I start by defining the `passes` dict (hash in Perl), where the key is the days the pass is valid for, and the value is the cost of the pass. I also create the `travel_on` list (array in Perl) representing the days that I want to travel. This list is sorted numerically.

I then call the `buy_pass` function with the `passes` dict and `travel_on` list. If the later is empty, I don't need to buy any more passes, so return `0`. I loop through each item in the `passes` dict. I know that the days the pass doesn't cover is the first day (i.e. `travel_on[0]`) plus the days of the pass. I call the function again with the remaining days. I also track the minimum spend, and this is record and sent upstream of the function.

### Examples

```bash
$ ./ch-2.py 2 7 25 1 5 6 7 9 15
11

$ ./ch-2.py 2 7 25 1 2 3 5 7 10 11 12 14 20 30 31
20
```
Unleashing the Power of AI: My Journey of Development 🤖🚀
Tags: webdev, programming, ai, productivity
Published: 2023-06-03 00:10:36

🔮 Have you ever experienced a magical "aha" moment that changed your entire perspective? I had one, and it all began with a single click... 👀

Last year, I stumbled upon an AI-powered development tool that promised to revolutionize my coding experience. Skeptical yet intrigued, I decided to give it a try. Little did I know that this would be the beginning of an exhilarating adventure! 🌟

From the moment I dived into the world of AI-driven development, I felt like a wizard casting spells of innovation and efficiency. The tool's ability to generate code snippets, predict errors, and enhance my productivity left me in awe. It was as if my fingertips had been imbued with a magical touch. 🧙‍♂️

But what truly amazed me was the empathetic touch it brought to my work. It adapted to my coding style, understood my preferences, and anticipated my needs like a trusted companion. It felt like I had an AI-powered co-pilot who not only accelerated my progress but also understood the essence of my creativity. 🎨

Through this transformative experience, I realized that AI was not just a buzzword; it was an enabler of limitless possibilities. It pushed the boundaries of my own potential, helping me deliver exceptional solutions faster than ever before. 💡

Today, I invite you to embark on this awe-inspiring journey with me. Let's unleash the power of AI in our development process and unlock a world of endless opportunities. Visit my profile to discover more about my exciting projects and how AI can shape the future of our industry. 🌐

✨ Together, let's make magic happen. Like and share if you're ready to embrace AI and transform the way we create! Let's connect and discuss how we can collaborate to shape the future. Comment below if you've had your own magical AI experience! 👇✨
What is Apache AGE?
Tags: graphql, database, postgres, postgressql
Published: 2023-06-02 23:20:47

**Apache Age**, developed by Apache Software Foundation, is an open-source project. It is an extension of the PostgreSQL database management system and stands for a graph extension. Apache Age combines the reliability and stability of PostgreSQL with the added features and capabilities of a graph database. Users can store, query, and analyze graph-structured data within the familiar PostgreSQL environment through Apache Age. Its flexible graph data models allow for the efficient handling of complex relationships and interconnected data. Apache Age offers a wide range of graph query capabilities, including traversal, pattern matching, and graph analytics, and can be used for applications such as fraud detection, social network analysis, and recommendation systems.

**Initially developed by Bitnine Global** with the name AGE (Agens Graph Extension), it was based on their Postgres-forked graph database AgensGraph. In April 2020, Bitnine donated the project to the Apache Software Foundation, and it became an Apache incubator project. Apache Age then changed its name to a Graph extension. In June 2022, it became a top-level project within the Apache Software Foundation.

Apache Age's **features** include PostgreSQL integration, hybrid query with SQL and open cypher query languages and the ability to query multiple graphs. It allows users to create property indexes on both vertices and edges using SQL syntax. By optimizing graph queries that involve searching for specific values within indexed properties, users can extract insights and patterns from graph data while minimizing processing time. Finally, this efficient tool eliminates the need for switching between different tools or platforms, allowing users to analyze and extract insights from multiple graph datasets within a unified database environment.
Unleashing the Power of GPT Prompt Engineering: A Deep Dive into the Awesome GPT Prompt Engineering Project
Published: 2023-06-02 22:30:57

---
title: Unleashing the Power of GPT Prompt Engineering: A Deep Dive into the Awesome GPT Prompt Engineering Project
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-02 22:30 +0000
---

Hello, fellow developers and AI enthusiasts! I'm snwfdhmp, a programmer with a passion for exploring the frontiers of AI and machine learning. Today, I want to share with you a project that I've been working on: [Awesome GPT Prompt Engineering](https://github.com/snwfdhmp/awesome-gpt-prompt-engineering). It's a curated list of resources, tools, and other shiny things for GPT prompt engineering. 

## What is Awesome GPT Prompt Engineering?

Awesome GPT Prompt Engineering is a project that aims to provide a comprehensive list of resources for anyone interested in GPT prompt engineering. It includes guides, techniques, prompt lists, papers, books, courses, tutorials, blogs, tools, and communities related to GPT prompt engineering. 

## Why Should You Care?

GPT prompt engineering is an emerging field that focuses on how to effectively use and control Generative Pretrained Transformers (GPTs) like GPT-3 and GPT-4. By understanding and mastering prompt engineering, you can unlock the full potential of these powerful AI models in your applications.

## What Can You Find in the Project?

Here are some highlights of what you can find in the Awesome GPT Prompt Engineering project:

- **Guides**: Introduction to Prompt Engineering and Prompt Engineering techniques.
- **Techniques**: Innovative techniques like Chain of Thought, Tree of Thought, Zero Shot Chain of Thought, and Prompt Injection.
- **Prompt Lists**: Datasets of awesome chatgpt prompts.
- **Papers**: Key papers introducing GPT-3 and fine-tuning language models.
- **Tools**: Python libraries and online tools for experimenting with GPT models.
- **Communities**: Forums and subreddits for discussing GPT and other language models.

## Join the Community

The Awesome GPT Prompt Engineering project is open to contributions. If you have a resource, tool, or technique that you think would be valuable to the community, don't hesitate to contribute. By sharing our knowledge and experiences, we can push the boundaries of what's possible with GPT prompt engineering.

## Final Thoughts

The field of GPT prompt engineering is still young, and there's a lot to explore and discover. The Awesome GPT Prompt Engineering project is a starting point for that journey. I invite you to check out the project, delve into the resources, and join the community. Together, we can shape the future of GPT prompt engineering.

So, are you ready to dive into the world of GPT prompt engineering? Click [here](https://github.com/snwfdhmp/awesome-gpt-prompt-engineering) to explore the Awesome GPT Prompt Engineering project. I can't wait to see what you'll create!

Happy coding!

snwfdhmp
100 Days Coding Challenge - Day 14: FreeCodeCamp JavaScript Algorithms and Data Structures
Tags: javascript, programming, webdev, 100daysofcode
Published: 2023-06-02 22:28:43

## Day 14

Now I did the Debugging section, it's not much, but I will code at less 30 min every day, I won't stop, I will code more time when I get more free time, I spell much time at the University.


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

Fun fact: I bought an SSD disk, and I formatted my pc, now I'm stalling Kali Linux only in a partiture of an HDD disk.
Happy DEV Anniversary!
Tags: wins, webdev, writing
Published: 2023-06-02 21:57:00

---
title: Happy DEV Anniversary!
published: true
description: Celebrating my 5th anniversary here on DEV
tags: #wins, #webdev, #writing
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-31 20:23 +0000
---

Guess what happened yesterday?

I received in my email one of those cool DEV messages giving me good news.

I opened it up and this is what I found.

...

..

.

![DEV Anniversary](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/olqm0gst2rfeocubjf10.png)

I can't believe it's been 5 years. Time really flies!

I first joined here before I even got my first developer job.

I was just searching resources to learn UI and frontend development.

And on October of that year, I accepted an offer to start working as a slightly more skilled junior developer.

Since then, everything changed for me.

I was a lurker here for the first years.

In January of 2020 I decided to start writing to share knowledge and help more people not only on as a volunteer on the company I was working with back then.

If it weren't for DEV, I would have spent more time fiddling around building my own blog and dealing with all the technical stuff instead of spending the time _actually_ writing.

It has been a wild ride everything that has happened over the last years.

And I will always be grateful to this wonderful community for giving me the start and helping me discover my love for writing online.

Thank you all!

![Appreciate you](https://media.giphy.com/media/ymFDudHcTn6I6vLGgd/giphy-downsized.gif)
LB Labs: The Magic of Compound Efficiencies in Engineering
Tags: programming, productivity, management, podcast
Published: 2023-06-02 21:50:36

As the milestone book Atomic Habits laid out, the key to life-changing habits is adopting one effectively and then layering another desirable habit on top of it.

The same is true for efficiencies in software engineering.

When your team adopts one efficiency, sees it bear fruit, then adds the next efficiency habit on top of it, the result is compounding efficiencies.

In this conversation, LinearB’s CTO Yishai Beeri reveals the data on compound efficiencies as experienced by real dev teams out in the wild.

>“There are dev orgs that just visit their metrics dashboard every three weeks. That's nice, but that's not enough. That's not going to change behaviors that improve efficiency.”

{% spotify spotify:episode:6kWcslB10npKeXyPl7BTET %}

## Episode Highlights:
* (2:53) Sourcing the data
* (5:57) Visibility for devs & managers
* (12:15) Improving code reviews
* (19:30) What are compounding efficiencies?
* (21:48) Streamlining the PR process
* (25:52) Results from efficiencies gained
* (33:40) Giving devs back more focus time
* (40:45) How to get compounding efficiencies for your team

[Episode Transcription.](https://devinterrupted.com/podcast/lb-labs-the-magic-of-compound-efficiencies-in-engineering/)

---

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!***

{% youtube O-J6fhi9L1w %}

---

## A 3-part Summer Workshop Series for Engineering Executives
Engineering executives, [register now](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution) for LinearB's 3-part workshop series designed to improve your team's business outcomes. Learn the three essential steps used by elite software engineering organizations to decrease cycle time by 47% on average and deliver better results: Benchmark, Automate, and Improve.

Don't miss this opportunity to take your team to the next level - [save your seat today](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution).

[![Register Today](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd6b3egikvnssdi9x50g.png)](https://linearb.io/events/2023-summer-series/?utm_source=Dev.to&utm_medium=referral&utm_campaign=202306%20-%20Event%20-%20Summer%20Series%20-%20Podcast%20Distribution)