teleren/devto huggingface dataset:
Building a Kafka Data Pipeline for Time Series With Kafka Connect and Timescale
Published: 2023-08-30 16:59:46

## What Is Kafka Connect

Apache Kafka Connect is an ecosystem of pre-written and maintained Kafka Producers (source connectors) and Kafka Consumers (sink connectors) for various other data products and platforms like databases and message brokers. This allows you to easily build data pipelines without having to write and test your own consumers and producers.

There are two distinct types of connectors:

- Source connectors:
 As the name suggests, these connectors act as a source of data and publish messages onto Kafka topics. For example, you can use the PostgreSQL JDBC source connector to publish a message onto a topic every time a row gets added to a table. This would allow you to set off a chain of events when (for example) someone posts a new message or a new user is created.


- Sink connectors:
 These connectors consume data from a Kafka topic and upload or insert that data onto a different data platform. For example, when someone makes a trade, you might want that event inserted into a time series database (like Timescale) for record-keeping and analytical purposes.

But the real benefit comes from the fact that you are not limited to a one-to-one relationship between producers and consumers. You can have multiple connectors act on the same message. Maybe your message is flowing between microservices, but you also want to store these messages in S3 and a data lake but also send it to another message broker. The sky's the limit when it comes to building pipelines using Apache Kafka Connect.

When I first started learning about Kafka and Kafka Connect, my biggest grievance was that there were almost no beginner-friendly end-to-end tutorials on properly setting up Kafka Connect for connectors that were more complicated than a local file sink. Because I had very limited Java experience, the ecosystem was quite daunting to wrap my head around, which made understanding and installing plugins all the more difficult.

My goal for this tutorial is to clearly explain every step to set up a JDBC Sink connector that streams data from a Kafka topic into a Timescale database without any guesswork. If you aren’t fond of blog posts and would rather just dive into the code, [you can find the full shell script with all the necessary steps and commands here.](https://github.com/mathisve/kafka-shenanigans/blob/main/baremetal-configs/commands.sh?ref=timescale.com)

## Kafka Connect Tutorial
This short tutorial will show you how to set up Kafka and Kafka Connect to stream data from a Kafka topic into a Timescale database.

Read the full article here: https://www.timescale.com/blog/building-a-kafka-data-pipeline-for-time-series-with-kafka-connect-and-timescale/
Is Domain-Driven Design relevant?
Tags: discuss, programming, beginners, career
Published: 2023-08-30 16:55:31

I found a [FREE](https://www.domainlanguage.com/ddd/reference/) guide on Domain-Driven Design that I found helpful. How is it relevant anymore? 

It seems like writing code is less significant than modeling your system.

Have you found value in domain-driven design techniques? Or did you find that modeling is not worth the effort?

What do you think?
How to restore deleted Apple email?
Tags: apple, mail, restore
Published: 2023-08-30 16:00:28

If you have only recently deleted that email, you have a good chance of finding it in the trash bin from where you can select that mail to restore it to the mailbox. It may be possible that you have deleted it way back or it got deleted accidentally and you are realizing it only now. In this case, you can restore easily if you have granular backups. Even a non-granular Time Machine backup can be used though it may take longer to search that specific mail. If you don't have any of these resources, then you can either take help of an IT professional, which will cost you a lot, if the mail is really important or you can buy a recovery software application which recovers deleted emails. To be frank, the possibility of recovering any type of data without backup is never hundred percent. 

## Even with backups, you may not be able to restore Apple mail without doing the following

Just taking a single backup is not a guarantee to restore your email or emails. It takes more than that and has become quite feasible with advanced certified options. Let us see what needs to be done. 

First of all, you need to combine periodical full backups with regular backups because this not only optimizes time and space but also ensures that your backup data is up to date. Automatic incremental backups help with both. Now you need a tool which has these options as well as other important ones like mirror backups and selective backups.

Furthermore, we all generally understand that all kinds of backup sites have their limitations and advantages. When we use different sites and store multiple copies, we mitigate the risks associated with a single site. If you can find a tool which compresses data and encrypts data then using all-local, external, and Cloud based service for storing backups should be easy and cost effective. 

You should get granular backups with options to view and search easily. The steps should be simple for anyone, even a beginner, so that one can use the tool anytime.

Data is the lifeline of organizations today and when you Restore or backup this email data, its safety should be assured. 

## This is the best choice to **[backup and restore Apple emails](https://www.mailbackupx.com/restore-apple-email/)**

Mail Backup X is the best option for beginners and advanced users, for personal and professional backups, for those on or not on a budget, in short for everyone. This is a tool that has the attribute of twin compatibility for Mac and Windows devices which is rare and really beneficial. It also has another beneficial trait of cross platform compatibility with major email services like IMAP email clients, many desktop services, etc. When we are discussing it after discussing the main qualities of a reliable backup, it is evident that it has all those attributes to create reliable backups and to restore emails efficiently. What trumps everything else is the fact that it can also export mailboxes. 
This is a wonderful tool and there is a free demo available to assess it. Go for it.https://www.mailbackupx.com/restore-apple-email/
"Self-Taught Coding Stories of a Former Lab Scientist": CodeNewbie Podcast S25E3
Tags: podcast, codenewbie, career, beginners
Published: 2023-08-30 16:34:27

It's our third episode of Season 25 of the CodeNewbie Podcast. This time, @saronyitbarek talks about self-taught coding, applying for jobs, and choosing a new career path with [Vanessa Vun](https://twitter.com/nessar00), Frontend Engineer at SciShield.

{% embed https://www.codenewbie.org/podcast/self-taught-coding-stories-of-an-former-lab-scientist %}

Vanessa Vun started her self-taught coding journey in 2022 after quitting a 10-year career as a clinical laboratory scientist. About 14 months later, she landed a job as a Frontend Engineer at SciShield, which provides a platform of solutions for research laboratories.

- [Listen on Apple Podcasts](https://podcasts.apple.com/us/podcast/codenewbie/id919219256?i=1000626181237)

- [Listen on Spotify](https://open.spotify.com/episode/5UdOwUmVpVmF6FigmQJzep?si=f7344c2c5aac47bd)

Or find the episode wherever you normally find your podcasts.

***

We love this podcast and we are happy y'all like it too!

### If you see this, tell us below what podcasts you have been listening to!

PS: Make sure to subscribe to the CodeNewbie podcast if you haven't yet + review us on your chosen platform!
What is the difference between an Element and a Component?
Tags: webdev, javascript, react, css
Published: 2023-08-30 16:30:48

Imagine you're building a house using building blocks. In this scenario:

Element: An element is like a single brick. It's the smallest building block in React, representing a part of your user interface. Elements are lightweight and immutable. They describe what you want to see on the screen, but they don't have any behavior or logic.

```
const element = <h1>Hello, World!</h1>;
```

**Component:** A component is a combination of several bricks forming a specific part of your house, like a window or a door. It's a reusable and self-contained piece of UI that can have its own behavior and logic. Components are created by combining multiple elements and other components.

```
function Greeting(props) {
  return <h1>Hello, {props.name}!</h1>;
}
```

The `Greeting` component is made up of an element `<h1>` and some logic to display a personalized greeting.

Remember, React's component-based architecture allows you to create modular and maintainable UIs. Components are reusable and can encapsulate their own logic, making your application more organized and easier to manage.
How to load CSS asynchronously in WordPress [Snippet]
Tags: opensource, wordpress
Published: 2023-09-04 17:57:04

---
title: How to load CSS asynchronously in WordPress [Snippet]
published: true
date: 2023-08-30 16:30:30 UTC
tags: OpenSource,Wordpress
canonical_url: https://daniele.tech/2023/08/how-to-load-css-asynchronously-in-wordpress-snippet/
---

How to use this simple workaround in WordPress

The post [How to load CSS asynchronously in WordPress [Snippet]](https://daniele.tech/2023/08/how-to-load-css-asynchronously-in-wordpress-snippet/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
How To Bypass The Capthca Using Selenium Python.
Tags: selenium, automation, softwareengineering, python
Published: 2023-08-30 16:06:21

Hi guys we are bypassing the captcha by selenium web driver to log in particular webpage.
(Please note that this article does not condone or support any form of security bypass or unethical use of technology).


![source imgflip](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dcq5txxlv331de3jwcc1.jpeg)


## Prerequisites:

1. OpenCV (cv2)
2. Tesseract OCR
3. Pillow (PIL)
4. Selenium

## Now lets code our requirment.


## 1. Getting the log in page
 

```
 Import the required modules as I shown below.

from selenium import webdriver
import cv2
from PIL import Image
from pytesseract import pytesseract


driver = webdriver()
driver.maximize_window()

# Now we will hit the website just pass your website link below.

driver.get(" Your Website Link Here")

```

## 2 . Capturing the screenshot of log in page and cropping it.

```
# Taking screenshot of login page and saving it as image.png
driver.save_screenshot("image.png")
```


## 3 . To focus on the area of interest menase crop the exact image which holds only captcha block.

This is sample cropped image. 

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

```
img = cv2.imread('image.png')
# you guys have  define coordinates as per your page layout.
cropped_image = img[200:250, 60:200]  
cv2.imwrite("Cropped_Image.jpeg", cropped_image)

```

## 3. Performing OCR -  Extracting text from cropped image.

To extract text from the cropped image, we use Tesseract OCR. Make sure you have Tesseract installed and properly configured. We set the path to the Tesseract executable and the path to our cropped image.

```
# Define path to tesseract.exe
path_to_tesseract = "Your path to tesseract.exe"

# Define path to the cropped image
path_to_image = "Your path to cropped image"

# Point pytesseract to the Tesseract executable
pytesseract.tesseract_cmd = path_to_tesseract
img = Image.open(path_to_image)

# Extract text from image
text = pytesseract.image_to_string(img)

```
Now take that data in text variable and using send keys send it to captcha labelbox.

```
enetr_captcha = driver.find_element("element path to location").send_keys(text)
```

Please remember to use this knowledge responsibly and ethically. Accessibility is about making the digital world more inclusive, not compromising security.

## Conclusion : 
In this blog post, we've explored how to use Python, OpenCV, and Tesseract OCR to extract text from images. While this technique has legitimate uses, it's essential to use such knowledge for the right purposes, such as improving web accessibility.

I hope this would be helpful if yes like and comments Yeehhhh!
Monokle VS-Code Extension
Tags: kubernetes, opensource, devops, vscode
Published: 2023-08-30 16:01:12

Super excited to share the newest addition to our open-source tooling arsenal: Monokle's [Visual Studio Code extension](https://bit.ly/47LzAZS). If you're knee-deep in Kubernetes resource validations or just venturing out, this is designed to supercharge and simplify your journey without ever leaving your VS Code environment.

Why you might want to check this out:

- **Instant, Pre-commit Validation**: No more tedious checks! Get real-time alerts and navigate directly to errors, even if you're not a Kubernetes guru.

- **Customisation Galore**: Kickstart with our default policies or get your hands dirty and customise validations according to your unique needs. We're talking everything from Pod Security Standards, NSA/CISA Hardening Guidance, Community Best Practices, Kubernetes Schemas and deprecations, resource links, etc, to classic YAML syntax checks

- **Integrate with Monokle Cloud**: If you're working in a team setting, Monokle Cloud lets you craft policies that every member can access via this extension, ensuring your pull requests align with team-established best practices and policies pre-commit.

For those curious about how [Monokle Cloud](https://monokle.io/features) and our [VS Code Extension]((https://bit.ly/47LzAZS)) play together, we've made the integration process buttery smooth. Set up centralized policies on the cloud, and they're ready to roll in every team member's VS Code setup.

Whether you're a seasoned Kubernetes professional or a curious newcomer, we hope this extension makes your life a bit easier. Give it a whirl and let us know your thoughts.

Cheers!
Easily test combos of microservices underlying your distributed app
Tags: kubernetes, testing, javascript, vscode
Published: 2023-08-30 15:50:29

Today we’re announcing the availability of [Tester](https://marketplace.visualstudio.com/items?itemName=skyramp.mocker-vscode) as part of Skyramp’s VS Code Extension. Our API test client makes it easy to create and run functional integration and load tests against hard-to-reach endpoints inside your application. Quickly execute complex test scenarios with request chaining and powerful asserts. Save time and stop writing flaky end-to-end tests. [Tester](https://marketplace.visualstudio.com/items?itemName=skyramp.mocker-vscode) makes experimenting with your app fast, easy, and above all — useful.
Cypress Feature: Let's Play with "Test Replay"
Tags: testing, javascript, beginners, tutorial
Published: 2023-08-30 15:30:37

Let's Play with "Test Replay": Cypress has launched the "Test Replay" feature!

[Click on the link For More Detail ](https://medium.com/@kailash-pathak/cypress-feature-test-replay-launched-lets-play-with-test-replay-651629a75202)

* Test Replay can significantly expedite the debugging workflow.

* Developers can more accurately identify the causes of failures, understand the dynamic behaviour of the application, and address issues that might be elusive or hard to replicate

* It captures every test run detail, enabling developers to replay it and inspect the DOM, network requests, console logs, and JavaScript errors.
Introduce Stargazers: Analyze and explore the stars of any GitHub user.
Tags: github, projects, opensource
Published: 2023-08-30 15:29:54

[Stargazers](https://stargazers.dev) is a web application that allows you to add unlimited Github accounts and analyze and explore the star list of these accounts.

## ScreenShot

![CleanShot 2023-08-28 at 21.35.29@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2023/08/upgit_20230828_1693229767.png)

![CleanShot 2023-08-28 at 20.43.28@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2023/08/upgit_20230828_1693226665.png)

![CleanShot 2023-08-28 at 20.55.31@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2023/08/upgit_20230828_1693227392.png)

## Features

- Supports adding unlimited GitHub accounts.
- Supports adding accounts via various methods such as user search, GitHub OAuth, or one-click button (powered by UserScript).
- Supports querying based on star time, programming languages, repository information and more.
- Supports analyzing star lists.
- Dark mode support. 
- Mobile end support.

## UserScript

![CleanShot 2023-08-28 at 21.15.21@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2023/08/upgit_20230828_1693228551.png)

[Install from greasyfork](https://greasyfork.org/en/scripts/474055-add-to-stargazers)

A UserScript that adds a button on the GitHub user profile page, allowing you to easily add it to stargazers.

Welcome to use it and feel free to give your feedback.
It's open source, you can find the source code on https://github.com/yuyinws/stargazers
NumPy Tutorial #13: Array Filtering
Tags: datascience, python, beginners, tutorial
Published: 2023-08-30 15:16:58

{% embed https://youtu.be/VFmLv2ZBu7E %}

In this blog, I will show you how to filter an array in NumPy.

---

## Filter

NumPy has provided us a functionality to perform a filtration. Let me show you how to use it.

First, let us create an array
```python
import numpy as np

arr = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
```

Then, perform filtration. In this example, I want to filter out the odd numbers from the array. To achieve this, First I will create an expression of even number as the following
```python
even_arr_index = arr % 2 == 0
```

If you print the `even_arr_index` variable, you will get the following output
```
[False  True False  True False  True False  True False  True]
```

Then you can assign `even_arr_index` to the `arr` to perform the filtration
```python
even_arr = arr[even_arr_index]
```

If you print `even_arr`, you will get the following result
```
array([ 2,  4,  6,  8, 10])
```

---

There you go, that is how you can filter a NumPy array. Thank you for reading this blog and see you next time!
Basic Python: 7. Python Loops
Tags: python, beginners, programming, tutorial
Published: 2023-08-30 14:35:40

Loops allow you to repeat certain actions multiple times. The `for` loop and the `while` loop are commonly used in Python.

### Table of Contents

1. **The `for` Loop**
2. **The `while` Loop**
3. **Loop Control Statements**
4. **Nested Loops**
5. **Looping Through Iterables**

## 1. The `for` Loop

The `for` loop is used to iterate over a sequence (such as a list, tuple, string, or range) and execute a block of code for each element in the sequence.

### Syntax:
```python
for element in sequence:
    # Code block to be executed
```

#### Example 1: Iterating Through a List
```python
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
    print(fruit)
```

#### Example 2: Using the `range` Function
```python
for num in range(1, 6):  # Iterates from 1 to 5
    print(num)
```

## 2. The `while` Loop

The `while` loop repeatedly executes a block of code as long as a given condition is true.

### Syntax:
```python
while condition:
    # Code block to be executed
```

#### Example 3: Counting Down with `while` Loop
```python
count = 5
while count > 0:
    print(count)
    count -= 1
```

#### Example 4: Sum of Numbers Using `while` Loop
```python
total = 0
num = 1
while num <= 10:
    total += num
    num += 1
print("Sum:", total)
```

## 3. Loop Control Statements

Python provides loop control statements to modify the flow of loops.

- **1. `break` Statement**: Terminates the loop prematurely.

```python
numbers = [1, 2, 3, 4, 5]
for num in numbers:
    if num == 3:
        break
    print(num)
```

- **2. `continue` Statement**: Skips the remaining code and moves to the next iteration.

```python
numbers = [1, 2, 3, 4, 5]
for num in numbers:
    if num == 3:
        continue
    print(num)
```

- **3. `pass` Statement**: Acts as a placeholder for future code without affecting the loop's execution.

```python
numbers = [2, 7, 3, 9, 5]

for num in numbers:
    if num % 2 == 0:
        print(f"{num} is even")
    else:
        pass  # Placeholder for future code

print("Loop finished")
```

## 4. Nested Loops

You can nest loops within each other to handle more complex tasks.

```python
rows = 3
cols = 3
for i in range(rows):
    for j in range(cols):
        print(f"({i}, {j})", end=' ')
    print()
```

## 5. Looping Through Iterables

Python's built-in functions like enumerate(), zip(), and iteritems() make it easy to loop through and manipulate iterables.

```python
# Using enumerate() to loop through a list with index and value
fruits = ['apple', 'banana', 'cherry']
for index, fruit in enumerate(fruits):
    print(f"Index: {index}, Fruit: {fruit}")
```
```python
# Using zip() to loop through multiple lists simultaneously
names = ['Alice', 'Bob', 'Charlie']
ages = [25, 30, 22]
for name, age in zip(names, ages):
    print(f"Name: {name}, Age: {age}")
```
```python
# Using items() to loop through key-value pairs in a dictionary
student_scores = {'Alice': 85, 'Bob': 70, 'Charlie': 92}
for name, score in student_scores.items():
    print(f"Name: {name}, Score: {score}")
```
What does an automation tester do?
Tags: qa, testing, automation, career
Published: 2023-08-30 14:29:49

Recently I’ve watched a great talk from [Selenium Conf 2023](https://seleniumconf.com/) by [Mark Winteringham](https://github.com/mwinteringham). 

He could expose something that I believe most professionals cannot realise. 

Automation testers focused too much in their technical skills.

To help to elaborate that, Mark asks 2 questions:
- what we try to say we do?
- what we are really doing?

### What do we try to say we do?

The first thing that called my attention was his research based on a job website (surprisingly not LinkedIn), collecting information about job roles.

Most of the automation testers try to expose that they have knowledge about tools (Java, JavaScript, Python, JUnit, Test NG, Selenium, Cucumber, Cypress, Playwright, Rest Assured, Postman, SOAP UI - the list is long).

We focus on these things, like if they represent the importance of what we do. It seems that it is more important to know how to use a tool or technology than to test something well.

From Mark's research, he sorted testing job skills in 3 different areas:

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

He listed jobs on the Indeed website and classified them. 

- Testing skills (31%)
  - Risk analyses
  - Writing and raising bugs reports
  - Ensuring quality 
- Automation skills (33%)
  - Maintaining flaky tests
  - Set up environments
  - Set up pipelines
- Tools skills (36%)

After all, the majority of jobs list more tools than testing or automation skills.

But, should we focus on the tools, or the principles?

### What are we really doing?

There isn’t any right answer for this question, however, Mark asks the audience to write down 3 simple things:
- What do we do on a daily basis?
- What do we do on a weekly basis?
- What do we do on a monthly basis?

After answering these 3 questions, we can start to think more clearly about what we do.

Automation testers need different skills that are not directly related to any technology or tool:
- plan tests
- set up pipelines
- understand system requirements
- report defects
- prioritise tasks
- write down documentation
- communicate with the team
- investigate issues

None of these are specifically related to tools or technologies, but they are all testing skills required to do the daily basis work.

> The image of what an automator is, is not the same as we are actually doing or getting involved in.

By the end of the talk, Mark listed some things that an automator does:

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

To me, it was a great talk to reflect over testing skills. We usually focus heavily on learning and specialising in tools, but we usually leave basic principles aside.

The talk from Mark is available on YouTube:
- [What Exactly Do You Do in Test Automation?](https://youtu.be/pT20Ssc7y6I?si=yYK9ZE3HfdWDj1dO)