teleren/devto huggingface dataset:
Python Course in Coimbatore - Learn with Industry Experts
Tags: pythoncourseincoimbatore, pythontrainingincoimbatore, trainingwithplacement
Published: 2023-08-03 05:21:34

he Python course offered by Nschool Academy in Coimbatore is a thorough course that focuses on key programming ideas like conditional statements, syntax, strings, shell scripting, error handling, data operations, web scraping, loop statements, and lambda functions under the supervision of Python programmers in real-time. You will gain a solid understanding of the popular Python Web Framework Django during this Python training course, enabling you to use it to implement real-world projects and programmes like an experienced Python developer!

The demand for Python programmers is rising. Learn the Python programming language at beginner, intermediate, and advanced levels with courses specifically designed with realistic, real-world scenarios to meet industry demands. Python training in Coimbatore with the best course material and placement guarantees.

Click the link to more: https://www.n-school.com/python-training/
Metaverse
Tags: metaverse, talentserve
Published: 2023-08-03 05:17:21

The idea of a 3D online virtual world called the metaverse connects individuals from every aspect of their lives. It would link several platforms, much as how the internet connects various websites that may be accessed using a single browser.

Components and Technologies of the Metaverse:

Virtual Reality (VR): Utilizing special headsets and controllers, VR technology generates 3-D environments that users can explore and interact with. Users are immersed in a 3D world, giving them a feeling of involvement and presence.

Augmented Reality (AR): The real world is enhanced by augmented reality (AR), which adds to digital content on it. It enables a mixed-reality experience that combines the real and virtual worlds together.

Blockchain and Cryptocurrencies: Blockchain technology guarantees the ownership, security, and transparency of digital assets in the metaverse. With the help of cryptocurrencies, individuals can own and exchange virtual assets and support virtual economies.

Social and Networking Platforms: Users can connect, interact, and communicate on social platforms in the metaverse, generating real-world social interactions.

Artificial Intelligence (AI): By creating dynamic material, managing virtual characters, and customizing user experiences depending on their tastes and behaviours, AI plays a significant part in the metaverse.
Cucumber Selenium tests taking longer duration in multi-Threaded mode on latest chrome versions and on AL2 Linux
Published: 2023-08-03 04:53:56

Our automation scripts are developed using Cucumber and Selenium (4.6 version). These scripts are run first in multi-threaded mode (4 threads) in the Jenkins pipeline (EC2 instance, Amazon Linux2 OS) with headful chrome. Then the failed scripts are rerun (as UI tests can be flaky) within the same pipeline but in a single thread.

A few months back, we started upgrading Chrome to 108 and suddenly we noticed all our pipelines were taking longer duration. In the multi-threaded run, we noticed some scripts failing (due to CSS not displayed within time, not visible (or not loading) until some wait time), and also passed scripts taking longer duration compared to Chrome 80 run. However, the failed scripts are running fine in the rerun which is single-threaded. So, we concluded that the issue is happening only in multi-threaded run. We also tried running using Chrome 107, 109, 111, 113 and 114), but we see the same issue.

We ran our test suite on Windows and Mac in multi-threaded mode and observed that the tests are running fine without taking longer duration. It is almost the same as the Chrome 80 run on AL2 Linux. Then we concluded that this issue is happening on AL2 Linux and on the latest chrome versions (started somewhere from > 80 and < 108 version) in multi-threaded mode only. Not exactly sure if the latest Chrome has performance issues on AL2 Linux OR the latest Linux Chrome driver has performance issues OR issues with the combination of Selenium, the latest Chrome driver, and the latest Chrome on AL2 Linux in Multi-Threaded mode.

Did anyone observe this or a similar issue and be able to resolve it? Can someone please suggest how to resolve OR overcome this issue? (We have a very huge number of test cases and so many pipelines to run the scripts. So, running tests in a single thread is not an effective solution for us.)
AWS Solution Architect Associate Exam Preparation
Published: 2023-08-03 04:33:53

###Here we will be discussing How to make preparation for the AWS Solution Architect exam.

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/reDyP4m3Jcc/0.jpg)](http://www.youtube.com/watch?v=reDyP4m3Jcc)


###*Question 1:*
A Company has a project of managing an e-commerce application that runs on EC2 Instance which is backed on ALB (Application Load Balancer). ALB EC2 instances run in ASG (Auto Scaling Group) with Multiple AZs and use an AWS Aurora Database instance, As a Solution Architect you need to take care of Applications resilient to periodic spikes in request rate.

As an Architect what following solution would you recommend for a given use-case? Select any two

*Choose Any Two Options from Below*

A. Use AWS Classic Load Balancer

B. Use AWS Global Accelerator

C. Use AWS Direct Connect

D. Use Cloudfront distribution in front of ALB

E. Use Aurora Replica

F. Use AWS Guard Duty

###*Answer: D & E*
Explanation: You can use Aurora replica and cloudfront distribution to make the application more resilient to spikes in request rate

A. Use AWS Classic Load Balancer

B. Use AWS Global Accelerator

C. Use AWS Direct Connect

D. Use Aurora Replica: Correct

E. Use Cloudfront distribution in front of ALB: Correct

F. Use AWS Guard Duty
How return a JSON response instead of an HTML error code like 401 or 400
Tags: discuss, springboot, json, api
Published: 2023-08-03 04:00:47

Hello guys, i need help

with following the tutorial in this link ‘https://medium.com/geekculture/implementing-json-web-token-jwt-authentication-using-spring-security-detailed-walkthrough-1ac480a8d970’, i can create jwt token authorization but how to return json response instead of an HTML error code like 401 or 400 when the JWT token is not valid, expired, or not used ?

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hndk5uaaut9f9qz3vy1b.png)
How to perform a CIS Benchmark scan on Ubuntu 22.04
Tags: devops, ubuntu, linux, security
Published: 2023-08-03 03:04:27

In this blog, we will focus on the process of performing a security scan on Ubuntu 22.04 following the CIS Benchmark for Ubuntu 22.04 (version 1.0.0).

First, install [OpenSCAP](https://www.open-scap.org/).

```
apt install libopenscap8
```

Next, download [OpenSCAP's content](https://github.com/ComplianceAsCode/content/releases/).

```
wget https://github.com/ComplianceAsCode/content/releases/download/v0.1.67/scap-security-guide-0.1.67.zip

unzip scap-security-guide-0.1.67.zip
```

After that, perform the scanning process.

```
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis_level1_server --report report.html scap-security-guide-0.1.67/ssg-ubuntu2204-ds.xml
```

Finally, evaluate the results.

```
open report.html
```

That's all. Thank you for reading. Having a nice day.
Why Not Just Fetch All The Data From The Client?
Tags: architecture, nextjs, tips, react
Published: 2023-08-03 16:40:55

---
title: Why Not Just Fetch All The Data From The Client?
published: true
date: 2023-08-03 00:50:00 UTC
tags: architecture,nextjs,tips,reactjs
canonical_url: 
---

 **Question** : With my NextJS application, why not just fetch all the data from the client? Why do we need to fetch data on the server?

![](https://cdn-images-1.medium.com/max/1024/1*w03XojOiHkHkZ0o3e9dISw.jpeg)
_React + NextJS Questions and Answers banner_

**Answer** : There are several key advantages to fetching data on the server:

- **It’s Usually Faster**  — NextJS servers are usually deployed in the same Virtual Private Cloud (VPC) or cluster as the microservices they call. This means that the network latency between the NextJS server and the microservices is very low. This is not the case for requests from the client. A customer web client can be anywhere, and the network latency between the client and the microservices is much higher. This means that fetching data on the server is usually faster than fetching it on the client.
- **Microservices Stay Behind the Firewall**  — If only the NextJS server (or other microservices) can talk to the microservices then those microservices can stay behind the firewall. This means the surface area of attacks is limited to just the NextJS server itself. To make the API calls from the client we would have to expose the microservices to the public internet, which expands the security risk.
- **API Keys Are Hidden**  — If we are using third party serivces as part of our application then those probably have API keys. Those keys should never go out to the client. Making the requests only from the NextJS server ensures that those keys are hidden.
- **Search Engine Optimization**  — Server side rendering, where the server renders HTML in response to a request, has long been the preferred choice of Search Engine Optimization (SEO) professionals. It is an arguable point that nowadays search engines can index client side rendered pages, but if you have a site where SEO is an important point then most likely they will prefer the SEO relevant portions of the site to be server side rendered.

This is not to say that client side fetching is a bad thing, it’s not. There are many cases where client side fetching is the right choice. But if you are building a NextJS application then you should consider server side fetching as the default choice.

> Jack Herrington is currently working on a [course on NextJS](https://pronextjs.dev), subscribe to the newsletter to get updates as well as React and NextJS tips, tricks and tutorials.
What is bit operation
Tags: algorithms
Published: 2023-08-03 02:48:00

## What is bit?
A computer is a collection of switches that has either `on` and `off`.
Each switch represents one binary digit, commonly known as a 'bit`.
A single switch is referred to as one bit.
Generally, this switch is operated with eight bits and this eight switched is called as `byte`.

## What it bit operations?
Bit Operations control on/off switching of switches.
There are many operations to adopt to many situations.
On/off control is done in units of bytes.

### Bit Operations

#### &(AND)
Compares two switches and returns 1 if both are 1 and 0 if either is 0.
It is used to search whether flag is set.
**example**
a: 11110000
b: 10101010
↓
c: 10100000

#### |(OR)
Compares two switches and returns 1 if either is 1 and 0 if both are 0.
It is used to set flag.
**example**
a: 11110000
b: 10101010
↓
c: 11111010

#### !(NOT)
It is shown as `^`.
Inverts all on/off state of switches, changing 0 to 1 and 1 to 0.
**example**
a: 11110000
↓
b: 00001111

#### ^(XOR)
Compares two switches and returns 1 if either is 1 and 0 if both are 0 or 1.
It is used to search where is difference.
**examples**
a: 11110000
b: 10101010
↓
c: 01011010

#### >>(Right bit shift)
Shift the state of on/off of switches to right.
0 is entered in the empty frame by shifting, and if it protrudes from the determined number of digits, it disappears.
Disappears when it overflows is called overflow, and it is used when performing bit manipulation using a loop.
**examples**
c = a >> 1
a: 11110000
↓
c: 01110000

#### <<(Left bit shift)
Shift the state of on/off of switches to left.
**example**
c = a << 1
a: 11110000
↓
c: 11100000

## Summarise
By combining these, we can do computer-specific calculations that can't be done with `+`, `-`, `*`, and `/`.
We can calculate specificatte computer
HOME SO
Tags: suctioncuphook, suctionshowerhooks, bathroomsuctionhooks, suctioncuptowelhooks
Published: 2023-08-03 02:43:07

Introducing HOME SO Suction Cup Hook Holders, where top-notch functionality meets exquisite style. Bid farewell to ugly holes in your walls or shower, thanks to our Superior Vacuum Suction Technology that offers effortless installation and a sleek, integrated appearance. Simply choose a smooth surface, Twist & Lock, and voila! You've got a modern, elegant hook ready to hold anything up to 10 lbs.

Crafted with high-quality ABS Plastic Brushed Nickel Finish & Natural Rubber, our suction cups blend seamlessly into your home decor. These waterproof, rustproof vacuum cups offer long-lasting service, outshining cheaper, transparent plastic alternatives. Not only do they stand out aesthetically, but their unrivaled performance also comes with a 100% Satisfaction Guarantee!

Bear in mind, our suction cups work best on Glass, Mirrors, Porcelain tiles, Acrylic/Plastic shower inserts, Stainless steel, Quartz, Laminate, and other smooth, non-porous surfaces. To attach to uneven and porous surfaces, simply apply the included adhesive discs. Enjoy a hassle-free, tool-free installation process and experience the strongest suction power with HOME SO Suction Cup Hook Holders.

At HOME SO, we also offer Shower Squeegees. They are multi-purpose window and shower cleaners capable of quickly clearing any flat surface of water droplets thanks to its extended 12-inch blade. The product comes in a convenient two-pack of double hooks with robust, easy-to-remove peel and stick adhesive for convenient storage of the squeegee as well as other items like loofah sponges, brushes, and towels. Engineered for everyday use, it is rust-proof and maintenance-free, making it a reliable tool for both household and commercial applications over the years.

Visit our website to find a range of reliable suction shower hooks, bathroom suction hooks, and suction cup towel hooks, designed to bring functionality and style to your living spaces.

More Information:
Business Email: casaorllc@gmail.com
Business Phone Number: (845) 754-3535
Hours of Operation:
Tuesday to Sunday, 9am to 5pm
Generating a non-random UUID, using a hash of multiple strings in Swift
Tags: uuid, swift, swiftui, hash
Published: 2023-08-03 02:35:30

I was just working with some messy data, and realized I need a deterministic way to generate UUIDs from 2 strings in an iOS project. Looks like the only standard method available is 

`UUID(uuidString: String)`

The problem with this is sometimes we don't have the formatted uuidString, so turns out we need to build it ourselves.

Enough talk, here's the code:

```
import Foundation
import CommonCrypto

func createHash(from string1: String, and string2: String) -> Data {
    let concatenatedString = string1 + string2
    guard let data = concatenatedString.data(using: .utf8) else {
        return Data()
    }
    
    var digest = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))
    _ = data.withUnsafeBytes {
        CC_SHA256($0.baseAddress, UInt32(data.count), &digest)
    }
    
    return Data(digest)
}

func generateNonRandomUUID(from string1: String, and string2: String) -> UUID {
    let hashData = createHash(from: string1, and: string2)
    
    // Truncate the hash data to 128 bits (16 bytes)
    let truncatedHashData = hashData.prefix(16)
    
    // Create a byte array (UnsafePointer<UInt8>) from the truncated hash data
    var byteArray: [UInt8] = []
    truncatedHashData.withUnsafeBytes {
        byteArray.append(contentsOf: $0)
    }
    
    // Create a UUID from the byte array
    let uuid = NSUUID(uuidBytes: byteArray)
    
    return uuid as UUID
}
```

Happy coding!
Building in a Bear Market: Navigating NFT Data Needs
Tags: nft, web3, blockchain, dapp
Published: 2023-08-03 02:31:14

As many of us have observed, the current bear market has not deterred all builders in the world of Non-Fungible Tokens (NFTs). In fact, some see this as an opportunity to build projects at a lower cost. For those who continue to build during a bear market, it represents a true commitment to web3 and the underlying philosophies that drive it. From this perspective, the bear market can also be seen as a natural filter for speculative interests.

When building in the NFT space, access to comprehensive and accurate data becomes a necessity. Finding the right resources for NFT data that cover various dimensions and scenarios is crucial.

In my own exploration, I've come across several platforms, one of which is called NFTGo. What's interesting about them is that they are one of the entities that have continued to build during this bear market, offering a rich set of data through their APIs. They seem to be tailored to developers' needs for NFT data.

If you're interested in checking out different platforms, here are some resources:

NFTGo's Developer Platform: https://developer.nftgo.io/developers
API Documentation: https://docs.nftgo.io/reference/introduction
They do have various pricing tiers, so depending on your usage and budget, you might find something suitable.

The ability to access diverse NFT data is a great asset for developers and researchers alike. It helps foster creativity and innovation, even in challenging market conditions. Whether you choose to explore NFTGo or any other platform, it's exciting to see how the community continues to build and grow.

How are you navigating the current market conditions? Do you have any other resources or tools that have helped you in the process of building in the NFT space? Share your experiences and recommendations here!
How to do LeetCode with Rust in Vim
Tags: leetcode, rust, vim
Published: 2023-08-03 01:51:48

I solve problems in LeetCode everyday, so I tried to set up LeetCode and Rust to write with vim.
## Submit LeetCode through terminal
### 1. Install `leetcode-cli` through `npm`.
```
npm install -g leetcode-cli 
```
### 2. Update config.json
The config file was created in `~/.lc/config.json`.
Update lang to set default language used in coding.
```json
{
  "code": {
    "lang": "rust"
  }
}
```

### 3. Create directory and download problem
`show` command is used to generate source file in `.leetcode`
```
mkdir ~/.leetcode
cd ~/.leetcode
leetcode show -g ${question by name or id}
```

### 4. Run `test` command to confirm your code
After writing code, you should run `test` command before `submit`.
```
leetcode test ${file name}
```

### Run `submit` command
Once the tests pass, submit your code to LeetCode.

You could solve problem in LeetCode with only terminal!

## Setup Rust in vim
### 1. Add `mason.nvim` and `mason-lspconfig.nvim`
mason is a package manager specializing in language-related functions, for example lsp.

### 2. Set `mason` config
Set the server configured in lspconfig to be installed automatically

`~/nvim/after/plugin/mason`.
```lua
local status, mason = pcall(require, "mason")
if (not status) then return end
local status2, lspconfig = pcall(require, "mason-lspconfig")
if (not status2) then return end

mason.setup({})

lspconfig.setup {
  automatic_installation = true
}
```

### 3. Set lspconfig
Add `rust-analyzer` in `lspconfig`.
```lua
local status, nvim_lsp = pcall(require, "lspconfig")
if (not status) then return end

-- Rust
nvim_lsp.rust_analyzer.setup{
  filetypes = { "rust" }
}
```
After this setting, you can 
### 4. Add `rust-tools`

```lua
local status, rust_tools = pcall(require, "rust-tools")
if (not status) then return end

rust_tools.setup({
  tools = {
    autoSetHints = true,
  },
  server = {},
})
vim.g.rustfmt_autosave = 1
```
`autoSetHints` is very useful.
it shows variable type.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyyi7o8bypnc79l4kv2w.png)

I add `vim.g.rustfmt_autosave = 1` to format automatically when I save files.

#Summarize
Finally, I can comfortably write Rust in vim and submit code to LeetCode through terminal.
How to upgrade `pnpm`
Tags: pnpm
Published: 2023-08-03 01:51:16

I have summarized the procedure for upgrading the version of pnpm, which is a package manager for Node.

While updating the version of pnpm is not something you do frequently, when you do need to update it, you may wonder, "What should I do?" and it can take several minutes to several tens of minutes.

There are several installation routes for pnpm, and the method of version upgrade varies depending on which one you chose.

Here, I have only listed the procedures that I thought could be used generically (not limited to pnpm).
If you want to know other methods, please refer to the following GitHub Discussions.

[Confusing about how to update pnpm itself](https://github.com/orgs//discussions/4383)

## Steps to upgrade pnpm

- Check the installation directory with the command:
   ```bash
   where pnpm
   ```

- Delete the installation directory with the command:
   ```bash
   rm -rf installation_directory
   ```

- Reinstall pnpm using the command:
   ```bash
   curl -fsSL https://get.pnpm.io/install.sh | sh -
   ```
   [Official pnpm installation method]()

## Actual Commands

```bash
$ where pnpm
/usr/local/bin/pnpm
/usr/local/bin/pnpm
  
  
$ rm -rf /usr/local/bin/pnpm
 
 
$ where pnpm
pnpm not found

 
$ curl -fsSL https://get.pnpm.io/install.sh | sh -
==> Downloading pnpm binaries 8.6.11
 WARN  using --force I sure hope you know what you are doing
Appended new lines to /Users/YOU/.zshrc

Next configuration changes were made:
export PNPM_HOME="/Users/YOU/Library/pnpm"
case ":$PATH:" in
  *":$PNPM_HOME:"*) ;;
  *) export PATH="$PNPM_HOME:$PATH" ;;
esac

To start using pnpm, run:
source /Users/YOU/.zshrc

 
$ source /Users/YOU/.zshrc

$ pnpm -v
8.6.11
```

In my case, the steps above allowed me to use pnpm without any issues. However, please be cautious as this method involves deleting the entire executable directory.

That's all!