teleren/devto huggingface dataset:
An Indian Software Engineer...
Tags: softwareengineering, india, career, learning
Published: 2024-02-25 14:03:55

"_What do you do?_"
"_I am a software developer_", I replied.
"_Cool, so you write these code and algorithms and create these magical apps._"
"_Yeeyss.. Kind of_", I murmured.

---

In India, our focus isn't on software development but rather on software maintenance. Our primary aim seems to be keeping our US executives satisfied, often through ego-stroking activities. Much of our time is spent crafting PowerPoint presentations and attending unnecessary all-hands meetings, where mediocrity is often rewarded. It's no wonder that India is primarily seen as a cost-effective destination for development by US-based multinational corporations.

Don't misunderstand me; I'm not criticizing my employer. These MNCs pay us significantly more than other industries in our country. We can earn upwards of ₹50 lakhs per year for tasks that often involve little actual development work but plenty of mundane tasks. It's ironic that the higher you climb in these companies, the less innovation is required to succeed. I've witnessed brilliant individuals getting trapped in stock schemes(RSUs/ESPP) and spending the rest of their careers doing menial tasks in the name of work-life balance. What's the point of attending prestigious institutions like the IITs and acquiring software development skills when all we end up doing is fixing comments and improving indentation in legacy code?

I recently came across the term "imposter syndrome," which many software engineers experience. But then I realized, how can one have imposter syndrome when they truly are imposters? The reality is that the vast majority of software developers here contribute little to the developer ecosystem and struggle to maintain outdated software dumped on us by these MNCs. Calling these centers "development centers" is misleading; they should be termed "scrap yards" where end-of-life products are laid to rest.

Thanks to advancements in AI, such as ChatGPT, Copilot, and other tools, it's becoming increasingly evident that many jobs in these "development centers" are at risk of redundancy. Even today, these roles fail to add significant value, but they do allow a few savvy MBAs in management to earn substantial sums by hiring more laborers (developers) in India and dubbing themselves leaders on LinkedIn. Managing 500 people might seem impressive, but not when the primary task is overseeing 5 obsolete products.

continued...
New servers: SA1 (KSA) and IL1 (Israel)
Tags: vpn, softether, ksa, israel
Published: 2024-02-25 14:03:55


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

The new servers have been added: SA1 (Jeddah, Saudi Arabia) and IL1 (Tel Aviv, Israel). Download the new configs please.

**OpenVPN**
https://dash.deepwebvpn.net/en/download?goto=openvpn/single/SingleRSA_SA1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/single/SingleECC_SA1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/single/SingleRSA_IL1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/single/SingleECC_IL1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/double/DoubleRSA_SA1_IL1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/double/DoubleECC_SA1_IL1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/double/DoubleRSA_IL1_SA1.ovpn
https://dash.deepwebvpn.net/en/download?goto=openvpn/double/DoubleECC_IL1_SA1.ovpn

**SoftEther**
https://dash.deepwebvpn.net/en/download?goto=softether/single/SingleSSL_SA1.vpn
https://dash.deepwebvpn.net/en/download?goto=softether/single/SingleSSL_IL1.vpn
https://dash.deepwebvpn.net/en/download?goto=softether/double/DoubleSSL_SA1_IL1.vpn
https://dash.deepwebvpn.net/en/download?goto=softether/double/DoubleSSL_IL1_SA1.vpn

Origin of the news: https://en.blog.deepwebvpn.net/2024/02/12/sa1_il1
The Environmental Impact of Choosing commercetools
Published: 2024-02-25 14:02:09

Introduction:

In an era where sustainability is paramount, businesses are increasingly seeking eco-friendly solutions that not only meet their operational needs but also align with their environmental values. commercetools, with its innovative cloud-native, headless architecture, stands at the forefront of this movement in the eCommerce sector, offering a path towards more sustainable digital commerce.

Sustainable eCommerce Practices:

Sustainable practices in eCommerce are crucial for reducing the environmental footprint of online businesses. commercetools facilitates these practices by leveraging cloud efficiency, scalability, and flexibility, which in turn minimizes the need for extensive physical infrastructure and reduces energy consumption.

Coding Examples:

```
// Example: Optimizing resource usage in commercetools
const { createClient } = require('@commercetools/sdk-client');
const { createHttpMiddleware } = require('@commercetools/sdk-middleware-http');
const { createAuthMiddlewareForClientCredentialsFlow } = require('@commercetools/sdk-middleware-auth');

const client = createClient({
  middlewares: [
    createAuthMiddlewareForClientCredentialsFlow({
      host: 'https://auth.europe-west1.gcp.commercetools.com',
      projectKey: 'your-project-key',
      credentials: {
        clientId: 'your-client-id',
        clientSecret: 'your-client-secret',
      },
      scopes: ['view_products:your-project-key'],
    }),
    createHttpMiddleware({ host: 'https://api.europe-west1.gcp.commercetools.com' }),
  ],
});

// Efficient data retrieval example
// This minimizes data transfer and processing, contributing to energy savings
client.execute({
  uri: '/product-projections/search?staged=false&limit=1',
  method: 'GET',
}).then(response => console.log(response.body))
  .catch(error => console.error(error));

```
Comparative Analysis:
When compared to traditional eCommerce solutions that rely heavily on physical infrastructure and constant resource allocation, commercetools' cloud-native approach offers a greener alternative. By minimizing the need for on-premise servers and optimizing the use of computing resources, commercetools significantly reduces the carbon footprint of its users.

Case Studies:
Incorporate real-world examples of businesses that have benefited from the eco-friendly approach of commercetools. These case studies can serve as powerful testimonials to the platform's potential to contribute to environmental sustainability.

Conclusion:
Choosing commercetools for your eCommerce needs isn't just a strategic business decision; it's a step towards a more sustainable and environmentally friendly digital commerce ecosystem. By leveraging the platform's efficiency, scalability, and flexibility, businesses can significantly reduce their environmental impact, paving the way for a greener future.

---

Thank you for reading my article! For more updates and useful information, feel free to connect with me on LinkedIn and follow me on Twitter. I look forward to engaging with more like-minded professionals and sharing valuable insights.
PYTHON - DAY 1 - my DOODLE
Published: 2024-02-25 13:59:18

## <u>**List of API's**</u>

```
https://github.com/fawazahmed0/currency-api#readme
https://api.chucknorris.io/
https://github.com/public-apis/public-apis?tab=readme-ov-file#social

```
## <u>How to start ?</u>

> **Json output**

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

<u>_https://httpbin.org/get_</u>

> **Code**

**_cat http_bin.py_**

```

import requests
mydata = requests.get("https://httpbin.org/get")
print(mydata)
data = mydata.json()
print(data)
result=data['headers']["Host"]
print(result)

```

> **Output**

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

## <u>**Links :**</u>

https://gitlab.com/parameshwar_a/pyfordevops/-/tree/main?ref_type=heads
https://gitlab.com/parameshwar_a/pyfordevops
Ready to Dive into the Tech World?
Tags: beginners, opensource, career, programming
Published: 2024-02-25 13:52:28

Are you excited about diving into the world of technology? 
<br />
With so many options, it can be overwhelming to know where to start.
<br />
**Imagine a place where confusion disappears.**
<br />
At **the Community**, you're not just another face in the crowd. You're part of a supportive group of professionals where theory meets practice.
<br />
Think of **the Community** as a helpful guide or even a secret information booth that aims to assist you not just in **getting through the tech maze** but also in achieving YOUR specific objectives.
<br />
**Picture this**, you are stuck at your desk, frustrated by the vast paths, content, and information everyone on the internet is trying to teach you, or even sell you.

**You are struggling to understand what the next step is to get closer to your first job or the next step in your career.**

We have all been there. _You are not alone_.

<br />

Suddenly, you feel relief.
<br /> 
A few months from now, you will remember that you decided **to take action** and join this one community from a post you read on DevTo. 

Suddenly, you have a place to ask questions or ask for guidance.

<br />

We are focused on practical skills, not just theory. **The community** offers opportunities to work on real projects and learn from industry experts.
<br />
You might get access to valuable insights and expand your network. 
<br />
Do you want to become a thought leader or share your ideas and expertise on stage, but you're nervous about public speaking?

**The Community** prepares to provide training to boost your confidence and walk you through workshops to acquire those essential skills.
<br />
If I manage to hype you up for it, fantastic, although **we will not accept everyone**.
<br />
We will share more details in the upcoming weeks.
<br />
However, individuals who decide to enlist early on already stand out for us. As an open-source project, **we have a special place for early birds** and those willing to try **NEW** things and **take action**.
<br />
Too good to be true? It's okay if you are skeptical.
<br />
Are you still interested?

{% cta https://novu.co/novu-community-2-0/?utm_source=DevTo&utm_medium=Blog%20Posts%20%26%20Articles&utm_campaign=Internal%20Content&utm_content=Ready%20to%20Dive%20into%20the%20Tech%20World%3F %} Join The Waitlist {% endcta %}
Taming the Code Beasts: Mastering Function in JavaScript
Tags: beginners, javascript, webdev, programming
Published: 2024-02-25 13:13:46

Hey JavaScript enthusiasts! Today I'm diving into the world of functions, those versatile code beasts that make our lives (and code) much easier.

But before we unleash their full potential, let's understand the different types we can work with:

**The Function Declaration (The OG):**

Imagine this: you have a recipe for your grandma's famous cookies. You write down the steps in a clear, concise way, and anyone can follow them to bake delicious treats. That's essentially a function declaration!

```
function greet(name) {
  console.log("Hello, " + name + "!");
}

greet("Alice"); // Output: Hello, Alice!
```
Explanation:
function greet(name): This line declares the function named greet, taking one parameter named name.
`console.log("Hello, " + name + "!");`: This line defines the function's behavior, printing a greeting message with the provided name.
`greet("Alice");`: This line calls the function, passing the argument `"Alice"` to the name parameter.

**The Function Expression (The Ninja):**

This type is like a secret agent, able to be assigned to variables and passed like any other value.

```
const greet = function(name) {
  console.log("Hey there, " + name + ".");
};

greet("Bob"); // Output: Hey there, Bob.
```
Explanation:

`const greet = function(name) {...}:` Here, we define a function and assign it to the greet constant using a function expression.
The rest remains similar to the declaration.

**The Arrow Function (The Concise One):**

This sleek type is perfect for short, simple functions. Think of it as a one-liner in the coding world.

```
const greet = (name) => console.log("Greetings, " + name + "!");

greet("Charlie"); // Output: Greetings, Charlie!
```
Explanation:

const greet = (name) => {...}: This combines the function definition and assignment in one line using the arrow operator (=>).

**Why use Functions?**

Reusability: Code once, use it everywhere! Functions allow you to create reusable blocks of code, saving time and effort.
Modularity: Break down complex tasks into smaller, manageable functions, making your code cleaner and easier to understand.
Maintainability: When changes are needed, you only modify the relevant function, reducing the risk of unintended consequences elsewhere.

**When to use Functions:**

Whenever you find yourself repeating a block of code, it's a sign to create a function!
For complex tasks, break them down into smaller, more manageable functions.
When you need to pass data or perform calculations based on different inputs.

> 
So, there you have it! These are the three main types of functions in JavaScript, along with their basic explanations and benefits. Remember, practice makes perfect, so experiment and create your own functions to conquer those coding challenges!
1512. Number of Good Pairs
Tags: easy, leetcode, dsa, java
Published: 2024-02-25 13:04:20

##Introduction

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

So here we are given an array. We have have to find how many pairs have the equal value like, nums = [1,2,3,1,1,3] and There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed.

##Examples

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

##Steps
1. Take a nested for loop
2. 1st loop runs 0 to nums.length.
3. 2nd loop starts from first loop index+1 and ends to nums.length.
4. if (nums[i] == nums[j]), counter++
5. return counter.


##JavaCode

```
class Solution {
    public int numIdenticalPairs(int[] nums) {
        int counter = 0;
        for(int i =0; i<nums.length; i++){
            for(int j = i+1; j<nums.length; j++){
                if( nums[i] == nums[j]){
                    counter++;
                }
            }
        }
        return counter;
    }
}
```

#Output


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rv77z84s4aseg90kh0u3.png)
How to full screen a browser in Playwright?
Tags: playwright, typescript, testing, tutorial
Published: 2024-02-25 12:37:47

One of the things that newcomers to Playwright may find strange at first is that even when the browser is full screen, the content displayed remains in a small area.

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

The main reason for this is that in the default device parameters, separate values are defined for the viewport. The viewport is the area in the browser where the content is displayed, for example if you go to [whatismyviewport](https://whatismyviewport.com/) you will see a value smaller than your screen resolution.

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

If you look at the viewport resolution in the default device parameters in Playwright, you will see that it remains quite small and since these values remain constant, the area where the content will be displayed remains the same even if the browser is made full screen.

```
  "Desktop Chrome": {
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.6312.4 Safari/537.36",
    "screen": {
      "width": 1920,
      "height": 1080
    },
    "viewport": {
      "width": 1280,
      "height": 720
    },
    "deviceScaleFactor": 1,
    "isMobile": false,
    "hasTouch": false,
    "defaultBrowserType": "chromium"
  },
```

Source: [deviceDescriptorsSource.json](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json)

I did some research to solve this situation and the solutions I found were either directly wrong or not enough. As a result of my own experiments, I obtained the solution I found the most suitable and it is as follows:

```
    {
      name: 'chromium',
      use: { 
        ...devices['Desktop Chrome'],
        deviceScaleFactor: undefined,
        viewport: null,
        launchOptions: {
          args: ['--start-maximized']
        },
      },
    },
```

In the example above, I have added additional parameters for Chromium in the `playwright.config.ts` file. The argument in `launchOptions` already makes the Chromium (and of course Chrome) browser window fullscreen, but as I mentioned at the beginning of this article, the viewport resolution remains constant, so the area where the content is displayed is still small.

In order for the viewport resolution to change dynamically, the `viewport` parameter must be set to `null`, but if you do this alone, it is not enough because you get the following error when you try to run the test:

```
Error: "deviceScaleFactor" option is not supported with null "viewport"
```

And that's why I also defined the `deviceScaleFactor` parameter as `undefined`. When you run the test in its final form, the browser now comes up full screen as it should in reality.

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

If you found my article useful, you can like it and share it for the benefit of people around you, thank you.
AWS S3: A Beginner’s Guide
Tags: aws, cloud, beginners, s3
Published: 2024-02-25 12:14:04

Amazon S3 (Simple Storage Service) is a powerful cloud-based storage solution provided by Amazon Web Services (AWS). It allows you to store and retrieve data securely from anywhere on the web. Whether you’re a developer, a business owner, or just curious about cloud storage, this guide will help you understand the basics of Amazon S3.

## Key Concepts
### Buckets:
Think of an Amazon S3 bucket as a virtual container for your files. It’s like a folder in the cloud where you can organize and store your data. Buckets have unique names (similar to domain names) and are globally accessible.

### Objects:
Objects are the files you store in an S3 bucket. These can be anything: documents, images, videos, backups, or even cat memes!. Each object has a unique key (similar to a file path) within the bucket.

### Scalability and Durability:
Amazon S3 is highly scalable. You can store as little as a single file or as much as petabytes of data. It’s also incredibly durable. Your data is redundantly stored across multiple data centers, ensuring high availability.

## Use Cases
### Static Website Hosting:
You can host static websites directly from an S3 bucket. Upload your HTML, CSS, and JavaScript files, set permissions, and voilà! Your website is live.

### Data Backup and Archiving:
Use S3 to back up critical data. It’s like having a digital safe deposit box. Set lifecycle policies to automatically move older data to cheaper storage classes (like Glacier) for long-term archiving.

### Media Storage and Distribution:
Store media files (videos, images, audio) and serve them to users via Amazon CloudFront (a content delivery network). CloudFront caches content close to users, reducing latency.

Remember, this is a simplified explanation, but it gives you an idea of how Amazon S3 can be used on different systems. Feel free to explore more about AWS services and their capabilities!
AWS Lambda: A Beginner’s Guide
Tags: aws, cloud, beginners, lambda
Published: 2024-02-25 12:11:36

AWS Lambda is a serverless compute service provided by Amazon Web Services (AWS). It allows you to run code without provisioning or managing servers. You only pay for the compute time you consume, making it cost-effective and efficient.

In simple words, AWS Lambda lets you execute code in response to events, such as file uploads, scheduled tasks, or messages published to an SNS topic. Let’s dive deeper into how it works and explore some practical examples.

## How AWS Lambda Works

### 1. Event Triggers: 
Lambda functions are triggered by events. Some examples include:

- A file uploaded to Amazon S3 (cloud storage service).
- A cron job that runs your function at regular intervals.
- A message published to an SNS topic (a publish-subscribe service).

### 2. Function Execution: 
When an event occurs, AWS Lambda automatically provisions compute resources to run your code. It executes your function in an isolated environment.

### 3. Scaling: 
Lambda scales automatically based on the incoming workload. If many events occur simultaneously, Lambda creates multiple instances of your function to handle them.

### 4. Billing: 
You are billed only for the compute time your function consumes. There’s no need to worry about server maintenance or capacity planning.

## Practical Examples
### 1. Media Transformation
Imagine you’re building an application that handles media files. You can use Lambda to automatically resize images when they’re uploaded to an S3 bucket. Here’s how it works:

- Event: A user uploads an image to S3.
- Lambda Function: Your Lambda function triggers on the S3 upload event.
- Action: The function resizes the image and stores it back in S3.

### 2. Cross-Device Development
Developing applications for different devices can be challenging. Lambda can help by converting media files to different formats suitable for various devices. For example:

- Event: A video is uploaded to S3.
- Lambda Function: Your function converts the video to different resolutions and formats.
- Action: Users can stream the video seamlessly on their phones, tablets, or desktops.

### 3. Real-Time Data Processing
Lambda is excellent for real-time data processing. Let’s say you’re building a chat application:

- Event: A user sends a message.
- Lambda Function: Your function processes the message, checks for profanity, and logs it.
- Action: The chat remains clean, and you have a record of all messages.

## Conclusion
AWS Lambda simplifies serverless computing, allowing you to focus on writing code rather than managing infrastructure. With practical examples like media transformation, cross-device development, and real-time data processing, you can harness the power of Lambda for your applications.

Remember to explore the official AWS Lambda documentation for more details and best practices. Happy coding!
Running SDXL-Lightning on Google Colab
Tags: python, googlecolab, sdxl, generativeai
Published: 2024-02-25 11:58:51


**SDXL-Lightning**
https://huggingface.co/spaces/AP123/SDXL-Lightning

### Step 1. Clone repo & install packages
```zsh
!git clone https://huggingface.co/spaces/AP123/SDXL-Lightning
cd SDXL-Lightning
!pip install transformers diffusers accelerate gradio
```

### Step 2. Modify app.py
Add `share=True` to launch()


### Step 3. Run the app
```zsh
!python app.py
```

This step will take some time since the app requires to download a few models for each step.

Once you finish downloading models, you will see a link of the Gradio app and see something like below.


![Gradio app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejewdmcinrc2p2k211fl.png)
iPhone 15 Pro Max Giveaway!
Published: 2024-02-25 11:34:51

 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0znnzqt3px53k6xr59vf.jpg)
It's time for an exciting giveaway!
We're thrilled to announce that we're giving away the latest iPhone 15 Pro Max to one [lucky winner](https://sites.google.com/d/10obBrRPAQlB3myLxJSQbMWvUJuTxf4CC/p/1cWOy8hSCaF_iSbs8uhSbMzDwnVVIitYs/edit)!

To participate, all you need to do is follow these simple steps:

1️⃣ Like this post.
2️⃣ Follow our page.
3️⃣ Tag 3 friends in the comments who would love to win this iPhone!

That's it! 🎁 The winner will be randomly selected from the eligible participants and announced on [15.03.24].

🏆 Don't miss this chance to get your hands on the most advanced iPhone yet! Enter now and good luck to everyone! 🍀

**[Win iPhone 15 Pro Max](https://sites.google.com/d/10obBrRPAQlB3myLxJSQbMWvUJuTxf4CC/p/1cWOy8hSCaF_iSbs8uhSbMzDwnVVIitYs/edit)**