teleren/devto huggingface dataset:
My Time at FlatIron.
Published: 2023-01-24 17:36:44

What can you really do in a brief 3 and a half months? Time is a strange concept. We humans give it infinite value , and we might be right to do so, but we can also over estimate and underestimate its capability. It is best to live on our own clock. When I first started a bootcamp 3 and a half months ago, I thought it would never end, but in two days it will be graduating time! When bootcamp was starting I considered so many ways things could go wrong, how I would lose motivation, and or give up. I was not wrong to think this because in the past ,in school, I never really had the desire to get good grades, I never saw the value in an "A". I would live to regret that because I realized its not the grade you get that matters, its the effort you put in. Whether you get an A or an F it dosent matter as long as you try. An A resembles someone who tried or who has innate talent in a subject, but in the real world there aren't grades. We do have ways to measure output, productivity and so on and they provide us with a great deal of information. There is nothing wrong with these barometers but they don't measure the actual motivation of an individual. There is a process to growth. There is a saying. "Hard work beats talent when talent fails to work hard." I think its easy to wave things off as being trivial or meaningless , but those are only excuses. When I would do poorly in school I would justify it saying I didn't try or it does not matter. I could get the grade if had really tried. This might or might not have been true but nothing replaces the effort. We are the ones who determine how important something is in our lives. Therefore what we value will ultimately decide the trajectory of our lives. Going into this bootcamp I decided this was going to be my number one priority. I put this bootcamp above everything else. I made a sacrifice of my time and energy , and now that I am here when all is said and done, I have few regrets. The only regret I have is not having put in more work. I do feel like I have learned a lot, but then again there is so much more to learn, but what I will walk away with is an important lesson,  your success  should be based on being a better you then you were yesterday. The world is constantly changing, so in order to live a healthy and meaningful life we need to grow as well. We need to identify our weak areas and work on them. That way we can venture boldly into new terrain, instead of feeling held back by our concept of who we are and why we cant.
How to associate AWS Elastic IP Address with AWS EC2 Linux Server.
Published: 2023-01-24 17:19:57

This video provides a solution to this problem.

The auto-assigned public IP address associated with my Amazon Elastic Compute Cloud (Amazon EC2) instance changes every time I stop and start the instance. How can I assign a static public IP address to my Windows or Linux EC2 instance that doesn't change when I stop/start the instance?

[](https://www.youtube.com/watch?v=jnjZu8THaU0)
How to create Disclaimer for Website or App
Tags: tutorial
Published: 2023-01-24 17:16:05

A disclaimer is a statement that is used to limit the liability of a website or app owner for the information and activities that take place on their platform. Disclaimers can be used to protect against a wide range of potential liabilities, including errors and omissions, defamation, and intellectual property infringement.

One way to create a disclaimer for your website or app is by using a disclaimer generator tool such as Disclaimer Generator by goonlinetools.

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

**Here's how you can use Disclaimer Generator by goonlinetools to create a disclaimer for your website or app:**

1.  Go to the [Disclaimer Generator](https://www.goonlinetools.com/disclaimer-generator/) website 
2.  Select the type of disclaimer you want to create (e.g. Website Disclaimer, App Disclaimer, etc.)
3.  Fill in the required information, such as your name, the name of your website or app, and the types of information that will be included on your platform.
4.  Customize your disclaimer as needed by editing the provided text.
5.  Once you are satisfied with the final disclaimer, you can download it as a text file or copy it to your website or app.

It's important to note that while a disclaimer can provide some protection, it is not a substitute for legal advice. If you have any questions or concerns about the legal implications of your website or app, you should consult with an attorney.

Another great feature of Disclaimer Generator by goonlinetools is that you can also publish your disclaimer and get a live link, so you don't have to worry about hosting.

Once you have completed creating your disclaimer using the tool, you will be given the option to publish it on the goonlinetools server. This means that you will be provided with a unique URL for your disclaimer, which you can then add to your website or app. This feature is especially useful for those who are not familiar with hosting and website management.

By publishing your disclaimer on the goonlinetools server, you can ensure that your disclaimer is always up-to-date and accessible to users. Additionally, you can also make changes to the disclaimer at any time without the need to re-upload or update it on your website or app.

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

Here is the disclaimer I have created and published using this tool - [https://goonlinetools.com/disclaimer-generator/view/#GoOnlineTools.com_q9vu4f](https://goonlinetools.com/disclaimer-generator/view/#GoOnlineTools.com_q9vu4f)

## Conclusion

Disclaimer Generator by goonlinetools is a comprehensive tool that not only helps you create a legal disclaimer but also provides you with a live link to publish it on the goonlinetools server. This feature is a great way to ensure that your disclaimer is always available to users without the need to worry about hosting and website management.
Getting Hooked on State
Published: 2023-01-24 16:58:27

Once you've gained an understanding of the innerworkings of JavaScript, it's worth it to learn how to work with React within JS. However, doing so will require a bit of a shift in mindset as you learn the different features that will be available to you. One such feature is state - a crucial tool for keeping track of changes to your data. But what exactly is it?

State allows us to keep track of the "state" of a react component. To make use of it, make sure you import useState from react (same source you get React from).

    import React, { useState } from "react";

Then we define a state variable like this:

    const [state, setState] = useState(0);

The useState hook returns an array containing two elements: the state variable (name it whatever you wish, preferably after the "state" you intend to track), and the state setter function (the function you'll use whenever you need to manipulate the state). Passing useState an argument will set the initial state as the value of that argument - in this case, the number 0. When our component first renders, this state will be 0.

So, what's the point of this? Well, it's useful to be able to change the data in our component without having to have a property be passed down from a parent component. Let's look at an example scenario.

    import React, { useState } from "react";

    const [toggle, setToggle] = useState(false);

    function toggleSwitch () {
        setToggle(() => !toggle);
        toggle ? 
            console.log("The switch is on!"): 
            console.log("The switch is off!");
    }

We've created a toggle function! How useful. Let's say we have a JSX element with an onClick listener for this:

    <button onClick={toggleSwitch}>On/Off</button>

Now anytime we click this button, the state of this button will change between on and off, based on the truthiness of the toggle.

Using state in this way lets us make significant changes in the data without having to render components again or take in props from a parent component. What you see here is only the tip of the iceberg. In practice, it's a bit like a fancier version of variable reassignment, isn't it? Use your creativity and go nuts with it. Happy coding, young Padawan.
Removing sensitive data from Git history
Tags: git, programming, python, github
Published: 2023-01-24 16:48:30

Hello folks, this will be a quick but really handy post. Let's say we are working on a side project that we didn't care the sensitive data like credentials of API keys and we want to make the repo public on Github.

I've found a great tool to clear all the commit history of the specific file, in my case it was `.env.example`. 

The tool is called [git-filter-repo](https://github.com/newren/git-filter-repo/) and it is developed with python. 

So, to use the library, first we need to install the python script using:

`pip install git-filter-repo`

and then we are running this code to delete all the history of the selected file:

`git filter-branch --force --index-filter "git rm --cached --ignore-unmatch <the path of file that you want delete>" --prune-empty --tag-name-filter cat -- --all`

When you run the code, you will see the remote branch and local are different. Now, you just need to push your local changes with this command:

`git push origin --force --all`

That's it! Now, when you check the Github, you wont't see any history about that file. 

Hope this will help someone having the same issue.

`
Convert Radians to Degrees
Published: 2023-01-24 16:45:17

When working with rotating view animations or 2d/3d games, you would have to eventually deal with degrees and radians at some point.

There are rare scenerios where you would have to convert radians to degrees since most of the angles are dealt in radians in Swift. But there is no harm to take a look, right?
Before diving into the coding path, let’s get the math part clear.

1 pi radian = 180 degrees


> Note: pi = 3.14


Thus, for converting radians to degrees, you have to multiply it by 180  and divide by pi.

Degrees = Radians * 180 / pi

#Computed Property Extension

One of the easy, clean and efficient way to convert radians to degrees is to extend a computed property to BinaryFloatingPoint which is basically a generic type which includes all the decimal numeric types - Float, Double.


```
extension BinaryFloatingPoint {
   var degrees : Self {
        return self * 180 / .pi
    }
 }
```

Usage:

```
let radians : Double = 2 * .pi // 6.2831...
let degrees = radians.degrees // 360.0 degrees // As a double
let degreesInInt = Int(degrees) // 360 degrees
```

#Extension Methods

Another convienient way of converting radians to degrees is using a method over BinaryFloatingPoint, Double and Float.

```
extension BinaryFloatingPoint {
    func inDegrees() -> Self {
        return self * 180 / .pi 
    }
}
```

Usage:

```
let radians : Float = .pi / 2 // half of a pi
let degrees = radians.inDegrees() // 90.0 degrees // in float
let degreesInInt = Int(degrees) // 90 degrees // as an integer
```

This above method works for decimal based data types. In the case you want degrees to be in integer format, you can convert it to an integer by Int(degrees).


> Note on the performance differences of computed property and method:
For methods, the calculations are done everytime the method is called. Moreover, for the computed properties, once the results are computed for a particular value, it is saved and reused throughout. Thus, saving computational power.


This works! Congratulations! You have successfully converted radians to degrees.

In a similar way if you are looking forward to convert degrees into radians, check out [this article](https://www.swiftanytime.com/how-to-convert-degrees-to-radians-in-swift/). Moreover, if you are looking forward to apply this to angle, you can check out [apple documentation](https://developer.apple.com/documentation/swiftui/angle).

Eat. Sleep. Swift Anytime. Repeat.
Prepare MacOS for interacting with AWS EKS
Tags: eks, aws, cli
Published: 2023-01-24 16:43:42

---
title: Prepare MacOS for interacting with AWS EKS
published: true
description: tools needed for working on EKS from MacOS
tags: EKS, AWS, CLI 
---

Amazon EKS clusters require `kubectl` and the `aws-iam-authenticator` binary to allow IAM authentication for your Kubernetes cluster.

If you do not already have `Homebrew` installed on your Mac, install it with the following command.

```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

## INSTALL TOOLS

- `kubectl`
```bash
brew install kubectl
```

- `aws-iam-authenticator`
```bash
brew install aws-iam-authenticator
```

- `jq`
```bash
brew install jq
```

- `envsubst`
```bash
brew install gettext
brew link --force gettext
```

## Verify

```bash
for command in kubectl aws-iam-authenticator jq envsubst
  do
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"
  done
```

## `eksctl` - a CLI for Amazon EKS
Instead of using AWS console to create EKS cluster, you can use a more simpler but powerful tool.

`eksctl` is a simple CLI tool for creating clusters on EKS - Amazon’s new managed Kubernetes service for EC2. It is written in Go, and uses CloudFormation.

```bash
brew install eksctl
```

Now you are ready to use `eksctl` learn more here <https://eksctl.io/>

## Bouns - Lens

I would recommended Lens - https://k8slens.dev/desktop.html - to manage and troubleshoot your K8s clusters, super easy to use, rich feature and free.


![Lens](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll84k3cb073wfapaskne.png)
What is Deno Part 1
Tags: deno, webdev, typescript, javascript
Published: 2023-01-24 16:34:19

In this short blogpost we will take a look at Deno and write some small apps with it. 

###Introduction

Deno is a runtime for JavaScript , TypeScript which is based on V8 and Rust. It was co-created by Ryan Dahl who also created Node.js. Deno was announced at the JS Conf EU in 2018. In 2022 Deno got a lot of attention recently because since Deno 1.28 it introduced [npm-support](https://deno.com/blog/v1.28)

Denos advantages over Node.js are TypeScript support out of the box and full compatibility with Web-APIs you can use just like in a normal browser.

To install Deno follow the instructions on the [Deno Website](https://deno.land/manual@v1.29.4/getting_started/installation) once you done this you can write your first Deno program: 

```ts
console.log("Hello Deno!")
```
Now you just need to run the deno run command in your terminal to run it:
`deno run 01-hello-world.ts`

Congratulations you wrote your first Deno programm.

### basic webserver

Now we will write a basic webserver using Deno's standard library:
```ts
import { serve } from "https://deno.land/std@0.171.0/http/server.ts";

const port = 8080;

const handler = (request: Request): Response => {
  const body = `Your user-agent is:\n\n${
    request.headers.get("user-agent") ?? "Unknown"
  }`;

  return new Response(body, { status: 200 });
};

console.log(`HTTP webserver running. Access it at: http://localhost:8080/`);
await serve(handler, { port });
```

Note the import statement here we're importing a Deno module just with a weblink using ES modules rather than using Common JS as in Node.js.

You can try the webserver by running `deno run --allow-net HTTP-Server.ts` note the --allow-net statement here, Deno code runs in a safe sandbox by default so you have to grant permissions for example get net access in your app.

You can now run `http://localhost:8080/` and get your displayed which web browser you use.

### npm support

Deno support Node.js npm modles which is handy since there not much Deno native modules this days the following example will import the Express framework:

```ts
import express from "npm:express@^4.17";
const app = express();

app.get("/", (req, res) => {
  res.send("Hello World");
});

app.listen(3000);
console.log("listening on http://localhost:3000/");

```

This is the end of the first part a introduction to Deno comment below if you liked it or not based on the comments I will blog a second part soon stay tuned.
😤 Don’t let anyone steal your bike!
Tags: opensource, tutorial, news, luos
Published: 2023-01-24 16:30:00

In this tutorial series, we'll show you how to make your own Luos app using a fully modular bike alarm as an example. Follow along to learn how to create a custom app with Luos and bring your ideas to life! 

⏩ [Watch](https://www.youtube.com/watch?v=kTr-pwIrRqw)
Contract Types in Solidity
Tags: solidity, ethereum, blockchain, web3
Published: 2023-01-24 16:29:14

Every contract has its type. Contracts may be implicitly converted into the contracts from which they derive. Contracts may be explicitly converted to and from the address type by using the address type conversion function.

Using the contract type as a local variable, you may invoke functions that are associated with the contracted type. Make certain that it is assigned from a location that has the same contract type.

Contracts may also be formed and instantiated (which means they are newly created). More information may be found in the section under "Contracts through new."

- The data representation of a contract is the same as the data representation of the address type, and this type is also utilized in Address Based Identification (ABI).

- Contracts do not provide any assistance to operators.

- The members of contract types are the external functions of the contract, as well as any state variables that have been declared as publicly accessible.

- When dealing with a contract C, you may use type(C) to get information about the contract's type.


For more content, follow me on - https://linktr.ee/shlokkumar2303
Internationalize the paragraphs with JS
Tags: javascript, webdev, beginners, tutorial
Published: 2023-01-24 16:06:35

Using JavaScript, let's create this project

## Code 

### HTML

```html
<button id="changeEnEl">Inglês</button>
<button id="changePtBrEl">Português</button>

<p data-i18n="title"></p>
<p data-i18n="name"></p>
<p data-i18n="password"></p>
```

This code snippet is using a technique called "Internationalization and Localization" (i18n and L10n respectively) to change the language of the text displayed in the three <p> elements. The two buttons will be used to switch between languages. The "data-i18n" attribute on <p> elements is used to identify the specific text that needs to be translated. When the "changeEnEl" button is clicked, the text in <p> elements with the "data-i18n" attribute is replaced with the corresponding English translation. Likewise, when the "alterarPtBrEl" button is clicked, the text is replaced by the corresponding translation in Portuguese.

### JS

```js
'use strict';

const en = {
  title: 'Title',
  name: 'Name',
  password: 'Password',
};

const ptBr = {
  title: 'Titulo',
  name: 'Nome',
  password: 'Senha',
};

const elements = document.querySelectorAll('[data-i18n]');

let i18n = [];

function replaceText(el) {
  const key = el.dataset.i18n;
  el.innerText = i18n[key] || key;
}

function changeLang(lang) {
  i18n = eval(lang);
  elements.forEach((el) => replaceText(el));
}

changeEnEl.addEventListener('click', () => changeLang('en'));
changePtBrEl.addEventListener('click', () => changeLang('ptBr'));
```

It uses the data-i18n attribute to identify elements in the HTML that need to be translated. It then selects all the elements with that attribute using document.querySelectorAll('[data-i18n]').

The function replaceText(el) takes an element as a parameter, and it replaces the inner text of the element with the translation from the i18n object. If the translation is not found, the key is used as a fallback.

The function changeLang(lang) takes a language code as a parameter, it sets the i18n object to the desired language, and calls replaceText(el) for each element with the data-i18n attribute.

The last two lines of code are adding click event listeners to the changeEnEl and changePtBrEl elements respectively. When clicked on it, it will call the changeLang function with the appropriate language code.


## Demo

See below for the complete working project.

{% codepen https://codepen.io/WalterNascimento/pen/KKNoMrL %}

_if you can't see it [click here](https://codepen.io/WalterNascimento/pen/KKNoMrL) and see the final result_


***

## Thanks for reading!

If you have any questions, complaints or tips, you can leave them here in the comments. I will be happy to answer!

😊😊 See you later! 😊😊

***

## Support Me

[Youtube - WalterNascimentoBarroso](https://www.youtube.com/channel/UCXm0xRtDRrdnvkW24WmkBqA)
[Github - WalterNascimentoBarroso](https://github.com/walternascimentobarroso)
[Codepen - WalterNascimentoBarroso](https://codepen.io)
ArtDraw SVG Waves Generator
Published: 2023-01-24 16:05:09

With the [ArtDraw](https://artdraw.muisca.co/) online editor, it is easy to create wave compositions. To do this we select the Waves option from the menu on the right side.

![ArtDraw](https://images2.muisca.co/27/artdraw/8f/PHOTO-63cc5f60cbb32-918383.png)

The function create waves, shows us a drop-down menu, from which we can configure all aspects of the design we want to create.

![ArtDraw](https://images2.muisca.co/27/artdraw/57/PHOTO-63cc64568b961-120727.png)

**We can modify:**
- Number of waves.
- Size of the wave crest.
- Number of wave crests.
- The noise factor that affects the wave.
- And the colors of the wave set.
PNG-JPG Image to SVG Vectors
Published: 2023-01-24 15:54:59

 
 ![Image to vectors with ArtDraw Editor online](https://images2.muisca.co/27/artdraw/9d/PHOTO-63cc72e7a88b1-272368.png)  

[ArtDraw SVG Editor Online  ](https://artdraw.muisca.co/)

PNG, JPG images are a type of bitmap file. This means that there are no lines, fills or any kind of drawing information. There are only dots called pixels, so when you zoom in on an image you can see how those little colored squares form the image. 
A vector image contains all the information to recreate the drawing. Line width and color, fill color, xy coordinates, etc. . . 

With the online drawing program ArtDraw, we can convert images of any type to Vectors. To vectorize an image, first we load it into the program. We can do it from a file on our computer or by pasting the URL. 

![ArtDraw Image to Vector Online](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2czvzk5tcqx08gzn8cu.png)

For best results use images with few colors. And no gradient fills. A good image file to convert to lines should have less than 8 colors and no gradients. After vectorizing the image, we can modify the fill colors, line colors, etc.