teleren/devto huggingface dataset:
My adventure with Power Over Ethernet (POE) using my Raspberry PI 3B+
Published: 2022-10-03 17:56:24

---
title: My adventure with Power Over Ethernet (POE) using my Raspberry PI 3B+
published: true
description: I am looking into POE (Power Over Ethernet). What is required to run servers without having a power cord? I've been really curious, so it was fun to learn about it.
tags:
cover_image: https://i.ytimg.com/vi/zpA2TossNao/maxresdefault.jpg
---

{% youtube zpA2TossNao %}

I am looking into POE (Power Over Ethernet). What is required to run servers without having a power cord? I've been really curious, so it was fun to learn about it.
How to integrate Razorpay payment gateway in ReactJS
Tags: razorpay, react, javascript, payment
Published: 2022-10-03 17:53:56

Hello everyone!
I hope the tutorial has helped you learn how to integrate Razorpay payment gateway in ReactJS.

create-react-app sets up the environment for developing and running a React application.
`npx create-react-app app-directory`

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

**[Razorpay](https://razorpay.com/)**
Now move to Razorpay intergeration

1. Register using your email account.
2. Log into your [Dashboard](https://dashboard.razorpay.com/signin?screen=sign_in) with appropriate credentials.
3. Select the mode **(Test or Live)** for which you want to generate the API key
   - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. Your customers will not be able to make payments in this mode.
   - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers.
4. Navigate to **Settings → API Keys → Generate Key** to generate key for the selected mode.

Then Key Id and Key Secret appear on a pop-up page.

**Accept All Payment Modes**
With Domestic and International Credit & Debit cards, EMIs ( Credit/Debit Cards & Cardless), PayLater, Netbanking from 58 banks, UPI and 8 mobile wallets, Razorpay provides the most extensive set of payment methods.

**[Powerful Dashboard](url)**
Get reports and detailed statistics on payments, settlements, refunds and much more for you to take better business decisions.

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

Demo : https://razorpay-payment-gateway-in-reactjs.vercel.app/
Source : https://github.com/erajamanickam/how-to-integrate-razorpay-payment-gateway-in-reactjs

Your comments and suggestions will be greatly appreciated.
Thankyou.
Easy maintenance of openGauss - WDR
Published: 2022-09-27 09:33:04

Overview of WDR Diagnostic Reports 

⚫ WDR (Workload Diagnosis Report) is based on the performance snapshot data of the system at two different time points, and generates a performance performance report between the two time points to diagnose the performance failure of the database kernel. 

⚫ The WDR report is the primary means of diagnosing long-term performance problems. Based on SNAPSHOT's performance baseline, multi-dimensional performance analysis can help DBAs grasp the busyness of the system load, the performance of each component, and performance bottlenecks. 

⚫ SNAPSHOT is also an important data source for follow-up performance problem self-diagnosis and self-optimization suggestions.

WDR Diagnostic Report 

⚫ WDR mainly depends on two components: 

 SNAPSHOT performance snapshot: A performance snapshot can be configured to collect a certain amount of performance data from the kernel at certain intervals and persist it in the user tablespace. Any SNAPSHOT can be used as a performance baseline, and the results of other SNAPSHOTs can be compared to analyze the performance of the baseline. 

 WDR Reporter: The report generation tool is based on two SNAPSHOTs, analyzes the overall performance of the system, and can calculate the changes of more specific performance indicators between these two time periods, and generate two different levels of Summary and DETAIL. performance data.



WDR report generation 

⚫ Prerequisites 

 After WDR Snasphot is started (that is, when the parameter enable_wdr_snapshot is on), and the number of snapshots is greater than or equal to 2. 

⚫ Operation steps 

 Execute the following command to query the snapshot that has been generated to obtain the snapshot_id of the snapshot. 

select * from snapshot.snapshot;

 (Optional) Execute the following command to create a snapshot manually. If there is only one snapshot in the database or you need to view the monitoring data of the database in the current time period, you can choose to perform the snapshot operation manually. This command requires the user to have the sysadmin privilege. 

 select create_wdr_snapshot();



WDR report generation example 

⚫ Query the snapshot that has been generated. 

postgres=# select * from snapshot.snapshot; 

snapshot_id | start_ts | end_ts 

-------------+-----------------------------------------+---- --------------------------------------- 

1 | 2020-09-07 10:20:36.763244+08 | 2020-09-07 10:20:42.166511+08 

2 | 2020-09-07 10:21:13.416352+08 | 2020-09-07 10:21:19.470911+08 

⚫ Execute the following command to write the queried information into the performance report.

select generate_wdr_report(begin_snap_id Oid, end_snap_id Oid, varchar report_type, varchar report_scope, int node_name ); 

⚫ Generate formatted performance report wdrTestNode.html. 

postgres=# \a \t \o /home/om/wdrTestNode.html Output format is unaligned. Showing only tuples.

⚫ Turn off performance report 

postgres=# \o \a \t Output format is aligned. Tuples only is off.
Verify the Images deployed to Kubernetes.
Tags: kubernetes, security, tutorial
Published: 2022-10-03 17:42:08


Do you want to verify that the images are going to be deployed to your Kubernetes Cluster are not modified by a malicious actor? Then you can use Kyverno integrated with Cosign to achieve that.

See the official [Documentation](https://kyverno.io/docs/writing-policies/verify-images/).
See the [tutorial ]( https://nirmata.com/2021/08/12/kubernetes-supply-chain-policy-management-with-cosign-and-kyverno/)by Nirmata the Creators of Kyverno

Finally watch the youtube video with the comparison between Kyverno and Datree by Viktor Farcic.

Ref: [Youtube Video](https://www.youtube.com/watch?v=A4SIpyG5BNU)

#### The Manifest to Validate the images

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

#### The actual validation by Kyverno Admission Controller. 

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

I hope you like the tutorial, if you do give a thumps up! and follow me in [Twitter](https://twitter.com/TVelmachos), also you can subscribe to my [Newsletter](https://dashboard.mailerlite.com/forms/167581/67759331736553243/share) in order to avoid missing any of the upcoming tutorials.

#### Media Attribution
I would like to thank [Clark Tibbs](https://unsplash.com/@clarktibbs) for designing the awesome [photo ](https://unsplash.com/photos/oqStl2L5oxI)I am using in my posts.

Thank you, Cheers!!!
How to start your career in Data Analysis?
Tags: analytics
Published: 2022-10-03 17:26:26

_Hi, this article is for people who want to get into the world of data especially in Data Analysis. Please read and share to your family or friends.🙏🏿_

The world of data is vast. Don’t get lost between these different terms: **artificial intelligence, machine learning, deep learning, data analysis, data science, business intelligence, big data.**

Know first that all these terms have one thing in common: data. So before diving into these technological worlds, it is necessary to find answers to some essential questions: **What is data? What types of data exist? What are the issues?**

Once you have an overview of data, you can start your journey by choosing an area you like the most. However, there is a lot left unsaid in this world of data. You will have to be very careful about the choice of technologies before you start.

For example, starting with artificial intelligence would be like entering a black hole. Never make that mistake! Because behind artificial intelligence there is data science, i.e. the science of data. And to be comfortable in the latter you will need to have **data analysis skills, basic statistics, mathematics, programming, database skills and soft skills (communication, data intuition).**

Just to let you know that you will have to follow some steps in order to advance in this world of data. I would advise you to start with data analysis. Because it is the gateway to the technological world of data.

**Why data analysis?** Because it is a necessity. You need someone who can collect, clean, interpret and analyze data to help you make decisions. Having these skills is a good start.

**How do you get these skills?** There are certain prerequisites you need to have before starting your data analysis adventure: **a basic understanding of statistics, some programming skills would be an asset, an understanding of databases, basic SQL.**

However, these prerequisites should not be barriers for you if you are really motivated. It will take some sacrifice and determination to get yourself up to speed before you start your data analyst career.

In data analysis, you will have to handle a lot of technologies: **Excel, Power BI, Google Data Studio, Tableau, Python, R, etc.** The most important thing is not the tool but to find a solution to a business problem.

Always keep in mind that as a data analyst, you have to facilitate strategic decision making. So before starting any data analysis case, always ask yourself these questions **Why am I doing this analysis? What is the given problem? What data do I need to collect? What solutions should I come up with in the end?**

It’s not about having beautiful data dashboards, but about finding solutions to a given problem through strategic decision making.

_**Papa Ibra Diagne — Data Scientist & Business Intelligence Analyst
Founder of Shakur Analysis**_
VS Code Extensions and Common Shortcuts for Web Designers
Tags: extensions
Published: 2022-10-03 16:58:58

**JavaScript (ES6) Code Snippets**

This extension contains code snippets for JavaScript in ES6 syntax for Vs Code editor. It supports both JavaScript and TypeScript.

**Auto Close Tag**

After opening a tag in HTML and XML it’s a hectic job to close it. So here is a nice solution. This extension closes the HTML and XML tag automatically.

**Prettier — Code formatter**

This extension will help us to format the JavaScript, HTML, CSS code. We can configure it as per our need.

**Auto Rename Tag**

This extension renames html tags automatically. So we can keep our code consistent and easy to maintain, even when working on bigger projects with lots of elements deep in the HTML structure.

**Live Server**

At the last the one extension every web designer/developer must use. This extension helps us in launching a local development server with live reload feature for both static & dynamic pages. So the next time you guys don't have to refresh the page again to see the output.


## Cool Shortcuts

I have found useful cool shortcuts that allows you to start typing and if you hit tab it will complete your text or the cod you are trying to write. In react this can be useful when importing as you just need to start the import component and hit tab and it completes it.

when in your terminal there are a few tricks to speed up the process if you made a mistake or need to run a command again you can simply push the up arrow. And it will show the last command you typed and you can push up as many times as you feel the need to.

there are some good to know things we should be typing in our terminal a few I think we should always know.

- Ctrl c – copy
- Ctrl v – paste
- Ctrl / - comment out the line of code
- Ctrl b – hides your side column
- Ctrl P -This shortcut will bring up the dropdown menu with all your files so that you can quickly navigate to a new one.
- Ctrl Shift F -This is a great one that I just recently learned. If you have a load of files and folders in VS Code and you are looking for something specific you can use this shortcut to quickly find it.
279CharsOrLess - 3 QoL VS Extensions for React Devs
Tags: webdev, react, beginners, vscode
Published: 2022-10-03 17:11:57

#If you can read a tweet you can read this entry.
 
**Btw, QoL = _Quality of Life_**

![Beemo AdventureTime Ketchup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fcyj99nmdoyetrz7o9co.gif)

1. [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag)
Easily change those div's into [fragments](https://reactjs.org/docs/fragments.html).

2. [vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components)
It's like CSS-lint for styled-components!

3. [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
Spell ~~Asthma~~. 

What are some extensions you love? Comment below!
_-KR_
Merge Mondays and Doc Fridays
Published: 2022-10-03 17:02:17

Several places I've worked have a no merges on Friday policy.  Even if it's not a policy, It's the way I prefer to work.  It's not a steadfast rule, but it is a guideline.  It's nice going into the weekend not worrying about a risky change you had planned.

The nice thing about this is it becomes a good time to work on all the other work that isn't strictly "delivering".  Documentation, planning, 20% time, scripting, UX improvements are all great for Fridays.  I like that it encourages me to dedicate time to activities which ultimately may have a multiplicative impact, and make the rest of the days easier, even if they don't strictly "deliver value to the customer"

This got me thinking about how I work and it made me come up with corallary which is "Merge Mondays".

If you believe in the adage, the only work that provides value is shipped work (which while not strictly true is a good shortcut) than Merge Mondays can be valuable for a few reasons.

1. It's a great way to start your week.  You can deliver the equivalent of a weeks worth of value in a couple hours.
2. It's the best day to take on added risk.  Your mind is fresh, you have the whole week to fix any problems. 
3. It's the best day to take on additional cognitive load.  Often times things don't get merged for thorny reasons.  Do they have the right tests? is the original contributor available? does something have to be fixed?  When you're fresh and not in the middle of a bunch of other work is a good time to take on this load.
Facing issue in size fixing(React)
Tags: react
Published: 2022-10-03 16:56:48


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




<br/>
<br/>

- Please suggest any solution to fix size issue in my local e-commerce website.
- share resource also.
Human Farm in The Matrix
Tags: thematrix, ai, humanfarm, genetics
Published: 2022-10-03 16:52:34

---
title: Human Farm in The Matrix
published: true
description: Human Farm
tags: #thematrix #ai #humanfarm #genetics
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Will AI farm humans for energy?

Although The Matrix is a great sci fi movie of our time this notion of farming humans for energy doesn't sound realistic. There are a lot of other easy to farm species for energy, why humans?

On top of that why not use nuclear plants? Given that robots are more resistant to radiation. They do not have DNA and are less prone to issues of mutation or any other radiation related illnesses.

For the sake of fiction I still feel there is slight chance of robots farming human beings, but not for heat but for our processing power. 

I think it is hard to find a processor as small as our head and with as many bits of processing speed that we have. Some theorize that our brain is a quantum computer and it is not so unrealistic to think that way.

Looks like this idea is not new and was discussed/rumored before as well https://dwheeler.com/essays/humans-batteries-matrix.html

For fun how will this farm look like. I have created a tentative possible farm design, maybe first version.

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

This has four main units:

1. Human brain
2. Machine input to sensory converter
3. Sensory output to machine input converter
4. Machine processor

There has to be some kind of mapper from machine processor to human processor and from human output.

It is possible over time that machines will learn how to generate these signals and directly feed these to the spinal cords.

Overall I think idea of farm is not totally impossible. 

It is almost certain that next successful species is going to be an engineered species. In the plant world that ball is already rolling and I will not be surprised if some of the pathogens or small animals like rat are already out in the wild which was genetically engineered for the tough environment.
Sell My House Fast For Cash In Market Value
Tags: javascript, webdev
Published: 2022-10-03 16:34:59

At Equal House Solutions LLC, we believe that the process of selling a house should be faster, easier, and hassle-free for the United States home sellers. If you’re serious about selling your house for cash in the US, we are ready to make you a fair all-cash online quote. When we buy directly from homeowners like you, we buy houses As-Is. You walk away without having to do any repairs. We’ll even clean out the property. It’s that easy and convenient.

[Sell My House Fast My Self
](https://www.sellmyhousefastmyself.com/)
Equal House Solutions LLC provides the best and win-win option for selling your home quickly. There are no listing fees, no agent commissions, and a quick and hassle-free closing process. You won’t have to worry about the hassle of repairs or renovations. With us, you will be able to get rid of that unwanted house quickly. Our simple process makes it easy to “sell my house fast”. We have bought houses for cash nationwide from homeowners like you. See the side-by-side comparison below:

Equal House Solutions LLC is a home buying company by real homebuyers all across the US. We are a group of real estate investors and cash home buyers. We buy houses from those who are selling their houses due to various causes. We have helped homeowners in every situation through this home buying website, including foreclosure, short sale, job loss, divorce, etc. We work in all states of the US. We have a separate team for each state where they manage all the processes to make your home purchase as easy and fast as possible.

Our main aim is to relieve you from the burden of your unwanted property to start fresh again where you wish, and for this being a national company, we have professionals in each state to serve you in every situation. If you are saying, “Help me sell my house AS-IS,” We will buy your house in any condition, no matter how ugly or outdated it is. You don’t have to make any repairs, clean, or paint.Are you trying and searching “how to sell my house fast with an online quote?” you are aware that selling a house with an online quote is easy and hassle-free. There is no lengthy process and paperwork, all you need to fill out the form and provide us with your property information. We will call you or will email you for further process.

Home Seller Review

Equal House Solutions LLC team recently came out to evaluate our house. My wife and I were curious to see our home value in today’s market. First, this company is a great people’s person, great attitude and full of knowledge in this industry. Took time to answer our questions and gave us advice on how to move to the next chapter.

Equal House Solutions LLC followed that up with an email loaded with more information. We are still in the process of figuring out what we want to do next but he gave a great road map on how to start. Big thanks to Equal House Solutions LLC!!
Count Common Words With One Occurrence
Tags: javascript, leetcode
Published: 2022-10-03 16:34:18

`Given two string arrays words1 and words2, return the number of strings that appear exactly once in each of the two arrays.

Input: words1 = ["leetcode","is","amazing","as","is"], words2 = ["amazing","leetcode","is"]
Output: 2
Explanation:
- "leetcode" appears exactly once in each of the two arrays. We count this string.
- "amazing" appears exactly once in each of the two arrays. We count this string.
- "is" appears in each of the two arrays, but there are 2 occurrences of it in words1. We do not count this string.
- "as" appears once in words1, but does not appear in words2. We do not count this string.
Thus, there are 2 strings that appear exactly once in each of the two arrays.
`
```js
/**
 * @param {string[]} words1
 * @param {string[]} words2
 * @return {number}
 */
var countWords = function (words1, words2) {
  let mapW1 = new Map();
  let mapW2 = new Map();

  for (let i = 0; i < words1.length; i++) {
    if (mapW1.has(words1[i])) {
      mapW1.set(words1[i], mapW1.get(words1[i] + 1));
    } else {
      mapW1.set(words1[i], 1);
    }
  }

  for (let i = 0; i < words2.length; i++) {
    if (mapW2.has(words2[i])) {
      mapW2.set(words2[i], mapW2.get(words2[i] + 1));
    } else {
      mapW2.set(words2[i], 1);
    }
  }
  let count = 0;

  for (let i = 0; i < words1.length; i++) {
    console.log(words1[i]);
    if (
      mapW1.has(words1[i]) &&
      mapW2.has(words1[i]) &&
      mapW1.get(words1[i]) === 1 &&
      mapW2.get(words1[i]) === 1
    ) {
      count++;
    }
  }
  return count;
};

console.log(
  countWords(
    ["leetcode", "is", "amazing", "as", "is"],
    ["amazing", "leetcode", "is"]
  )
);

```