teleren/devto huggingface dataset:
What is a Reverse Proxy and its Utility?
Published: 2023-03-29 23:17:35

A reverse proxy is a type of server that acts as an intermediary between a client and one or more destination servers. Unlike a normal proxy, which acts as an intermediary between a client and an origin server, a reverse proxy is used to hide the identity and location of the destination servers.

The utility of a reverse proxy lies in its ability to provide an additional layer of security and privacy by hiding the real location of the destination servers behind a single public IP address. Additionally, a reverse proxy can also improve website performance by caching static content such as images and CSS files.

Here are some examples of how to use a reverse proxy in Python3:

## Using Flask:

```python
from flask import Flask, render_template
import requests

app = Flask(__name__)

@app.route('/')
def home():
    r = requests.get('http://example.com')
    return r.content

if __name__ == '__main__':
    app.run(port=5000)

```
In this example, we're using Flask to create a simple web server that listens on port 5000. When a user navigates to the home page, the server sends a GET request to http://example.com and returns the content of the response.

## Using aiohttp

```python
import aiohttp
import asyncio

async def get_data(url):
    async with aiohttp.ClientSession() as session:
        async with session.get(url) as response:
            return await response.text()

async def home(request):
    data = await get_data('http://example.com')
    return web.Response(text=data)

app = web.Application()
app.add_routes([web.get('/', home)])

if __name__ == '__main__':
    web.run_app(app, port=5000)

```
In this example, we're using the aiohttp library to create an asynchronous web server that listens on port 5000. When a user navigates to the home page, the server sends an asynchronous GET request to http://example.com using the get_data function and returns the response as text.

## Using reverse_proxy

```python
from http.server import HTTPServer, BaseHTTPRequestHandler
import http.client

class ReverseProxy(BaseHTTPRequestHandler):
    def do_GET(self):
        conn = http.client.HTTPSConnection("example.com")
        conn.request(self.command, self.path)
        resp = conn.getresponse()

        self.send_response(resp.status)
        for header, value in resp.getheaders():
            self.send_header(header, value)
        self.end_headers()

        self.copyfile(resp, self.wfile)

httpd = HTTPServer(('localhost', 5000), ReverseProxy)
httpd.serve_forever()

```
In this example, we're using the built-in http.server library to create a simple HTTP server that listens on port 5000. When a user navigates to the home page, the server sends a GET request to http://example.com using the ReverseProxy class and returns the response to the client.

In conclusion, a reverse proxy is a powerful tool that can be used to improve the security, privacy, and performance of web servers. In Python3, there are several libraries and frameworks that can be used to create reverse proxies, including Flask, aiohttp, and the built-in http.server library.
How to Detect Chat GPT: A Guide for Content Creators
Tags: chatgpt, gpt3, webdev, detect
Published: 2023-03-29 23:08:46



Are you concerned about the authenticity of the content you're reading online? With the rise of AI-powered text generation tools like Chat GPT, it's becoming increasingly difficult to distinguish between human and machine-generated content. However, there are ways to detect Chat GPT and ensure that you're reading human-written content.

## 1- How to Detect Chat GPT generated content
One effective way to detect Chat GPT is to use a tool like [gptcheck](https://gptcheck.net). This online tool allows you to paste text and analyze it to determine if it was generated by an AI language model. With its advanced algorithms and deep learning techniques, gptcheck.net can accurately identify Chat GPT-generated text and provide you with a confidence score.

Using this tool is simple. Just copy and paste the text you want to analyze, and the tool will instantly generate a report indicating whether it was written by a human or generated by Chat GPT. With its user-friendly interface and accurate results, gptcheck is a powerful tool for content creators looking to maintain the integrity of their content.

In addition to using tools like gptcheck.net, there are a few other ways to detect Chat GPT. One is to look for telltale signs of AI-generated text, such as repetitive patterns or unnatural syntax. Another is to consider the context of the text. If the content seems too good to be true or lacks a human touch, it could be Chat GPT-generated.

## 2- How to use gptcheck tool

1. Go to the GPTCheck website: [https://gptcheck.net](https://gptcheck.net)

2. Copy and paste the text you want to check into the box on the homepage.

3. Click the "Check Text" button.

4. Wait for the tool to analyze the text. The tool will give you a score based on how likely it is that the text was generated by an AI model.

5. Check the score. If the score is high, there is a strong likelihood that the text was generated by an AI model.



## 3- GPTcheck tool exemple results

![gptcheck tool exemple results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i716azd7sxulikppdzsq.PNG)


In conclusion, detecting Chat GPT-generated content is becoming increasingly important in the age of AI-powered text generation. While it can be challenging to distinguish between human and machine-generated content, tools like [gptcheck](https://gptcheck.net) can help ensure that the content we read is authentic and trustworthy. By following the simple steps outlined in this article, users can effectively detect Chat GPT-generated content and make informed decisions about the reliability of the text they encounter online. Ultimately, staying vigilant and informed is crucial in the ongoing effort to maintain the integrity of online content.
How Data is Stored - The Internals of Apache AGE
Tags: beginners, apacheage, postgres, tutorial
Published: 2023-03-29 22:34:06

## **Introduction**
In this article I will give an introduction to the internals of Apache AGE, specifically how data is stored in AGE. 

## **Prerequisites**
A basic knowledge of PostgreSQL or any other Relational Database Management System (RDBMS), including an understanding of tables, schemas, and commonly used SQL queries such as SELECT, INSERT, DELETE, and UPDATE, is essential. Additionally, proficiency in JSON (JavaScript Object Notation) is also necessary.

## **How Data is Stored**
Apache AGE uses a separate namespace in PostgreSQL for each individual graph, with the data for each graph being stored in the table `ag_catalog.ag_graph`.

![Executing SELECT oid, * FROM ag_catalog.ag_graph, showing all graphs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f1fpgtwz9z71y02stvk.png)

- oid - PostgreSQL identifier for the graph

- name - The graph name

- namespace - The schema name

When creating a graph, it also creates two tables within this namespace:` _ag_label_vertex` and `_ag_label_edge`, these will be the parent tables of any new vertex or edge label you create. Vertices and edges in AGE are stored as rows in PostgreSQL tables, with each row representing a single vertex or edge in the graph.

A label is generally a user-defined string that is assigned to vertices and edges in the graph to describe their type or category. The data for each label is stored in the table `ag_label`.

![Executing SELECT oid, * FROM ag_catalog.ag_label, showing all labels](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxcmm2nvwz22ep7kdmyn.png)

- oid - Unique PostgreSQL identifier per label

- name - The label name

- graph - The oid of the graph to which this label belongs

- id - The id for the label, unique per graph

- kind - The type of label as v stands for vertex and e for edge

- relation - The schema-qualified table name for the label 

The data for all vertices and edges in a graph is stored at  `graph_name._ag_label_vertex` and `graph_name._ag_label_edge`.
![SELECT on tables _ag_label_vertex and _ag_label_edge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsfjel6hyjw9rhmo26op.png) It's possible to see the data for all vertices or edges under a specific label using `graph_name."Label"`.

Apache AGE repository: https://github.com/apache/age
Apache AGE website: https://age.apache.org
Day 724 : Repeat
Tags: hiphop, code, coding, lifelongdev
Published: 2023-03-29 22:16:33

_liner notes_:
- Professional : Whew... today was a good day. Had a meeting with my manager's manager. We have meetings like once a month and it felt like it's been a while. Helped out with community question. Spent the rest of the day working on my proof of concept demo. I even showed my manager's manager and he seemed to like it. Ran into a situation of what would happen if the user accidentally refreshed their page or if someone came to a page after the event had started. Basically added a current state of  everything and used localStorage as a way of backing things up. Also, during lunch, I sat in on the Orlando Devs board meeting. It was a lunch but since I had a meeting in the morning and stay pretty far from where the board meeting was held, I just tuned in through video. Not a bad day at all.

- Personal : Last night, I went through tracks for the radio show. I also worked on a demo for how I want a layout to function on my side project. I'm continuously amazed at what can be achieved with CSS. After that, I watched an episode of "Swarm". It looks pretty intense! A lot happened in the first episode.

![View into the Grand Canyon, United States with its striped plateaus extending into the distance under a hazy sky.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/523ff3g91tc5l313zdq7.jpg)

Going to try and have a repeat of last night. Go through tracks for the radio show. Get real images pulled from a database into the test layout and maybe try to get the View Transitions API stuff started, even though I'm still shaky on it. Will probably end the night watching another episode of "Swarm".

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube AcEMi-Q9mJA %}
Coding Diary...
Tags: career, beginners
Published: 2023-03-29 22:02:53


![Sponge Bob Biting nails](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ij75pj0e7r2mzf6xbacz.gif)

This will be a diary for my new coding journey. Currently, the coding BootCamp at GWU I am attending has given us Pre-work before classes have begun. This site was recommended to immerse students into the developer world/lifestyle for new ways to gain information as well as to connect with other developers. So far this is very exciting to me being that I have taken an expressive step back from social media. Soon I will update this information with "_coding day 1_". Overall I am very happy about the path ahead 🤗.
http://www.gameslotjoker.com/
Published: 2023-03-29 21:59:27

มีวิดีโอเกมประเภทต่างๆ มากมายที่คุณสามารถเล่นได้ รวมถึงเกมแนวออนไลน์เมื่อคุณมีเวลา อย่างไรก็ตาม ในกรณีที่คุณกำลังมองหาการทำกำไรเล็กน้อยสำหรับตัวคุณเอง คุณจะต้องพยายามอย่างเต็มที่ เป็นเว็บคาสิโนสล็อตที่พักผ่อนหย่อนใจ ด้วยเกมสล็อตคาสิโนทางอินเทอร์เน็ต คุณจะมีความเสี่ยงสูงที่จะได้เงินจริง
**_[https://gameslotjoker.com/](http://www.gameslotjoker.com/)_**

เงินปลอมหรือเงินจริง

คุณยังสามารถเล่นด้วยเงินปลอมได้หากนี่คือสิ่งที่คุณเลือก อย่างไรก็ตามหลายคนที่ชื่นชอบการไปคาสิโนและใช้จ่ายเงินตอนนี้กำลังทำสิ่งที่ดีที่สุดในออนไลน์เนื่องจากความจริงที่ว่ามันมากกว่านั้นมาก สะดวก.

สะดวกสบายอย่างแท้จริง

แทนที่จะวางแผนเวลาในขณะที่คุณสามารถเล่นที่คาสิโนแห่งใดแห่งหนึ่ง คุณสามารถเล่นเกมสล็อตคาสิโนบนเว็บและชนะเงินจำนวนมาก แต่จากการปลอบใจที่บ้านของคุณ สิ่งนี้ทำให้การโหลดสิ่งต่าง ๆ ยากขึ้นและทำให้คุณหัวเราะได้มากขึ้น เลือกเว็บกีฬาสล็อตคาสิโนที่คุณต้องการเล่น จากนั้นดูว่าคุณสามารถเล่นออนไลน์ผ่านเว็บไซต์ได้หรือไม่ หรือเมื่อคุณต้องดาวน์โหลดลงในแล็ปท็อปเพื่อเล่น

ปัญหาการดาวน์โหลด

ตอนนี้หากคุณพบว่าคุณต้องดาวน์โหลดเกมสล็อตคาสิโนออนไลน์จริง ๆ สิ่งนี้ไม่จำเป็นต้องเป็นปัญหา แต่คุณจะต้องตรวจสอบบางประเด็นก่อน แง่มุมหนึ่งที่คุณกำลังจะทำคือตรวจสอบให้แน่ใจว่าโปรแกรมป้องกันไวรัสและซอฟต์แวร์ป้องกันแอดแวร์ของคุณพร้อมใช้งานแล้ว เพราะนี่คือสิ่งที่จะบอกคุณว่าเอกสารที่คุณกำลังจะดาวน์โหลดนั้นเสียหายหรือไม่ ถึงอย่างไร. หากคุณพบว่าเป็นเช่นนั้น คุณจะต้องใช้เวลาในการค้นหาหน้าเว็บอื่นที่ปลอดภัยกว่าในการดาวน์โหลด แน่นอนว่าคุณต้องการเล่นกีฬา แต่แน่นอนว่ามันจะไม่คุ้มกับการที่คุณได้รับเฉพาะถิ่นบนพีซีของคุณ

ขั้นตอนต่อไป: สนุก!

อินเทอร์เน็ตเป็นปัจจัยที่ยอดเยี่ยมอย่างแน่นอนและช่วยให้เราบรรลุเป้าหมายนี้ได้อย่างมาก ไม่เพียงแต่คุณจะได้รับความสนุกสนานจากการพนันในคาสิโนออนไลน์เท่านั้น แต่ด้วยรูปลักษณ์และเสียงที่คุณจะได้สัมผัสราวกับว่าคุณอยู่ที่นั่น คุณยังสามารถเติมเต็มมนุษย์ที่คุณไม่เคยพบมาก่อนจากทั่วทุกมุมโลกในเวลาเดียวกันกับที่คุณกำลังเล่น
Zerando HackerRank ( 3 )
Published: 2023-02-27 23:22:17

Neste desafio é pedido que se faça uma função que receba uma array de números e retorne também uma array de números, porem com a ordem invertida.

Utilizando typescript existem várias formas de fazer essa função, a mais simples dessas é utilizar a função reverse presente no javascript desta forma:

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

Porem existem outras maneiras de executar essa mesma tarefa de outras formas utilizando de outras formas.

Partindo da suposição que não vamos utilizar a função nativa do javascript, uma solução bastante logica para isso, seria criar uma função que faça esse papel.

Essa função deve então percorrer essa array e por fim retornar uma nova araay com a ordem dos seus itens modificada.

Nesse caso usaremos como estrutura de repetição o FOR, com ele percorreremos a array, mas como fazemos isso?

Se a gente parar para pensar no que queremos fazer, isso fica bem claro. Nos queremos percorrer uma lista do final para o início, uma forma interessante para isso seria começar pelo comprimento da lista. Se tratando de uma lista, se começarmos pelo índex x -1 nos recebemos o último item dessa array, depois disso precisaremos percorrer esta mesma lista, porem ao invés de incrementar (i++) iremos retroceder (i--).
Utilizando essas logicas nossa função vai ficar assim:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yf1dja7tvt2rbt8vfdb4.png)
Fix Cert-Manager Conflict with EKS
Tags: aws, eks, kubernetes, openssl
Published: 2023-03-29 21:45:03


I was facing issue with multiple managed worker nodes running on EKS clusters. 

The issue was appearing randomly in different nodes, I cannot access the pods or get the logs by kubectl. 

```
x509: cannot validate certificate for 10.0.83.153 because it doesn’t contain any IP SANs 
```

Kube API in the CloudWatch showing the following errors:

```
E0327 08:54:17.406029 11 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"error dialing backend: x509: cannot validate certificate for 10.0.83.153 because it doesn't contain any IP SANs"}: error dialing backend: x509: cannot validate certificate for 10.0.83.153 because it doesn't contain any IP SANs 
```


After investigating the issue with the AWS EKS support team, we found that cert-manager-webhook is causing the issue.
Kubelet certificate chain is being used from cert-manager-webhook-ca.


Run the following command on the non-working node: 
```
openssl s_client -connect localhost:10250 
```

```
CONNECTED(00000003)
---
Certificate chain
 0 s:
   i:/CN=cert-manager-webhook-ca
---
Server certificate
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
subject=
issuer=/CN=cert-manager-webhook-ca
---
```

Run the following command on the working healthy node:
```
openssl s_client -connect localhost:10250 
```
```
CONNECTED(00000003)
---
Certificate chain
 0 s:/O=system:nodes/CN=system:node:ip-10-0-31-151.eu-west-1.compute.internal
   i:/CN=kubernetes
---
Server certificate
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
subject=/O=system:nodes/CN=system:node:ip-10-0-31-151.eu-west-1.compute.internal
issuer=/CN=kubernetes
---
```

The cert-manager-webhook deployment uses port 10250 which is also used for kubelet.

The solution is change the port of cert-manager-webhook to 10260.

By setting webhook.securePort to 10260

```
helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.10.0 \
  --set webhook.securePort=10260
```

Sources:

https://cert-manager.io/docs/concepts/webhook/
https://cert-manager.io/docs/installation/compatibility/#aws-eks
How Data is Represented - The Internals of Apache AGE
Tags: beginners, apacheage, postgres, tutorial
Published: 2023-03-29 21:35:02

## **Introduction**
In this article I will give an introduction to the internals of Apache AGE, specifically how data is represented in AGE. 


## **Prerequisites**
A basic knowledge of PostgreSQL or any other Relational Database Management System (RDBMS), including an understanding of tables, schemas, and commonly used SQL queries such as SELECT, INSERT, DELETE, and UPDATE, is essential. Additionally, proficiency in JSON (JavaScript Object Notation) is also necessary.

## **How Data is Represented**
Apache AGE has extended PostgreSQL with a new data type called "agtype," which is based on PostgreSQL's JSONB implementation. The agtype data type provides support for three custom data types: vertices, edges, and paths, which enable graph database functionality within the PostgreSQL ecosystem.
In AGE, data is represented using a graph model, which consists of vertices and edges. Vertices represent entities in the data, such as people, places, or things, and edges represent the relationships or connections between those entities. 
Each vertex and edge can have a set of properties, which are key-value pairs that provide additional information about the entity or relationship being represented. 
A path refers to a sequence of edges that connect two vertices in a graph, which may include zero or more edges and vertices, and it can be either directed or undirected.

An agtype vertex consists of a graph ID, a label, and a set of properties

`{
  			"id": 844424930131969,
  			"label": "person",
   		"properties": {"key": "value"}
}::vertex`


An edge is defined by its graph ID, a label that describes its relationship to the vertices it connects, the graph IDs of its start and end vertices, and a set of properties

`{
 		"id": 1125899906842625,
 		"label": "reports_to", 
 		"start_id": 844424930131969,
 		"end_id": 844424930131970,
 		"properties": {"key": "value"}
}::edge
`

A path is a list of alternating vertices and edges

`[vertex, edge, vertex, ...]::path`

Apache AGE repository: https://github.com/apache/age
Apache AGE website: https://age.apache.org
Introducing Topical Community Hours!
Tags: community
Published: 2023-03-29 21:34:50

In order to better structure our community hours, and increase participation, we’ve decided that each month there will be a new topic to discuss at our community hours. This might be a new feature, a demo, or just something we want to show you and get feedback on. You can still bring your questions and ideas, as always, but we thought we’d kickstart the communication with a topic. We’ll cover the topic at each of the three monthly community hours, so pick what works best for you!

Keep an eye out here and on social media for each month’s topic!

## Upcoming topics:

### August

Lagoon Sync

### September

Lagoon Scaffolding

### October 

Organizations


**See the full 2023 schedule here: https://dev.to/uselagoon/2023-community-hours-schedule-701**
Building a REST API Gateway with path and query string parameters
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-03-29 20:04:05

[88/100] #100DaysOfCloud Today, I created an API Gateway with path and query string parameters integrated with the Lambda function.

Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services. Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.

API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management. API Gateway has no minimum fees or startup costs. You pay for the API calls you receive and the amount of data transferred out and, with the API Gateway tiered pricing model, you can reduce your cost as your API usage scales.

You can try do it by yourself by following the steps from the link below: [GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/088/Readme.md)
How a Single Mom in a Shelter Became a Successful Software Developer: CodeNewbie Podcast S23E7
Tags: codenewbie, beginners, career, podcast
Published: 2023-03-29 20:03:10

In S23E7 of the CodeNewbie Podcast, @saronyitbarek talks with [Brittney Ball](https://twitter.com/Brii_toe_knee), Documentation Engineer @ Meta, about her journey to get to where she is today and how she made it as a self-taught engineer.

{% embed https://www.codenewbie.org/podcast/from-homeless-single-mom-to-software-engineer %}

Through hard work and determination, Brittney’s proven that your past doesn’t define your future. Six years ago, she was a single mom living in a shelter. Now, she’s a self-taught software engineer, documentation engineer, keynote speaker, event organizer, technical bootcamp instructor, and mentor.

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

- [Listen on Spotify](https://open.spotify.com/episode/6JEtnit8uz81mQaIGS4f7c?si=1637e8ada4084cab)

Or, as always listen wherever you normally get your podcasts!!

***

**And hey, make sure to subscribe to the CodeNewbie podcast if you haven't yet!**

Happy coding! We hope you enjoy this season of the CodeNewbie Podcast 💜
Gnarly News March 2023
Tags: news, ruby, womenintech, programming
Published: 2023-03-29 19:03:11

The software development landscape is constantly changing. As a software consultancy, it’s our responsibility to keep our finger on the pulse of the industry. Here are some headlines that caught our attention recently. 


## [Women Who Code Opens Nominations for 100 Technologists to Watch](https://code.womenwhocode.com/100-technologists-to-watch/)

It's Women's History Month, and Women Who Code are opening nominations for top technologists. WHC's mission is to "empower diverse women to excel in technology careers". Let the voting begin!


## [Ruby Turns 30](https://twitter.com/hashtag/ruby30th)

I was in my first year of life when Ruby was released. I wasn’t slinging code until much, much later but the metric provided perspective on the longevity of the language and how far it has come. We ♡ you Ruby, and we’re not alone.


## [Tuple Now Supports Linux and “Mob” Pairing](https://tuple.app/blog/the-realness)

Tuple is a great tool for pair programming and they just shipped with a bunch of new features! The Tuple team teased the linked article back in November 2022 and recently sent an email to subscribers boasting a Slack integration, Linux support, increased call sizes of up to 6 people, and more. 


## Contributors

* [Ethan Fertsch](https://github.com/efertsch)
* [Taylor Kearns ](https://github.com/taylorkearns)


_Learn more about how The Gnar [builds software](https://www.thegnar.com/software-development)._