teleren/devto huggingface dataset:
AWS - Amazon File Cache
Tags: aws, efs, intro, cloudcomputing
Published: 2022-10-15 14:32:42

## Introduction

Very recently AWS introduced a new service called Amazon File Cache. So what is this? Amazon File Cache is a fully managed, scalable, high-speed temporary caching service for files. The files could reside either on-premises (NFS v3) on the cloud, as supported file systems or Simple Storage Service (S3). It also crosses the restriction of geographical boundaries, which means that the on-premises location or cloud location can be spread across the globe.

![Amazon File Cache](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8zvhdt3nxtj038nkbjm.png)

## When to use File Cache

Given the fact that Amazon File Cache can cross the boundaries of geographical restriction, it basically means it can act as proxy over multiple file systems created across regions, thereby providing a seamless access to all the files. As an example, let's consider that you have files stored in S3 buckets in four different regions. If the files from all the regions are required to be accessed by an EC2 instance, then it must be aware of the S3 location, in order to get the file. Given that a File Cache can be created which can sit in front of all the four S3 regions, now the File Cache can be simply mounted as a folder for transparent access. File Cache supports both, lazy-loading (on-demand) and pre-load. This behavior can be configured for both, data and its metadata.

## How to access File Cache

File Cache works with most of the Linux based distributions such as RHEL, CentOS, Suse and Ubuntu. In order to access File Cache from a L based instance, an open-source Lustre client must be installed. Once it is done, File Cache can be mounted as local directory in the instance. The File Cache can be administered from console, cli and sdk.

## Security and Monitoring

File Cache encrypts data at rest and in transit. When File Cache needs to bring data from either S3 or AWS File system, it ensures that the data is encrypted while in transit. For on-premises file systems, it is highly recommended to use VPN in order to ensure privacy during file transfer or use AWS Direct Connect.
Like every other service, File Cache is also integrated with AWS CloudWatch, allowing monitoring health and performance metrics in real time.

## Limitations

File Cache supports only up to 8 file systems or S3 buckets. You cannot mix file system with S3, it has to be all of same type. The minimum size provisioned is 1.2 Tib and then in increments of 2.4 Tib. Metadata requires separate storage, apart from data. There is a limit of 100 File Cache per account. Also, File Cache service is currently available only in the following regions

- United States - North Virginia, Ohio, Oregon
- Asia Pacific - Singapore, Sydney, Tokyo
- Canada - Central
- European- Ireland, London, Frankfurt

Image credits - https://aws.amazon.com

If you liked my article, [Buy me a Coffee](https://www.buymeacoffee.com/vishalraj82)
In One Minute : JIRA
Tags: jira, beginners, productivity, oneminute
Published: 2022-10-15 14:31:25

Jira is a proprietary issue tracking product developed by Atlassian that allows bug tracking, agile, project management and Work management.

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

The product name comes from the second syllable of the Japanese word pronounced as Gojira, which is Japanese for Godzilla.

According to Atlassian, Jira is used for issue tracking and project management by over 180,000 customers in 190 countries.

Jira is written in Java and uses the Pico inversion of control container, Apache OFBiz entity engine, and WebWork 1 technology stack.

Jira has REST, SOAP, and XML-RPC interfaces.
Jira integrates with source control programs such as Clearcase, Concurrent Versions System, Git, Mercurial, Perforce, Subversion, and Team Foundation Server.

It ships with various translations including English, French, German, Japanese, and Spanish.

When launched in 2002, Jira was purely issue tracking software, targeted at software developers.

The app was later adopted by non-IT organizations as a project management tool. 

Official Website :- https://www.atlassian.com/software/jira
Exercise 1
Published: 2022-10-15 14:24:23

---
title: Exercise 1 
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

```javascript 
import React, { useEffect, useState } from "react";

const HelloWorld = () => {
  const [result, setResult] = useState([]);
//   useEffect(() => {
//     filterDeveloper();
//   }, []);
  const data = [
    {
      name: "Rajasekar",
      title: "Developer",
    },
    {
      name: "Ganesh",
      title: "Manager",
    },
    {
      name: "Arun",
      title: "Developer",
    },
  ];

  const filterDeveloper = () => {
    let test = data.filter((item) => {
      return item.title === "Manager";
    });
    setResult(test);
  };
  const style1 = {
    color:"white"
  }
  const style= {
    backgroundColor: "red",
    ...style1
  }



  return (
    <>
    {result.map((item, index) => (
        <div key={item.name} className="test" style={style}>
          {index + 1} {item.name} - {item.title}
        </div>
      ))}
      <button onClick={filterDeveloper}>Test</button>
    </>
  );
};

export default HelloWorld;

```
Do certification really matters..?
Tags: certification, career, devops, azure
Published: 2022-10-15 14:18:52

> Tell me and I forget, teach me and I may remember, involve me and I learn- Benjamin Franklin.

Something very apt to what I feel whenever I take up any certification. Generally, most people in the software industry either love or hate IT certifications. Some take this as proof that they are experts. For some, it is a money-making machine for companies, and these certifications don't hold any true value for them.

**The truth, as always, is somewhere in the middle.**

Certifications, in my opinion, are useful to validate your knowledge on the topic, not so that you can display the badges on LinkedIn (though I do this on occasion), but rather so that you can pursue targeted learning. It provides the fundamental knowledge needed to get experience, gives you a road map and organizes your learning.

I just passed the AZ-104(Azure Administrator Associate) and AZ-305(Designing Microsoft Azure Infrastructure Solutions) exams. Does that imply I have extensive knowledge of Azure? Not at all, no. I have never managed Azure for a full-fledged production project; I have only ever done it for my own personal projects. But I have discovered the fundamentals of the service by working toward the certifications, and I have demonstrated this through the tests. Am I going to present myself as an Azure expert or start consulting as one right away? No, but if I were looking for a new position, I would gladly highlight this achievement to demonstrate to a hiring manager that, despite my lack of experience, I do grasp the basics and have the motivation to move up. Your career is revitalized, which is sometimes necessary.

Consider pursuing a certification to start your educational journey if you feel trapped, overburdened, or unsure of where to focus your time to sharpen your saw.

> We must never be too busy to take time to sharpen the saw- Stephen Covey
Double Depping: Use import maps and deps.ts together
Tags: deno, typescript, webdev, beginners
Published: 2022-10-15 14:18:16

## Import Maps !== Deno Dependency Management

Import maps serve as an **import alias** and not necessarily as a manifest for
dependencies.

Import map keys are to add some sex-appeal: shortcuts, aliases, mirror/redirect URLs, client-side usage, scopes, file system paths, so on and etc.

```json
{
  "imports": {
    "@/", "./where-its-at",
  }
}
```

## `deps.ts`: Just a Typical Script

The practice of using `deps.ts` is for **adding _logic_**. This script's primary
purpose is to **export** your modules and types together from external
dependencies and local libraries.

It's a bit like putting `./node_modules` and `module.exports` together. Mix that
with modern `export` declarations, and –🎉– the real beauty and purpose of Deno becomes more apparent.

## Package and Lock

Use these two files in tandem to manage dependency versions. Whether you want to set your version numbers in the `deps.ts` or `import_maps.json` file is up to you. It could even be irrelevant, depending upon the dependency usage. A single-use helper function, for example, does not need to be updated alongside its parent module.

### Is this Bad for Bundles?

The article _[Why `deps.ts` is Bad in Deno](https://dev.to/wongjiahau/why-deps-ts-and-mod-ts-is-bad-in-deno-bjo)_ points out that the practice of using `deps.ts` prevents tree-shaking; however, Deno's Bundler output is **[intended for consumption in Deno](https://deno.land/manual@v1.26.1/tools/bundler#bundling-for-the-web)**.

#### But it Slows Down Compilation

bUt It sLoWs DoWn CoMpiL— Who cares? Its compilation time is negligible when your project is hosted by **servers powerful enough for edge computing**, like Deno Deploy, Netlify and GitHub Actions. Your local development process can be sped up by utilizing Deno's built-in tools like `deno test` and `deno info`.

## Independence

This mix-and-match method of composing dependencies may seem haphazard, but Deno's compiler _does not mind_.

You do you. The best practice is whatever feels right for your project. Create your own convention with collaborators. Or don't, because it doesn't matter for a random, one-time sandbox repository without much code review.

Or do, because you can be opinionated and unconventional. Your method could lead by example, or you can find many great examples to follow.

**OSS FTW!**

### TLDR

Ryan Dahl explained this in the [10 Things I Regret About Node.js presentation](https://www.youtube.com/watch?v=M3BM9TB-8yA)...probably. (I don't know. It was too long. I didn't watch it.)
xw2juo
Tags: codesandbox, javascript
Published: 2022-10-15 13:57:33

{% codesandbox xw2juo %}
<a href="https://codesandbox.io/s/stupefied-ptolemy-xw2juo?fontsize=14&hidenavigation=1&previewwindow=tests&theme=dark&view=editor">
  <img alt="Edit xw2juo" src="https://codesandbox.io/static/img/play-codesandbox.svg">
</a>
Part4- Context Api in React Class Based Component
Tags: javascript, react, reactredux, coding
Published: 2022-10-15 13:36:04

=> **Here Folder Structure image here**:

![Folder Photo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfvqzm21wzpm0lxelk8d.png)




**I<u>ndex.js Code:-</u>_**

```
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
    <React.StrictMode>
        <App />
    </React.StrictMode>
)
```

**_<u>App.js Code:-</u>_**

```
import React, { Component } from 'react'
import User from './User'
import { Provider } from './Context'

export default class App extends Component {
    state = {
        name: 'Rahul',
        value: 10
    };

    handleClickContext = () => {
        this.setState({
            value: this.state.value + 1
        });
    }

    render() {
        const contextValue = {
            data: this.state,
            handleClick: this.handleClickContext
        };
        return (
            <Provider value={contextValue}>
                <User />
            </Provider>
        )
    }
}


```

**_<u>User.js Code:</u>_**

```
import React, { Component } from 'react'
import Guest from './Guest'

export default class User extends Component {
  render() {
    return (
      <div>
        <h3>User component</h3>
        <Guest />
      </div>
    )
  }
}

```

**<u>_Guest.js Code:_</u>**

```
import React, { Component } from 'react'
import { myContext } from './Context';
// import { Consumer } from './Context'

export default class Guest extends Component {
    static contextType = myContext;

    componentDidMount() {
        console.log(this.context);
    }

    render() {
        console.log('a', this.context);
        const { name, value } = this.context.data;
        return (
            <div>
                <h3>Guest Component</h3>

                {/* <h4>Name: {this.context.data.name} Value: {this.context.data.value}</h4>
                <button onClick={this.context.handleClick}>Change Value</button> */}

                <h4>Name: {name} Value: {value}</h4>
                <button onClick={this.context.handleClick}>Change Value</button>

            </div>
        )
    }
}



```

**_<u>Context.js Code:</u>_**

```
import React from 'react'
export const myContext = React.createContext();
console.log('a', myContext);
export const Provider = myContext.Provider;
// export const Consumer = myContext.Consumer;
```
**Output Photo**

![Output Photo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1pjhna24ewrvsqg3fq5.png)



Thank You.
You can follow us on:
[Youtube ](https://www.youtube.com/c/ULTIMATEPROGRAMMING)
[Instagram](https://www.instagram.com/full_stack_web_developer1/)
How to set the header's Accept-Language with locale value
Tags: microservices, java, webdev, springboot
Published: 2022-10-15 13:35:28

I have a request header `Accept-Language` which can have "en" or "fr" locale. Now one application sends a header where header key will be `locale`. So, to be in the same pace i should set their `locale` value to `Accept-Language`. I cannot do it commonly in localeResolver method. It should be for partucular api so i need to do this in controller. How to achieve this? 
Thanks in advance
Part3- Context Api in React Class Based Component
Tags: javascript, react, reactredux, coding
Published: 2022-10-15 13:25:50

=> **Here Folder Structure image here**:


![Folder Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvdd97gfbbyaq8fulm2r.png)




**I<u>ndex.js Code:-</u>_**

```
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
    <React.StrictMode>
        <App />
    </React.StrictMode>
)
```

**_<u>App.js Code:-</u>_**

```

import React, { Component } from 'react'
import User from './User'

export default class App extends Component {
    render() {
        return (
            <User />
        )
    }
}

```

**_<u>User.js Code:</u>_**

```
import React, { Component } from 'react'
import Guest from './Guest'

export default class User extends Component {
  render() {
    return (
      <div>
        <h3>User component</h3>
        <Guest />
      </div>
    )
  }
}

```

**<u>_Guest.js Code:_</u>**

```
import React, { Component } from 'react'
import { Consumer1 } from './Context'

export default class Guest extends Component {
    render() {
        return (
            <div>
                <h3>Guest Component</h3>
                <Consumer1>
                    {(value) =>
                        <>
                            {value}
                        </>
                    }
                </Consumer1>
            </div>
        )
    }
}


```

**_<u>Context.js Code:</u>_**

```
import React from 'react'
const myContext1 = React.createContext('aksh');
export const Provider1 = myContext1.Provider;
export const Consumer1 = myContext1.Consumer; 
```

**Output Photo**
![Output Photo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/looso9sj3i8yndalk4qt.png)


Thank You.
You can follow us on:
[Youtube ](https://www.youtube.com/c/ULTIMATEPROGRAMMING)
[Instagram](https://www.instagram.com/full_stack_web_developer1/)
Part2- Context Api in React Class Based Component
Tags: react, reactredux, javascript, coding
Published: 2022-10-15 13:17:24

=> **Here Folder Structure image here**:


![Folder Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvdd97gfbbyaq8fulm2r.png)




**I<u>ndex.js Code:-</u>_**

```
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
    <React.StrictMode>
        <App />
    </React.StrictMode>
)
```

**_<u>App.js Code:-</u>_**

```
import React, { Component } from 'react'
import User from './User'
import { Provider1 } from './Context'

export default class App extends Component {
    state = {
        name: 'Rahul',
        value: 10
    }

    handleClickContext = () => {
        this.setState({
            value: this.state.value + 1
        })
    }

    render() {
        const contextValue = {
            data: this.state,
            handleClick: this.handleClickContext
        }

        return (
            // <myContext.Provider value={this.state.name}>
            <Provider1 value={contextValue}>
                <User />
            </Provider1>
        )
    }
}


```

**_<u>User.js Code:</u>_**

```
import React, { Component } from 'react'
import Guest from './Guest'

export default class User extends Component {
  render() {
    return (
      <div>
        <h3>User component</h3>
        <Guest />
      </div>
    )
  }
}

```

**<u>_Guest.js Code:_</u>**

```
import React, { Component } from 'react'
import { Consumer1 } from './Context'

export default class Guest extends Component {
    render() {
        return (
            <div>
                <h3>Guest Component</h3>
                <Consumer1> 
                    {({ data, handleClick }) =>
                        <>

                            <h4>{data.name}</h4>
                            <h4>{data.value}</h4>

                            <button onClick={handleClick}>Change Value</button>
                        </>
                    }
                </Consumer1>
            </div>
        )
    }
}


```

**_<u>Context.js Code:</u>_**

```
import React from 'react'
const myContext1 = React.createContext();
export const Provider1 = myContext1.Provider;
export const Consumer1 = myContext1.Consumer; 
```

Thank You.
You can follow us on:
[Youtube ](https://www.youtube.com/c/ULTIMATEPROGRAMMING)
[Instagram](https://www.instagram.com/full_stack_web_developer1/)
Introduction to Python
Tags: python, machinelearning, datascience, programming
Published: 2022-10-15 12:47:33

### What is python?

Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for web development (server-side), software development, mathematics, and system scripting. Python is a dynamic, interpreted (byte code-compiled) language. There are no type declarations of variables, parameters, functions, or methods in the source code. This makes the code short and flexible, and you lose the compile-time type checking of the source code. Python tracks the types of all values at runtime and flags code that does not make sense as it runs.

### First Python Program

Most programmers start their programming journey by printing “Hello, World!” in the console. It is so much popular that now it became a tradition. So, we will also start by running the hello world program.

```python
>>> print("Hello, World!")
Hello, World!
```

Here `print()` is a function and `“Hello, World!”` . We are passing the string through the `print()`

function and the function is printing the given string in the display.

### Python Syntax

Python’s syntax is so much more readable. It was actually designed for readability and has some similarities to the English language with influence from mathematics.

Python syntax can be executed by writing directly in the Command Line:

```python
>>> print("Hello, World!")
Hello, World!
```

Or by creating a python file on the server, using the .py file extension, and running it in the Command Line:

```python
C:\Users\Your Name>python myfile.py
```

### Python Indentation

Unlike some other programming languages, python uses indentation to indicate a block of code.

If you write this code, you will get an error:

```python
if 5 > 2:
print("Five is greater than two!")
```

Because this code is not properly indented. The number of spaces that you want to give is totally up to you. Giving 4 spaces is a good practice. You also make sure that you are not doing unnecessary indentation otherwise again you will get an error.

```python
if 5 > 2:
 print("Five is greater than two!")
        print("Five is greater than two!")
```

### **Comments**

Sometimes you need to add some text to your code to describe how your code is working. In that case, you have to use the proper commenting rule. Comments start with a `#`, and Python will render the rest of the line as a comment:

```python
#This is an example of a comment
#This is a comment
print("Like and share this post")
```

Comments can also be placed at the end of a line, and Python will ignore the rest of the line:

```python
print("Like and share this post") #This is an example of a comment
```

You can also comment out even multiple lines of code to prevent Python from executing:

```python
#print("Follow Me")
print("Hi there!")
```

you can add a multi-line string (triple quotes) in your code, and place your comment inside it:

```python
"""
This is a multiline
comment.
"""
print("Hello, World!")
```
Positivity in learning
Tags: beginners, positivity, learning
Published: 2022-10-15 12:22:00

Starting out a new journey of learning can seem daunting and it's true to say that you get out of something what you put in. But staying positive in any situation, be it learning, survival or even simply in the workplace, is a KEY factor in succeeding and success. 

I am starting a FED course, and I am feeling nervous; it is an intensive 16-week course that requires 30 hours a week. I have a full-time job already and time management will be key. But, I am positive that I can do it, and I will remember this all the way through. 

Positivity is a state of mind, and you control your mind. Negativity is a poison that can be channelled into positivity. Think for example of a bad teacher telling a pupil they won't succeed as they don't have the brain for it. The pupil has two choices: 1) Believe the teacher and give up or 2) Channel the negativity into a force of motivation and self-determination to prove them wrong, and succeed. 

Nothing is out of our reach as humans. We have the most powerful computer of all, and nothing will ever match it. Even the most powerful computer is programmed by humans and decades of experience and fine tuning. Let's use this brain, channel negativity into positivity and never say "I can't do it". Switch this to "I can and I will". 

I cannot wait to learn FED and help anyone with positivity when they need it.
args and kwargs in python
Tags: python, oops
Published: 2022-10-15 11:59:49


Non keyword arguments (*args)
*args is known as Non keyword arguments which is used to pass the unknown number of arguments or variable number of arguments to the function.
In the function, Non keyword arguments are denoted using asterisk* symbol before the parameter name like as *args, *numbers etc.
The arguments are passed like function (argl, arg2, ..., arg3) and these passed arguments make tuple inside the function with same name as the parameter excluding asterisk *.

Example 1:

```
def func(*args): 
         print('Non keyword arguments:', args) 
         for arg in args: 
               print(arg, end=' ')

func(1, 2, 3, 4)

```
Output

> Non keyword arguments: (1, 2, 3, 4)
> print1234

Example 2:

```
def func(sum, *numbers):
    print('sum =', sum)
     print('Numbers:', numbers)
     for n in numbers:
           sum += n 
           print('Sum of numbers is:', sum)
func(0, 1, 2, 3, 4)
```

Output

> sum = 0
> Numbers: (1, 2, 3, 4)
> Sum of numbers is: 10