teleren/devto huggingface dataset:
How to Configure a Standard and FIFO SQS Queue in AWS
Tags: aws, spring
Published: 2023-12-18 16:26:48

In this post we will see How to Configure a Standard and FIFO SQS Queue in AWS. Configuring Amazon [Simple Queue Service](https://javatute.com/aws/spring-boot-aws-sqs-listener-example/) (SQS) involves setting up either a standard queue or a FIFO (First-In-First-Out) queue, depending on your application's requirements. Here's a step-by-step guide for configuring both types of queues:

## Configuring a Standard SQS Queue

Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery.

1. **Sign in to AWS Management Console** and open the Amazon SQS console at https://console.aws.amazon.com/sqs/.

2. **Create a New Queue**:
   - Click on “Create Queue”.
   - Select “Standard Queue”.
   - Enter the Queue Name.

3. **Configure Queue Settings** (Optional):
   - Set parameters such as Delay Seconds, Maximum Message Size, Message Retention Period, etc., according to your needs.
   - For a standard queue, ordering is not guaranteed, and each message is delivered at least once.

4. **Create Queue**:
   - Click the “Create Queue” button at the bottom of the page. Your standard queue is now set up and ready to use.

### Configuring a FIFO SQS Queue

FIFO queues ensure the order in which messages are sent and received is strictly preserved and a message is delivered once and remains available until a consumer processes and deletes it.

1. **Sign in to AWS Management Console** and open the Amazon SQS console at https://console.aws.amazon.com/sqs/.

2. **Create a New Queue**:
   - Click on “Create Queue”.
   - Select “FIFO Queue”.
   - Enter the Queue Name. Note that FIFO queue names must end with the `.fifo` suffix.

3. **Configure Queue Settings**:
   - Set parameters such as Message Deduplication ID, Message Group ID, Maximum Message Size, Message Retention Period, etc.
   - FIFO queues also offer features like Content-Based Deduplication.

4. **Create Queue**:
   - Click the “Create Queue” button at the bottom of the page. Your FIFO queue is now set up and ready to use.

### Additional Configuration

- **Access Policies**: Configure access policies to control which users or services can send messages to or receive messages from the queue.
- **Dead-Letter Queues**: Optionally, configure a Dead-Letter Queue (DLQ) to collect messages that can't be processed successfully.
- **Monitoring**: Set up CloudWatch monitoring to track metrics like the number of messages sent, delivered, delayed, etc.

### Conclusion

- Use **Standard Queues** when you require high throughput and at-least-once delivery without the necessity of message ordering.
- Use **FIFO Queues** when the order of operations and events is critical, or where duplicates cannot be tolerated.

Remember that SQS is a managed service, so much of the heavy lifting is done by AWS, allowing you to focus more on how your application interacts with the queue rather than on the underlying infrastructure and maintenance.
DAY 9: Python Day 12
Published: 2023-12-18 16:23:20

**Namespace and scope**

- function has local scope 
- blocks like `for`, `while`, `if` do not
- can tap into global variable with `global` keyword within a function (avoid modifying global scope; prone to bugs)
-alternatively, use `return`
-CONSTANTS are usually given global scope and are capitalized by convention. 


**End of the Lesson Project: number guessing game**
```
#Number Guessing Game Objectives:

# Allow the player to submit a guess for a number between 1 and 100.
# Check user's guess against actual answer. Print "Too high." or "Too low." depending on the user's answer. 
# If they got the answer correct, show the actual answer to the player.
# Track the number of turns remaining.
# If they run out of turns, provide feedback to the player. 
# Include two different difficulty levels (e.g., 10 guesses in easy mode, only 5 guesses in hard mode).
import random
run_project = True 

while run_project:
  number = random.randrange(1, 101)
  print("Welcome to the Number Guessing Game!")
  print("I'm thinking of a number between 1 and 100.")
  difficulty = input("Choose a difficulty. Type 'easy' or 'hard':" )
  def game(attempts): 
    for i in range(1, attempts + 1):
      print(f"You have {attempts+1-i} attempts remaining to guess the number.")
      guess = int(input("Make a guess:" ))
      if guess > number:
        print("Too high.")
      elif guess < number: 
        print("Too low.")
      else: 
        print(f"You got it! The answer was {number}.")
        return 
  if difficulty == "easy": 
    game (10)
  elif difficulty == "hard":
    game (5)

  if input("Restart game? 'yes' or 'no'") == "yes":
    run_project = True
  else: 
    run_project = False
```
As this project was made some scratch, some improvements can be made: 
- store number of turns as a global variable, which was the whole point of today's lesson 
- create another function to set the difficulty 
- do not forget that `return` exits the function!
NUMPY AND IMAGE MANIPULATION (part 2)
Tags: numpy, webdev
Published: 2023-12-18 16:21:54

INTRODUCTION

In my previous post, I talked about what Numpy Arrays do and why they are popular in computer vision creation.

In this post, we are going to display a Numpy array as diagram so that it appears just like how a picture created from it would look like.

MAIN BODY

The numpy array diagram picture shown above is 
Array = [ 4 , 7 , 3].  The picture shown is practically how numpy arrays or pixels work on screen.

As you can recall from my previous post, the array declared [4 ,7 , 3] is interpreted as:
a picture with a height of 4 pixels ,width of 7 pixels and each pixel has 3 RGB color values.

It can also be interpreted as:
a large 3Dimensional array which contains four 4 two-Dimensional arrays. Each of the 4 2D arrays has 7 rows (7 pixels). Finally each of the 7 rows has 3 RGB  values.  Remember that 3 rgb values come together to form a single color.

Therefore, each ROW in each ARRAY represents a particular PIXEL location. And the RGB values in that ROW represents the color of that PIXEL.

DIFFERENCE BETWEEN NUMPY ARRAYS(PIXELS) AND SPREADSHEET CELLS

In spreadsheet software such as excel, ROWS are arranged from top to bottom, likewise in Numpy, ARRAYS are arranged from top to bottom.

In spreadsheet, COLUMNS are arranged from left to right, likewise in Numpy, ROWS are arranged from left to right.

As you can see, spreadsheet(ROW) = Numpy(ARRAY)
and spreadsheet(COLUMN) = Numpy(ROW)

In Numpy, the content of each ROW represents the RGB value of that ROW.

In Numpy, ROW is the same as PIXEL.

In my previous post I stated that a PIXEL, is the smallest part of a picture just as an atom is the smallest part of an object. Pixels come together to form an image.

Finally, in Numpy, Arrays can be converted to images and images can be converted to Arrays.

CONCLUSION
Today, we talked about how Numpy array looks like diagrammatically as a group of pixels. 

We also compared Numpy Array arrangement to the arrangement of cells in a spreadsheet software.

BY THE WAY........
We are building a complete Object Recognition System robotic companies.

This means that their teams do not need to do any  computer vision related tasks as our system can do that for them.

If you would like to know more or if you know a company which might need our service,
please email us at email@rev25.com

or you can visit our website: https://rev25.com
Tử vi trọn đời
Published: 2023-12-18 16:20:55

Tử Vi, hay Tử Vi Đẩu Số, là một bộ môn huyền học được dùng với các công năng chính như: luận đoán về tính cách, hoàn cảnh, dự đoán về các "" vận hạn"" trong cuộc đời của một người đồng thời nghiên cứu tương tác của một người với các sự kiện, nhân sự.... Chung quy với mục đích chính là để biết vận mệnh con người.
Lấy lá số tử vi để làm gì ?
Xem lá số tử vi trọn đời có bình giải chi tiết sẽ giúp cho quý bạn mệnh biết về tương lai, vận hạn theo các năm. Khi lấy lá số tử vi theo giờ sinh và ngày tháng năm sinh thì quý bạn cần khám phá phần luận giải lá số để nắm bắt vận mệnh của chính mình. Lá số tử vi trọn đời mang yếu tố tham khảo giúp quý bản mệnh tránh việc không nên, tăng cường việc tốt từ đó có một cuộc sống suôn sẻ và nhiều may mắn.
Lá số tử vi trọn đời thể hiện điều gì ?
Trên mỗi lá số tử vi sẽ thể hiện các phương diện cuộc sống của quý bản mệnh theo từng năm tuổi cụ thể như: công danh, sự nghiệp, gia đạo, tình duyên, tiền tài, sức khỏe, anh chị em, quan hệ xã hội...
Để tra cứu và lấy lá số tử vi trọn đời trực tuyến miễn phí quý bạn cần cung cấp đầy đủ và chính xác nhất về họ tên, giờ sinh, ngày sinh, tháng sinh, năm sinh và giới tính.
Ngoài ra: cách xem lá số tử vi có thể thay đổi theo các năm. Vì vậy để luận đoán và có cái nhìn chính xác nhất về tương lai và vận mệnh của mình trong năm Kỷ Hợi 2019 cũng như trong năm Canh Tý 2020. Quý bạn nên lấy lá số tử vi 2019 và cách lập lá số tử vi để tham khảo chi tiết tử vi năm 2020 của mình, cũng như phân tích và khám phá lá số tử vi trọn đời của các năm khác.
Xem thêm tại: https://tuvi.vn/lap-la-so-tu-vi
Trying to get out of the tutorial hell.
Tags: beginners, webdev, tutorialhell
Published: 2023-12-18 16:15:32

**Warning: I have no idea what I am doing and I have never done this before.**

Hello, I'm a relatively new coder trying to become a full-stack web developer. I have been learning coding for about half a year now but I am deep inside tutorial hell and cannot code any projects on my own.

I have built multiple projects by just mindlessly following tutorials on YouTube. Even after all these tutorials, I cannot build even a simple project on my own. So I decided to build some projects on my own and become a better coder.

A very short term goal I have is to build a basic admin dashboard by the end of this year.

This blog is for me to keep myself accountable and motivated to code daily.

## How much do I know?

I feel like I know all of these but I just can't apply them to actual projects.

-  **The basics**
	- HTML, CSS, and JS.
	- A little bit of React for the front-end.
	- Express for backend
	-  MongoDB.
-  **A bit more advanced stuff that I think I know.**
	- Typescript
	- Next.Js (I think this is kind of easy if you know React)
	- ZOD
	- SQL (PostgreSQL)
	- Prisma
## Building a Todo List

Yeah, that is the best thing I was even remotely confident in being able to build on my own.

**How did I build it?**
1.  I first set up a basic Next.Js project (Yeah I decided to build it in Next.Js because I like the App Router and the server actions)
2. Set up Shadcn-ui 
	- Shadcn because I like the default theme it has.
3. Created a basic modal with shadcn-ui that is used to Add a new Todo.
4. The modal has an Input form with simple validation using ZOD.
5. On submission of the form a server action is triggered to create a new todo using Prisma.
6. All the stored todos are displayed on the front end on a Table.
7. You can also delete or edit the to-do.
8. The Edit todo also opens a modal with an Input form with the current data already pre-filled.
9. You cannot mark the todo as Done because I completely forgot about that.

### What Next?

There are a lot of things missing from this like no loading, and no proper error handling but it is a start.

So now the task is to fix those and re-factor the code because the code that I have written is horrible.

Authentication is very important too.
I was messing around with NextAuth for authentication but it was hard to add it after the latest update.
I did manage to add it but it was using drizzle adapter for some reason the Prisma adapter did not work for me. Maybe I am just too dumb for this.

Screenshots of what I accomplished today.

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


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

It ain't much but it's a start.


**Thats all I did today Thank you**
TDD is a personal practice
Tags: tdd, testing
Published: 2023-12-18 16:12:19

---
title: TDD is a personal practice
published: true
description: TDD should not be a mandated practice in a team. Doing TDD is not a goal in itself.
tags: tdd, testing
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-12-18 16:05 +0000
---

I know TDD. I know what real TDD is. I know how to do it right, whatever that means depending on the TDD practitioner.
I still don’t like this practice, and rarely use it, except in 2 situations:

1. I’m fixing a bug in an existing code base: in this case I’ll write a test first to reproduce and isolate the bug, and then fix it and refactor if needed
2. I’m adding a new use case to an existing feature, and will treat the lack of existence of this new case as a bug, see 1.

I don’t ever, ever, EVER use TDD to write new features from scratch. It doesn’t work for me. It doesn’t match my mental model. It doesn’t help me go faster, doesn’t make me produce better code, and doesn’t make me write more, or more useful tests. I don't enjoy it and it doesn't provide me with any kind of satisfaction.

I still have a personal methodology, but it’s not TDD. I still strive to write good test and maintain good coverage, but not doing TDD.

TDD should not be forced upon developers who don’t want to follow it, in the same way a specific IDE should not be forced upon a developer. TDD is a tool, not a goal in itself. The shared goal is to have a well tested code base that is as safe as possible from regressions. How developers achieve that doesn’t matter.

TDD should not be conflated as "writing tests". I often see the rhetoric that, if you don’t do TDD, then you don’t write tests. If I showed you a code base with tests, there would be no way for you to know if they’ve been written in TDD or not.

TDD is not a team practice. Writing tests is a team practice. Code review is a team practice. Automated CI is a team practice. Whether a developer does or does not do TDD has no impact on the rest of the team. I could tell you I'm doing TDD if it pleases you, and you'd have no way to know that I don't, micro-managing set aside.

If in TDD you trust, don’t proselytize it. TDD is a personal practice.
A Quick-start guide on hosting Next.js ✨
Tags: javascript, nextjs, tutorial, productivity
Published: 2023-12-18 16:11:48

Welcome to our quick-start guide on hosting Next.js (at the time of writing, the most recent version of Next.js is 14.0.3).

We will demonstrate just how simple it is to host Next.js projects on our new PaaS offering - Upsun. 

**What will we cover in this guide?**

1. How to set up a Next.js GitHub repository, and clone it locally.
2. Configure your project
3. Create a new project via the Upsun console and deployment
4. And more information about updates, including resource allocation and code changes.

Are you ready to take a closer look? **[Let's get started!](https://upsun.com/blog/setting-up-next-js-on-upsun/?utm_source=social&utm_medium=organic-social&utm_campaign=upsun-blog-2023)**
What the H is Git?
Tags: beginners, git
Published: 2023-12-16 08:17:31


Git is used for managing the versioning of your code. It will help if you need to collaborate with a team and the code continues to grow. It is used for:
- Tracking code changes
- Tracking who made changes
- Coding collaboration

If you are still confused, I hope this helps.

Imagine you're working on a complex puzzle, and you have a helpful time-traveling assistant named _Git_. As you make changes to the puzzle (source code), Git allows you to take snapshots of the puzzle at different points in time.

- **Commits as Snapshots:** Each time you make progress on the puzzle, you ask Git to take a snapshot (commit). This snapshot includes all the pieces of the puzzle as they are at that specific moment.

- **Branches as Alternate Realities:** Git also allows you to create branches, which are like parallel realities or different versions of the puzzle. You can work on one branch without affecting the others.

- **Merging as Combining Realities:** When you're satisfied with the progress in one branch, Git helps you merge that branch back into the main puzzle. It's like taking the completed parts of one reality and seamlessly integrating them into another.

- **Rollbacks as Time Travel:** If you make a mistake or want to go back to a specific point in time, Git lets you time-travel. You can reset your puzzle to a previous snapshot (commit) and continue from there.

- **Collaboration as Team Puzzle Solving:** If you're working on the puzzle with friends, Git ensures that everyone has their own copy (clone) to work on. Your time-traveling assistant helps synchronize changes, preventing conflicts and ensuring a smooth collaborative experience.

- **Repositories as Puzzle Storerooms:** The place where you and your friends store your puzzles and their complete histories is like a Git repository. It holds all the snapshots, branches, and changes you've collectively made.

In this analogy, Git simplifies the process of managing different versions of your project, allowing you to experiment, make improvements, and collaborate seamlessly, all with the assistance of your trusty time-traveling assistant.
Circle inside circle using html css
Tags: freecodez, react, html, blog
Published: 2023-12-18 16:07:49

Hey there, You are most welcome to this article.

**Circle inside circle using html css**

![Circle inside circle using html css](https://res.cloudinary.com/freecodez/image/upload/v1702915665/images/bhjymkwfwm1ggwoc9sad.webp)

For full source code visit : [https://freecodez.com/post/toiz3d6](https://freecodez.com/post/toiz3d6)


```html
<!-- https://freecodez.com -->
<div class="cover">
    <div class="r">
        <div class="r">
            <div class="r"></div>
        </div>
    </div>
</div>
```

Source Code : [https://freecodez.com/post/toiz3d6](https://freecodez.com/post/toiz3d6)

For more such articles visit : [https://freecodez.com](https://freecodez.com/all)
🔍 OSINT Investigation Service: Uncover the Truth with Us! 🔍
Tags: osintinvestigation, opensourceintelligence, digitalfootprint, investigatewithconfidence
Published: 2023-12-18 15:51:04

Have you ever been curious about someone's online presence? Do you need to dig deep and gather valuable information about a person, business, or organization? Look no further! Introducing our cutting-edge OSINT (Open-Source Intelligence) Investigation Service!

**🕵️‍♂️ Who Are We?**
We are a team of skilled investigators, equipped with advanced tools and techniques, dedicated to providing you with the most comprehensive OSINT reports. Our goal is to help you uncover crucial data, enabling you to make informed decisions and stay safe in an increasingly connected world.

**🔎 What is OSINT?**
OSINT stands for Open-Source Intelligence, and it involves gathering information from publicly available sources on the internet. Our team is trained to extract valuable data from social media platforms, websites, forums, and more, while strictly adhering to ethical practices and privacy guidelines.

**🌟 Our Services Include:**
✔️ Personal Background Checks: Need to know more about someone new in your life? We'll help you verify their online identity and spot any red flags.
✔️ Business Due Diligence: Researching a potential partner or investment? Our reports will give you valuable insights into a company's reputation and credibility.
✔️ Online Reputation Management: Worried about your digital footprint? Let us assess and help you manage your online presence effectively.
✔️ Social Media Investigations: Suspect someone of impersonation or malicious activities? We'll delve into their online activities and provide you with evidence-based findings.

**💼 Who Can Benefit from Our Services?**

Individuals seeking to safeguard their personal information.
Businesses wanting to make informed decisions before partnerships or investments.
Legal professionals requiring online evidence for cases.
HR departments conducting pre-employment background checks.
Concerned parents monitoring their children's online activities.
🔒 Confidentiality & Legal Compliance
We understand the importance of privacy, and all investigations are conducted discreetly and securely. Rest assured that our processes strictly adhere to legal regulations and ethical standards.

**📞 Get Started Today!**
Uncover the truth with our professional OSINT Investigation Service. Contact us now via private message or call us at:
**E-mail:** rakibhasanakas@gmail.com
**Fiverr:** https://www.fiverr.com/s/YkkkpK
Our team is ready to assist you in getting the information you need!

Remember, knowledge is power, and we're here to empower you with the truth. 🌐
Raku Blog Posts 2023.51
Tags: programming, rakulang, summary
Published: 2023-12-18 15:50:04

- [Day 12 – Perspectives on RakuDoc Version 2](https://raku-advent.blog/2023/12/12/perspectives-on-rakudoc-version-2/) by *Richard Hainsworth*
- [Day 13 – Networks Roasting on an Open Fire, Part 3: Feeling Warm and Looking Cool](https://raku-advent.blog/2023/12/13/day-13-networks-roasting-on-an-open-fire-part-3-feeling-warm-and-looking-cool/) by *Geoffrey Broadwell*
- [Day 14 – The Magic Of Q (Part 2)](https://raku-advent.blog/2023/12/14/day-14-the-magic-of-q-part-2/) by *Elizabeth Mattijsen*
- [Day 15 – An Object Lesson for the Elven](https://raku-advent.blog/2023/12/15/day-15-an-object-lesson-for-the-elven/) by *Steve Roe*
- [Day 16 – It’s Too Generic; Please Instantiate!](https://raku-advent.blog/2023/12/16/day-16-its-too-generic-please-instantiate/) by *Vadim Belman*
- [Day 17 – Writing some horrible Raku code this Christmas!](https://raku-advent.blog/2023/12/17/day-17-writing-some-horrible-raku-code-this-christmas/) by *Will Coleda*
- [Day 18 – Dissecting the Go-Ethereum keystore files using Raku tools](https://raku-advent.blog/2023/12/18/dissecting-the-go-ethereum-keystore-files-using-raku-tools/) by *Konstantin Narkhov*

The third batch of blog posts for the Raku Advent Calendar.

- [Rakudo Weekly News 2023.51](https://rakudoweekly.blog/2023/12/18/2023-51-still-more-magic/)

*Elizabeth Mattijsen* reports on all recent developments around Rakudo, an implementation of the [Raku Programming Language](https://raku.org).